Change the slice/parameter buffers to be allocated dynamically.
Showing the changes to libavcodec/vaapi_encode.h (1 of 2 files). Show all
Unified · Split
| @@ -35,8 +35,6 @@ enum { · 34 unmodified lines | |||
| 35 | MAX_CONFIG_ATTRIBUTES = 4, | 35 | MAX_CONFIG_ATTRIBUTES = 4, |
| 36 | MAX_GLOBAL_PARAMS = 4, | 36 | MAX_GLOBAL_PARAMS = 4, |
| 37 | MAX_PICTURE_REFERENCES = 2, | 37 | MAX_PICTURE_REFERENCES = 2, |
| 38 | MAX_PICTURE_SLICES = 112, | ||
| 39 | MAX_PARAM_BUFFERS = 128, | ||
| 40 | MAX_REORDER_DELAY = 16, | 38 | MAX_REORDER_DELAY = 16, |
| 41 | MAX_PARAM_BUFFER_SIZE = 1024, | 39 | MAX_PARAM_BUFFER_SIZE = 1024, |
| 42 | }; | 40 | }; |
| @@ -73,7 +71,7 @@ typedef struct VAAPIEncodePicture { · 30 unmodified lines | |||
| 73 | VASurfaceID recon_surface; | 71 | VASurfaceID recon_surface; |
| 74 | 72 | ||
| 75 | int nb_param_buffers; | 73 | int nb_param_buffers; |
| 76 | VABufferID param_buffers[MAX_PARAM_BUFFERS]; | 74 | VABufferID *param_buffers; |
| 77 | 75 | ||
| 78 | AVBufferRef *output_buffer_ref; | 76 | AVBufferRef *output_buffer_ref; |
| 79 | VABufferID output_buffer; | 77 | VABufferID output_buffer; |
| @@ -85,7 +83,7 @@ typedef struct VAAPIEncodePicture { · 5 unmodified lines | |||
| 85 | struct VAAPIEncodePicture *refs[MAX_PICTURE_REFERENCES]; | 83 | struct VAAPIEncodePicture *refs[MAX_PICTURE_REFERENCES]; |
| 86 | 84 | ||
| 87 | int nb_slices; | 85 | int nb_slices; |
| 88 | VAAPIEncodeSlice *slices[MAX_PICTURE_SLICES]; | 86 | VAAPIEncodeSlice *slices; |
| 89 | } VAAPIEncodePicture; | 87 | } VAAPIEncodePicture; |
| 90 | 88 | ||
| 91 | typedef struct VAAPIEncodeContext { | 89 | typedef struct VAAPIEncodeContext { |