| OLD | NEW |
| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { | 469 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { |
| 470 switch (tx_size) { | 470 switch (tx_size) { |
| 471 case TX_32X32: | 471 case TX_32X32: |
| 472 vp9_highbd_fdct32x32_1(src_diff, coeff, diff_stride); | 472 vp9_highbd_fdct32x32_1(src_diff, coeff, diff_stride); |
| 473 vp9_highbd_quantize_dc_32x32(coeff, x->skip_block, p->round, | 473 vp9_highbd_quantize_dc_32x32(coeff, x->skip_block, p->round, |
| 474 p->quant_fp[0], qcoeff, dqcoeff, | 474 p->quant_fp[0], qcoeff, dqcoeff, |
| 475 pd->dequant[0], eob); | 475 pd->dequant[0], eob); |
| 476 break; | 476 break; |
| 477 case TX_16X16: | 477 case TX_16X16: |
| 478 vp9_highbd_fdct16x16_1(src_diff, coeff, diff_stride); | 478 vp9_highbd_fdct16x16_1(src_diff, coeff, diff_stride); |
| 479 vp9_highbd_quantize_dc(coeff, x->skip_block, p->round, | 479 vp9_highbd_quantize_dc(coeff, 256, x->skip_block, p->round, |
| 480 p->quant_fp[0], qcoeff, dqcoeff, | 480 p->quant_fp[0], qcoeff, dqcoeff, |
| 481 pd->dequant[0], eob); | 481 pd->dequant[0], eob); |
| 482 break; | 482 break; |
| 483 case TX_8X8: | 483 case TX_8X8: |
| 484 vp9_highbd_fdct8x8_1(src_diff, coeff, diff_stride); | 484 vp9_highbd_fdct8x8_1(src_diff, coeff, diff_stride); |
| 485 vp9_highbd_quantize_dc(coeff, x->skip_block, p->round, | 485 vp9_highbd_quantize_dc(coeff, 64, x->skip_block, p->round, |
| 486 p->quant_fp[0], qcoeff, dqcoeff, | 486 p->quant_fp[0], qcoeff, dqcoeff, |
| 487 pd->dequant[0], eob); | 487 pd->dequant[0], eob); |
| 488 break; | 488 break; |
| 489 case TX_4X4: | 489 case TX_4X4: |
| 490 x->fwd_txm4x4(src_diff, coeff, diff_stride); | 490 x->fwd_txm4x4(src_diff, coeff, diff_stride); |
| 491 vp9_highbd_quantize_dc(coeff, x->skip_block, p->round, | 491 vp9_highbd_quantize_dc(coeff, 16, x->skip_block, p->round, |
| 492 p->quant_fp[0], qcoeff, dqcoeff, | 492 p->quant_fp[0], qcoeff, dqcoeff, |
| 493 pd->dequant[0], eob); | 493 pd->dequant[0], eob); |
| 494 break; | 494 break; |
| 495 default: | 495 default: |
| 496 assert(0); | 496 assert(0); |
| 497 } | 497 } |
| 498 return; | 498 return; |
| 499 } | 499 } |
| 500 #endif // CONFIG_VP9_HIGHBITDEPTH | 500 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 501 | 501 |
| 502 switch (tx_size) { | 502 switch (tx_size) { |
| 503 case TX_32X32: | 503 case TX_32X32: |
| 504 vp9_fdct32x32_1(src_diff, coeff, diff_stride); | 504 vp9_fdct32x32_1(src_diff, coeff, diff_stride); |
| 505 vp9_quantize_dc_32x32(coeff, x->skip_block, p->round, | 505 vp9_quantize_dc_32x32(coeff, x->skip_block, p->round, |
| 506 p->quant_fp[0], qcoeff, dqcoeff, | 506 p->quant_fp[0], qcoeff, dqcoeff, |
| 507 pd->dequant[0], eob); | 507 pd->dequant[0], eob); |
| 508 break; | 508 break; |
| 509 case TX_16X16: | 509 case TX_16X16: |
| 510 vp9_fdct16x16_1(src_diff, coeff, diff_stride); | 510 vp9_fdct16x16_1(src_diff, coeff, diff_stride); |
| 511 vp9_quantize_dc(coeff, x->skip_block, p->round, | 511 vp9_quantize_dc(coeff, 256, x->skip_block, p->round, |
| 512 p->quant_fp[0], qcoeff, dqcoeff, | 512 p->quant_fp[0], qcoeff, dqcoeff, |
| 513 pd->dequant[0], eob); | 513 pd->dequant[0], eob); |
| 514 break; | 514 break; |
| 515 case TX_8X8: | 515 case TX_8X8: |
| 516 vp9_fdct8x8_1(src_diff, coeff, diff_stride); | 516 vp9_fdct8x8_1(src_diff, coeff, diff_stride); |
| 517 vp9_quantize_dc(coeff, x->skip_block, p->round, | 517 vp9_quantize_dc(coeff, 64, x->skip_block, p->round, |
| 518 p->quant_fp[0], qcoeff, dqcoeff, | 518 p->quant_fp[0], qcoeff, dqcoeff, |
| 519 pd->dequant[0], eob); | 519 pd->dequant[0], eob); |
| 520 break; | 520 break; |
| 521 case TX_4X4: | 521 case TX_4X4: |
| 522 x->fwd_txm4x4(src_diff, coeff, diff_stride); | 522 x->fwd_txm4x4(src_diff, coeff, diff_stride); |
| 523 vp9_quantize_dc(coeff, x->skip_block, p->round, | 523 vp9_quantize_dc(coeff, 16, x->skip_block, p->round, |
| 524 p->quant_fp[0], qcoeff, dqcoeff, | 524 p->quant_fp[0], qcoeff, dqcoeff, |
| 525 pd->dequant[0], eob); | 525 pd->dequant[0], eob); |
| 526 break; | 526 break; |
| 527 default: | 527 default: |
| 528 assert(0); | 528 assert(0); |
| 529 break; | 529 break; |
| 530 } | 530 } |
| 531 } | 531 } |
| 532 | 532 |
| 533 void vp9_xform_quant(MACROBLOCK *x, int plane, int block, | 533 void vp9_xform_quant(MACROBLOCK *x, int plane, int block, |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 *(args->skip) = 0; | 1035 *(args->skip) = 0; |
| 1036 } | 1036 } |
| 1037 | 1037 |
| 1038 void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { | 1038 void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { |
| 1039 const MACROBLOCKD *const xd = &x->e_mbd; | 1039 const MACROBLOCKD *const xd = &x->e_mbd; |
| 1040 struct encode_b_args arg = {x, NULL, &xd->mi[0].src_mi->mbmi.skip}; | 1040 struct encode_b_args arg = {x, NULL, &xd->mi[0].src_mi->mbmi.skip}; |
| 1041 | 1041 |
| 1042 vp9_foreach_transformed_block_in_plane(xd, bsize, plane, | 1042 vp9_foreach_transformed_block_in_plane(xd, bsize, plane, |
| 1043 vp9_encode_block_intra, &arg); | 1043 vp9_encode_block_intra, &arg); |
| 1044 } | 1044 } |
| OLD | NEW |