diff options
author | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-07-16 14:25:44 +0200 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-07-17 15:29:28 +0200 |
commit | dadb3d344f5327b0e27c559f46051ca522887077 (patch) | |
tree | 8e7f5856efb5e70dcf4cea0e167672e0989c8e13 /src | |
parent | acc0cf3475103fe1bd89950d8fd99f30b419ffa4 (diff) | |
download | libva-v4l2-request-dadb3d344f5327b0e27c559f46051ca522887077.tar.gz libva-v4l2-request-dadb3d344f5327b0e27c559f46051ca522887077.tar.bz2 libva-v4l2-request-dadb3d344f5327b0e27c559f46051ca522887077.zip |
h264: Pass the context to the sub-control functions
Some functions setting the controls in the H264 code will need the context
in order to access the DPB. Make sure that we pass it as an argument.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/h264.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -57,6 +57,7 @@ static int h264_lookup_ref_pic(VAPictureParameterBufferH264 *VAPicture, } static void h264_va_picture_to_v4l2(struct cedrus_data *driver_data, + struct object_context *context, VAPictureParameterBufferH264 *VAPicture, struct v4l2_ctrl_h264_decode_param *decode, struct v4l2_ctrl_h264_pps *pps, @@ -146,6 +147,7 @@ static void h264_va_picture_to_v4l2(struct cedrus_data *driver_data, } static void h264_va_matrix_to_v4l2(struct cedrus_data *driver_data, + struct object_context *context, VAIQMatrixBufferH264 *VAMatrix, struct v4l2_ctrl_h264_scaling_matrix *v4l2_matrix) { @@ -164,6 +166,7 @@ static void h264_va_matrix_to_v4l2(struct cedrus_data *driver_data, } static void h264_va_slice_to_v4l2(struct cedrus_data *driver_data, + struct object_context *context, VASliceParameterBufferH264 *VASlice, VAPictureParameterBufferH264 *VAPicture, struct v4l2_ctrl_h264_slice_param *slice) @@ -241,11 +244,13 @@ int h264_set_controls(struct cedrus_data *driver_data, struct v4l2_ctrl_h264_sps sps = { 0 }; int rc; - h264_va_picture_to_v4l2(driver_data, &surface->params.h264.picture, + h264_va_picture_to_v4l2(driver_data, context, + &surface->params.h264.picture, &decode, &pps, &sps); - h264_va_matrix_to_v4l2(driver_data, &surface->params.h264.matrix, - &matrix); - h264_va_slice_to_v4l2(driver_data, &surface->params.h264.slice, + h264_va_matrix_to_v4l2(driver_data, context, + &surface->params.h264.matrix, &matrix); + h264_va_slice_to_v4l2(driver_data, context, + &surface->params.h264.slice, &surface->params.h264.picture, &slice); rc = v4l2_set_control(driver_data->video_fd, surface->request_fd, |