diff options
author | suresh guttula <[email protected]> | 2019-04-11 10:21:56 +0530 |
---|---|---|
committer | Leo Liu <[email protected]> | 2019-04-16 10:15:09 -0400 |
commit | d98f6380cb0b306f636175c1b3465dbcccadb4e9 (patch) | |
tree | 1f5673c5ec1f74cb86400e656d6904d692b70140 /src | |
parent | 05cc018ae6f91ccdb96bc0badcbb25124ee2275e (diff) |
st/va/enc: Add support for frame_cropping_flag of VAEncSequenceParameterBufferH264
This patch will add support for frame_cropping when the input size is not
matched with aligned size. Currently vaapi driver ignores frame cropping
values provided by client. This change will update SPS nalu with proper
cropping values.
Signed-off-by: Satyajit Sahu <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/va/picture_h264_enc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/picture_h264_enc.c b/src/gallium/state_trackers/va/picture_h264_enc.c index abfd39633de..f46b3425566 100644 --- a/src/gallium/state_trackers/va/picture_h264_enc.c +++ b/src/gallium/state_trackers/va/picture_h264_enc.c @@ -127,6 +127,14 @@ vlVaHandleVAEncSequenceParameterBufferTypeH264(vlVaDriver *drv, vlVaContext *con context->desc.h264enc.rate_ctrl.frame_rate_num = h264->time_scale / 2; context->desc.h264enc.rate_ctrl.frame_rate_den = h264->num_units_in_tick; context->desc.h264enc.pic_order_cnt_type = h264->seq_fields.bits.pic_order_cnt_type; + + if (h264->frame_cropping_flag) { + context->desc.h264enc.pic_ctrl.enc_frame_cropping_flag = h264->frame_cropping_flag; + context->desc.h264enc.pic_ctrl.enc_frame_crop_left_offset = h264->frame_crop_left_offset; + context->desc.h264enc.pic_ctrl.enc_frame_crop_right_offset = h264->frame_crop_right_offset; + context->desc.h264enc.pic_ctrl.enc_frame_crop_top_offset = h264->frame_crop_top_offset; + context->desc.h264enc.pic_ctrl.enc_frame_crop_bottom_offset = h264->frame_crop_bottom_offset; + } return VA_STATUS_SUCCESS; } |