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

Unified Diff: source/libvpx/vp9/encoder/vp9_encodemb.c

Issue 756673003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encodemb.h ('k') | source/libvpx/vp9/encoder/vp9_encodemv.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/encoder/vp9_encodemb.c
===================================================================
--- source/libvpx/vp9/encoder/vp9_encodemb.c (revision 293081)
+++ source/libvpx/vp9/encoder/vp9_encodemb.c (working copy)
@@ -29,12 +29,6 @@
ENTROPY_CONTEXT tl[MAX_MB_PLANE][16];
};
-struct encode_b_args {
- MACROBLOCK *x;
- struct optimize_ctx *ctx;
- int8_t *skip;
-};
-
void vp9_subtract_block_c(int rows, int cols,
int16_t *diff, ptrdiff_t diff_stride,
const uint8_t *src, ptrdiff_t src_stride,
@@ -444,11 +438,11 @@
scan_order->scan, scan_order->iscan);
break;
case TX_8X8:
- vp9_fdct8x8(src_diff, coeff, diff_stride);
- vp9_quantize_fp(coeff, 64, x->skip_block, p->zbin, p->round_fp,
- p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
- pd->dequant, p->zbin_extra, eob,
- scan_order->scan, scan_order->iscan);
+ vp9_fdct8x8_quant(src_diff, diff_stride, coeff, 64,
+ x->skip_block, p->zbin, p->round_fp,
+ p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
+ pd->dequant, p->zbin_extra, eob,
+ scan_order->scan, scan_order->iscan);
break;
case TX_4X4:
x->fwd_txm4x4(src_diff, coeff, diff_stride);
@@ -658,6 +652,10 @@
return;
}
+#if CONFIG_VP9_HIGHBITDEPTH
+ if (!x->skip_recode)
+ vp9_xform_quant(x, plane, block, plane_bsize, tx_size);
+#else
if (!x->skip_recode) {
if (max_txsize_lookup[plane_bsize] == tx_size) {
if (x->skip_txfm[(plane << 2) + (block >> (tx_size << 1))] == 0) {
@@ -676,9 +674,13 @@
return;
}
} else {
- vp9_xform_quant(x, plane, block, plane_bsize, tx_size);
+ if (x->quant_fp)
+ vp9_xform_quant_fp(x, plane, block, plane_bsize, tx_size);
+ else
+ vp9_xform_quant(x, plane, block, plane_bsize, tx_size);
}
}
+#endif
if (x->optimize && (!x->skip_recode || !x->skip_optimize)) {
const int ctx = combine_entropy_contexts(*a, *l);
@@ -802,7 +804,7 @@
}
}
-static void encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
+void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
struct encode_b_args* const args = arg;
MACROBLOCK *const x = args->x;
@@ -1040,18 +1042,10 @@
*(args->skip) = 0;
}
-void vp9_encode_block_intra(MACROBLOCK *x, int plane, int block,
- BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
- int8_t *skip) {
- struct encode_b_args arg = {x, NULL, skip};
- encode_block_intra(plane, block, plane_bsize, tx_size, &arg);
-}
-
-
void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
const MACROBLOCKD *const xd = &x->e_mbd;
struct encode_b_args arg = {x, NULL, &xd->mi[0].src_mi->mbmi.skip};
- vp9_foreach_transformed_block_in_plane(xd, bsize, plane, encode_block_intra,
- &arg);
+ vp9_foreach_transformed_block_in_plane(xd, bsize, plane,
+ vp9_encode_block_intra, &arg);
}
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encodemb.h ('k') | source/libvpx/vp9/encoder/vp9_encodemv.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698