[FFmpeg-devel] [PATCH] Add add_pixels4/8() to h264dsp, and remove add_pixels4 from dsputil.

Michael Niedermayer michaelni at gmx.at
Sun Feb 10 02:49:47 CET 2013


On Sat, Feb 09, 2013 at 03:43:56PM -0800, Ronald S. Bultje wrote:
> From: "Ronald S. Bultje" <rsbultje at gmail.com>
> 
> These functions are mostly H264-specific (the only other user I can
> spot is bink), and this allows us to special-case some functionality
> for H264. Also remove the 16-bit-coeff with >8bpp versions (unused)
> and merge the duplicate 32-bit-coeff for >8bpp (identical).

[...]

> +
> +#include "bit_depth_template.c"
> +
> +static void FUNCC(ff_h264_add_pixels4)(uint8_t *_dst, int16_t *_src, int stride)
> +{
> +    int i;
> +    pixel *dst = (pixel *) _dst;
> +    dctcoef *src = (dctcoef *) _src;

> +    stride /= sizeof(pixel);

a >> should be faster


[...]
> diff --git a/libavcodec/h264dsp.h b/libavcodec/h264dsp.h
> index 4526da8..8f9351a 100644
> --- a/libavcodec/h264dsp.h
> +++ b/libavcodec/h264dsp.h
> @@ -121,6 +121,10 @@ typedef struct H264DSPContext {
>      void (*h264_luma_dc_dequant_idct)(int16_t *output,
>                                        int16_t *input /*align 16*/, int qmul);
>      void (*h264_chroma_dc_dequant_idct)(int16_t *block, int qmul);
> +
> +    /* bypass-transform */
> +    void (*h264_add_pixels8)(uint8_t *dst, int16_t *block, int stride);
> +    void (*h264_add_pixels4)(uint8_t *dst, int16_t *block, int stride);

maybe a function name like add_and_clear_pixels or something similar
is better

also iam not sure the fields of the H264DSPContext context should have
h264_ prefixes but thats quite seperate of this patch, i just realized
now

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

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130210/50bbc923/attachment.asc>


More information about the ffmpeg-devel mailing list