mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
vc1dec: factorize picture pointer selection code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3fdd0979ac
commit
72e5d91908
@ -384,32 +384,20 @@ static void vc1_mc_1mv(VC1Context *v, int dir)
|
|||||||
uvmx = uvmx + ((uvmx < 0) ? (uvmx & 1) : -(uvmx & 1));
|
uvmx = uvmx + ((uvmx < 0) ? (uvmx & 1) : -(uvmx & 1));
|
||||||
uvmy = uvmy + ((uvmy < 0) ? (uvmy & 1) : -(uvmy & 1));
|
uvmy = uvmy + ((uvmy < 0) ? (uvmy & 1) : -(uvmy & 1));
|
||||||
}
|
}
|
||||||
if (v->field_mode) { // interlaced field picture
|
if (!dir) {
|
||||||
if (!dir) {
|
if (v->field_mode && (v->cur_field_type != v->ref_field_type[dir]) && v->second_field) {
|
||||||
if ((v->cur_field_type != v->ref_field_type[dir]) && v->second_field) {
|
srcY = s->current_picture.f.data[0];
|
||||||
srcY = s->current_picture.f.data[0];
|
srcU = s->current_picture.f.data[1];
|
||||||
srcU = s->current_picture.f.data[1];
|
srcV = s->current_picture.f.data[2];
|
||||||
srcV = s->current_picture.f.data[2];
|
|
||||||
} else {
|
|
||||||
srcY = s->last_picture.f.data[0];
|
|
||||||
srcU = s->last_picture.f.data[1];
|
|
||||||
srcV = s->last_picture.f.data[2];
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
srcY = s->next_picture.f.data[0];
|
|
||||||
srcU = s->next_picture.f.data[1];
|
|
||||||
srcV = s->next_picture.f.data[2];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!dir) {
|
|
||||||
srcY = s->last_picture.f.data[0];
|
srcY = s->last_picture.f.data[0];
|
||||||
srcU = s->last_picture.f.data[1];
|
srcU = s->last_picture.f.data[1];
|
||||||
srcV = s->last_picture.f.data[2];
|
srcV = s->last_picture.f.data[2];
|
||||||
} else {
|
|
||||||
srcY = s->next_picture.f.data[0];
|
|
||||||
srcU = s->next_picture.f.data[1];
|
|
||||||
srcV = s->next_picture.f.data[2];
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
srcY = s->next_picture.f.data[0];
|
||||||
|
srcU = s->next_picture.f.data[1];
|
||||||
|
srcV = s->next_picture.f.data[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!srcY)
|
if(!srcY)
|
||||||
@ -574,11 +562,8 @@ static void vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg)
|
|||||||
my = s->mv[dir][n][1];
|
my = s->mv[dir][n][1];
|
||||||
|
|
||||||
if (!dir) {
|
if (!dir) {
|
||||||
if (v->field_mode) {
|
if (v->field_mode && (v->cur_field_type != v->ref_field_type[dir]) && v->second_field) {
|
||||||
if ((v->cur_field_type != v->ref_field_type[dir]) && v->second_field)
|
srcY = s->current_picture.f.data[0];
|
||||||
srcY = s->current_picture.f.data[0];
|
|
||||||
else
|
|
||||||
srcY = s->last_picture.f.data[0];
|
|
||||||
} else
|
} else
|
||||||
srcY = s->last_picture.f.data[0];
|
srcY = s->last_picture.f.data[0];
|
||||||
} else
|
} else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user