History

Merge "Eliminating usage of txfrm_block_to_raster_block() from encode_block()."

Dmitry Kovalev committed 13 years ago

Commit 58f75432 parents 4995dbc 7bfc20a1 file · +5 −10Browse files

Unified · Split

vp9/encoder/vp9_encodemb.c+5−10
@@ -419,19 +419,16 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize, · 418 unmodified lines
419 MACROBLOCKD *const xd = &x->e_mbd;419 MACROBLOCKD *const xd = &x->e_mbd;
420 struct optimize_ctx *const ctx = args->ctx;420 struct optimize_ctx *const ctx = args->ctx;
421 struct macroblockd_plane *const pd = &xd->plane[plane];421 struct macroblockd_plane *const pd = &xd->plane[plane];
422 const int raster_block = txfrm_block_to_raster_block(plane_bsize, tx_size,
423 block);
424
425 int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);422 int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
426 uint8_t *const dst = raster_block_offset_uint8(plane_bsize, raster_block,423 int i, j;
427 pd->dst.buf, pd->dst.stride);424 uint8_t *dst;
425 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
426 dst = &pd->dst.buf[4 * j * pd->dst.stride + 4 * i];
428 427
429 // TODO(jingning): per transformed block zero forcing only enabled for428 // TODO(jingning): per transformed block zero forcing only enabled for
430 // luma component. will integrate chroma components as well.429 // luma component. will integrate chroma components as well.
431 if (x->zcoeff_blk[tx_size][block] && plane == 0) {430 if (x->zcoeff_blk[tx_size][block] && plane == 0) {
432 int i, j;
433 pd->eobs[block] = 0;431 pd->eobs[block] = 0;
434 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
435 ctx->ta[plane][i] = 0;432 ctx->ta[plane][i] = 0;
436 ctx->tl[plane][j] = 0;433 ctx->tl[plane][j] = 0;
437 return;434 return;
@@ -443,10 +440,8 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize, · 5 unmodified lines
443 if (x->optimize && (!x->skip_recode || !x->skip_optimize)) {440 if (x->optimize && (!x->skip_recode || !x->skip_optimize)) {
444 vp9_optimize_b(plane, block, plane_bsize, tx_size, x, ctx);441 vp9_optimize_b(plane, block, plane_bsize, tx_size, x, ctx);
445 } else {442 } else {
446 int i, k;
447 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &k);
448 ctx->ta[plane][i] = pd->eobs[block] > 0;443 ctx->ta[plane][i] = pd->eobs[block] > 0;
449 ctx->tl[plane][k] = pd->eobs[block] > 0;444 ctx->tl[plane][j] = pd->eobs[block] > 0;
450 }445 }
451 446
452 if (x->skip_encode || pd->eobs[block] == 0)447 if (x->skip_encode || pd->eobs[block] == 0)

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