Unified · Split
| @@ -772,17 +772,15 @@ static int get_qp(const VVCFrameContext *fc, const uint8_t *src, const int x, co · 771 unmodified lines | ||
| 772 | 772 | |
| 773 | 773 | static void vvc_deblock(const VVCLocalContext *lc, int x0, int y0, const int rs, const int vertical) |
| 774 | 774 | { |
| 775 | − VVCFrameContext *fc = lc->fc; | |
| 776 | − const VVCSPS *sps = fc->ps.sps; | |
| 777 | − const int c_end = sps->r->sps_chroma_format_idc ? VVC_MAX_SAMPLE_ARRAYS : 1; | |
| 778 | − const int ctb_size = fc->ps.sps->ctb_size_y; | |
| 779 | − const DBParams *params = fc->tab.deblock + rs; | |
| 780 | − int x_end = FFMIN(x0 + ctb_size, fc->ps.pps->width); | |
| 781 | − int y_end = FFMIN(y0 + ctb_size, fc->ps.pps->height); | |
| 782 | − | |
| 783 | − //not use this yet, may needed by plt. | |
| 784 | − const uint8_t no_p[4] = { 0 }; | |
| 785 | − const uint8_t no_q[4] = { 0 } ; | |
| 775 | + VVCFrameContext *fc = lc->fc; | |
| 776 | + const VVCSPS *sps = fc->ps.sps; | |
| 777 | + const int c_end = sps->r->sps_chroma_format_idc ? VVC_MAX_SAMPLE_ARRAYS : 1; | |
| 778 | + const int ctb_size = fc->ps.sps->ctb_size_y; | |
| 779 | + const DBParams *params = fc->tab.deblock + rs; | |
| 780 | + int x_end = FFMIN(x0 + ctb_size, fc->ps.pps->width); | |
| 781 | + int y_end = FFMIN(y0 + ctb_size, fc->ps.pps->height); | |
| 782 | + const int log2_min_cb_size = fc->ps.sps->min_cb_log2_size_y; | |
| 783 | + const int min_cb_width = fc->ps.pps->min_cb_width; | |
| 786 | 784 | |
| 787 | 785 | if (!vertical) { |
| 788 | 786 | FFSWAP(int, x_end, y_end); |
| @@ -802,6 +800,8 @@ static void vvc_deblock(const VVCLocalContext *lc, int x0, int y0, const int rs, · 13 unmodified lines | ||
| 802 | 800 | const uint8_t horizontal_ctu_edge = !vertical && !(x % ctb_size); |
| 803 | 801 | int32_t bs[4], beta[4], tc[4] = { 0 }, all_zero_bs = 1; |
| 804 | 802 | uint8_t max_len_p[4], max_len_q[4]; |
| 803 | + uint8_t no_p[4] = { 0 }; | |
| 804 | + uint8_t no_q[4] = { 0 }; | |
| 805 | 805 | |
| 806 | 806 | for (int i = 0; i < DEBLOCK_STEP >> (2 - vs); i++) { |
| 807 | 807 | int tx = x; |
| @@ -818,6 +818,13 @@ static void vvc_deblock(const VVCLocalContext *lc, int x0, int y0, const int rs, · 10 unmodified lines | ||
| 818 | 818 | tc[i] = TC_CALC(qp, bs[i]) ; |
| 819 | 819 | max_filter_length(fc, tx, ty, c_idx, vertical, horizontal_ctu_edge, bs[i], &max_len_p[i], &max_len_q[i]); |
| 820 | 820 | all_zero_bs = 0; |
| 821 | + | |
| 822 | + if (sps->r->sps_palette_enabled_flag) { | |
| 823 | + const int cu_q = (ty >> log2_min_cb_size) * min_cb_width + (tx >> log2_min_cb_size); | |
| 824 | + const int cu_p = (ty - !vertical >> log2_min_cb_size) * min_cb_width + (tx - vertical >> log2_min_cb_size); | |
| 825 | + no_q[i] = fc->tab.cpm[!!c_idx][cu_q] == MODE_PLT; | |
| 826 | + no_p[i] = cu_p >= 0 && fc->tab.cpm[!!c_idx][cu_p] == MODE_PLT; | |
| 827 | + } | |
| 821 | 828 | } |
| 822 | 829 | } |
| 823 | 830 | |