This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit b81380a95d665bbf71bbc11ae714bc8444c34f0d Author: Wu Jianhua <[email protected]> AuthorDate: Tue Apr 15 04:45:30 2025 +0800 Commit: jianhuaw <[email protected]> CommitDate: Sun Nov 29 10:42:10 2026 +0000 avcodec/h26x/h2656_inter_template: fix put pixel functions for high bitdepth Signed-off-by: Wu Jianhua <[email protected]> --- libavcodec/h26x/h2656_inter_template.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/libavcodec/h26x/h2656_inter_template.c b/libavcodec/h26x/h2656_inter_template.c index 864f6c7e7d..c8795a4314 100644 --- a/libavcodec/h26x/h2656_inter_template.c +++ b/libavcodec/h26x/h2656_inter_template.c @@ -26,16 +26,17 @@ #define LUMA_EXTRA_BEFORE 3 #define LUMA_EXTRA 7 -static void FUNC(put_pixels)(int16_t *dst, +static void FUNC(put_pixels)(int16_t *_dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width) { const pixel *src = (const pixel *)_src; + tpixel *dst = (tpixel *)_dst; const ptrdiff_t src_stride = _src_stride / sizeof(pixel); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) - dst[x] = src[x] << (14 - BIT_DEPTH); + dst[x] = (src[x] << (FFMAX(2, 14 - BIT_DEPTH))); src += src_stride; dst += MAX_PB_SIZE; } @@ -66,17 +67,13 @@ static void FUNC(put_uni_w_pixels)(uint8_t *_dst, const ptrdiff_t _dst_stride, pixel *dst = (pixel *)_dst; const ptrdiff_t src_stride = _src_stride / sizeof(pixel); const ptrdiff_t dst_stride = _dst_stride / sizeof(pixel); - const int shift = denom + 14 - BIT_DEPTH; -#if BIT_DEPTH < 14 + const int shift = denom + FFMAX(2, 14 - BIT_DEPTH); const int offset = 1 << (shift - 1); -#else - const int offset = 0; -#endif const int ox = _ox * (1 << (BIT_DEPTH - 8)); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { - const int v = (src[x] << (14 - BIT_DEPTH)); + const int v = (src[x] << (FFMAX(2, 14 - BIT_DEPTH))); dst[x] = av_clip_pixel(((v * wx + offset) >> shift) + ox); } src += src_stride; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
