summaryrefslogtreecommitdiff
path: root/vp8/encoder/encodeframe.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2012-10-15 10:52:13 -0700
committerRonald S. Bultje <rbultje@google.com>2012-10-15 10:56:39 -0700
commite788146247d47e0e24ad92259f6f016ffcf7b55a (patch)
tree8c75788a10daec09557ca59afa6b27f28fb51c05 /vp8/encoder/encodeframe.c
parent41e3a9ef14ce3e1da623e1e7e255e9376af3b7bd (diff)
downloadlibvpx-e788146247d47e0e24ad92259f6f016ffcf7b55a.tar
libvpx-e788146247d47e0e24ad92259f6f016ffcf7b55a.tar.gz
libvpx-e788146247d47e0e24ad92259f6f016ffcf7b55a.tar.bz2
libvpx-e788146247d47e0e24ad92259f6f016ffcf7b55a.zip
Add a new token stuffing function vp8_stuff_mb().
This way a caller doesn't need to implement the logic for which (and how many) tokens to write out to stuff one macroblock worth of EOBs. Make the actual function implementations static, since they are now only used in tokenize.c; also do some minor stylistic changes so it follows the style guide a little more closely; use PLANE_TYPE where appropriate, remove old (stale) frame_type function arguments; hardcode plane type where only a single one is possible (2nd order DC or U/V EOB stuffing); support stuffing 8x8/4x4 transform EOBs with no 2nd order DC. Change-Id: Ia448e251d19a4e3182eddeb9edd034bd7dc16fa3
Diffstat (limited to 'vp8/encoder/encodeframe.c')
-rw-r--r--vp8/encoder/encodeframe.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c
index 628a8df4d..ac22456d1 100644
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -52,9 +52,6 @@ int enc_debug = 0;
int mb_row_debug, mb_col_debug;
#endif
-extern void vp8_stuff_mb_4x4(VP8_COMP *cpi, MACROBLOCKD *xd,
- TOKENEXTRA **t, int dry_run);
-
extern void vp8cx_initialize_me_consts(VP8_COMP *cpi, int QIndex);
extern void vp8_auto_select_speed(VP8_COMP *cpi);
extern void vp8cx_init_mbrthread_data(VP8_COMP *cpi,
@@ -81,8 +78,6 @@ void vp8cx_encode_intra_super_block(VP8_COMP *cpi,
MACROBLOCK *x,
TOKENEXTRA **t, int mb_col);
static void adjust_act_zbin(VP8_COMP *cpi, MACROBLOCK *x);
-extern void vp8_stuff_mb_8x8(VP8_COMP *cpi,
- MACROBLOCKD *xd, TOKENEXTRA **t, int dry_run);
#ifdef MODE_STATS
unsigned int inter_y_modes[MB_MODE_COUNT];
@@ -1843,7 +1838,7 @@ static void update_sb_skip_coeff_state(VP8_COMP *cpi,
if (skip[n]) {
x->e_mbd.above_context = &ta[n];
x->e_mbd.left_context = &tl[n];
- vp8_stuff_mb_8x8(cpi, &x->e_mbd, tp, 0);
+ vp8_stuff_mb(cpi, &x->e_mbd, tp, 0);
} else {
if (n_tokens[n]) {
memcpy(*tp, tokens[n], sizeof(*t[0]) * n_tokens[n]);
@@ -2150,7 +2145,7 @@ void vp8cx_encode_inter_macroblock (VP8_COMP *cpi, MACROBLOCK *x,
cpi->skip_true_count[mb_skip_context]++;
vp8_fix_contexts(xd);
} else {
- vp8_stuff_mb_4x4(cpi, xd, t, !output_enabled);
+ vp8_stuff_mb(cpi, xd, t, !output_enabled);
mbmi->mb_skip_coeff = 0;
if (output_enabled)
cpi->skip_false_count[mb_skip_context]++;
@@ -2342,7 +2337,7 @@ void vp8cx_encode_inter_superblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
cpi->skip_true_count[mb_skip_context]++;
vp8_fix_contexts(xd);
} else {
- vp8_stuff_mb_4x4(cpi, xd, t, 0);
+ vp8_stuff_mb(cpi, xd, t, 0);
xd->mode_info_context->mbmi.mb_skip_coeff = 0;
cpi->skip_false_count[mb_skip_context]++;
}