File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -219,9 +219,23 @@ static void h264_va_picture_to_v4l2(struct request_data *driver_data,
219
219
struct v4l2_ctrl_h264_pps * pps ,
220
220
struct v4l2_ctrl_h264_sps * sps )
221
221
{
222
+ unsigned char * b ;
223
+ unsigned char nal_ref_idc ;
224
+ unsigned char nal_unit_type ;
225
+
226
+ /* Extract missing nal_ref_idc and nal_unit_type */
227
+ b = surface -> source_data ;
228
+ if (context -> h264_start_code )
229
+ b += 3 ;
230
+ nal_ref_idc = (b [0 ] >> 5 ) & 0x3 ;
231
+ nal_unit_type = b [0 ] & 0x1f ;
232
+
222
233
h264_fill_dpb (driver_data , context , decode );
223
234
224
235
decode -> num_slices = surface -> slices_count ;
236
+ decode -> nal_ref_idc = nal_ref_idc ;
237
+ if (nal_unit_type == 5 )
238
+ decode -> flags = V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC ;
225
239
decode -> top_field_order_cnt = VAPicture -> CurrPic .TopFieldOrderCnt ;
226
240
decode -> bottom_field_order_cnt = VAPicture -> CurrPic .BottomFieldOrderCnt ;
227
241
You can’t perform that action at this time.
0 commit comments