[FFmpeg-devel] [PATCH] RV30 Loop Filter, should be final version
Kostya
kostya.shishkov
Thu Dec 18 07:12:44 CET 2008
On Thu, Dec 18, 2008 at 05:11:54AM +0100, Michael Niedermayer wrote:
> On Wed, Dec 17, 2008 at 10:24:40PM +0200, Kostya wrote:
> > $subj
> >
> > Tested for bitexactness too.
>
> > Index: libavcodec/rv30data.h
> > ===================================================================
> > --- libavcodec/rv30data.h (revision 16095)
> > +++ libavcodec/rv30data.h (working copy)
> > @@ -171,4 +171,17 @@
> > 2, 7, 8, 4, 0, 6, 1, 5, 3,
> > 2, 8, 3, 0, 7, 4, 1, 6, 5,
> > };
> > +
> > +/**
> > + * Loop filter limits are taken from this table.
> > + */
> > +static const uint8_t rv30_loop_filt_lim[7][32] = {
> > + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5 },
> > + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4 },
> > + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5 },
> > + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 },
> > + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7 },
> > + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8 },
> > + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9 }
> > +};
> [...]
> > +static void rv30_loop_filter(RV34DecContext *r, int row)
> > +{
> > + MpegEncContext *s = &r->s;
> > + int mb_pos, mb_x;
> > + int i, j, k;
> > + uint8_t *Y, *C;
>
> > + int strength = 0;//FIXME how to determine correct value?
>
> 0 is correct? that is bitexact ?
> then the comment is wrong, the variable unneeded and the table too big
Well, theoretically it should take strength value in the range 0-6 but the only
place it's initialized deblocking strength is always zero (i.e. called
SetDeblockingStrength(ctx, 0) in one place and that's all). Maybe they hadn't
decided where to pass or how to adapt deblocking strength and left this.
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
More information about the ffmpeg-devel
mailing list