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

Ronald S. Bultje rsbultje at gmail.com
Tue Mar 5 18:34:46 CET 2013


Hi,

On Mon, Mar 4, 2013 at 11:19 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> 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 ?

You mean you'd prefer me to just call the functions
avg/put_h264_qpel8/16_mc00_{8-14}_c instead of
put/avg_pixels_1616/8x8_{8-14}_c? (Asking to prevent me from sending a
patch that does something you didn't mean.)

Ronald


More information about the ffmpeg-devel mailing list