History

avcodec/vp9: Join extradata buffer pools

Up until now each thread had its own buffer pool for extradata buffers when using frame-threading. Each thread can have at most three references to extradata and in the long run, each thread's bufferpool seems to fill up with three entries. But given that at any given time there can be at most 2 + number of threads entries used (the oldest thread can have two references to preceding frames that are not currently decoded and each thread has its own current frame, but there can be no references to any other frames), this is wasteful. This commit therefore uses a single buffer pool that is synced across threads.

Andreas Rheinhardt committed 4 years ago

Commit eba73141 parent 0c44f631 file · +2 −0Browse files

Unified · Split

libavcodec/vp9.c+2−0
@@ -1845,6 +1845,8 @@ static int vp9_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo · 1844 unmodified lines
1845 return ret;1845 return ret;
1846 }1846 }
1847 }1847 }
1848 ff_refstruct_replace(&s->frame_extradata_pool, ssrc->frame_extradata_pool);
1849 s->frame_extradata_pool_size = ssrc->frame_extradata_pool_size;
1848 1850
1849 s->s.h.invisible = ssrc->s.h.invisible;1851 s->s.h.invisible = ssrc->s.h.invisible;
1850 s->s.h.keyframe = ssrc->s.h.keyframe;1852 s->s.h.keyframe = ssrc->s.h.keyframe;

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