Skip to content

Commit

Permalink
deblock: refact, use LUMA, CB, CR instead of magic 0, 1, 2, 3
Browse files Browse the repository at this point in the history
  • Loading branch information
nuomi2021 committed Jan 22, 2023
1 parent 63e16b2 commit 94461dc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libavcodec/vvc_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ static void vvc_deblock_bs_luma_vertical(const VVCLocalContext *lc,
int y_tu = (y0 + i) >> log2_min_tu_size;
MvField *left = &tab_mvf[y_pu * min_pu_width + xp_pu];
MvField *curr = &tab_mvf[y_pu * min_pu_width + xq_pu];
uint8_t left_cbf_luma = fc->tab.tu_coded_flag[0][y_tu * min_tu_width + xp_tu];
uint8_t curr_cbf_luma = fc->tab.tu_coded_flag[0][y_tu * min_tu_width + xq_tu];
uint8_t left_cbf_luma = fc->tab.tu_coded_flag[LUMA][y_tu * min_tu_width + xp_tu];
uint8_t curr_cbf_luma = fc->tab.tu_coded_flag[LUMA][y_tu * min_tu_width + xq_tu];
uint8_t pcmf = fc->tab.pcmf[LUMA][y_tu * min_tu_width + xp_tu] &&
fc->tab.pcmf[LUMA][y_tu * min_tu_width + xq_tu];

Expand Down Expand Up @@ -637,8 +637,8 @@ static void vvc_deblock_bs_luma_horizontal(const VVCLocalContext *lc,
int x_tu = (x0 + i) >> log2_min_tu_size;
MvField *top = &tab_mvf[yp_pu * min_pu_width + x_pu];
MvField *curr = &tab_mvf[yq_pu * min_pu_width + x_pu];
uint8_t top_cbf_luma = fc->tab.tu_coded_flag[0][yp_tu * min_tu_width + x_tu];
uint8_t curr_cbf_luma = fc->tab.tu_coded_flag[0][yq_tu * min_tu_width + x_tu];
uint8_t top_cbf_luma = fc->tab.tu_coded_flag[LUMA][yp_tu * min_tu_width + x_tu];
uint8_t curr_cbf_luma = fc->tab.tu_coded_flag[LUMA][yq_tu * min_tu_width + x_tu];
const uint8_t pcmf = fc->tab.pcmf[LUMA][yp_tu * min_tu_width + x_tu] &&
fc->tab.pcmf[LUMA][yq_tu * min_tu_width + x_tu];

Expand Down Expand Up @@ -704,7 +704,7 @@ static void vvc_deblock_bs_chroma_vertical(const VVCLocalContext *lc,
const int curr_tu = y_tu * min_tu_width + xq_tu;
const uint8_t pcmf = fc->tab.pcmf[CHROMA][left_tu] && fc->tab.pcmf[CHROMA][curr_tu];

for (int c = 1; c < 3; c++) {
for (int c = CB; c <= CR; c++) {
uint8_t cbf = fc->tab.tu_coded_flag[c][left_tu] |
fc->tab.tu_coded_flag[c][curr_tu] |
fc->tab.tu_joint_cbcr_residual_flag[left_tu] |
Expand Down Expand Up @@ -760,7 +760,7 @@ static void vvc_deblock_bs_chroma_horizontal(const VVCLocalContext *lc,
const int curr_tu = yq_tu * min_tu_width + x_tu;
const uint8_t pcmf = fc->tab.pcmf[CHROMA][top_tu] && fc->tab.pcmf[CHROMA][curr_tu];

for (int c = 1; c < 3; c++) {
for (int c = CB; c <= CR; c++) {
uint8_t cbf = fc->tab.tu_coded_flag[c][top_tu] |
fc->tab.tu_coded_flag[c][curr_tu] |
fc->tab.tu_joint_cbcr_residual_flag[top_tu] |
Expand Down

0 comments on commit 94461dc

Please sign in to comment.