Lines Matching refs:current

327         xf(width, name, current->name, 0, MAX_UINT_BITS(width), 0, )
329 xf(width, name, current->name, range_min, range_max, 0, )
332 xsu(width, name, current->name, 0, )
335 xf(width, name, current->name, 0, MAX_UINT_BITS(width), subs, __VA_ARGS__)
337 xf(width, name, current->name, range_min, range_max, subs, __VA_ARGS__)
339 xf(1, name, current->name, 0, 1, subs, __VA_ARGS__)
341 xsu(width, name, current->name, subs, __VA_ARGS__)
363 current->name = value; \
370 current->name = value; \
376 current->name = value; \
383 current->name = value; \
394 current->name = delta_q; \
400 current->name = value; \
404 current->name = value; \
410 AV1RawOBUHeader *current) in mpp_av1_read_obu_header() argument
422 if (current->obu_extension_flag) { in mpp_av1_read_obu_header()
431 ctx->temporal_id = current->temporal_id; in mpp_av1_read_obu_header()
432 ctx->spatial_id = current->spatial_id; in mpp_av1_read_obu_header()
469 AV1RawColorConfig *current, RK_S32 seq_profile) in mpp_av1_color_config() argument
476 current->high_bitdepth) { in mpp_av1_color_config()
478 ctx->bit_depth = current->twelve_bit ? 12 : 10; in mpp_av1_color_config()
480 ctx->bit_depth = current->high_bitdepth ? 10 : 8; in mpp_av1_color_config()
487 ctx->num_planes = current->mono_chrome ? 1 : 3; in mpp_av1_color_config()
490 if (current->color_description_present_flag) { in mpp_av1_color_config()
494 if (current->transfer_characteristics == MPP_FRAME_TRC_BT2020_10 || in mpp_av1_color_config()
495 current->transfer_characteristics == MPP_FRAME_TRC_SMPTEST2084) in mpp_av1_color_config()
503 if (current->mono_chrome) { in mpp_av1_color_config()
511 } else if (current->color_primaries == MPP_FRAME_PRI_BT709 && in mpp_av1_color_config()
512 current->transfer_characteristics == MPP_FRAME_TRC_IEC61966_2_1 && in mpp_av1_color_config()
513 current->matrix_coefficients == MPP_FRAME_SPC_RGB) { in mpp_av1_color_config()
531 if (current->subsampling_x) in mpp_av1_color_config()
540 if (current->subsampling_x && current->subsampling_y) { in mpp_av1_color_config()
552 AV1RawTimingInfo *current) in mpp_av1_timing_info() argument
561 if (current->equal_picture_interval) in mpp_av1_timing_info()
568 AV1RawDecoderModelInfo *current) in mpp_av1_decoder_model_info() argument
581 AV1RawSequenceHeader *current) in mpp_av1_sequence_header_obu() argument
590 if (current->reduced_still_picture_header) { in mpp_av1_sequence_header_obu()
605 if (current->timing_info_present_flag) { in mpp_av1_sequence_header_obu()
606 CHECK(mpp_av1_timing_info(ctx, gb, &current->timing_info)); in mpp_av1_sequence_header_obu()
609 if (current->decoder_model_info_present_flag) { in mpp_av1_sequence_header_obu()
611 (ctx, gb, &current->decoder_model_info)); in mpp_av1_sequence_header_obu()
620 for (i = 0; i <= current->operating_points_cnt_minus_1; i++) { in mpp_av1_sequence_header_obu()
624 if (current->seq_level_idx[i] > 7) in mpp_av1_sequence_header_obu()
629 if (current->decoder_model_info_present_flag) { in mpp_av1_sequence_header_obu()
631 if (current->decoder_model_present_for_this_op[i]) { in mpp_av1_sequence_header_obu()
632 RK_S32 n = current->decoder_model_info.buffer_delay_length_minus_1 + 1; in mpp_av1_sequence_header_obu()
641 if (current->initial_display_delay_present_flag) { in mpp_av1_sequence_header_obu()
643 if (current->initial_display_delay_present_for_this_op[i]) in mpp_av1_sequence_header_obu()
652 fb(current->frame_width_bits_minus_1 + 1, max_frame_width_minus_1); in mpp_av1_sequence_header_obu()
653 fb(current->frame_height_bits_minus_1 + 1, max_frame_height_minus_1); in mpp_av1_sequence_header_obu()
655 if (current->reduced_still_picture_header) in mpp_av1_sequence_header_obu()
659 if (current->frame_id_numbers_present_flag) { in mpp_av1_sequence_header_obu()
668 if (current->reduced_still_picture_header) { in mpp_av1_sequence_header_obu()
688 if (current->enable_order_hint) { in mpp_av1_sequence_header_obu()
697 if (current->seq_choose_screen_content_tools) in mpp_av1_sequence_header_obu()
702 if (current->seq_force_screen_content_tools > 0) { in mpp_av1_sequence_header_obu()
704 if (current->seq_choose_integer_mv) in mpp_av1_sequence_header_obu()
713 if (current->enable_order_hint) in mpp_av1_sequence_header_obu()
721 CHECK(mpp_av1_color_config(ctx, gb, &current->color_config, in mpp_av1_sequence_header_obu()
722 current->seq_profile)); in mpp_av1_sequence_header_obu()
739 AV1RawFrameHeader *current) in mpp_av1_set_frame_refs() argument
754 ref_frame_idx[AV1_REF_FRAME_LAST - AV1_REF_FRAME_LAST] = current->last_frame_idx; in mpp_av1_set_frame_refs()
755 ref_frame_idx[AV1_REF_FRAME_GOLDEN - AV1_REF_FRAME_LAST] = current->golden_frame_idx; in mpp_av1_set_frame_refs()
763 used_frame[current->last_frame_idx] = 1; in mpp_av1_set_frame_refs()
764 used_frame[current->golden_frame_idx] = 1; in mpp_av1_set_frame_refs()
776 latest_order_hint = shifted_order_hints[current->last_frame_idx]; in mpp_av1_set_frame_refs()
777 earliest_order_hint = shifted_order_hints[current->golden_frame_idx]; in mpp_av1_set_frame_refs()
882 AV1RawFrameHeader *current) in mpp_av1_superres_params() argument
892 if (current->use_superres) { in mpp_av1_superres_params()
894 denom = current->coded_denom + AV1_SUPERRES_DENOM_MIN; in mpp_av1_superres_params()
906 AV1RawFrameHeader *current) in mpp_av1_frame_size() argument
911 if (current->frame_size_override_flag) { in mpp_av1_frame_size()
919 ctx->frame_width = current->frame_width_minus_1 + 1; in mpp_av1_frame_size()
920 ctx->frame_height = current->frame_height_minus_1 + 1; in mpp_av1_frame_size()
922 CHECK(mpp_av1_superres_params(ctx, gb, current)); in mpp_av1_frame_size()
928 AV1RawFrameHeader *current) in mpp_av1_render_size() argument
934 if (current->render_and_frame_size_different) { in mpp_av1_render_size()
938 infer(render_width_minus_1, current->frame_width_minus_1); in mpp_av1_render_size()
939 infer(render_height_minus_1, current->frame_height_minus_1); in mpp_av1_render_size()
942 ctx->render_width = current->render_width_minus_1 + 1; in mpp_av1_render_size()
943 ctx->render_height = current->render_height_minus_1 + 1; in mpp_av1_render_size()
949 AV1RawFrameHeader *current) in mpp_av1_frame_size_with_refs() argument
955 if (current->found_ref[i]) { in mpp_av1_frame_size_with_refs()
957 &ctx->ref_s[current->ref_frame_idx[i]]; in mpp_av1_frame_size_with_refs()
962 i, current->ref_frame_idx[i]); in mpp_av1_frame_size_with_refs()
981 CHECK(mpp_av1_frame_size(ctx, gb, current)); in mpp_av1_frame_size_with_refs()
982 CHECK(mpp_av1_render_size(ctx, gb, current)); in mpp_av1_frame_size_with_refs()
984 CHECK(mpp_av1_superres_params(ctx, gb, current)); in mpp_av1_frame_size_with_refs()
991 AV1RawFrameHeader *current) in mpp_av1_interpolation_filter() argument
996 if (current->is_filter_switchable) in mpp_av1_interpolation_filter()
1006 AV1RawFrameHeader *current) in mpp_av1_tile_info() argument
1037 if (current->uniform_tile_spacing_flag) { in mpp_av1_tile_info()
1042 tile_width_sb = (sb_cols + (1 << current->tile_cols_log2) - 1) >> in mpp_av1_tile_info()
1043 current->tile_cols_log2; in mpp_av1_tile_info()
1044 current->tile_cols = (sb_cols + tile_width_sb - 1) / tile_width_sb; in mpp_av1_tile_info()
1046 min_log2_tile_rows = MPP_MAX(min_log2_tiles - current->tile_cols_log2, 0); in mpp_av1_tile_info()
1050 tile_height_sb = (sb_rows + (1 << current->tile_rows_log2) - 1) >> in mpp_av1_tile_info()
1051 current->tile_rows_log2; in mpp_av1_tile_info()
1052 current->tile_rows = (sb_rows + tile_height_sb - 1) / tile_height_sb; in mpp_av1_tile_info()
1054 for (i = 0; i < current->tile_cols - 1; i++) in mpp_av1_tile_info()
1057 sb_cols - (current->tile_cols - 1) * tile_width_sb - 1); in mpp_av1_tile_info()
1058 for (i = 0; i < current->tile_rows - 1; i++) in mpp_av1_tile_info()
1061 sb_rows - (current->tile_rows - 1) * tile_height_sb - 1); in mpp_av1_tile_info()
1073 size_sb = current->width_in_sbs_minus_1[i] + 1; in mpp_av1_tile_info()
1077 current->tile_cols_log2 = mpp_av1_tile_log2(1, i); in mpp_av1_tile_info()
1078 current->tile_cols = i; in mpp_av1_tile_info()
1090 size_sb = current->height_in_sbs_minus_1[i] + 1; in mpp_av1_tile_info()
1093 current->tile_rows_log2 = mpp_av1_tile_log2(1, i); in mpp_av1_tile_info()
1094 current->tile_rows = i; in mpp_av1_tile_info()
1097 if (current->tile_cols_log2 > 0 || in mpp_av1_tile_info()
1098 current->tile_rows_log2 > 0) { in mpp_av1_tile_info()
1099 fb(current->tile_cols_log2 + current->tile_rows_log2, in mpp_av1_tile_info()
1104 current->tile_size_bytes_minus1 = 3; in mpp_av1_tile_info()
1107 ctx->tile_cols = current->tile_cols; in mpp_av1_tile_info()
1108 ctx->tile_rows = current->tile_rows; in mpp_av1_tile_info()
1114 AV1RawFrameHeader *current) in mpp_av1_quantization_params() argument
1132 if (current->diff_uv_delta) { in mpp_av1_quantization_params()
1136 infer(delta_q_v_dc, current->delta_q_u_dc); in mpp_av1_quantization_params()
1137 infer(delta_q_v_ac, current->delta_q_u_ac); in mpp_av1_quantization_params()
1147 if (current->using_qmatrix) { in mpp_av1_quantization_params()
1153 infer(qm_v, current->qm_u); in mpp_av1_quantization_params()
1160 AV1RawFrameHeader *current) in mpp_av1_segmentation_params() argument
1170 if (current->segmentation_enabled) { in mpp_av1_segmentation_params()
1171 if (current->primary_ref_frame == AV1_PRIMARY_REF_NONE) { in mpp_av1_segmentation_params()
1177 if (current->segmentation_update_map) in mpp_av1_segmentation_params()
1188 if (current->primary_ref_frame == AV1_PRIMARY_REF_NONE) { in mpp_av1_segmentation_params()
1193 … ctx->ref_s[current->ref_frame_idx[current->primary_ref_frame]].feature_enabled[i]; in mpp_av1_segmentation_params()
1195 ctx->ref_s[current->ref_frame_idx[current->primary_ref_frame]].feature_value[i]; in mpp_av1_segmentation_params()
1199 if (current->segmentation_update_data) { in mpp_av1_segmentation_params()
1201 if (current->feature_enabled[i][j] && bits[j] > 0) { in mpp_av1_segmentation_params()
1208 current->feature_value[i][j] = data; in mpp_av1_segmentation_params()
1233 if (current->feature_enabled[i][j]) { in mpp_av1_segmentation_params()
1247 AV1RawFrameHeader *current) in mpp_av1_delta_q_params() argument
1251 if (current->base_q_idx > 0) in mpp_av1_delta_q_params()
1256 if (current->delta_q_present) in mpp_av1_delta_q_params()
1263 AV1RawFrameHeader *current) in mpp_av1_delta_lf_params() argument
1267 if (current->delta_q_present) { in mpp_av1_delta_lf_params()
1268 if (!current->allow_intrabc) in mpp_av1_delta_lf_params()
1272 if (current->delta_lf_present) { in mpp_av1_delta_lf_params()
1289 AV1RawFrameHeader *current) in mpp_av1_loop_filter_params() argument
1296 if (ctx->coded_lossless || current->allow_intrabc) { in mpp_av1_loop_filter_params()
1316 if (current->loop_filter_level[0] || in mpp_av1_loop_filter_params()
1317 current->loop_filter_level[1]) { in mpp_av1_loop_filter_params()
1324 current->order_hint, in mpp_av1_loop_filter_params()
1325 current->loop_filter_level[0], current->loop_filter_level[1], in mpp_av1_loop_filter_params()
1326 current->loop_filter_level[2], current->loop_filter_level[3]); in mpp_av1_loop_filter_params()
1330 if (current->loop_filter_delta_enabled) { in mpp_av1_loop_filter_params()
1333 if (current->primary_ref_frame == AV1_PRIMARY_REF_NONE) { in mpp_av1_loop_filter_params()
1338 … ctx->ref_s[current->ref_frame_idx[current->primary_ref_frame]].loop_filter_ref_deltas; in mpp_av1_loop_filter_params()
1340 … ctx->ref_s[current->ref_frame_idx[current->primary_ref_frame]].loop_filter_mode_deltas; in mpp_av1_loop_filter_params()
1345 if (current->loop_filter_delta_update) in mpp_av1_loop_filter_params()
1349 if (current->update_ref_delta[i]) in mpp_av1_loop_filter_params()
1355 if (current->loop_filter_delta_update) in mpp_av1_loop_filter_params()
1359 if (current->update_mode_delta[i]) in mpp_av1_loop_filter_params()
1375 AV1RawFrameHeader *current) in mpp_av1_cdef_params() argument
1379 if (ctx->coded_lossless || current->allow_intrabc || in mpp_av1_cdef_params()
1394 for (i = 0; i < (1 << current->cdef_bits); i++) { in mpp_av1_cdef_params()
1408 AV1RawFrameHeader *current) in mpp_av1_lr_params() argument
1414 if (ctx->all_lossless || current->allow_intrabc || in mpp_av1_lr_params()
1423 if (current->lr_type[i] != AV1_RESTORE_NONE) { in mpp_av1_lr_params()
1448 AV1RawFrameHeader *current) in mpp_av1_read_tx_mode() argument
1456 current->tx_mode = current->tx_mode ? TX_MODE_SELECT : TX_MODE_LARGEST; in mpp_av1_read_tx_mode()
1463 AV1RawFrameHeader *current) in mpp_av1_frame_reference_mode() argument
1467 if (current->frame_type == AV1_FRAME_INTRA_ONLY || in mpp_av1_frame_reference_mode()
1468 current->frame_type == AV1_FRAME_KEY) in mpp_av1_frame_reference_mode()
1477 AV1RawFrameHeader *current) in mpp_av1_skip_mode_params() argument
1486 if (current->frame_type == AV1_FRAME_KEY || in mpp_av1_skip_mode_params()
1487 current->frame_type == AV1_FRAME_INTRA_ONLY || in mpp_av1_skip_mode_params()
1488 !current->reference_select || !seq->enable_order_hint) { in mpp_av1_skip_mode_params()
1500 ref_hint = ctx->ref_s[current->ref_frame_idx[i]].order_hint; in mpp_av1_skip_mode_params()
1532 ref_hint = ctx->ref_s[current->ref_frame_idx[i]].order_hint; in mpp_av1_skip_mode_params()
1564 AV1RawFrameHeader *current, in mpp_av1_global_motion_param() argument
1572 abs_bits = AV1_GM_ABS_TRANS_ONLY_BITS - !current->allow_high_precision_mv; in mpp_av1_global_motion_param()
1573 prec_bits = AV1_GM_TRANS_ONLY_PREC_BITS - !current->allow_high_precision_mv; in mpp_av1_global_motion_param()
1597 AV1RawFrameHeader *current) in mpp_av1_global_motion_params() argument
1602 if (current->frame_type == AV1_FRAME_KEY || in mpp_av1_global_motion_params()
1603 current->frame_type == AV1_FRAME_INTRA_ONLY) in mpp_av1_global_motion_params()
1608 if (current->is_global[ref]) { in mpp_av1_global_motion_params()
1610 if (current->is_rot_zoom[ref]) { in mpp_av1_global_motion_params()
1614 type = current->is_translation[ref] ? AV1_WARP_MODEL_TRANSLATION in mpp_av1_global_motion_params()
1622 CHECK(mpp_av1_global_motion_param(ctx, gb, current, type, ref, 2)); in mpp_av1_global_motion_params()
1623 CHECK(mpp_av1_global_motion_param(ctx, gb, current, type, ref, 3)); in mpp_av1_global_motion_params()
1625 CHECK(mpp_av1_global_motion_param(ctx, gb, current, type, ref, 4)); in mpp_av1_global_motion_params()
1626 CHECK(mpp_av1_global_motion_param(ctx, gb, current, type, ref, 5)); in mpp_av1_global_motion_params()
1628 current->gm_params[ref][4] = -current->gm_params[ref][3]; in mpp_av1_global_motion_params()
1629 current->gm_params[ref][5] = current->gm_params[ref][2]; in mpp_av1_global_motion_params()
1633 CHECK(mpp_av1_global_motion_param(ctx, gb, current, type, ref, 0)); in mpp_av1_global_motion_params()
1634 CHECK(mpp_av1_global_motion_param(ctx, gb, current, type, ref, 1)); in mpp_av1_global_motion_params()
1642 AV1RawFilmGrainParams *current, in mpp_av1_film_grain_params() argument
1655 if (!current->apply_grain) in mpp_av1_film_grain_params()
1665 if (!current->update_grain) { in mpp_av1_film_grain_params()
1671 for (i = 0; i < current->num_y_points; i++) { in mpp_av1_film_grain_params()
1673 i ? current->point_y_value[i - 1] + 1 : 0, in mpp_av1_film_grain_params()
1674 MAX_UINT_BITS(8) - (current->num_y_points - i - 1), in mpp_av1_film_grain_params()
1685 current->chroma_scaling_from_luma || in mpp_av1_film_grain_params()
1688 current->num_y_points == 0)) { in mpp_av1_film_grain_params()
1693 for (i = 0; i < current->num_cb_points; i++) { in mpp_av1_film_grain_params()
1695 i ? current->point_cb_value[i - 1] + 1 : 0, in mpp_av1_film_grain_params()
1696 MAX_UINT_BITS(8) - (current->num_cb_points - i - 1), in mpp_av1_film_grain_params()
1701 for (i = 0; i < current->num_cr_points; i++) { in mpp_av1_film_grain_params()
1703 i ? current->point_cr_value[i - 1] + 1 : 0, in mpp_av1_film_grain_params()
1704 MAX_UINT_BITS(8) - (current->num_cr_points - i - 1), in mpp_av1_film_grain_params()
1712 num_pos_luma = 2 * current->ar_coeff_lag * (current->ar_coeff_lag + 1); in mpp_av1_film_grain_params()
1713 if (current->num_y_points) { in mpp_av1_film_grain_params()
1720 if (current->chroma_scaling_from_luma || current->num_cb_points) { in mpp_av1_film_grain_params()
1724 if (current->chroma_scaling_from_luma || current->num_cr_points) { in mpp_av1_film_grain_params()
1730 if (current->num_cb_points) { in mpp_av1_film_grain_params()
1735 if (current->num_cr_points) { in mpp_av1_film_grain_params()
1748 AV1RawFrameHeader *current) in mpp_av1_uncompressed_header() argument
1775 if (current->show_existing_frame) { in mpp_av1_uncompressed_header()
1779 ref = &ctx->ref_s[current->frame_to_show_map_idx]; in mpp_av1_uncompressed_header()
1784 current->frame_to_show_map_idx); in mpp_av1_uncompressed_header()
1798 if (current->frame_type == AV1_FRAME_KEY) { in mpp_av1_uncompressed_header()
1822 frame_is_intra = (current->frame_type == AV1_FRAME_INTRA_ONLY || in mpp_av1_uncompressed_header()
1823 current->frame_type == AV1_FRAME_KEY); in mpp_av1_uncompressed_header()
1826 if (current->frame_type == AV1_FRAME_KEY) { in mpp_av1_uncompressed_header()
1829 Av1GetCDFs(ctx, current->frame_to_show_map_idx); in mpp_av1_uncompressed_header()
1834 if (current->show_frame && in mpp_av1_uncompressed_header()
1840 if (current->show_frame) in mpp_av1_uncompressed_header()
1841 infer(showable_frame, current->frame_type != AV1_FRAME_KEY); in mpp_av1_uncompressed_header()
1845 if (current->frame_type == AV1_FRAME_SWITCH || in mpp_av1_uncompressed_header()
1846 (current->frame_type == AV1_FRAME_KEY && current->show_frame)) in mpp_av1_uncompressed_header()
1852 if (current->frame_type == AV1_FRAME_KEY && current->show_frame) { in mpp_av1_uncompressed_header()
1868 if (current->allow_screen_content_tools) { in mpp_av1_uncompressed_header()
1882 if (current->current_frame_id > (RK_S32)(1 << diff_len)) { in mpp_av1_uncompressed_header()
1883 if (ctx->ref_s[i].frame_id > current->current_frame_id || in mpp_av1_uncompressed_header()
1884 ctx->ref_s[i].frame_id < (current->current_frame_id - in mpp_av1_uncompressed_header()
1888 if (ctx->ref_s[i].frame_id > current->current_frame_id && in mpp_av1_uncompressed_header()
1890 current->current_frame_id - in mpp_av1_uncompressed_header()
1899 if (current->frame_type == AV1_FRAME_SWITCH) in mpp_av1_uncompressed_header()
1912 ctx->order_hint = current->order_hint; in mpp_av1_uncompressed_header()
1914 if (frame_is_intra || current->error_resilient_mode) in mpp_av1_uncompressed_header()
1921 if (current->buffer_removal_time_present_flag) { in mpp_av1_uncompressed_header()
1937 if (current->frame_type == AV1_FRAME_SWITCH || in mpp_av1_uncompressed_header()
1938 (current->frame_type == AV1_FRAME_KEY && current->show_frame)) in mpp_av1_uncompressed_header()
1943 ctx->refresh_frame_flags = current->refresh_frame_flags; in mpp_av1_uncompressed_header()
1944 if (!frame_is_intra || current->refresh_frame_flags != all_frames) { in mpp_av1_uncompressed_header()
1947 if (current->error_resilient_mode) in mpp_av1_uncompressed_header()
1951 if (current->ref_order_hint[i] != ctx->ref_s[i].order_hint) in mpp_av1_uncompressed_header()
1957 current->ref_frame_valued = 1; in mpp_av1_uncompressed_header()
1958 if (current->frame_type == AV1_FRAME_KEY || in mpp_av1_uncompressed_header()
1959 current->frame_type == AV1_FRAME_INTRA_ONLY) { in mpp_av1_uncompressed_header()
1960 CHECK(mpp_av1_frame_size(ctx, gb, current)); in mpp_av1_uncompressed_header()
1961 CHECK(mpp_av1_render_size(ctx, gb, current)); in mpp_av1_uncompressed_header()
1963 if (current->allow_screen_content_tools && in mpp_av1_uncompressed_header()
1969 current->ref_frame_valued = 0; in mpp_av1_uncompressed_header()
1975 if (current->frame_refs_short_signaling) { in mpp_av1_uncompressed_header()
1978 CHECK(mpp_av1_set_frame_refs(ctx, gb, current)); in mpp_av1_uncompressed_header()
1983 if (!current->frame_refs_short_signaling) in mpp_av1_uncompressed_header()
1991 if (current->frame_size_override_flag && in mpp_av1_uncompressed_header()
1992 !current->error_resilient_mode) { in mpp_av1_uncompressed_header()
1993 CHECK(mpp_av1_frame_size_with_refs(ctx, gb, current)); in mpp_av1_uncompressed_header()
1995 CHECK(mpp_av1_frame_size(ctx, gb, current)); in mpp_av1_uncompressed_header()
1996 CHECK(mpp_av1_render_size(ctx, gb, current)); in mpp_av1_uncompressed_header()
1999 if (current->force_integer_mv) in mpp_av1_uncompressed_header()
2004 CHECK(mpp_av1_interpolation_filter(ctx, gb, current)); in mpp_av1_uncompressed_header()
2008 if (current->error_resilient_mode || in mpp_av1_uncompressed_header()
2021 if (seq->reduced_still_picture_header || current->disable_cdf_update) in mpp_av1_uncompressed_header()
2026 ctx->disable_frame_end_update_cdf = current->disable_frame_end_update_cdf; in mpp_av1_uncompressed_header()
2028 if (current->use_ref_frame_mvs) { in mpp_av1_uncompressed_header()
2032 CHECK(mpp_av1_tile_info(ctx, gb, current)); in mpp_av1_uncompressed_header()
2035 CHECK(mpp_av1_quantization_params(ctx, gb, current)); in mpp_av1_uncompressed_header()
2038 CHECK(mpp_av1_segmentation_params(ctx, gb, current)); in mpp_av1_uncompressed_header()
2041 CHECK(mpp_av1_delta_q_params(ctx, gb, current)); in mpp_av1_uncompressed_header()
2044 CHECK(mpp_av1_delta_lf_params(ctx, gb, current)); in mpp_av1_uncompressed_header()
2048 …if (current->error_resilient_mode || frame_is_intra || current->primary_ref_frame == AV1_PRIMARY_R… in mpp_av1_uncompressed_header()
2053 Av1DefaultCoeffProbs(current->base_q_idx, ctx->cdfs); in mpp_av1_uncompressed_header()
2057 RK_U32 idx = current->ref_frame_idx[current->primary_ref_frame]; in mpp_av1_uncompressed_header()
2062 current->frame_to_show_map_idx, in mpp_av1_uncompressed_header()
2063 current->ref_frame_idx[current->primary_ref_frame], in mpp_av1_uncompressed_header()
2064 ctx->ref[current->ref_frame_idx[current->primary_ref_frame]].slot_index, in mpp_av1_uncompressed_header()
2065 current->primary_ref_frame, in mpp_av1_uncompressed_header()
2066 current->refresh_frame_flags, in mpp_av1_uncompressed_header()
2067 current->base_q_idx); in mpp_av1_uncompressed_header()
2068 Av1StoreCDFs(ctx, current->refresh_frame_flags); in mpp_av1_uncompressed_header()
2073 if (current->feature_enabled[i][AV1_SEG_LVL_ALT_Q]) { in mpp_av1_uncompressed_header()
2074 qindex = (current->base_q_idx + in mpp_av1_uncompressed_header()
2075 current->feature_value[i][AV1_SEG_LVL_ALT_Q]); in mpp_av1_uncompressed_header()
2077 qindex = current->base_q_idx; in mpp_av1_uncompressed_header()
2081 if (qindex || current->delta_q_y_dc || in mpp_av1_uncompressed_header()
2082 current->delta_q_u_ac || current->delta_q_u_dc || in mpp_av1_uncompressed_header()
2083 current->delta_q_v_ac || current->delta_q_v_dc) { in mpp_av1_uncompressed_header()
2091 CHECK(mpp_av1_loop_filter_params(ctx, gb, current)); in mpp_av1_uncompressed_header()
2094 CHECK(mpp_av1_cdef_params(ctx, gb, current)); in mpp_av1_uncompressed_header()
2097 CHECK(mpp_av1_lr_params(ctx, gb, current)); in mpp_av1_uncompressed_header()
2100 CHECK(mpp_av1_read_tx_mode(ctx, gb, current)); in mpp_av1_uncompressed_header()
2103 CHECK(mpp_av1_frame_reference_mode(ctx, gb, current)); in mpp_av1_uncompressed_header()
2106 CHECK(mpp_av1_skip_mode_params(ctx, gb, current)); in mpp_av1_uncompressed_header()
2108 if (frame_is_intra || current->error_resilient_mode || in mpp_av1_uncompressed_header()
2117 CHECK(mpp_av1_global_motion_params(ctx, gb, current)); in mpp_av1_uncompressed_header()
2119 CHECK(mpp_av1_film_grain_params(ctx, gb, &current->film_grain, current)); in mpp_av1_uncompressed_header()
2135 AV1RawFrameHeader *current, RK_S32 redundant, in mpp_av1_frame_header_obu() argument
2167 CHECK(mpp_av1_uncompressed_header(ctx, gb, current)); in mpp_av1_frame_header_obu()
2171 if (current->show_existing_frame) { in mpp_av1_frame_header_obu()
2196 AV1RawTileGroup *current) in mpp_av1_tile_group_obu() argument
2207 if (num_tiles == 1 || !current->tile_start_and_end_present_flag) { in mpp_av1_tile_group_obu()
2214 fc(tile_bits, tg_end, current->tg_start, num_tiles - 1); in mpp_av1_tile_group_obu()
2217 ctx->tile_num = current->tg_end + 1; in mpp_av1_tile_group_obu()
2222 if (current->tg_end == num_tiles - 1) in mpp_av1_tile_group_obu()
2230 AV1RawFrame *current, in mpp_av1_frame_obu() argument
2236 CHECK(mpp_av1_frame_header_obu(ctx, gb, &current->header, in mpp_av1_frame_obu()
2241 CHECK(mpp_av1_tile_group_obu(ctx, gb, &current->tile_group)); in mpp_av1_frame_obu()
2248 AV1RawTileList *current) in mpp_av1_tile_list_obu() argument
2263 AV1RawMetadataHDRCLL *current) in mpp_av1_metadata_hdr_cll() argument
2270 ctx->content_light.MaxCLL = current->max_cll; in mpp_av1_metadata_hdr_cll()
2271 ctx->content_light.MaxFALL = current->max_fall; in mpp_av1_metadata_hdr_cll()
2277 AV1RawMetadataHDRMDCV *current) in mpp_av1_metadata_hdr_mdcv() argument
2292 fc(32, luminance_min, 0, MPP_MIN(((RK_U64)current->luminance_max << 6) - 1, in mpp_av1_metadata_hdr_mdcv()
2296 ctx->mastering_display.display_primaries[i][0] = current->primary_chromaticity_x[i]; in mpp_av1_metadata_hdr_mdcv()
2297 ctx->mastering_display.display_primaries[i][1] = current->primary_chromaticity_y[i]; in mpp_av1_metadata_hdr_mdcv()
2299 ctx->mastering_display.white_point[0] = current->white_point_chromaticity_x; in mpp_av1_metadata_hdr_mdcv()
2300 ctx->mastering_display.white_point[1] = current->white_point_chromaticity_y; in mpp_av1_metadata_hdr_mdcv()
2301 ctx->mastering_display.max_luminance = current->luminance_max; in mpp_av1_metadata_hdr_mdcv()
2302 ctx->mastering_display.min_luminance = current->luminance_min; in mpp_av1_metadata_hdr_mdcv()
2308 AV1RawMetadataScalability *current) in mpp_av1_scalability_structure() argument
2325 if (current->spatial_layer_dimensions_present_flag) { in mpp_av1_scalability_structure()
2326 for (i = 0; i <= current->spatial_layers_cnt_minus_1; i++) { in mpp_av1_scalability_structure()
2333 if (current->spatial_layer_description_present_flag) { in mpp_av1_scalability_structure()
2334 for (i = 0; i <= current->spatial_layers_cnt_minus_1; i++) in mpp_av1_scalability_structure()
2337 if (current->temporal_group_description_present_flag) { in mpp_av1_scalability_structure()
2339 for (i = 0; i < current->temporal_group_size; i++) { in mpp_av1_scalability_structure()
2344 for (j = 0; j < current->temporal_group_ref_cnt[i]; j++) { in mpp_av1_scalability_structure()
2354 AV1RawMetadataScalability *current) in mpp_av1_metadata_scalability() argument
2360 if (current->scalability_mode_idc == AV1_SCALABILITY_SS) in mpp_av1_metadata_scalability()
2361 CHECK(mpp_av1_scalability_structure(ctx, gb, current)); in mpp_av1_metadata_scalability()
2484 AV1RawMetadataITUTT35 *current) in mpp_av1_metadata_itut_t35() argument
2489 if (current->itu_t_t35_country_code == 0xff) in mpp_av1_metadata_itut_t35()
2492 current->payload_size = mpp_get_bits_left(gb) / 8 - 1; in mpp_av1_metadata_itut_t35()
2495 __func__, current->itu_t_t35_country_code, current->payload_size); in mpp_av1_metadata_itut_t35()
2500 current->itu_t_t35_country_code); in mpp_av1_metadata_itut_t35()
2502 current->itu_t_t35_terminal_provider_code); in mpp_av1_metadata_itut_t35()
2504 switch (current->itu_t_t35_terminal_provider_code) { in mpp_av1_metadata_itut_t35()
2506 READ_BITS_LONG(gb, 32, &current->itu_t_t35_terminal_provider_oriented_code); in mpp_av1_metadata_itut_t35()
2508 current->itu_t_t35_terminal_provider_oriented_code); in mpp_av1_metadata_itut_t35()
2509 if (current->itu_t_t35_terminal_provider_oriented_code == 0x800) in mpp_av1_metadata_itut_t35()
2519 current->itu_t_t35_terminal_provider_oriented_code); in mpp_av1_metadata_itut_t35()
2522 … if (current->itu_t_t35_terminal_provider_oriented_code == smpte2094_40_provider_oriented_code && in mpp_av1_metadata_itut_t35()
2536 AV1RawMetadataTimecode *current) in mpp_av1_metadata_timecode() argument
2547 if (current->full_timestamp_flag) { in mpp_av1_metadata_timecode()
2553 if (current->seconds_flag) { in mpp_av1_metadata_timecode()
2556 if (current->minutes_flag) { in mpp_av1_metadata_timecode()
2559 if (current->hours_flag) in mpp_av1_metadata_timecode()
2566 if (current->time_offset_length > 0) in mpp_av1_metadata_timecode()
2567 fb(current->time_offset_length, time_offset_value); in mpp_av1_metadata_timecode()
2575 AV1RawMetadata *current) in mpp_av1_metadata_obu() argument
2580 av1d_dbg(AV1D_DBG_STRMIN, "%s meta type %lld\n", __func__, current->metadata_type); in mpp_av1_metadata_obu()
2581 switch (current->metadata_type) { in mpp_av1_metadata_obu()
2583 CHECK(mpp_av1_metadata_hdr_cll(ctx, gb, &current->metadata.hdr_cll)); in mpp_av1_metadata_obu()
2586 CHECK(mpp_av1_metadata_hdr_mdcv(ctx, gb, &current->metadata.hdr_mdcv)); in mpp_av1_metadata_obu()
2589 CHECK(mpp_av1_metadata_scalability(ctx, gb, &current->metadata.scalability)); in mpp_av1_metadata_obu()
2592 CHECK(mpp_av1_metadata_itut_t35(ctx, gb, &current->metadata.itut_t35)); in mpp_av1_metadata_obu()
2595 CHECK(mpp_av1_metadata_timecode(ctx, gb, &current->metadata.timecode)); in mpp_av1_metadata_obu()
2598 mpp_err_f("unknown metadata type %lld\n", current->metadata_type); in mpp_av1_metadata_obu()
2606 AV1RawPadding *current) in mpp_av1_padding_obu() argument
2611 current->payload_size = mpp_av1_get_payload_bytes_left(gb); in mpp_av1_padding_obu()
2613 current->payload = mpp_malloc(RK_U8, current->payload_size); in mpp_av1_padding_obu()
2614 if (!current->payload ) in mpp_av1_padding_obu()
2617 for (i = 0; i < current->payload_size; i++) in mpp_av1_padding_obu()
2618 xf(8, obu_padding_byte[i], current->payload[i], 0x00, 0xff, 1, i); in mpp_av1_padding_obu()