summaryrefslogtreecommitdiff
path: root/vp9/decoder
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-12-03 17:59:32 -0800
committerDmitry Kovalev <dkovalev@google.com>2013-12-03 17:59:32 -0800
commitf00d157c125a5362b48037a2c65d2f0eee4f5f84 (patch)
treec3ed89ef93a5cc82057ab6371733875e18691874 /vp9/decoder
parent3c34619125ea8a5ea1657d06d7c4d970d0a30599 (diff)
downloadlibvpx-f00d157c125a5362b48037a2c65d2f0eee4f5f84.tar
libvpx-f00d157c125a5362b48037a2c65d2f0eee4f5f84.tar.gz
libvpx-f00d157c125a5362b48037a2c65d2f0eee4f5f84.tar.bz2
libvpx-f00d157c125a5362b48037a2c65d2f0eee4f5f84.zip
Moving eob array to the encoder.
In the decoder we don't need to save eobs, we can pass eob as an argument. That's why removing eob arrays from VP9Decompressor and TileWorkerData, and moving eob pointer from macroblockd_plane to macroblock_plane. Change-Id: I8eb919acc837acfb3abdd8319af63d1bbca8217a
Diffstat (limited to 'vp9/decoder')
-rw-r--r--vp9/decoder/vp9_decodeframe.c24
-rw-r--r--vp9/decoder/vp9_detokenize.c1
-rw-r--r--vp9/decoder/vp9_onyxd_if.c4
-rw-r--r--vp9/decoder/vp9_onyxd_int.h1
4 files changed, 13 insertions, 17 deletions
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index 9b6740eea..82bace00d 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -42,7 +42,6 @@ typedef struct TileWorkerData {
vp9_reader bit_reader;
DECLARE_ALIGNED(16, MACROBLOCKD, xd);
DECLARE_ALIGNED(16, int16_t, dqcoeff[MAX_MB_PLANE][64 * 64]);
- DECLARE_ALIGNED(16, uint16_t, eobs[MAX_MB_PLANE][256]);
} TileWorkerData;
static int read_be32(const uint8_t *p) {
@@ -238,9 +237,9 @@ static void alloc_tile_storage(VP9D_COMP *pbi, int tile_rows, int tile_cols) {
}
static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block,
- TX_SIZE tx_size, uint8_t *dst, int stride) {
+ TX_SIZE tx_size, uint8_t *dst, int stride,
+ int eob) {
struct macroblockd_plane *const pd = &xd->plane[plane];
- const int eob = pd->eobs[block];
if (eob > 0) {
TX_TYPE tx_type;
const int plane_type = pd->plane_type;
@@ -313,9 +312,11 @@ static void predict_and_reconstruct_intra_block(int plane, int block,
dst, pd->dst.stride, dst, pd->dst.stride);
if (!mi->mbmi.skip_coeff) {
- vp9_decode_block_tokens(cm, xd, plane, block, plane_bsize, x, y, tx_size,
- args->r);
- inverse_transform_block(xd, plane, block, tx_size, dst, pd->dst.stride);
+ const int eob = vp9_decode_block_tokens(cm, xd, plane, block,
+ plane_bsize, x, y, tx_size,
+ args->r);
+ inverse_transform_block(xd, plane, block, tx_size, dst, pd->dst.stride,
+ eob);
}
}
@@ -333,14 +334,14 @@ static void reconstruct_inter_block(int plane, int block,
VP9_COMMON *const cm = args->cm;
MACROBLOCKD *const xd = args->xd;
struct macroblockd_plane *const pd = &xd->plane[plane];
- int x, y;
+ int x, y, eob;
txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &x, &y);
- *args->eobtotal += vp9_decode_block_tokens(cm, xd, plane, block,
- plane_bsize, x, y, tx_size,
- args->r);
+ eob = vp9_decode_block_tokens(cm, xd, plane, block, plane_bsize, x, y,
+ tx_size, args->r);
inverse_transform_block(xd, plane, block, tx_size,
&pd->dst.buf[4 * y * pd->dst.stride + 4 * x],
- pd->dst.stride);
+ pd->dst.stride, eob);
+ *args->eobtotal += eob;
}
static void set_offsets(VP9_COMMON *const cm, MACROBLOCKD *const xd,
@@ -925,7 +926,6 @@ static void setup_tile_macroblockd(TileWorkerData *const tile_data) {
for (i = 0; i < MAX_MB_PLANE; ++i) {
pd[i].dqcoeff = tile_data->dqcoeff[i];
- pd[i].eobs = tile_data->eobs[i];
vpx_memset(xd->plane[i].dqcoeff, 0, 64 * 64 * sizeof(int16_t));
}
}
diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c
index bdbe67dbc..8be71d392 100644
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -213,7 +213,6 @@ int vp9_decode_block_tokens(VP9_COMMON *cm, MACROBLOCKD *xd,
BLOCK_OFFSET(pd->dqcoeff, block), tx_size,
pd->dequant, pt);
set_contexts(xd, pd, plane_bsize, tx_size, eob > 0, x, y);
- pd->eobs[block] = eob;
return eob;
}
diff --git a/vp9/decoder/vp9_onyxd_if.c b/vp9/decoder/vp9_onyxd_if.c
index 740ad72cb..25fb3d6d2 100644
--- a/vp9/decoder/vp9_onyxd_if.c
+++ b/vp9/decoder/vp9_onyxd_if.c
@@ -112,10 +112,8 @@ static void init_macroblockd(VP9D_COMP *const pbi) {
struct macroblockd_plane *const pd = xd->plane;
int i;
- for (i = 0; i < MAX_MB_PLANE; ++i) {
+ for (i = 0; i < MAX_MB_PLANE; ++i)
pd[i].dqcoeff = pbi->dqcoeff[i];
- pd[i].eobs = pbi->eobs[i];
- }
}
VP9D_PTR vp9_create_decompressor(VP9D_CONFIG *oxcf) {
diff --git a/vp9/decoder/vp9_onyxd_int.h b/vp9/decoder/vp9_onyxd_int.h
index 038cd96a5..e90f8923c 100644
--- a/vp9/decoder/vp9_onyxd_int.h
+++ b/vp9/decoder/vp9_onyxd_int.h
@@ -23,7 +23,6 @@ typedef struct VP9Decompressor {
DECLARE_ALIGNED(16, VP9_COMMON, common);
DECLARE_ALIGNED(16, int16_t, dqcoeff[MAX_MB_PLANE][64 * 64]);
- DECLARE_ALIGNED(16, uint16_t, eobs[MAX_MB_PLANE][256]);
VP9D_CONFIG oxcf;