fix ==135000== Conditional jump or move depends on uninitialised value(s) ==135000== at 0x169FF95: vvc_deblock_bs (filter.c:699) and ==135000== Conditional jump or move depends on uninitialised value(s) ==135000== at 0x16A2E72: ff_vvc_alf_filter (filter.c:1217)
Unified · Split
| @@ -686,11 +686,12 @@ static void vvc_deblock_bs(const VVCLocalContext *lc, const int x0, const int y0 · 685 unmodified lines | |||
| 686 | const int ctb_size = sps->ctb_size_y; | 686 | const int ctb_size = sps->ctb_size_y; |
| 687 | const int x_end = FFMIN(x0 + ctb_size, pps->width) >> MIN_TU_LOG2; | 687 | const int x_end = FFMIN(x0 + ctb_size, pps->width) >> MIN_TU_LOG2; |
| 688 | const int y_end = FFMIN(y0 + ctb_size, pps->height) >> MIN_TU_LOG2; | 688 | const int y_end = FFMIN(y0 + ctb_size, pps->height) >> MIN_TU_LOG2; |
| 689 | const int has_chroma = !!sps->r->sps_chroma_format_idc; | ||
| 689 | deblock_bs_fn deblock_bs[] = { | 690 | deblock_bs_fn deblock_bs[] = { |
| 690 | vvc_deblock_bs_luma, vvc_deblock_bs_chroma | 691 | vvc_deblock_bs_luma, vvc_deblock_bs_chroma |
| 691 | }; | 692 | }; |
| 692 | 693 | ||
| 693 | for (int is_chroma = 0; is_chroma <= 1; is_chroma++) { | 694 | for (int is_chroma = 0; is_chroma <= has_chroma; is_chroma++) { |
| 694 | const int hs = sps->hshift[is_chroma]; | 695 | const int hs = sps->hshift[is_chroma]; |
| 695 | const int vs = sps->vshift[is_chroma]; | 696 | const int vs = sps->vshift[is_chroma]; |
| 696 | for (int y = y0 >> MIN_TU_LOG2; y < y_end; y++) { | 697 | for (int y = y0 >> MIN_TU_LOG2; y < y_end; y++) { |
| @@ -1194,6 +1195,7 @@ void ff_vvc_alf_filter(VVCLocalContext *lc, const int x0, const int y0) · 497 unmodified lines | |||
| 1194 | const int padded_stride = EDGE_EMU_BUFFER_STRIDE << ps; | 1195 | const int padded_stride = EDGE_EMU_BUFFER_STRIDE << ps; |
| 1195 | const int padded_offset = padded_stride * ALF_PADDING_SIZE + (ALF_PADDING_SIZE << ps); | 1196 | const int padded_offset = padded_stride * ALF_PADDING_SIZE + (ALF_PADDING_SIZE << ps); |
| 1196 | const int c_end = sps->r->sps_chroma_format_idc ? VVC_MAX_SAMPLE_ARRAYS : 1; | 1197 | const int c_end = sps->r->sps_chroma_format_idc ? VVC_MAX_SAMPLE_ARRAYS : 1; |
| 1198 | const int has_chroma = !!sps->r->sps_chroma_format_idc; | ||
| 1197 | const int ctu_end = y0 + sps->ctb_size_y; | 1199 | const int ctu_end = y0 + sps->ctb_size_y; |
| 1198 | const ALFParams *alf = &CTB(fc->tab.alf, rx, ry); | 1200 | const ALFParams *alf = &CTB(fc->tab.alf, rx, ry); |
| 1199 | int sb_edges[MAX_VBBS][MAX_EDGES], nb_sbs; | 1201 | int sb_edges[MAX_VBBS][MAX_EDGES], nb_sbs; |
| @@ -1214,7 +1216,7 @@ void ff_vvc_alf_filter(VVCLocalContext *lc, const int x0, const int y0) · 14 unmodified lines | |||
| 1214 | uint8_t *src = POS(c_idx, sb->l, sb->t); | 1216 | uint8_t *src = POS(c_idx, sb->l, sb->t); |
| 1215 | uint8_t *padded; | 1217 | uint8_t *padded; |
| 1216 | 1218 | ||
| 1217 | if (alf->ctb_flag[c_idx] || (!c_idx && (alf->ctb_cc_idc[0] || alf->ctb_cc_idc[1]))) { | 1219 | if (alf->ctb_flag[c_idx] || (!c_idx && has_chroma && (alf->ctb_cc_idc[0] || alf->ctb_cc_idc[1]))) { |
| 1218 | padded = (c_idx ? lc->alf_buffer_chroma : lc->alf_buffer_luma) + padded_offset; | 1220 | padded = (c_idx ? lc->alf_buffer_chroma : lc->alf_buffer_luma) + padded_offset; |
| 1219 | alf_prepare_buffer(fc, padded, src, x, y, rx, ry, width, height, | 1221 | alf_prepare_buffer(fc, padded, src, x, y, rx, ry, width, height, |
| 1220 | padded_stride, src_stride, c_idx, sb_edges[i]); | 1222 | padded_stride, src_stride, c_idx, sb_edges[i]); |