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 | 35 | MAX_CONFIG_ATTRIBUTES = 4, |
| 36 | 36 | MAX_GLOBAL_PARAMS = 4, |
| 37 | 37 | MAX_PICTURE_REFERENCES = 2, |
| 38 | − MAX_PICTURE_SLICES = 112, | |
| 39 | − MAX_PARAM_BUFFERS = 128, | |
| 40 | 38 | MAX_REORDER_DELAY = 16, |
| 41 | 39 | MAX_PARAM_BUFFER_SIZE = 1024, |
| 42 | 40 | }; |
| @@ -73,7 +71,7 @@ typedef struct VAAPIEncodePicture { · 30 unmodified lines | ||
| 73 | 71 | VASurfaceID recon_surface; |
| 74 | 72 | |
| 75 | 73 | int nb_param_buffers; |
| 76 | − VABufferID param_buffers[MAX_PARAM_BUFFERS]; | |
| 74 | + VABufferID *param_buffers; | |
| 77 | 75 | |
| 78 | 76 | AVBufferRef *output_buffer_ref; |
| 79 | 77 | VABufferID output_buffer; |
| @@ -85,7 +83,7 @@ typedef struct VAAPIEncodePicture { · 5 unmodified lines | ||
| 85 | 83 | struct VAAPIEncodePicture *refs[MAX_PICTURE_REFERENCES]; |
| 86 | 84 | |
| 87 | 85 | int nb_slices; |
| 88 | − VAAPIEncodeSlice *slices[MAX_PICTURE_SLICES]; | |
| 86 | + VAAPIEncodeSlice *slices; | |
| 89 | 87 | } VAAPIEncodePicture; |
| 90 | 88 | |
| 91 | 89 | typedef struct VAAPIEncodeContext { |