diff options
author | Yaowu Xu <yaowu@google.com> | 2012-01-20 15:30:31 -0800 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2012-02-16 15:00:10 -0800 |
commit | b92a96d8adfcdb381d559c65aaa65805e1bc9321 (patch) | |
tree | a9b17483944bcf36450a10d8f828b908f380b301 /vp8/encoder/rdopt.c | |
parent | f90983e16748f8f3a4c18a4c6f8f13e0de4aa4ac (diff) | |
download | libvpx-b92a96d8adfcdb381d559c65aaa65805e1bc9321.tar libvpx-b92a96d8adfcdb381d559c65aaa65805e1bc9321.tar.gz libvpx-b92a96d8adfcdb381d559c65aaa65805e1bc9321.tar.bz2 libvpx-b92a96d8adfcdb381d559c65aaa65805e1bc9321.zip |
Reworked context conversion between 8x8 and 4x4
The commit rationized and simplified the entropy context conversion
betwen MB using 8x8 transform and MB using 4x4 transform. The old version
had a number of weirdness in how 4x4 transform MB's context is used for
8x8 blocks other than the first 8x8 within a MB.
Test showed the change has a gain ~.1% for avg psnr, glb psnr and ssim on
the limited HD set.
Change-Id: I774536c416baa6845aa741f956d8a69fa40e5d47
Diffstat (limited to 'vp8/encoder/rdopt.c')
-rw-r--r-- | vp8/encoder/rdopt.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 61ee7fe5c..73cd21e2a 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -690,8 +690,7 @@ static int cost_coeffs_2x2(MACROBLOCK *mb, static int cost_coeffs_8x8(MACROBLOCK *mb, BLOCKD *b, int type, - ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l, - ENTROPY_CONTEXT *a1, ENTROPY_CONTEXT *l1) + ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l) { int c = !type; /* start at coef 0, unless Y with Y2 */ int eob = b->eob; @@ -699,7 +698,7 @@ static int cost_coeffs_8x8(MACROBLOCK *mb, int cost = 0; short *qcoeff_ptr = b->qcoeff; - VP8_COMBINEENTROPYCONTEXTS_8x8(pt, *a, *l, *a1, *l1); + VP8_COMBINEENTROPYCONTEXTS(pt, *a, *l); # define QC8X8( I) ( qcoeff_ptr [vp8_default_zig_zag1d_8x8[I]] ) @@ -738,8 +737,7 @@ static int vp8_rdcost_mby_8x8(MACROBLOCK *mb) for (b = 0; b < 16; b+=4) cost += cost_coeffs_8x8(mb, x->block + b, PLANE_TYPE_Y_NO_DC, - ta + vp8_block2above[b], tl + vp8_block2left[b], - ta + vp8_block2above[b+1], tl + vp8_block2left[b+4]); + ta + vp8_block2above_8x8[b], tl + vp8_block2left_8x8[b]); cost += cost_coeffs_2x2(mb, x->block + 24, PLANE_TYPE_Y2, ta + vp8_block2above[24], tl + vp8_block2left[24]); @@ -1204,10 +1202,8 @@ static int rd_cost_mbuv_8x8(MACROBLOCK *mb) for (b = 16; b < 24; b+=4) cost += cost_coeffs_8x8(mb, x->block + b, PLANE_TYPE_UV, - ta + vp8_block2above[b], - tl + vp8_block2left[b], - ta + vp8_block2above[b+1], - tl + vp8_block2left[b+2]); + ta + vp8_block2above_8x8[b], + tl + vp8_block2left_8x8[b]); return cost; } |