[FFmpeg-devel] [PATCH 1/4] dsputil: make square put/avg_pixels functions local to h264qpel.

Michael Niedermayer michaelni at gmx.at
Mon Mar 4 20:19:09 CET 2013


On Sun, Mar 03, 2013 at 03:47:09PM -0800, Ronald S. Bultje wrote:
> From: "Ronald S. Bultje" <rsbultje at gmail.com>
> 
> Put a copy of the 8bit functions only in dsputil, where they are used
> for some other things (e.g. mpeg4qpel, mspel, cavsqpel). We could perhaps
> also try to share specifically the 8bit functions from h264qpel between
> it and the others, but that will be slightly more complicated.
> ---
[...]

> diff --git a/libavcodec/h264qpel_template.c b/libavcodec/h264qpel_template.c
> index 95950f4..88adb15 100644
> --- a/libavcodec/h264qpel_template.c
> +++ b/libavcodec/h264qpel_template.c
> @@ -532,29 +532,42 @@ H264_MC(avg_, 16)
>  #undef op2_avg
>  #undef op2_put
>  
> +static void FUNCC(put_pixels8x8)(uint8_t *dst, uint8_t *src, int stride) {
> +  FUNCC(put_pixels8)(dst, src, stride, 8);
> +}
> +static void FUNCC(avg_pixels8x8)(uint8_t *dst, uint8_t *src, int stride) {
> +  FUNCC(avg_pixels8)(dst, src, stride, 8);
> +}
> +static void FUNCC(put_pixels16x16)(uint8_t *dst, uint8_t *src, int stride) {
> +  FUNCC(put_pixels16)(dst, src, stride, 16);
> +}
> +static void FUNCC(avg_pixels16x16)(uint8_t *dst, uint8_t *src, int stride) {
> +  FUNCC(avg_pixels16)(dst, src, stride, 16);
> +}
> +
>  #if BIT_DEPTH == 8
> -#   define put_h264_qpel8_mc00_8_c  ff_put_pixels8x8_8_c
> -#   define avg_h264_qpel8_mc00_8_c  ff_avg_pixels8x8_8_c
> -#   define put_h264_qpel16_mc00_8_c ff_put_pixels16x16_8_c
> -#   define avg_h264_qpel16_mc00_8_c ff_avg_pixels16x16_8_c
> +#   define put_h264_qpel8_mc00_8_c  put_pixels8x8_8_c
> +#   define avg_h264_qpel8_mc00_8_c  avg_pixels8x8_8_c
> +#   define put_h264_qpel16_mc00_8_c put_pixels16x16_8_c
> +#   define avg_h264_qpel16_mc00_8_c avg_pixels16x16_8_c
>  #elif BIT_DEPTH == 9
> -#   define put_h264_qpel8_mc00_9_c  ff_put_pixels8x8_9_c
> -#   define avg_h264_qpel8_mc00_9_c  ff_avg_pixels8x8_9_c
> -#   define put_h264_qpel16_mc00_9_c ff_put_pixels16x16_9_c
> -#   define avg_h264_qpel16_mc00_9_c ff_avg_pixels16x16_9_c
> +#   define put_h264_qpel8_mc00_9_c  put_pixels8x8_9_c
> +#   define avg_h264_qpel8_mc00_9_c  avg_pixels8x8_9_c
> +#   define put_h264_qpel16_mc00_9_c put_pixels16x16_9_c
> +#   define avg_h264_qpel16_mc00_9_c avg_pixels16x16_9_c

are these defines still needed after duplicating the functions ?


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

Those who are best at talking, realize last or never when they are wrong.
-------------- 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/20130304/269dbce7/attachment.asc>


More information about the ffmpeg-devel mailing list