History

lavc/vvc: Fix condition for using default scaling factor

Add handling here for sps_scaling_matrix_for_alternative_colour_space_disabled_flag. Also add parentheses to make behaviour a little more explicit, where &&'s precedence over || was relied on previously.

Frank Plowman committed 1 year ago

Commit 540a2491 parent f8a9d941 file · +3 −3Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/vvc/intra.c+3−3
@@ -367,10 +367,10 @@ static const uint8_t* derive_scale_m(const VVCLocalContext *lc, const TransformB · 366 unmodified lines
367 const int log2_matrix_size = (id < 2) ? 1 : (id < 8) ? 2 : 3;367 const int log2_matrix_size = (id < 2) ? 1 : (id < 8) ? 2 : 3;
368 uint8_t *p = scale_m;368 uint8_t *p = scale_m;
369 369
370 av_assert0(!sps->r->sps_scaling_matrix_for_alternative_colour_space_disabled_flag);
371
372 if (!rsh->sh_explicit_scaling_list_used_flag || tb->ts ||370 if (!rsh->sh_explicit_scaling_list_used_flag || tb->ts ||
373 sps->r->sps_scaling_matrix_for_lfnst_disabled_flag && cu->apply_lfnst_flag[tb->c_idx])371 (sps->r->sps_scaling_matrix_for_lfnst_disabled_flag && cu->apply_lfnst_flag[tb->c_idx]) ||
372 (sps->r->sps_scaling_matrix_for_alternative_colour_space_disabled_flag &&
373 sps->r->sps_scaling_matrix_designated_colour_space_flag == cu->act_enabled_flag))
374 return ff_vvc_default_scale_m;374 return ff_vvc_default_scale_m;
375 375
376 if (!sl) {376 if (!sl) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t