History

Simplifies band-getting with a static array

Simplifies the code by implementing band mapping with static arrays. A lot of the code complexity introduced in a previous patch disappears.

Deb Mukherjee committed 13 years ago

Commit cfcd5c41 parent 8282c1a9 files · +100 −73Browse files

Unified · Split

9 files
  1. vp9/common/vp9_entropy.c +67 −4
  2. vp9/common/vp9_entropy.h +8 −4
  3. vp9/decoder/vp9_decodframe.c +18 −41
  4. vp9/decoder/vp9_detokenize.c +4 −6
  5. vp9/decoder/vp9_detokenize.h +1 −2
  6. vp9/encoder/vp9_block.h +0 −3
  7. vp9/encoder/vp9_encodemb.c +1 −3
  8. vp9/encoder/vp9_onyx_if.c +0 −7
  9. vp9/encoder/vp9_tokenize.c +1 −3
vp9/common/vp9_entropy.c+67−4
@@ -37,15 +37,78 @@ DECLARE_ALIGNED(16, const uint8_t, vp9_norm[256]) = { · 36 unmodified lines
3737 };
3838
3939 DECLARE_ALIGNED(16, const uint8_t,
40− vp9_coefband_trans_8x8plus[MAXBAND_INDEX + 1]) = {
40+ vp9_coefband_trans_8x8plus[1024]) = {
4141 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
42− 4, 4, 4, 4, 4, 5
42+ 4, 4, 4, 4, 4, 5,
43+ // beyond MAXBAND_INDEX+1 all values are filled as 5
44+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
45+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
46+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
47+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
48+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
49+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
50+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
51+ 5, 5, 5, 5, 5,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LARE_ALIGNED(16, const uint8_t, vp9_pt_energy_class[MAX_ENTROPY_TOKENS]) = {
vp9/common/vp9_entropy.h+8−4
@@ -120,12 +120,16 @@ static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) { · 119 unmodified lines
120120
121121 // This is the index in the scan order beyond which all coefficients for
122122 // 8x8 transform and above are in the top band.
123−// For 4x4 blocks the index is less but to keep things common the lookup
124−// table for 4x4 is padded out to this index.
123+// This macro is currently unused but may be used by certain implementations
125124 #define MAXBAND_INDEX 21
126125
127−extern const uint8_t vp9_coefband_trans_8x8plus[MAXBAND_INDEX + 1];
128−extern const uint8_t vp9_coefband_trans_4x4[MAXBAND_INDEX + 1];
126+extern const uint8_t vp9_coefband_trans_8x8plus[1024];
127+extern const uint8_t vp9_coefband_trans_4x4[16];
128+
129+static const uint8_t *get_band_translate(TX_SIZE tx_size) {
130+ return tx_size == TX_4X4 ? vp9_coefband_trans_4x4
131+ : vp9_coefband_trans_8x8plus;
132+}
129133
130134 // 128 lists of probabilities are stored for the following ONE node probs:
131135 // 1, 3, 5, 7, ..., 253, 255
vp9/decoder/vp9_decodframe.c+18−41
@@ -45,7 +45,6 @@ typedef struct TileWorkerData { · 44 unmodified lines
4545 DECLARE_ALIGNED(16, int16_t, qcoeff[MAX_MB_PLANE][64 * 64]);
4646 DECLARE_ALIGNED(16, int16_t, dqcoeff[MAX_MB_PLANE][64 * 64]);
4747 DECLARE_ALIGNED(16, uint16_t, eobs[MAX_MB_PLANE][256]);
48− const uint8_t *band_translate[2];
4948 } TileWorkerData;
5049
5150 static int read_be32(const uint8_t *p) {
@@ -295,7 +294,6 @@ struct intra_args { · 243 unmodified lines
295294 MACROBLOCKD *xd;
296295 vp9_reader *r;
297296 uint8_t *token_cache;
298− const uint8_t *band_translate[2];
299297 };
300298
301299 static void predict_and_reconstruct_intra_block(int plane, int block,
@@ -304,9 +302,6 @@ static void predict_and_reconstruct_intra_block(int plane, int block, · 2 unmodified lines
304302 struct intra_args *const args = arg;
305303 VP9_COMMON *const cm = args->cm;
306304 MACROBLOCKD *const xd = args->xd;
307− const uint8_t *band_translate[2] = {
308− args->band_translate[0], args->band_translate[1]
309− };
310305 struct macroblockd_plane *const pd = &xd->plane[plane];
311306 MODE_INFO *const mi = xd->mi_8x8[0];
312307 const MB_PREDICTION_MODE mode = (plane == 0)
@@ -327,7 +322,7 @@ static void predict_and_reconstruct_intra_block(int plane, int block, · 14 unmodified lines
327322
328323 if (!mi->mbmi.skip_coeff) {
329324 vp9_decode_block_tokens(cm, xd, plane, block, plane_bsize, x, y, tx_size,
330− args->r, args->token_cache, band_translate);
325+ args->r, args->token_cache);
331326 inverse_transform_block(xd, plane, block, tx_size, x, y);
332327 }
333328 }
@@ -338,7 +333,6 @@ struct inter_args { · 4 unmodified lines
338333 vp9_reader *r;
339334 int *eobtotal;
340335 uint8_t *token_cache;
341− const uint8_t *band_translate[2];
342336 };
343337
344338 static void reconstruct_inter_block(int plane, int block,
@@ -347,16 +341,12 @@ static void reconstruct_inter_block(int plane, int block, · 2 unmodified lines
347341 struct inter_args *args = arg;
348342 VP9_COMMON *const cm = args->cm;
349343 MACROBLOCKD *const xd = args->xd;
350− const uint8_t *band_translate[2] = {
351− args->band_translate[0], args->band_translate[1]
352− };
353344 int x, y;
354345 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &x, &y);
355346
356347 *args->eobtotal += vp9_decode_block_tokens(cm, xd, plane, block,
357348 plane_bsize, x, y, tx_size,
358− args->r, args->token_cache,
359− band_translate);
349+ args->r, args->token_cache);
360350 inverse_transform_block(xd, plane, block, tx_size, x, y);
361351 }
362352
@@ -408,8 +398,7 @@ static void decode_modes_b(VP9_COMMON *const cm, MACROBLOCKD *const xd, · 45 unmodified lines
408398 const TileInfo *const tile,
409399 int mi_row, int mi_col,
410400 vp9_reader *r, BLOCK_SIZE bsize,
411− uint8_t *token_cache,
412− const uint8_t *band_translate[2]) {
401+ uint8_t *token_cache) {
413402 const int less8x8 = bsize < BLOCK_8X8;
414403 MB_MODE_INFO *mbmi;
415404
@@ -432,7 +421,7 @@ static void decode_modes_b(VP9_COMMON *const cm, MACROBLOCKD *const xd, · 16 unmodified lines
432421
433422 if (!is_inter_block(mbmi)) {
434423 struct intra_args arg = {
435− cm, xd, r, token_cache, {band_translate[0], band_translate[1]}
424+ cm, xd, r, token_cache
436425 };
437426 foreach_transformed_block(xd, bsize, predict_and_reconstruct_intra_block,
438427 &arg);
@@ -452,8 +441,7 @@ static void decode_modes_b(VP9_COMMON *const cm, MACROBLOCKD *const xd, · 13 unmodified lines
452441 if (!mbmi->skip_coeff) {
453442 int eobtotal = 0;
454443 struct inter_args arg = {
455− cm, xd, r, &eobtotal, token_cache,
456− {band_translate[0], band_translate[1]}
444+ cm, xd, r, &eobtotal, token_cache
457445 };
458446 foreach_transformed_block(xd, bsize, reconstruct_inter_block, &arg);
459447 if (!less8x8 && eobtotal == 0)
@@ -494,8 +482,7 @@ static void decode_modes_sb(VP9_COMMON *const cm, MACROBLOCKD *const xd, · 34 unmodified lines
494482 const TileInfo *const tile,
495483 int mi_row, int mi_col,
496484 vp9_reader* r, BLOCK_SIZE bsize,
497− uint8_t *token_cache,
498− const uint8_t *band_translate[2]) {
485+ uint8_t *token_cache) {
499486 const int hbs = num_8x8_blocks_wide_lookup[bsize] / 2;
500487 PARTITION_TYPE partition;
501488 BLOCK_SIZE subsize;
@@ -506,37 +493,33 @@ static void decode_modes_sb(VP9_COMMON *const cm, MACROBLOCKD *const xd, · 4 unmodified lines
506493 partition = read_partition(cm, xd, hbs, mi_row, mi_col, bsize, r);
507494 subsize = get_subsize(bsize, partition);
508495 if (subsize < BLOCK_8X8) {
509− decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache,
510− band_translate);
496+ decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache);
511497 } else {
512498 switch (partition) {
513499 case PARTITION_NONE:
514− decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache,
515− band_translate);
500+ decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache);
516501 break;
517502 case PARTITION_HORZ:
518− decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache,
519− band_translate);
503+ decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache);
520504 if (mi_row + hbs < cm->mi_rows)
521505 decode_modes_b(cm, xd, tile, mi_row + hbs, mi_col, r, subsize,
522− token_cache, band_translate);
506+ token_cache);
523507 break;
524508 case PARTITION_VERT:
525− decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache,
526− band_translate);
509+ decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache);
527510 if (mi_col + hbs < cm->mi_cols)
528511 decode_modes_b(cm, xd, tile, mi_row, mi_col + hbs, r, subsize,
529− token_cache, band_translate);
512+ token_cache);
530513 break;
531514 case PARTITION_SPLIT:
532515 decode_modes_sb(cm, xd, tile, mi_row, mi_col, r, subsize,
533− token_cache, band_translate);
516+ token_cache);
534517 decode_modes_sb(cm, xd, tile, mi_row, mi_col + hbs, r, subsize,
535− token_cache, band_translate);
518+ token_cache);
536519 decode_modes_sb(cm, xd, tile, mi_row + hbs, mi_col, r, subsize,
537− token_cache, band_translate);
520+ token_cache);
538521 decode_modes_sb(cm, xd, tile, mi_row + hbs, mi_col + hbs, r, subsize,
539− token_cache, band_translate);
522+ token_cache);
540523 break;
541524 default:
542525 assert(!"Invalid partition type");
@@ -820,11 +803,8 @@ static void decode_tile(VP9D_COMP *pbi, const TileInfo *const tile, · 277 unmodified lines
820803 vp9_zero(xd->left_seg_context);
821804 for (mi_col = tile->mi_col_start; mi_col < tile->mi_col_end;
822805 mi_col += MI_BLOCK_SIZE) {
823− const uint8_t *band_translate[2] = {
824− vp9_coefband_trans_4x4, pbi->coefband_trans_8x8plus
825− };
826806 decode_modes_sb(cm, xd, tile, mi_row, mi_col, r, BLOCK_64X64,
827− pbi->token_cache, band_translate);
807+ pbi->token_cache);
828808 }
829809
830810 if (pbi->do_loopfilter_inline) {
@@ -985,8 +965,7 @@ static int tile_worker_hook(void *arg1, void *arg2) { · 154 unmodified lines
985965 mi_col += MI_BLOCK_SIZE) {
986966 decode_modes_sb(tile_data->cm, &tile_data->xd, tile,
987967 mi_row, mi_col, &tile_data->bit_reader, BLOCK_64X64,
988− tile_data->token_cache,
989− tile_data->band_translate);
968+ tile_data->token_cache);
990969 }
991970 }
992971 return !tile_data->xd.corrupted;
@@ -1045,8 +1024,6 @@ static const uint8_t *decode_tiles_mt(VP9D_COMP *pbi, const uint8_t *data) { · 52 unmodified lines
10451024 tile_data->cm = cm;
10461025 tile_data->xd = pbi->mb;
10471026 tile_data->xd.corrupted = 0;
1048− tile_data->band_translate[0] = vp9_coefband_trans_4x4;
1049− tile_data->band_translate[1] = pbi->coefband_trans_8x8plus;
10501027 vp9_tile_init(tile, tile_data->cm, 0, tile_col);
10511028
10521029 setup_token_decoder(data, data_end, size, &cm->error,
vp9/decoder/vp9_detokenize.c+4−6
@@ -93,8 +93,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, · 92 unmodified lines
9393 vp9_reader *r, int block_idx,
9494 PLANE_TYPE type, int seg_eob, int16_t *dqcoeff_ptr,
9595 TX_SIZE tx_size, const int16_t *dq, int pt,
96− uint8_t *token_cache,
97− const uint8_t *band_translate) {
96+ uint8_t *token_cache) {
9897 const FRAME_CONTEXT *const fc = &cm->fc;
9998 FRAME_COUNTS *const counts = &cm->counts;
10099 const int ref = is_inter_block(&xd->mi_8x8[0]->mbmi);
@@ -110,6 +109,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, · 9 unmodified lines
110109 counts->eob_branch[tx_size][type][ref];
111110 const int16_t *scan, *nb;
112111 const uint8_t *cat6;
112+ const uint8_t *band_translate = get_band_translate(tx_size);
113113 get_scan(xd, tx_size, type, block_idx, &scan, &nb);
114114
115115 while (c < seg_eob) {
@@ -219,8 +219,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, · 103 unmodified lines
219219 int vp9_decode_block_tokens(VP9_COMMON *cm, MACROBLOCKD *xd,
220220 int plane, int block, BLOCK_SIZE plane_bsize,
221221 int x, int y, TX_SIZE tx_size, vp9_reader *r,
222− uint8_t *token_cache,
223− const uint8_t *band_translate[2]) {
222+ uint8_t *token_cache) {
224223 struct macroblockd_plane *const pd = &xd->plane[plane];
225224 const int seg_eob = get_tx_eob(&cm->seg, xd->mi_8x8[0]->mbmi.segment_id,
226225 tx_size);
@@ -228,8 +227,7 @@ int vp9_decode_block_tokens(VP9_COMMON *cm, MACROBLOCKD *xd, · 1 unmodified line
228227 pd->left_context + y);
229228 const int eob = decode_coefs(cm, xd, r, block, pd->plane_type, seg_eob,
230229 BLOCK_OFFSET(pd->dqcoeff, block), tx_size,
231− pd->dequant, pt, token_cache,
232− band_translate[tx_size != TX_4X4]);
230+ pd->dequant, pt, token_cache);
233231 set_contexts(xd, pd, plane_bsize, tx_size, eob > 0, x, y);
234232 pd->eobs[block] = eob;
235233 return eob;
vp9/decoder/vp9_detokenize.h+1−2
@@ -18,7 +18,6 @@ · 17 unmodified lines
1818 int vp9_decode_block_tokens(VP9_COMMON *cm, MACROBLOCKD *xd,
1919 int plane, int block, BLOCK_SIZE plane_bsize,
2020 int x, int y, TX_SIZE tx_size, vp9_reader *r,
21− uint8_t *token_cache,
22− const uint8_t *band_translate[2]);
21+ uint8_t *token_cache);
2322
2423 #endif // VP9_DECODER_VP9_DETOKENIZE_H_
vp9/encoder/vp9_block.h+0−3
@@ -194,9 +194,6 @@ struct macroblock { · 193 unmodified lines
194194 BLOCK_SIZE sb64_partitioning;
195195
196196 void (*fwd_txm4x4)(const int16_t *input, int16_t *output, int stride);
197−
198− // band cache
199− DECLARE_ALIGNED(16, uint8_t, coefband_trans_8x8plus[1024]);
200197 };
201198
202199 // TODO(jingning): the variables used here are little complicated. need further
vp9/encoder/vp9_encodemb.c+1−3
@@ -137,9 +137,7 @@ static void optimize_b(MACROBLOCK *mb, · 136 unmodified lines
137137 const int mul = 1 + (tx_size == TX_32X32);
138138 uint8_t token_cache[1024];
139139 const int16_t *dequant_ptr = pd->dequant;
140− const uint8_t *const band_translate = (tx_size == TX_4X4 ?
141− vp9_coefband_trans_4x4 :
142− mb->coefband_trans_8x8plus);
140+ const uint8_t *const band_translate = get_band_translate(tx_size);
143141
144142 assert((!type && !plane) || (type && plane));
145143 dqcoeff_ptr = BLOCK_OFFSET(pd->dqcoeff, block);
vp9/encoder/vp9_onyx_if.c+0−7
@@ -1224,13 +1224,6 @@ static void init_config(VP9_PTR ptr, VP9_CONFIG *oxcf) { · 1223 unmodified lines
12241224 cpi->fixed_divide[0] = 0;
12251225 for (i = 1; i < 512; i++)
12261226 cpi->fixed_divide[i] = 0x80000 / i;
1227−
1228− vpx_memset(cpi->mb.coefband_trans_8x8plus,
1229− (COEF_BANDS-1),
1230− sizeof(cpi->mb.coefband_trans_8x8plus));
1231− vpx_memcpy(cpi->mb.coefband_trans_8x8plus,
1232− vp9_coefband_trans_8x8plus,
1233− sizeof(vp9_coefband_trans_8x8plus));
12341227 }
12351228
12361229
vp9/encoder/vp9_tokenize.c+1−3
@@ -115,9 +115,7 @@ static void tokenize_b(int plane, int block, BLOCK_SIZE plane_bsize, · 114 unmodified lines
115115 vp9_coeff_count *const counts = cpi->coef_counts[tx_size];
116116 vp9_coeff_probs_model *const coef_probs = cpi->common.fc.coef_probs[tx_size];
117117 const int ref = is_inter_block(mbmi);
118− const uint8_t *const band_translate = (tx_size == TX_4X4 ?
119− vp9_coefband_trans_4x4 :
120− cpi->mb.coefband_trans_8x8plus);
118+ const uint8_t *const band_translate = get_band_translate(tx_size);
121119 const int seg_eob = get_tx_eob(&cpi->common.seg, segment_id, tx_size);
122120 int aoff, loff;
123121 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &aoff, &loff);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t