History

avcodec/mpegvideo: Zero-init mbintra_table

Up until now, they are marked as dirty (filled with 1), meaning that the entries are in need of a reset via ff_clean_intra_table_entries(); but actually, the entries are initialized to the state that ff_clean_intra_table_entries() produces, so they can be marked as non-dirty (i.e. filled with 0).

Andreas Rheinhardt committed 1 year ago

Commit c4fd33a1 parent c4ebe551 file · +1 −2Browse files

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

Unified · Split

libavcodec/mpegvideo.c+1−2
@@ -361,9 +361,8 @@ av_cold int ff_mpv_init_context_frame(MpegEncContext *s) · 360 unmodified lines
361361 // Note the + 1 is for a quicker MPEG-4 slice_end detection
362362 if (!(s->mbskip_table = av_mallocz(mb_array_size + 2)) ||
363363 /* which mb is an intra block, init macroblock skip table */
364− !(s->mbintra_table = av_malloc(mb_array_size)))
364+ !(s->mbintra_table = av_mallocz(mb_array_size)))
365365 return AVERROR(ENOMEM);
366− memset(s->mbintra_table, 1, mb_array_size);
367366
368367 ALLOC_POOL(qscale_table, mv_table_size, 0);
369368 ALLOC_POOL(mb_type, mv_table_size * sizeof(uint32_t), 0);

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