[FFmpeg-devel] [PATCH 6/6] avcodec/hevc: ff_hevc_(qpel/epel)_filters are signed type
Zhao Zhili
quinkblack at foxmail.com
Mon Sep 9 14:56:21 EEST 2024
> On Sep 9, 2024, at 18:35, Anton Khirnov <anton at khirnov.net> wrote:
>
> Quoting Zhao Zhili (2024-09-07 19:13:40)
>> From: Zhao Zhili <zhilizhao at tencent.com>
>>
>> ---
>> libavcodec/hevc/dsp_template.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavcodec/hevc/dsp_template.c b/libavcodec/hevc/dsp_template.c
>> index aebccd1a0c..a0f79c2673 100644
>> --- a/libavcodec/hevc/dsp_template.c
>> +++ b/libavcodec/hevc/dsp_template.c
>> @@ -302,8 +302,8 @@ IDCT_DC(32)
>> ////////////////////////////////////////////////////////////////////////////////
>> #define ff_hevc_pel_filters ff_hevc_qpel_filters
>> #define DECL_HV_FILTER(f) \
>> - const uint8_t *hf = ff_hevc_ ## f ## _filters[mx]; \
>> - const uint8_t *vf = ff_hevc_ ## f ## _filters[my];
>> + const int8_t *hf = ff_hevc_ ## f ## _filters[mx]; \
>> + const int8_t *vf = ff_hevc_ ## f ## _filters[my];
>
> Looks ok, though I wonder why are these then used as intptr_t.
They are accessed as const int8_t * in h256_inter_template.c. For example
static void
put_hevc_pel_pixels_8(int16_t *dst, const uint8_t *src, ptrdiff_t srcstride,
int height, intptr_t mx, intptr_t my, int width) {
const uint8_t *hf = ff_hevc_qpel_filters[mx];
const uint8_t *vf = ff_hevc_qpel_filters[my];
put_pixels_8(dst, src, srcstride, height, hf, vf, width);
}
I experienced a lot of headaches with these macro.
>
> --
> Anton Khirnov
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list