Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: source/libvpx/vp9/encoder/vp9_encodemb.c

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encodeframe.c ('k') | source/libvpx/vp9/encoder/vp9_encodemv.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 pt = get_coef_context(nb, token_cache, idx + 1); 96 pt = get_coef_context(nb, token_cache, idx + 1);
97 token_cache[scan[idx]] = bak; 97 token_cache[scan[idx]] = bak;
98 return pt; 98 return pt;
99 } 99 }
100 100
101 static int optimize_b(MACROBLOCK *mb, int plane, int block, 101 static int optimize_b(MACROBLOCK *mb, int plane, int block,
102 TX_SIZE tx_size, int ctx) { 102 TX_SIZE tx_size, int ctx) {
103 MACROBLOCKD *const xd = &mb->e_mbd; 103 MACROBLOCKD *const xd = &mb->e_mbd;
104 struct macroblock_plane *const p = &mb->plane[plane]; 104 struct macroblock_plane *const p = &mb->plane[plane];
105 struct macroblockd_plane *const pd = &xd->plane[plane]; 105 struct macroblockd_plane *const pd = &xd->plane[plane];
106 const int ref = is_inter_block(&xd->mi[0]->mbmi); 106 const int ref = is_inter_block(&xd->mi[0].src_mi->mbmi);
107 vp9_token_state tokens[1025][2]; 107 vp9_token_state tokens[1025][2];
108 unsigned best_index[1025][2]; 108 unsigned best_index[1025][2];
109 uint8_t token_cache[1024]; 109 uint8_t token_cache[1024];
110 const int16_t *const coeff = BLOCK_OFFSET(mb->plane[plane].coeff, block); 110 const tran_low_t *const coeff = BLOCK_OFFSET(mb->plane[plane].coeff, block);
111 int16_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block); 111 tran_low_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block);
112 int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block); 112 tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
113 const int eob = p->eobs[block]; 113 const int eob = p->eobs[block];
114 const PLANE_TYPE type = pd->plane_type; 114 const PLANE_TYPE type = pd->plane_type;
115 const int default_eob = 16 << (tx_size << 1); 115 const int default_eob = 16 << (tx_size << 1);
116 const int mul = 1 + (tx_size == TX_32X32); 116 const int mul = 1 + (tx_size == TX_32X32);
117 const int16_t *dequant_ptr = pd->dequant; 117 const int16_t *dequant_ptr = pd->dequant;
118 const uint8_t *const band_translate = get_band_translate(tx_size); 118 const uint8_t *const band_translate = get_band_translate(tx_size);
119 const scan_order *const so = get_scan(xd, tx_size, type, block); 119 const scan_order *const so = get_scan(xd, tx_size, type, block);
120 const int16_t *const scan = so->scan; 120 const int16_t *const scan = so->scan;
121 const int16_t *const nb = so->neighbors; 121 const int16_t *const nb = so->neighbors;
122 int next = eob, sz = 0; 122 int next = eob, sz = 0;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 next = tokens[i][best].next; 287 next = tokens[i][best].next;
288 best = best_index[i][best]; 288 best = best_index[i][best];
289 } 289 }
290 final_eob++; 290 final_eob++;
291 291
292 mb->plane[plane].eobs[block] = final_eob; 292 mb->plane[plane].eobs[block] = final_eob;
293 return final_eob; 293 return final_eob;
294 } 294 }
295 295
296 static INLINE void fdct32x32(int rd_transform, 296 static INLINE void fdct32x32(int rd_transform,
297 const int16_t *src, int16_t *dst, int src_stride) { 297 const int16_t *src, tran_low_t *dst,
298 int src_stride) {
298 if (rd_transform) 299 if (rd_transform)
299 vp9_fdct32x32_rd(src, dst, src_stride); 300 vp9_fdct32x32_rd(src, dst, src_stride);
300 else 301 else
301 vp9_fdct32x32(src, dst, src_stride); 302 vp9_fdct32x32(src, dst, src_stride);
302 } 303 }
303 304
305 #if CONFIG_VP9_HIGHBITDEPTH
306 static INLINE void high_fdct32x32(int rd_transform, const int16_t *src,
307 tran_low_t *dst, int src_stride) {
308 if (rd_transform)
309 vp9_high_fdct32x32_rd(src, dst, src_stride);
310 else
311 vp9_high_fdct32x32(src, dst, src_stride);
312 }
313 #endif
314
304 void vp9_xform_quant_fp(MACROBLOCK *x, int plane, int block, 315 void vp9_xform_quant_fp(MACROBLOCK *x, int plane, int block,
305 BLOCK_SIZE plane_bsize, TX_SIZE tx_size) { 316 BLOCK_SIZE plane_bsize, TX_SIZE tx_size) {
306 MACROBLOCKD *const xd = &x->e_mbd; 317 MACROBLOCKD *const xd = &x->e_mbd;
307 const struct macroblock_plane *const p = &x->plane[plane]; 318 const struct macroblock_plane *const p = &x->plane[plane];
308 const struct macroblockd_plane *const pd = &xd->plane[plane]; 319 const struct macroblockd_plane *const pd = &xd->plane[plane];
309 const scan_order *const scan_order = &vp9_default_scan_orders[tx_size]; 320 const scan_order *const scan_order = &vp9_default_scan_orders[tx_size];
310 int16_t *const coeff = BLOCK_OFFSET(p->coeff, block); 321 tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
311 int16_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block); 322 tran_low_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block);
312 int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block); 323 tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
313 uint16_t *const eob = &p->eobs[block]; 324 uint16_t *const eob = &p->eobs[block];
314 const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize]; 325 const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize];
315 int i, j; 326 int i, j;
316 const int16_t *src_diff; 327 const int16_t *src_diff;
317 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j); 328 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
318 src_diff = &p->src_diff[4 * (j * diff_stride + i)]; 329 src_diff = &p->src_diff[4 * (j * diff_stride + i)];
319 330
320 switch (tx_size) { 331 switch (tx_size) {
321 case TX_32X32: 332 case TX_32X32:
322 fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); 333 fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
(...skipping 27 matching lines...) Expand all
350 assert(0); 361 assert(0);
351 break; 362 break;
352 } 363 }
353 } 364 }
354 365
355 void vp9_xform_quant_dc(MACROBLOCK *x, int plane, int block, 366 void vp9_xform_quant_dc(MACROBLOCK *x, int plane, int block,
356 BLOCK_SIZE plane_bsize, TX_SIZE tx_size) { 367 BLOCK_SIZE plane_bsize, TX_SIZE tx_size) {
357 MACROBLOCKD *const xd = &x->e_mbd; 368 MACROBLOCKD *const xd = &x->e_mbd;
358 const struct macroblock_plane *const p = &x->plane[plane]; 369 const struct macroblock_plane *const p = &x->plane[plane];
359 const struct macroblockd_plane *const pd = &xd->plane[plane]; 370 const struct macroblockd_plane *const pd = &xd->plane[plane];
360 int16_t *const coeff = BLOCK_OFFSET(p->coeff, block); 371 tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
361 int16_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block); 372 tran_low_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block);
362 int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block); 373 tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
363 uint16_t *const eob = &p->eobs[block]; 374 uint16_t *const eob = &p->eobs[block];
364 const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize]; 375 const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize];
365 int i, j; 376 int i, j;
366 const int16_t *src_diff; 377 const int16_t *src_diff;
367 378
368 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j); 379 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
369 src_diff = &p->src_diff[4 * (j * diff_stride + i)]; 380 src_diff = &p->src_diff[4 * (j * diff_stride + i)];
370 381
371 switch (tx_size) { 382 switch (tx_size) {
372 case TX_32X32: 383 case TX_32X32:
(...skipping 25 matching lines...) Expand all
398 break; 409 break;
399 } 410 }
400 } 411 }
401 412
402 void vp9_xform_quant(MACROBLOCK *x, int plane, int block, 413 void vp9_xform_quant(MACROBLOCK *x, int plane, int block,
403 BLOCK_SIZE plane_bsize, TX_SIZE tx_size) { 414 BLOCK_SIZE plane_bsize, TX_SIZE tx_size) {
404 MACROBLOCKD *const xd = &x->e_mbd; 415 MACROBLOCKD *const xd = &x->e_mbd;
405 const struct macroblock_plane *const p = &x->plane[plane]; 416 const struct macroblock_plane *const p = &x->plane[plane];
406 const struct macroblockd_plane *const pd = &xd->plane[plane]; 417 const struct macroblockd_plane *const pd = &xd->plane[plane];
407 const scan_order *const scan_order = &vp9_default_scan_orders[tx_size]; 418 const scan_order *const scan_order = &vp9_default_scan_orders[tx_size];
408 int16_t *const coeff = BLOCK_OFFSET(p->coeff, block); 419 tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
409 int16_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block); 420 tran_low_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block);
410 int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block); 421 tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
411 uint16_t *const eob = &p->eobs[block]; 422 uint16_t *const eob = &p->eobs[block];
412 const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize]; 423 const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize];
413 int i, j; 424 int i, j;
414 const int16_t *src_diff; 425 const int16_t *src_diff;
415 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j); 426 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
416 src_diff = &p->src_diff[4 * (j * diff_stride + i)]; 427 src_diff = &p->src_diff[4 * (j * diff_stride + i)];
417 428
418 switch (tx_size) { 429 switch (tx_size) {
419 case TX_32X32: 430 case TX_32X32:
420 fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); 431 fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
(...skipping 30 matching lines...) Expand all
451 } 462 }
452 463
453 static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize, 464 static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
454 TX_SIZE tx_size, void *arg) { 465 TX_SIZE tx_size, void *arg) {
455 struct encode_b_args *const args = arg; 466 struct encode_b_args *const args = arg;
456 MACROBLOCK *const x = args->x; 467 MACROBLOCK *const x = args->x;
457 MACROBLOCKD *const xd = &x->e_mbd; 468 MACROBLOCKD *const xd = &x->e_mbd;
458 struct optimize_ctx *const ctx = args->ctx; 469 struct optimize_ctx *const ctx = args->ctx;
459 struct macroblock_plane *const p = &x->plane[plane]; 470 struct macroblock_plane *const p = &x->plane[plane];
460 struct macroblockd_plane *const pd = &xd->plane[plane]; 471 struct macroblockd_plane *const pd = &xd->plane[plane];
461 int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block); 472 tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
462 int i, j; 473 int i, j;
463 uint8_t *dst; 474 uint8_t *dst;
464 ENTROPY_CONTEXT *a, *l; 475 ENTROPY_CONTEXT *a, *l;
465 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j); 476 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
466 dst = &pd->dst.buf[4 * j * pd->dst.stride + 4 * i]; 477 dst = &pd->dst.buf[4 * j * pd->dst.stride + 4 * i];
467 a = &ctx->ta[plane][i]; 478 a = &ctx->ta[plane][i];
468 l = &ctx->tl[plane][j]; 479 l = &ctx->tl[plane][j];
469 480
470 // TODO(jingning): per transformed block zero forcing only enabled for 481 // TODO(jingning): per transformed block zero forcing only enabled for
471 // luma component. will integrate chroma components as well. 482 // luma component. will integrate chroma components as well.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 break; 542 break;
532 } 543 }
533 } 544 }
534 545
535 static void encode_block_pass1(int plane, int block, BLOCK_SIZE plane_bsize, 546 static void encode_block_pass1(int plane, int block, BLOCK_SIZE plane_bsize,
536 TX_SIZE tx_size, void *arg) { 547 TX_SIZE tx_size, void *arg) {
537 MACROBLOCK *const x = (MACROBLOCK *)arg; 548 MACROBLOCK *const x = (MACROBLOCK *)arg;
538 MACROBLOCKD *const xd = &x->e_mbd; 549 MACROBLOCKD *const xd = &x->e_mbd;
539 struct macroblock_plane *const p = &x->plane[plane]; 550 struct macroblock_plane *const p = &x->plane[plane];
540 struct macroblockd_plane *const pd = &xd->plane[plane]; 551 struct macroblockd_plane *const pd = &xd->plane[plane];
541 int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block); 552 tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
542 int i, j; 553 int i, j;
543 uint8_t *dst; 554 uint8_t *dst;
544 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j); 555 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
545 dst = &pd->dst.buf[4 * j * pd->dst.stride + 4 * i]; 556 dst = &pd->dst.buf[4 * j * pd->dst.stride + 4 * i];
546 557
547 vp9_xform_quant(x, plane, block, plane_bsize, tx_size); 558 vp9_xform_quant(x, plane, block, plane_bsize, tx_size);
548 559
549 if (p->eobs[block] > 0) 560 if (p->eobs[block] > 0)
550 x->itxm_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]); 561 x->itxm_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
551 } 562 }
552 563
553 void vp9_encode_sby_pass1(MACROBLOCK *x, BLOCK_SIZE bsize) { 564 void vp9_encode_sby_pass1(MACROBLOCK *x, BLOCK_SIZE bsize) {
554 vp9_subtract_plane(x, bsize, 0); 565 vp9_subtract_plane(x, bsize, 0);
555 vp9_foreach_transformed_block_in_plane(&x->e_mbd, bsize, 0, 566 vp9_foreach_transformed_block_in_plane(&x->e_mbd, bsize, 0,
556 encode_block_pass1, x); 567 encode_block_pass1, x);
557 } 568 }
558 569
559 void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize) { 570 void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize) {
560 MACROBLOCKD *const xd = &x->e_mbd; 571 MACROBLOCKD *const xd = &x->e_mbd;
561 struct optimize_ctx ctx; 572 struct optimize_ctx ctx;
562 MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi; 573 MB_MODE_INFO *mbmi = &xd->mi[0].src_mi->mbmi;
563 struct encode_b_args arg = {x, &ctx, &mbmi->skip}; 574 struct encode_b_args arg = {x, &ctx, &mbmi->skip};
564 int plane; 575 int plane;
565 576
577 mbmi->skip = 1;
578
579 if (x->skip)
580 return;
581
566 for (plane = 0; plane < MAX_MB_PLANE; ++plane) { 582 for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
567 if (!x->skip_recode) 583 if (!x->skip_recode)
568 vp9_subtract_plane(x, bsize, plane); 584 vp9_subtract_plane(x, bsize, plane);
569 585
570 if (x->optimize && (!x->skip_recode || !x->skip_optimize)) { 586 if (x->optimize && (!x->skip_recode || !x->skip_optimize)) {
571 const struct macroblockd_plane* const pd = &xd->plane[plane]; 587 const struct macroblockd_plane* const pd = &xd->plane[plane];
572 const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi, pd) : mbmi->tx_size; 588 const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi, pd) : mbmi->tx_size;
573 vp9_get_entropy_contexts(bsize, tx_size, pd, 589 vp9_get_entropy_contexts(bsize, tx_size, pd,
574 ctx.ta[plane], ctx.tl[plane]); 590 ctx.ta[plane], ctx.tl[plane]);
575 } 591 }
576 592
577 vp9_foreach_transformed_block_in_plane(xd, bsize, plane, encode_block, 593 vp9_foreach_transformed_block_in_plane(xd, bsize, plane, encode_block,
578 &arg); 594 &arg);
579 } 595 }
580 } 596 }
581 597
582 static void encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize, 598 static void encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
583 TX_SIZE tx_size, void *arg) { 599 TX_SIZE tx_size, void *arg) {
584 struct encode_b_args* const args = arg; 600 struct encode_b_args* const args = arg;
585 MACROBLOCK *const x = args->x; 601 MACROBLOCK *const x = args->x;
586 MACROBLOCKD *const xd = &x->e_mbd; 602 MACROBLOCKD *const xd = &x->e_mbd;
587 MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi; 603 MB_MODE_INFO *mbmi = &xd->mi[0].src_mi->mbmi;
588 struct macroblock_plane *const p = &x->plane[plane]; 604 struct macroblock_plane *const p = &x->plane[plane];
589 struct macroblockd_plane *const pd = &xd->plane[plane]; 605 struct macroblockd_plane *const pd = &xd->plane[plane];
590 int16_t *coeff = BLOCK_OFFSET(p->coeff, block); 606 tran_low_t *coeff = BLOCK_OFFSET(p->coeff, block);
591 int16_t *qcoeff = BLOCK_OFFSET(p->qcoeff, block); 607 tran_low_t *qcoeff = BLOCK_OFFSET(p->qcoeff, block);
592 int16_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block); 608 tran_low_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
593 const scan_order *scan_order; 609 const scan_order *scan_order;
594 TX_TYPE tx_type; 610 TX_TYPE tx_type;
595 PREDICTION_MODE mode; 611 PREDICTION_MODE mode;
596 const int bwl = b_width_log2(plane_bsize); 612 const int bwl = b_width_log2(plane_bsize);
597 const int diff_stride = 4 * (1 << bwl); 613 const int diff_stride = 4 * (1 << bwl);
598 uint8_t *src, *dst; 614 uint8_t *src, *dst;
599 int16_t *src_diff; 615 int16_t *src_diff;
600 uint16_t *eob = &p->eobs[block]; 616 uint16_t *eob = &p->eobs[block];
601 const int src_stride = p->src.stride; 617 const int src_stride = p->src.stride;
602 const int dst_stride = pd->dst.stride; 618 const int dst_stride = pd->dst.stride;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 p->quant_shift, qcoeff, dqcoeff, 678 p->quant_shift, qcoeff, dqcoeff,
663 pd->dequant, p->zbin_extra, eob, scan_order->scan, 679 pd->dequant, p->zbin_extra, eob, scan_order->scan,
664 scan_order->iscan); 680 scan_order->iscan);
665 } 681 }
666 if (!x->skip_encode && *eob) 682 if (!x->skip_encode && *eob)
667 vp9_iht8x8_add(tx_type, dqcoeff, dst, dst_stride, *eob); 683 vp9_iht8x8_add(tx_type, dqcoeff, dst, dst_stride, *eob);
668 break; 684 break;
669 case TX_4X4: 685 case TX_4X4:
670 tx_type = get_tx_type_4x4(pd->plane_type, xd, block); 686 tx_type = get_tx_type_4x4(pd->plane_type, xd, block);
671 scan_order = &vp9_scan_orders[TX_4X4][tx_type]; 687 scan_order = &vp9_scan_orders[TX_4X4][tx_type];
672 mode = plane == 0 ? get_y_mode(xd->mi[0], block) : mbmi->uv_mode; 688 mode = plane == 0 ? get_y_mode(xd->mi[0].src_mi, block) : mbmi->uv_mode;
673 vp9_predict_intra_block(xd, block, bwl, TX_4X4, mode, 689 vp9_predict_intra_block(xd, block, bwl, TX_4X4, mode,
674 x->skip_encode ? src : dst, 690 x->skip_encode ? src : dst,
675 x->skip_encode ? src_stride : dst_stride, 691 x->skip_encode ? src_stride : dst_stride,
676 dst, dst_stride, i, j, plane); 692 dst, dst_stride, i, j, plane);
677 693
678 if (!x->skip_recode) { 694 if (!x->skip_recode) {
679 vp9_subtract_block(4, 4, src_diff, diff_stride, 695 vp9_subtract_block(4, 4, src_diff, diff_stride,
680 src, src_stride, dst, dst_stride); 696 src, src_stride, dst, dst_stride);
681 if (tx_type != DCT_DCT) 697 if (tx_type != DCT_DCT)
682 vp9_fht4x4(src_diff, coeff, diff_stride, tx_type); 698 vp9_fht4x4(src_diff, coeff, diff_stride, tx_type);
(...skipping 26 matching lines...) Expand all
709 void vp9_encode_block_intra(MACROBLOCK *x, int plane, int block, 725 void vp9_encode_block_intra(MACROBLOCK *x, int plane, int block,
710 BLOCK_SIZE plane_bsize, TX_SIZE tx_size, 726 BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
711 int8_t *skip) { 727 int8_t *skip) {
712 struct encode_b_args arg = {x, NULL, skip}; 728 struct encode_b_args arg = {x, NULL, skip};
713 encode_block_intra(plane, block, plane_bsize, tx_size, &arg); 729 encode_block_intra(plane, block, plane_bsize, tx_size, &arg);
714 } 730 }
715 731
716 732
717 void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { 733 void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
718 const MACROBLOCKD *const xd = &x->e_mbd; 734 const MACROBLOCKD *const xd = &x->e_mbd;
719 struct encode_b_args arg = {x, NULL, &xd->mi[0]->mbmi.skip}; 735 struct encode_b_args arg = {x, NULL, &xd->mi[0].src_mi->mbmi.skip};
720 736
721 vp9_foreach_transformed_block_in_plane(xd, bsize, plane, encode_block_intra, 737 vp9_foreach_transformed_block_in_plane(xd, bsize, plane, encode_block_intra,
722 &arg); 738 &arg);
723 } 739 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encodeframe.c ('k') | source/libvpx/vp9/encoder/vp9_encodemv.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698