diff options
author | John Koleszar <jkoleszar@google.com> | 2013-04-23 09:51:09 -0700 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2013-04-23 16:28:17 -0700 |
commit | 138ec38cab4e8093d459600cd744720b036f2d50 (patch) | |
tree | 37caffe1058a7aa433260f8eabc1cda720830504 /vp9/encoder/vp9_encodeframe.c | |
parent | cbd1315ac433e4e81e70fcee0eaad249148dc44e (diff) | |
download | libvpx-138ec38cab4e8093d459600cd744720b036f2d50.tar libvpx-138ec38cab4e8093d459600cd744720b036f2d50.tar.gz libvpx-138ec38cab4e8093d459600cd744720b036f2d50.tar.bz2 libvpx-138ec38cab4e8093d459600cd744720b036f2d50.zip |
Convert coeff to per-plane MACROBLOCK data
This commit moves the coeff storage from the MACROBLOCK struct to its
per-plane part. The next commit will remove the coeff member from the
BLOCK structure so that it is consistently accessed per-plane.
Also refactors vp9_sb_block_error_c and vp9_sb_uv_block_error_c to be
variable subsampling aware.
Change-Id: I18c30f87f27c3a012119b6c1970d5fa499804455
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index fd65dfa45..27d386108 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1736,8 +1736,12 @@ void vp9_encode_frame(VP9_COMP *cpi) { void vp9_setup_block_ptrs(MACROBLOCK *x) { int i; - for (i = 0; i < 24; i++) - x->block[i].coeff = x->coeff + i * 16; + for (i = 0; i < 16; i++) + x->block[i].coeff = x->plane[0].coeff + i * 16; + for (i = 16; i < 20; i++) + x->block[i].coeff = x->plane[1].coeff + (i - 16) * 16; + for (i = 20; i < 24; i++) + x->block[i].coeff = x->plane[2].coeff + (i - 20) * 16; } void vp9_build_block_offsets(MACROBLOCK *x) { |