diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-08 21:03:27 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-12 11:08:19 +0200 |
commit | 788892d647636b314fa23df8eaaa3f016809ce0a (patch) | |
tree | 2cc6e0e12efe820f83cd1f393061b80395173f0a /libavcodec/mpegvideo.h | |
parent | a95591dbfde3a9347cdfe6537243957e65d2d8ea (diff) | |
download | ffmpeg-788892d647636b314fa23df8eaaa3f016809ce0a.tar.gz |
avcodec/mpegvideo, mpegpicture: Add buffer pool
This avoids constant allocations+frees and will also allow
to simply switch to the RefStruct API, thereby avoiding
the overhead of the AVBuffer API.
It also simplifies the code, because it removes the "needs_realloc"
field: It was added in 435c0b87d28b48dc2e0360adc404a0e2d66d16a0,
before the introduction of the AVBuffer API: given that these buffers
may be used by different threads, they were not freed immediately
and instead were marked as being freed later by setting needs_realloc.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r-- | libavcodec/mpegvideo.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index a8ed1b60b6..f5ae0d1ca0 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -132,6 +132,8 @@ typedef struct MpegEncContext { Picture **input_picture; ///< next pictures on display order for encoding Picture **reordered_input_picture; ///< pointer to the next pictures in coded order for encoding + BufferPoolContext buffer_pools; + int64_t user_specified_pts; ///< last non-zero pts from AVFrame which was passed into avcodec_send_frame() /** * pts difference between the first and second input frame, used for |