This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 90243291fd4a033b770528736b8a853fd44165a5 Author: Wu Jianhua <[email protected]> AuthorDate: Tue Apr 15 04:45:46 2025 +0800 Commit: jianhuaw <[email protected]> CommitDate: Sun Nov 29 10:42:10 2026 +0000 avcodec/h26x/h2656_inter_template: fix put chroma functions for high bitdepth Signed-off-by: Wu Jianhua <[email protected]> --- libavcodec/h26x/h2656_inter_template.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/libavcodec/h26x/h2656_inter_template.c b/libavcodec/h26x/h2656_inter_template.c index ba09bb2d24..c1bea72217 100644 --- a/libavcodec/h26x/h2656_inter_template.c +++ b/libavcodec/h26x/h2656_inter_template.c @@ -342,50 +342,56 @@ static void FUNC(put_uni_luma_w_hv)(uint8_t *_dst, const ptrdiff_t _dst_stride, filter[2] * src[x + stride] + \ filter[3] * src[x + 2 * stride]) -static void FUNC(put_chroma_h)(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, +static void FUNC(put_chroma_h)(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); const int8_t *filter = hf; + const int shift = FFMIN(4, BIT_DEPTH - 8); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) - dst[x] = CHROMA_FILTER(src, 1) >> (BIT_DEPTH - 8); + dst[x] = CHROMA_FILTER(src, 1) >> shift; src += src_stride; dst += MAX_PB_SIZE; } } -static void FUNC(put_chroma_v)(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, +static void FUNC(put_chroma_v)(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); const int8_t *filter = vf; + const int shift = FFMIN(4, BIT_DEPTH - 8); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) - dst[x] = CHROMA_FILTER(src, src_stride) >> (BIT_DEPTH - 8); + dst[x] = CHROMA_FILTER(src, src_stride) >> shift; src += src_stride; dst += MAX_PB_SIZE; } } -static void FUNC(put_chroma_hv)(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, +static void FUNC(put_chroma_hv)(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) { - int16_t tmp_array[(MAX_PB_SIZE + CHROMA_EXTRA) * MAX_PB_SIZE]; - int16_t *tmp = tmp_array; + tpixel tmp_array[(MAX_PB_SIZE + CHROMA_EXTRA) * MAX_PB_SIZE]; + tpixel *tmp = tmp_array; const pixel *src = (const pixel *)_src; + tpixel *dst = (tpixel *)_dst; const ptrdiff_t src_stride = _src_stride / sizeof(pixel); const int8_t *filter = hf; + const int shift = FFMIN(4, BIT_DEPTH - 8); src -= CHROMA_EXTRA_BEFORE * src_stride; for (int y = 0; y < height + CHROMA_EXTRA; y++) { for (int x = 0; x < width; x++) - tmp[x] = CHROMA_FILTER(src, 1) >> (BIT_DEPTH - 8); + tmp[x] = CHROMA_FILTER(src, 1) >> shift; src += src_stride; tmp += MAX_PB_SIZE; } -- 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]
