diff options
author | Jun Zhao <mypopydev@gmail.com> | 2017-08-24 09:13:01 +0800 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-02-20 22:04:12 +0000 |
commit | c8e135ea9225137050a6315fd9ba9c0f242c90b6 (patch) | |
tree | f019e240ae6f9806d321545b7e6fde4971196b09 /libavcodec/vaapi_encode.h | |
parent | 254e728d207c173a3714e6a01c9d68fcb3af8b73 (diff) | |
download | ffmpeg-streaming-c8e135ea9225137050a6315fd9ba9c0f242c90b6.zip ffmpeg-streaming-c8e135ea9225137050a6315fd9ba9c0f242c90b6.tar.gz |
vaapi_encode: Allocate slice structures and parameter buffers dynamically
This removes the arbitrary limit on the allowed number of slices and
parameter buffers.
From ffmpeg commit e4a6eb70f471eda36592078e8fa1bad87fc9df73.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavcodec/vaapi_encode.h')
-rw-r--r-- | libavcodec/vaapi_encode.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/vaapi_encode.h b/libavcodec/vaapi_encode.h index 1b0fed8..31c3790 100644 --- a/libavcodec/vaapi_encode.h +++ b/libavcodec/vaapi_encode.h @@ -35,8 +35,6 @@ enum { MAX_CONFIG_ATTRIBUTES = 4, MAX_GLOBAL_PARAMS = 4, MAX_PICTURE_REFERENCES = 2, - MAX_PICTURE_SLICES = 112, - MAX_PARAM_BUFFERS = 128, MAX_REORDER_DELAY = 16, MAX_PARAM_BUFFER_SIZE = 1024, }; @@ -73,7 +71,7 @@ typedef struct VAAPIEncodePicture { VASurfaceID recon_surface; int nb_param_buffers; - VABufferID param_buffers[MAX_PARAM_BUFFERS]; + VABufferID *param_buffers; AVBufferRef *output_buffer_ref; VABufferID output_buffer; @@ -85,7 +83,7 @@ typedef struct VAAPIEncodePicture { struct VAAPIEncodePicture *refs[MAX_PICTURE_REFERENCES]; int nb_slices; - VAAPIEncodeSlice *slices[MAX_PICTURE_SLICES]; + VAAPIEncodeSlice *slices; } VAAPIEncodePicture; typedef struct VAAPIEncodeContext { |