[FFmpeg-devel] [PATCH 7/7] utvideoenc: use dsp.sub_hfyu_median_prediction

Derek Buitenhuis derek.buitenhuis at gmail.com
Wed Aug 22 17:15:42 CEST 2012


On 22/08/2012 10:26 AM, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavcodec/utvideoenc.c |   26 ++++++--------------------
>  1 file changed, 6 insertions(+), 20 deletions(-)

[...]

> -static void median_predict(uint8_t *src, uint8_t *dst, int stride,
> +static void median_predict(UtvideoContext *c, uint8_t *src, uint8_t *dst, int stride,
>                             int width, int height)

Now that the context is passed, we could cut down on other argument passing, but
that might just make it uglier, and is outside the scope of this patch. Just noting.

> -    src += stride;
> +    A=C=0;

s/=/ = /

> +    for (j = 1; j < height; j++) {
> +        c->dsp.sub_hfyu_median_prediction(dst, src-stride, src, width, &A, &C);

s/-/ - /

> +            median_predict(c, src + sstart * stride, dst + sstart * width,
>                             stride, width, send - sstart);

So that's where I failed at my attempt...

Looks OK.

- Derek



More information about the ffmpeg-devel mailing list