[FFmpeg-devel] [PATCH] postproc: add basic deblock filter visualization support#
Michael Niedermayer
michaelni at gmx.at
Wed Sep 24 17:12:03 CEST 2014
On Fri, Sep 19, 2014 at 04:42:28PM +0200, Clément Bœsch wrote:
> On Fri, Sep 19, 2014 at 03:44:31PM +0200, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > libpostproc/postprocess.c | 36 +++++++++++++++++++++++++++++++++++-
> > libpostproc/postprocess_internal.h | 1 +
> > libpostproc/postprocess_template.c | 14 ++++++++++----
> > 3 files changed, 46 insertions(+), 5 deletions(-)
> >
> > diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
> > index b6da294..de95745 100644
> > --- a/libpostproc/postprocess.c
> > +++ b/libpostproc/postprocess.c
> > @@ -151,6 +151,7 @@ static const struct PPFilter filters[]=
> > {"tn", "tmpnoise", 1, 7, 8, TEMP_NOISE_FILTER},
> > {"fq", "forcequant", 1, 0, 0, FORCE_QUANT},
> > {"be", "bitexact", 1, 0, 0, BITEXACT},
> > + {"vi", "visualize", 1, 0, 0, VISUALIZE},
> > {NULL, NULL,0,0,0,0} //End Marker
> > };
> >
> > @@ -430,7 +431,7 @@ static inline void horizX1Filter(uint8_t *src, int stride, int QP)
> > * accurate deblock filter
> > */
> > static av_always_inline void do_a_deblock_C(uint8_t *src, int step,
> > - int stride, const PPContext *c)
> > + int stride, const PPContext *c, int mode)
> > {
> > int y;
> > const int QP= c->QP;
> > @@ -485,6 +486,32 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step,
> > sums[8] = sums[7] - src[3*step] + last;
> > sums[9] = sums[8] - src[4*step] + last;
> >
> > + if (mode & VISUALIZE) {
> > +// src[0*step] = av_clip_uint8(src[0*step]+32);
> > +// src[1*step] = av_clip_uint8(src[1*step]-32);
> > +// src[2*step] = av_clip_uint8(src[2*step]+32);
> > +// src[3*step] = av_clip_uint8(src[3*step]-32);
> > +// src[4*step] = av_clip_uint8(src[4*step]+32);
> > +// src[5*step] = av_clip_uint8(src[5*step]-32);
> > +// src[6*step] = av_clip_uint8(src[6*step]+32);
> > +// src[7*step] = av_clip_uint8(src[7*step]-32);
> > + src[0*step] =
> > + src[1*step] =
> > + src[2*step] =
> > + src[3*step] =
> > + src[4*step] =
> > + src[5*step] =
> > + src[6*step] =
> > + src[7*step] = 128;
> > +// src[0*step]= av_clip_uint8((-sums[0] - sums[2] + 22*src[0*step])>>3);
> > +// src[1*step]= av_clip_uint8((-sums[1] - sums[3] + 22*src[1*step])>>3);
> > +// src[2*step]= av_clip_uint8((-sums[2] - sums[4] + 22*src[2*step])>>3);
> > +// src[3*step]= av_clip_uint8((-sums[3] - sums[5] + 22*src[3*step])>>3);
> > +// src[4*step]= av_clip_uint8((-sums[4] - sums[6] + 22*src[4*step])>>3);
> > +// src[5*step]= av_clip_uint8((-sums[5] - sums[7] + 22*src[5*step])>>3);
> > +// src[6*step]= av_clip_uint8((-sums[6] - sums[8] + 22*src[6*step])>>3);
> > +// src[7*step]= av_clip_uint8((-sums[7] - sums[9] + 22*src[7*step])>>3);
> > + }
>
> If you want to add dead code, please at least explain above why it should
> be kept.
removed
>
> [...]
>
> No opinion on the rest of the patchset; don't forget to bump micro if you
> apply.
bumped minor
applied
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140924/0ae66a6c/attachment.asc>
More information about the ffmpeg-devel
mailing list