History

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.

Andreas Rheinhardt committed 1 year ago

Commit 70ce68d1 parent dcd74081 file · +3 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/mpegvideo.c+3−1
@@ -506,7 +506,9 @@ void ff_clean_intra_table_entries(MpegEncContext *s) · 505 unmodified lines
506 /* ac pred */506 /* ac pred */
507 int16_t (*ac_val)[16] = s->ac_val[0];507 int16_t (*ac_val)[16] = s->ac_val[0];
508 av_assume(!((uintptr_t)ac_val & 0xF));508 av_assume(!((uintptr_t)ac_val & 0xF));
509 memset(ac_val[xy ], 0, 2 * sizeof(*ac_val));509 // Don't reset the upper-left luma block, as it will only ever be
510 // referenced by blocks from the same macroblock.
511 memset(ac_val[xy + 1], 0, sizeof(*ac_val));
510 memset(ac_val[xy + wrap], 0, 2 * sizeof(*ac_val));512 memset(ac_val[xy + wrap], 0, 2 * sizeof(*ac_val));
511 /* ac pred */513 /* ac pred */
512 memset(ac_val[uxy], 0, sizeof(*ac_val));514 memset(ac_val[uxy], 0, sizeof(*ac_val));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t