This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 023165aecf28c219d8e008bd134a1f52555e5b25 Author: Michael Niedermayer <[email protected]> AuthorDate: Wed Aug 12 05:33:15 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sat Sep 19 14:27:09 2026 +0200 avcodec/huffyuv: seed the median predictor endian independently (cherry picked from commit 0a6145a344c11156f09b67b92654fcafd0b9e42c) Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/huffyuv.h | 2 ++ libavcodec/huffyuvdec.c | 2 +- libavcodec/huffyuvenc.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/huffyuv.h b/libavcodec/huffyuv.h index 62866b7a48..1e792196ad 100644 --- a/libavcodec/huffyuv.h +++ b/libavcodec/huffyuv.h @@ -55,6 +55,8 @@ typedef enum Predictor { MEDIAN, } Predictor; +#define READ_LOWBYTE(plane, bps) ((bps) <= 8 ? (plane)[0] : *(const uint16_t *)(plane) & 0xFF) + int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table, int n); #endif /* AVCODEC_HUFFYUV_H */ diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index c98904d497..3b91043431 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -987,7 +987,7 @@ static int decode_slice(AVCodecContext *avctx, AVFrame *p, int height, break; } - lefttop = p->data[plane][0]; + lefttop = READ_LOWBYTE(p->data[plane], s->bps); decode_plane_bitstream(s, w, plane); add_median_prediction(s, p->data[plane] + fake_stride, p->data[plane], s->temp[0], w, &left, &lefttop); y++; diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c index dd3ed9a996..9aec2cc462 100644 --- a/libavcodec/huffyuvenc.c +++ b/libavcodec/huffyuvenc.c @@ -911,7 +911,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, y++; } - lefttop = p->data[plane][0]; + lefttop = READ_LOWBYTE(p->data[plane], s->bps); for (; y < h; y++) { const uint8_t *dst = p->data[plane] + p->linesize[plane] * y; -- 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]
