# HG changeset patch # User kostya # Date 1229544048 0 # Node ID 45c3780b1a9625df1d532bca96c67da8b9428fd7 # Parent a7c85cdc11b535e9ca7e7596da4112043a458f43 Merge deblocking pattern with CBP for RV30/40 loop filtering diff -r a7c85cdc11b5 -r 45c3780b1a96 rv34.c --- a/rv34.c Wed Dec 17 19:39:56 2008 +0000 +++ b/rv34.c Wed Dec 17 20:00:48 2008 +0000 @@ -1151,9 +1151,9 @@ r->cbp_luma [s->mb_x + s->mb_y * s->mb_stride] = cbp; r->cbp_chroma[s->mb_x + s->mb_y * s->mb_stride] = cbp >> 16; if(s->pict_type == FF_I_TYPE) - r->deblock_coefs[mb_pos] = 0; + r->deblock_coefs[mb_pos] = 0xFFFF; else - r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r); + r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r) | r->cbp_luma[mb_pos]; s->current_picture_ptr->qscale_table[s->mb_x + s->mb_y * s->mb_stride] = s->qscale; if(cbp == -1) diff -r a7c85cdc11b5 -r 45c3780b1a96 rv40.c --- a/rv40.c Wed Dec 17 19:39:56 2008 +0000 +++ b/rv40.c Wed Dec 17 20:00:48 2008 +0000 @@ -453,7 +453,7 @@ for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){ int mbtype = s->current_picture_ptr->mb_type[mb_pos]; if(IS_INTRA(mbtype) || IS_SEPARATE_DC(mbtype)) - r->cbp_luma [mb_pos] = 0xFFFF; + r->cbp_luma [mb_pos] = r->deblock_coefs[mb_pos] = 0xFFFF; if(IS_INTRA(mbtype)) r->cbp_chroma[mb_pos] = 0xFF; } @@ -493,9 +493,7 @@ mb_strong[i] = IS_INTRA(mbtype[i]) || IS_SEPARATE_DC(mbtype[i]); clip[i] = rv40_filter_clip_tbl[mb_strong[i] + 1][q]; } - y_to_deblock = cbp[POS_CUR] - | (cbp[POS_BOTTOM] << 16) - | mvmasks[POS_CUR] + y_to_deblock = mvmasks[POS_CUR] | (mvmasks[POS_BOTTOM] << 16); /* This pattern contains bits signalling that horizontal edges of * the current block can be filtered. @@ -558,7 +556,7 @@ // filter left block edge in ordinary mode (with low filtering strength) if(y_v_deblock & (MASK_CUR << ij) && (i || !(mb_strong[POS_CUR] || mb_strong[POS_LEFT]))){ if(!i) - clip_left = (cbp[POS_LEFT] | mvmasks[POS_LEFT]) & (MASK_RIGHT << j) ? clip[POS_LEFT] : 0; + clip_left = mvmasks[POS_LEFT] & (MASK_RIGHT << j) ? clip[POS_LEFT] : 0; else clip_left = y_to_deblock & (MASK_CUR << (ij-1)) ? clip[POS_CUR] : 0; rv40_v_loop_filter(Y, s->linesize, dither, @@ -570,12 +568,12 @@ if(!j && y_h_deblock & (MASK_CUR << i) && (mb_strong[POS_CUR] || mb_strong[POS_TOP])){ rv40_h_loop_filter(Y, s->linesize, dither, clip_cur, - (cbp[POS_TOP] | mvmasks[POS_TOP]) & (MASK_TOP << i) ? clip[POS_TOP] : 0, + mvmasks[POS_TOP] & (MASK_TOP << i) ? clip[POS_TOP] : 0, alpha, beta, betaY, 0, 1); } // filter left block edge in edge mode (with high filtering strength) if(y_v_deblock & (MASK_CUR << ij) && !i && (mb_strong[POS_CUR] || mb_strong[POS_LEFT])){ - clip_left = (cbp[POS_LEFT] | mvmasks[POS_LEFT]) & (MASK_RIGHT << j) ? clip[POS_LEFT] : 0; + clip_left = mvmasks[POS_LEFT] & (MASK_RIGHT << j) ? clip[POS_LEFT] : 0; rv40_v_loop_filter(Y, s->linesize, dither, clip_cur, clip_left,