mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
v4l2codecs: h264: Set other field poc if available
Whenever the other field POC is available, pass it back to the driver. This should not be strictly required, but it makes things easier to debug and more forgiven. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2009>
This commit is contained in:
parent
dcd62c35f0
commit
efa360ce82
1 changed files with 10 additions and 2 deletions
|
@ -559,6 +559,7 @@ gst_v4l2_codec_h264_dec_fill_decoder_params (GstV4l2CodecH264Dec * self,
|
||||||
(slice_hdr->field_pic_flag ? V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC : 0) |
|
(slice_hdr->field_pic_flag ? V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC : 0) |
|
||||||
(slice_hdr->bottom_field_flag ? V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD : 0),
|
(slice_hdr->bottom_field_flag ? V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD : 0),
|
||||||
};
|
};
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
switch (picture->field) {
|
switch (picture->field) {
|
||||||
case GST_H264_PICTURE_FIELD_FRAME:
|
case GST_H264_PICTURE_FIELD_FRAME:
|
||||||
|
@ -569,9 +570,15 @@ gst_v4l2_codec_h264_dec_fill_decoder_params (GstV4l2CodecH264Dec * self,
|
||||||
case GST_H264_PICTURE_FIELD_TOP_FIELD:
|
case GST_H264_PICTURE_FIELD_TOP_FIELD:
|
||||||
self->decode_params.top_field_order_cnt = picture->top_field_order_cnt;
|
self->decode_params.top_field_order_cnt = picture->top_field_order_cnt;
|
||||||
self->decode_params.bottom_field_order_cnt = 0;
|
self->decode_params.bottom_field_order_cnt = 0;
|
||||||
|
if (picture->other_field)
|
||||||
|
self->decode_params.bottom_field_order_cnt =
|
||||||
|
picture->other_field->bottom_field_order_cnt;
|
||||||
break;
|
break;
|
||||||
case GST_H264_PICTURE_FIELD_BOTTOM_FIELD:
|
case GST_H264_PICTURE_FIELD_BOTTOM_FIELD:
|
||||||
self->decode_params.top_field_order_cnt = 0;
|
self->decode_params.top_field_order_cnt = 0;
|
||||||
|
if (picture->other_field)
|
||||||
|
self->decode_params.top_field_order_cnt =
|
||||||
|
picture->other_field->top_field_order_cnt;
|
||||||
self->decode_params.bottom_field_order_cnt =
|
self->decode_params.bottom_field_order_cnt =
|
||||||
picture->bottom_field_order_cnt;
|
picture->bottom_field_order_cnt;
|
||||||
break;
|
break;
|
||||||
|
@ -599,6 +606,7 @@ gst_v4l2_codec_h264_dec_fill_decoder_params (GstV4l2CodecH264Dec * self,
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = &self->decode_params.dpb[entry_id++];
|
entry = &self->decode_params.dpb[entry_id++];
|
||||||
|
/* *INDENT-OFF* */
|
||||||
*entry = (struct v4l2_h264_dpb_entry) {
|
*entry = (struct v4l2_h264_dpb_entry) {
|
||||||
/*
|
/*
|
||||||
* The reference is multiplied by 1000 because it's was set as micro
|
* The reference is multiplied by 1000 because it's was set as micro
|
||||||
|
|
Loading…
Reference in a new issue