Skip to content

Commit

Permalink
libavc: Add dynamic color aspects support
Browse files Browse the repository at this point in the history
Bug: 325468696
Test: atest android.mediav2.cts.DecoderDynamicColorAspectTest

Change-Id: Ib33d57a1f8109a149926841fed1a3d2ff454b668
  • Loading branch information
HaripriyaDeshmukh authored and harishdm committed Apr 24, 2024
1 parent 1c9bd7e commit 828cdb7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions decoder/ih264d_parse_headers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,20 @@ WORD32 ih264d_parse_sps(dec_struct_t *ps_dec, dec_bit_stream_t *ps_bitstrm)
ret = ih264d_parse_vui_parametres(&ps_seq->s_vui, ps_bitstrm);
if(ret != OK)
return ret;

if (ps_dec->pu1_bits_buf_dynamic != NULL) {
vui_t *ps_vui = &ps_seq->s_vui;
dec_seq_params_t *ps_sps_old = ps_dec->ps_sps;
vui_t *ps_vui_old = &ps_sps_old->s_vui;

if (ps_vui->u1_video_full_range_flag != ps_vui_old->u1_video_full_range_flag ||
ps_vui->u1_colour_primaries != ps_vui_old->u1_colour_primaries ||
ps_vui->u1_tfr_chars != ps_vui_old->u1_tfr_chars ||
ps_vui->u1_matrix_coeffs != ps_vui_old->u1_matrix_coeffs) {
ps_dec->u1_res_changed = 1;
return IVD_RES_CHANGED;
}
}
}

/* Compare older num_reorder_frames with the new one if header is already decoded */
Expand Down

0 comments on commit 828cdb7

Please sign in to comment.