[FFmpeg-devel] [PATCH] RV30 loop filter

Michael Niedermayer michaelni
Sat Dec 13 22:23:50 CET 2008


On Sat, Dec 13, 2008 at 01:19:08PM +0200, Kostya wrote:
> $subj

> Index: libavcodec/rv30.c
> ===================================================================
> --- libavcodec/rv30.c	(revision 15993)
> +++ libavcodec/rv30.c	(working copy)
> @@ -112,6 +112,137 @@
>          return rv30_b_types[code];
>  }
>  
> +static inline void rv30_weak_loop_filter(uint8_t *src, const int step,
> +                                         const int stride, const int lim)
> +{
> +    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
> +    int i, diff;
> +
> +    for(i = 0; i < 4; i++){
> +        diff = ((src[-2*step] - src[1*step]) - (src[-1*step] - src[0*step])*4) >> 3;
> +        diff = av_clip(diff, -lim, lim);
> +        src[-1*step] = cm[src[-1*step] + diff];
> +        src[ 0*step] = cm[src[ 0*step] - diff];
> +        src += stride;
> +    }
> +}
> +
> +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?

the code is not bitexact yet?

anyway this code looks cleaner than rv40 ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081213/d66bea4a/attachment.pgp>



More information about the ffmpeg-devel mailing list