ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> | Fri Jun 13 03:04:45 2025 +0200| [70ce68d0212f7c1fd9b453fa203371dba05fb3af] | committer: Andreas Rheinhardt
avcodec/mpegvideo: Don't reset AC values of upper-left luma block Said block will only be referenced by blocks from the same macroblock, which will read the new AC values instead of the reset values from this function. Signed-off-by: Andreas Rheinhardt <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70ce68d0212f7c1fd9b453fa203371dba05fb3af --- libavcodec/mpegvideo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index a27efa8b89..b481d1eef4 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -506,7 +506,9 @@ void ff_clean_intra_table_entries(MpegEncContext *s) /* ac pred */ int16_t (*ac_val)[16] = s->ac_val[0]; av_assume(!((uintptr_t)ac_val & 0xF)); - memset(ac_val[xy ], 0, 2 * sizeof(*ac_val)); + // Don't reset the upper-left luma block, as it will only ever be + // referenced by blocks from the same macroblock. + memset(ac_val[xy + 1], 0, sizeof(*ac_val)); memset(ac_val[xy + wrap], 0, 2 * sizeof(*ac_val)); /* ac pred */ memset(ac_val[uxy], 0, sizeof(*ac_val)); _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
