mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Split RV3/4 deblock pattern into horizontal and vertical parts
during calculating. Originally committed as revision 15794 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a85de417db
commit
502ecc97af
@ -1082,19 +1082,23 @@ static int is_mv_diff_gt_3(int16_t (*motion_val)[2], int step)
|
|||||||
static int rv34_set_deblock_coef(RV34DecContext *r)
|
static int rv34_set_deblock_coef(RV34DecContext *r)
|
||||||
{
|
{
|
||||||
MpegEncContext *s = &r->s;
|
MpegEncContext *s = &r->s;
|
||||||
int mvmask = 0, i, j;
|
int hmvmask = 0, vmvmask = 0, i, j;
|
||||||
int midx = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride;
|
int midx = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride;
|
||||||
int16_t (*motion_val)[2] = s->current_picture_ptr->motion_val[0][midx];
|
int16_t (*motion_val)[2] = s->current_picture_ptr->motion_val[0][midx];
|
||||||
for(j = 0; j < 16; j += 8){
|
for(j = 0; j < 16; j += 8){
|
||||||
for(i = 0; i < 2; i++){
|
for(i = 0; i < 2; i++){
|
||||||
if(is_mv_diff_gt_3(motion_val + i, 1))
|
if(is_mv_diff_gt_3(motion_val + i, 1))
|
||||||
mvmask |= 0x11 << (j + i*2);
|
vmvmask |= 0x11 << (j + i*2);
|
||||||
if(is_mv_diff_gt_3(motion_val + i, s->b8_stride))
|
if(is_mv_diff_gt_3(motion_val + i, s->b8_stride))
|
||||||
mvmask |= 0x03 << (j + i*2);
|
hmvmask |= 0x03 << (j + i*2);
|
||||||
}
|
}
|
||||||
motion_val += s->b8_stride;
|
motion_val += s->b8_stride;
|
||||||
}
|
}
|
||||||
return mvmask;
|
if(s->first_slice_line)
|
||||||
|
hmvmask &= ~0x000F;
|
||||||
|
if(!s->mb_x)
|
||||||
|
vmvmask &= ~0x1111;
|
||||||
|
return hmvmask | vmvmask; //XXX: should be stored separately for RV3
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rv34_decode_macroblock(RV34DecContext *r, int8_t *intra_types)
|
static int rv34_decode_macroblock(RV34DecContext *r, int8_t *intra_types)
|
||||||
|
Loading…
Reference in New Issue
Block a user