lavc/vaapi_encode: Change the slice/parameter buffers to dynamic alloc.

Change the slice/parameter buffers to be allocated dynamically.

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
This commit is contained in:
Jun Zhao 2017-08-24 09:13:01 +08:00 committed by Mark Thompson
parent 385cafb07a
commit e4a6eb70f4
2 changed files with 32 additions and 16 deletions

View file

@ -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 {