Merge commit '728214992e3698305550c1762f973d2ac567f016'

* commit '728214992e3698305550c1762f973d2ac567f016':
  vc1dec: Remove interlaced warning
  vc1dec: Fix mixed field/frame intensity compensation
  vc1dec: Match addressing between compensation and MC in vc1_mc_4mv_chroma4
  vc1dec: Handle top and bottom blocks in vc1_mc_4mv_chroma4() differently if needed
  vc1dec: Fix doxy for vc1_mc_4mv_chroma4()
  vc1dec: Drop old use_ic code from vc1_b_mc
  vc1: Use shuffled use_ic instead of equally shuffled mv_mode
  vc1dec: Implement intensity compensation for vc1_interp_mc()

Conflicts:
	Changelog
	libavcodec/vc1dec.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-05-29 03:28:18 +02:00
commit a58e10e5d1
3 changed files with 36 additions and 35 deletions

View File

@ -56,6 +56,7 @@ version <next>:
- SMPTE 302M audio encoder
- support for slice multithreading in libavfilter
- Hald CLUT support (generation and filtering)
- VC-1 interlaced B-frame support
version 1.2:

View File

@ -389,24 +389,24 @@ static void vc1_mc_1mv(VC1Context *v, int dir)
srcY = s->current_picture.f.data[0];
srcU = s->current_picture.f.data[1];
srcV = s->current_picture.f.data[2];
luty = v->curr_luty;
lutuv= v->curr_lutuv;
use_ic=v->curr_use_ic;
luty = v->curr_luty;
lutuv = v->curr_lutuv;
use_ic = v->curr_use_ic;
} else {
srcY = s->last_picture.f.data[0];
srcU = s->last_picture.f.data[1];
srcV = s->last_picture.f.data[2];
luty = v->last_luty ;
lutuv= v->last_lutuv;
use_ic=v->last_use_ic;
luty = v->last_luty;
lutuv = v->last_lutuv;
use_ic = v->last_use_ic;
}
} else {
srcY = s->next_picture.f.data[0];
srcU = s->next_picture.f.data[1];
srcV = s->next_picture.f.data[2];
luty = v->next_luty ;
lutuv= v->next_lutuv;
use_ic=v->next_use_ic;
luty = v->next_luty;
lutuv = v->next_lutuv;
use_ic = v->next_use_ic;
}
if(!srcY)
@ -492,7 +492,7 @@ static void vc1_mc_1mv(VC1Context *v, int dir)
src = srcY;
for (j = 0; j < 17 + s->mspel * 2; j++) {
int f = v->field_mode ? v->ref_field_type[dir] : ((j + src_y - s->mspel)&1) ;
int f = v->field_mode ? v->ref_field_type[dir] : ((j + src_y - s->mspel) & 1) ;
for (i = 0; i < 17 + s->mspel * 2; i++)
src[i] = luty[f][src[i]];
src += s->linesize;
@ -500,7 +500,7 @@ static void vc1_mc_1mv(VC1Context *v, int dir)
src = srcU;
src2 = srcV;
for (j = 0; j < 9; j++) {
int f = v->field_mode ? v->ref_field_type[dir] : ((j + uvsrc_y)&1);
int f = v->field_mode ? v->ref_field_type[dir] : ((j + uvsrc_y) & 1);
for (i = 0; i < 9; i++) {
src[i] = lutuv[f][src[i]];
src2[i] = lutuv[f][src2[i]];
@ -576,16 +576,16 @@ static void vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg)
if (v->field_mode && (v->cur_field_type != v->ref_field_type[dir]) && v->second_field) {
srcY = s->current_picture.f.data[0];
luty = v->curr_luty;
use_ic=v->curr_use_ic;
use_ic = v->curr_use_ic;
} else {
srcY = s->last_picture.f.data[0];
luty = v->last_luty;
use_ic=v->last_use_ic;
use_ic = v->last_use_ic;
}
} else {
srcY = s->next_picture.f.data[0];
luty = v->next_luty;
use_ic=v->next_use_ic;
use_ic = v->next_use_ic;
}
if(!srcY)
@ -717,7 +717,7 @@ static void vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg)
src = srcY;
for (j = 0; j < 9 + s->mspel * 2; j++) {
int f = v->field_mode ? v->ref_field_type[dir] : (((j<<fieldmv)+src_y - (s->mspel << fieldmv))&1);
int f = v->field_mode ? v->ref_field_type[dir] : (((j<<fieldmv)+src_y - (s->mspel << fieldmv)) & 1);
for (i = 0; i < 9 + s->mspel * 2; i++)
src[i] = luty[f][src[i]];
src += s->linesize << fieldmv;
@ -874,19 +874,19 @@ static void vc1_mc_4mv_chroma(VC1Context *v, int dir)
if (v->field_mode && (v->cur_field_type != chroma_ref_type) && v->second_field) {
srcU = s->current_picture.f.data[1];
srcV = s->current_picture.f.data[2];
lutuv= v->curr_lutuv;
use_ic=v->curr_use_ic;
lutuv = v->curr_lutuv;
use_ic = v->curr_use_ic;
} else {
srcU = s->last_picture.f.data[1];
srcV = s->last_picture.f.data[2];
lutuv= v->last_lutuv;
use_ic=v->last_use_ic;
lutuv = v->last_lutuv;
use_ic = v->last_use_ic;
}
} else {
srcU = s->next_picture.f.data[1];
srcV = s->next_picture.f.data[2];
lutuv= v->next_lutuv;
use_ic=v->next_use_ic;
lutuv = v->next_lutuv;
use_ic = v->next_use_ic;
}
if(!srcU)
@ -939,7 +939,7 @@ static void vc1_mc_4mv_chroma(VC1Context *v, int dir)
src = srcU;
src2 = srcV;
for (j = 0; j < 9; j++) {
int f = v->field_mode ? chroma_ref_type : ((j + uvsrc_y)&1);
int f = v->field_mode ? chroma_ref_type : ((j + uvsrc_y) & 1);
for (i = 0; i < 9; i++) {
src[i] = lutuv[f][src[i]];
src2[i] = lutuv[f][src2[i]];
@ -983,7 +983,7 @@ static void vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg)
return;
for (i = 0; i < 4; i++) {
int d = i<2 ? dir: dir2;
int d = i < 2 ? dir: dir2;
tx = s->mv[d][i][0];
uvmx_field[i] = (tx + ((tx & 3) == 3)) >> 1;
ty = s->mv[d][i][1];
@ -1019,7 +1019,7 @@ static void vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg)
if (fieldmv && (uvsrc_y & 1) && uvsrc_y < 2)
uvsrc_y--;
if ((use_ic)
if (use_ic
|| s->h_edge_pos < 10 || v_edge_pos < (5 << fieldmv)
|| (unsigned)uvsrc_x > (s->h_edge_pos >> 1) - 5
|| (unsigned)uvsrc_y > v_edge_pos - (5 << fieldmv)) {
@ -1040,7 +1040,7 @@ static void vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg)
src = srcU;
src2 = srcV;
for (j = 0; j < 5; j++) {
int f = (uvsrc_y + (j<<fieldmv))&1;
int f = (uvsrc_y + (j << fieldmv)) & 1;
for (i = 0; i < 5; i++) {
src[i] = lutuv[f][src[i]];
src2[i] = lutuv[f][src2[i]];
@ -1059,13 +1059,13 @@ static void vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg)
v->vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[1](s->dest[2] + off, srcV, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]);
}
} else {
if (!v->rnd) {
h264chroma->put_h264_chroma_pixels_tab[1](s->dest[1] + off, srcU, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]);
h264chroma->put_h264_chroma_pixels_tab[1](s->dest[2] + off, srcV, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]);
} else {
v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[1](s->dest[1] + off, srcU, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]);
v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[1](s->dest[2] + off, srcV, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]);
}
if (!v->rnd) {
h264chroma->put_h264_chroma_pixels_tab[1](s->dest[1] + off, srcU, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]);
h264chroma->put_h264_chroma_pixels_tab[1](s->dest[2] + off, srcV, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]);
} else {
v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[1](s->dest[1] + off, srcU, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]);
v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[1](s->dest[2] + off, srcV, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]);
}
}
}
}
@ -1996,7 +1996,7 @@ static void vc1_interp_mc(VC1Context *v)
src = srcY;
for (j = 0; j < 17 + s->mspel * 2; j++) {
int f = v->field_mode ? v->ref_field_type[1] : ((j+src_y - s->mspel)&1);
int f = v->field_mode ? v->ref_field_type[1] : ((j+src_y - s->mspel) & 1);
for (i = 0; i < 17 + s->mspel * 2; i++)
src[i] = luty[f][src[i]];
src += s->linesize;
@ -2004,7 +2004,7 @@ static void vc1_interp_mc(VC1Context *v)
src = srcU;
src2 = srcV;
for (j = 0; j < 9; j++) {
int f = v->field_mode ? v->ref_field_type[1] : ((j+uvsrc_y)&1);
int f = v->field_mode ? v->ref_field_type[1] : ((j+uvsrc_y) & 1);
for (i = 0; i < 9; i++) {
src[i] = lutuv[f][src[i]];
src2[i] = lutuv[f][src2[i]];

View File

@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 12
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \