Lines Matching refs:gb

72     GetBitContext gb;
74 init_get_bits(&gb, h->payload, h->payload_size_bits);
78 h->cpb_removal_delay = get_bits_long(&gb, sps->cpb_removal_delay_length);
79 h->dpb_output_delay = get_bits_long(&gb, sps->dpb_output_delay_length);
84 h->pic_struct = get_bits(&gb, 4);
93 if (get_bits(&gb, 1)) { /* clock_timestamp_flag */
97 h->ct_type |= 1 << get_bits(&gb, 2);
98 skip_bits(&gb, 1); /* nuit_field_based_flag */
99 counting_type = get_bits(&gb, 5); /* counting_type */
100 full_timestamp_flag = get_bits(&gb, 1);
101 skip_bits(&gb, 1); /* discontinuity_flag */
102 cnt_dropped_flag = get_bits(&gb, 1); /* cnt_dropped_flag */
105 tc->frame = get_bits(&gb, 8); /* n_frames */
108 tc->seconds = get_bits(&gb, 6); /* seconds_value 0..59 */
109 tc->minutes = get_bits(&gb, 6); /* minutes_value 0..59 */
110 tc->hours = get_bits(&gb, 5); /* hours_value 0..23 */
113 if (get_bits(&gb, 1)) { /* seconds_flag */
114 tc->seconds = get_bits(&gb, 6);
115 if (get_bits(&gb, 1)) { /* minutes_flag */
116 tc->minutes = get_bits(&gb, 6);
117 if (get_bits(&gb, 1)) /* hours_flag */
118 tc->hours = get_bits(&gb, 5);
124 skip_bits(&gb,
136 static int decode_picture_timing(H264SEIPictureTiming *h, GetBitContext *gb,
139 int index = get_bits_count(gb);
140 int size_bits = get_bits_left(gb);
151 memcpy(h->payload, gb->buffer + index / 8, size);
159 static int decode_registered_user_data_afd(H264SEIAFD *h, GetBitContext *gb, int size)
165 skip_bits(gb, 1); // 0
166 flag = get_bits(gb, 1); // active_format_flag
167 skip_bits(gb, 6); // reserved
172 skip_bits(gb, 4); // reserved
173 h->active_format_description = get_bits(gb, 4);
181 GetBitContext *gb, void *logctx,
187 return ff_parse_a53_cc(&h->buf_ref, gb->buffer + get_bits_count(gb) / 8, size);
190 static int decode_registered_user_data(H264SEIContext *h, GetBitContext *gb,
199 country_code = get_bits(gb, 8); // itu_t_t35_country_code
204 skip_bits(gb, 8); // itu_t_t35_country_code_extension_byte
216 provider_code = get_bits(gb, 16);
226 user_identifier = get_bits_long(gb, 32);
229 return decode_registered_user_data_afd(&h->afd, gb, size);
231 return decode_registered_user_data_closed_caption(&h->a53_caption, gb,
251 static int decode_unregistered_user_data(H264SEIUnregistered *h, GetBitContext *gb,
272 user_data[i] = get_bits(gb, 8);
287 static int decode_recovery_point(H264SEIRecoveryPoint *h, GetBitContext *gb, void *logctx)
289 unsigned recovery_frame_cnt = get_ue_golomb_long(gb);
300 skip_bits(gb, 4);
305 static int decode_buffering_period(H264SEIBufferingPeriod *h, GetBitContext *gb,
312 sps_id = get_ue_golomb_31(gb);
324 get_bits_long(gb, sps->initial_cpb_removal_delay_length);
326 skip_bits(gb, sps->initial_cpb_removal_delay_length);
332 get_bits_long(gb, sps->initial_cpb_removal_delay_length);
334 skip_bits(gb, sps->initial_cpb_removal_delay_length);
343 GetBitContext *gb)
345 h->arrangement_id = get_ue_golomb_long(gb);
346 h->arrangement_cancel_flag = get_bits1(gb);
350 h->arrangement_type = get_bits(gb, 7);
351 h->quincunx_sampling_flag = get_bits1(gb);
352 h->content_interpretation_type = get_bits(gb, 6);
355 skip_bits(gb, 3);
356 h->current_frame_is_frame0_flag = get_bits1(gb);
358 skip_bits(gb, 2);
361 skip_bits(gb, 16); // frame[01]_grid_position_[xy]
362 skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte
363 h->arrangement_repetition_period = get_ue_golomb_long(gb);
365 skip_bits1(gb); // frame_packing_arrangement_extension_flag
371 GetBitContext *gb)
373 h->present = !get_bits1(gb);
376 h->hflip = get_bits1(gb); // hor_flip
377 h->vflip = get_bits1(gb); // ver_flip
379 h->anticlockwise_rotation = get_bits(gb, 16);
380 get_ue_golomb_long(gb); // display_orientation_repetition_period
381 skip_bits1(gb); // display_orientation_extension_flag
387 static int decode_green_metadata(H264SEIGreenMetaData *h, GetBitContext *gb)
389 h->green_metadata_type = get_bits(gb, 8);
392 h->period_type = get_bits(gb, 8);
395 h->num_seconds = get_bits(gb, 16);
397 h->num_pictures = get_bits(gb, 16);
399 h->percent_non_zero_macroblocks = get_bits(gb, 8);
400 h->percent_intra_coded_macroblocks = get_bits(gb, 8);
401 h->percent_six_tap_filtering = get_bits(gb, 8);
402 h->percent_alpha_point_deblocking_instance = get_bits(gb, 8);
405 h->xsd_metric_type = get_bits(gb, 8);
406 h->xsd_metric_value = get_bits(gb, 16);
413 GetBitContext *gb)
416 h->preferred_transfer_characteristics = get_bits(gb, 8);
421 GetBitContext *gb)
423 h->present = !get_bits1(gb); // film_grain_characteristics_cancel_flag
427 h->model_id = get_bits(gb, 2);
428 h->separate_colour_description_present_flag = get_bits1(gb);
430 h->bit_depth_luma = get_bits(gb, 3) + 8;
431 h->bit_depth_chroma = get_bits(gb, 3) + 8;
432 h->full_range = get_bits1(gb);
433 h->color_primaries = get_bits(gb, 8);
434 h->transfer_characteristics = get_bits(gb, 8);
435 h->matrix_coeffs = get_bits(gb, 8);
437 h->blending_mode_id = get_bits(gb, 2);
438 h->log2_scale_factor = get_bits(gb, 4);
440 h->comp_model_present_flag[c] = get_bits1(gb);
443 h->num_intensity_intervals[c] = get_bits(gb, 8) + 1;
444 h->num_model_values[c] = get_bits(gb, 3) + 1;
448 h->intensity_interval_lower_bound[c][i] = get_bits(gb, 8);
449 h->intensity_interval_upper_bound[c][i] = get_bits(gb, 8);
451 h->comp_model_value[c][i][j] = get_se_golomb_long(gb);
455 h->repetition_period = get_ue_golomb_long(gb);
463 int ff_h264_sei_decode(H264SEIContext *h, GetBitContext *gb,
468 while (get_bits_left(gb) > 16 && show_bits(gb, 16)) {
475 if (get_bits_left(gb) < 8)
477 type += show_bits(gb, 8);
478 } while (get_bits(gb, 8) == 255);
481 if (get_bits_left(gb) < 8)
483 size += show_bits(gb, 8);
484 } while (get_bits(gb, 8) == 255);
486 if (size > get_bits_left(gb) / 8) {
488 type, 8*size, get_bits_left(gb));
492 ret = init_get_bits8(&gb_payload, gb->buffer + get_bits_count(gb) / 8, size);
540 skip_bits_long(gb, 8 * size);