summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorAdrian Grange <agrange@google.com>2013-08-20 12:55:41 -0700
committerAdrian Grange <agrange@google.com>2013-08-21 08:45:42 -0700
commitce28d0ca89832c36c56f22873732582edf9ce9a0 (patch)
tree87d969b8015ad01bc4ac5c600f71239a977c9f31 /vp9/encoder
parent5b6396357331404f624e5d0dc69835f254b621cb (diff)
downloadlibvpx-ce28d0ca89832c36c56f22873732582edf9ce9a0.tar
libvpx-ce28d0ca89832c36c56f22873732582edf9ce9a0.tar.gz
libvpx-ce28d0ca89832c36c56f22873732582edf9ce9a0.tar.bz2
libvpx-ce28d0ca89832c36c56f22873732582edf9ce9a0.zip
Fix typos and minor stylistic cleanup
Change-Id: I32e43474e8651ef2eb181d24860a8f118cfea7bf
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodeframe.c10
-rw-r--r--vp9/encoder/vp9_rdopt.c12
-rw-r--r--vp9/encoder/vp9_variance_c.c50
3 files changed, 35 insertions, 37 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 92153dd5f..51bd4477d 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -574,6 +574,7 @@ static void pick_sb_modes(VP9_COMP *cpi, int mi_row, int mi_col,
MACROBLOCK *const x = &cpi->mb;
MACROBLOCKD *const xd = &x->e_mbd;
+ // Use the lower precision, but faster, 32x32 fdct for mode selection.
x->use_lp32x32fdct = 1;
if (bsize < BLOCK_8X8) {
@@ -1757,8 +1758,6 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp, int mi_row,
}
}
- // Use 4 subblocks' motion estimation results to speed up current
- // partition's checking.
x->fast_ms = 0;
x->pred_mv.as_int = 0;
x->subblock_ref = 0;
@@ -2178,7 +2177,7 @@ static void encode_frame_internal(VP9_COMP *cpi) {
build_activity_map(cpi);
}
- // re-initencode frame context.
+ // Re-initialize encode frame context.
init_encode_frame_mb_context(cpi);
vp9_zero(cpi->rd_comp_pred_diff);
@@ -2414,7 +2413,7 @@ void vp9_encode_frame(VP9_COMP *cpi) {
// decoder such that we allow compound where one of the 3 buffers has a
// different sign bias and that buffer is then the fixed ref. However, this
// requires further work in the rd loop. For now the only supported encoder
- // side behaviour is where the ALT ref buffer has opposite sign bias to
+ // side behavior is where the ALT ref buffer has opposite sign bias to
// the other two.
if ((cm->ref_frame_sign_bias[ALTREF_FRAME]
== cm->ref_frame_sign_bias[GOLDEN_FRAME])
@@ -2481,13 +2480,12 @@ void vp9_encode_frame(VP9_COMP *cpi) {
filter_type = SWITCHABLE;
}
- /* transform size (4x4, 8x8, 16x16 or select-per-mb) selection */
-
cpi->mb.e_mbd.lossless = 0;
if (cpi->oxcf.lossless) {
cpi->mb.e_mbd.lossless = 1;
}
+ /* transform size selection (4x4, 8x8, 16x16 or select-per-mb) */
select_tx_mode(cpi);
cpi->common.comp_pred_mode = pred_type;
cpi->common.mcomp_filter_type = filter_type;
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index ae09309b4..c2feabaf9 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1217,6 +1217,7 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
MB_PREDICTION_MODE mode;
MB_PREDICTION_MODE mode_selected = DC_PRED;
MACROBLOCKD *const xd = &x->e_mbd;
+ MODE_INFO *const mic = xd->mode_info_context;
int this_rate, this_rate_tokenonly, s;
int64_t this_distortion, this_rd;
TX_SIZE best_tx = TX_4X4;
@@ -1230,7 +1231,6 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
/* Y Search for intra prediction mode */
for (mode = DC_PRED; mode <= TM_PRED; mode++) {
int64_t local_tx_cache[TX_MODES];
- MODE_INFO *const mic = xd->mode_info_context;
const int mis = xd->mode_info_stride;
if (cpi->common.frame_type == KEY_FRAME) {
@@ -1240,7 +1240,7 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
bmode_costs = x->y_mode_costs[A][L];
}
- x->e_mbd.mode_info_context->mbmi.mode = mode;
+ mic->mbmi.mode = mode;
super_block_yrd(cpi, x, &this_rate_tokenonly, &this_distortion, &s, NULL,
bsize, local_tx_cache, best_rd);
@@ -1254,7 +1254,7 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
if (this_rd < best_rd) {
mode_selected = mode;
best_rd = this_rd;
- best_tx = x->e_mbd.mode_info_context->mbmi.txfm_size;
+ best_tx = mic->mbmi.txfm_size;
*rate = this_rate;
*rate_tokenonly = this_rate_tokenonly;
*distortion = this_distortion;
@@ -1272,8 +1272,8 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
}
}
- x->e_mbd.mode_info_context->mbmi.mode = mode_selected;
- x->e_mbd.mode_info_context->mbmi.txfm_size = best_tx;
+ mic->mbmi.mode = mode_selected;
+ mic->mbmi.txfm_size = best_tx;
return best_rd;
}
@@ -1437,7 +1437,7 @@ static int labels2mode(MACROBLOCK *x, int i,
int *mvjcost, int *mvcost[2], VP9_COMP *cpi) {
MACROBLOCKD *const xd = &x->e_mbd;
MODE_INFO *const mic = xd->mode_info_context;
- MB_MODE_INFO * mbmi = &mic->mbmi;
+ MB_MODE_INFO *mbmi = &mic->mbmi;
int cost = 0, thismvcost = 0;
int idx, idy;
const int num_4x4_blocks_wide = num_4x4_blocks_wide_lookup[mbmi->sb_type];
diff --git a/vp9/encoder/vp9_variance_c.c b/vp9/encoder/vp9_variance_c.c
index 23e776791..325925cbd 100644
--- a/vp9/encoder/vp9_variance_c.c
+++ b/vp9/encoder/vp9_variance_c.c
@@ -46,7 +46,7 @@ unsigned int vp9_sub_pixel_variance64x32_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering
+ uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering
uint8_t temp2[68 * 64];
const int16_t *hfilter, *vfilter;
@@ -68,7 +68,7 @@ unsigned int vp9_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering
+ uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering
uint8_t temp2[68 * 64];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 64 * 64); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -103,7 +103,7 @@ unsigned int vp9_sub_pixel_variance32x64_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering
+ uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering
uint8_t temp2[68 * 64];
const int16_t *hfilter, *vfilter;
@@ -125,7 +125,7 @@ unsigned int vp9_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering
+ uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering
uint8_t temp2[68 * 64];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 32 * 64); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -160,7 +160,7 @@ unsigned int vp9_sub_pixel_variance32x16_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering
+ uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering
uint8_t temp2[36 * 32];
const int16_t *hfilter, *vfilter;
@@ -182,7 +182,7 @@ unsigned int vp9_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering
+ uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering
uint8_t temp2[36 * 32];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 32 * 16); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -217,7 +217,7 @@ unsigned int vp9_sub_pixel_variance16x32_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering
+ uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering
uint8_t temp2[36 * 32];
const int16_t *hfilter, *vfilter;
@@ -239,7 +239,7 @@ unsigned int vp9_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering
+ uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering
uint8_t temp2[36 * 32];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 16 * 32); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -440,7 +440,7 @@ unsigned int vp9_sub_pixel_variance4x4_c(const uint8_t *src_ptr,
unsigned int *sse) {
uint8_t temp2[20 * 16];
const int16_t *hfilter, *vfilter;
- uint16_t fdata3[5 * 4]; // Temp data bufffer used in filtering
+ uint16_t fdata3[5 * 4]; // Temp data buffer used in filtering
hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset);
vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset);
@@ -466,7 +466,7 @@ unsigned int vp9_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr,
uint8_t temp2[20 * 16];
const int16_t *hfilter, *vfilter;
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 4 * 4); // compound pred buffer
- uint16_t fdata3[5 * 4]; // Temp data bufffer used in filtering
+ uint16_t fdata3[5 * 4]; // Temp data buffer used in filtering
hfilter = VP9_BILINEAR_FILTERS_2TAP(xoffset);
vfilter = VP9_BILINEAR_FILTERS_2TAP(yoffset);
@@ -488,7 +488,7 @@ unsigned int vp9_sub_pixel_variance8x8_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[9 * 8]; // Temp data bufffer used in filtering
+ uint16_t fdata3[9 * 8]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
const int16_t *hfilter, *vfilter;
@@ -510,7 +510,7 @@ unsigned int vp9_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[9 * 8]; // Temp data bufffer used in filtering
+ uint16_t fdata3[9 * 8]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 8 * 8); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -532,7 +532,7 @@ unsigned int vp9_sub_pixel_variance16x16_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[17 * 16]; // Temp data bufffer used in filtering
+ uint16_t fdata3[17 * 16]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
const int16_t *hfilter, *vfilter;
@@ -577,7 +577,7 @@ unsigned int vp9_sub_pixel_variance64x64_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering
+ uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering
uint8_t temp2[68 * 64];
const int16_t *hfilter, *vfilter;
@@ -599,7 +599,7 @@ unsigned int vp9_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[65 * 64]; // Temp data bufffer used in filtering
+ uint16_t fdata3[65 * 64]; // Temp data buffer used in filtering
uint8_t temp2[68 * 64];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 64 * 64); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -621,7 +621,7 @@ unsigned int vp9_sub_pixel_variance32x32_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering
+ uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering
uint8_t temp2[36 * 32];
const int16_t *hfilter, *vfilter;
@@ -643,7 +643,7 @@ unsigned int vp9_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[33 * 32]; // Temp data bufffer used in filtering
+ uint16_t fdata3[33 * 32]; // Temp data buffer used in filtering
uint8_t temp2[36 * 32];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 32 * 32); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -785,7 +785,7 @@ unsigned int vp9_sub_pixel_variance16x8_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[16 * 9]; // Temp data bufffer used in filtering
+ uint16_t fdata3[16 * 9]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
const int16_t *hfilter, *vfilter;
@@ -807,7 +807,7 @@ unsigned int vp9_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[16 * 9]; // Temp data bufffer used in filtering
+ uint16_t fdata3[16 * 9]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 16 * 8); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -829,7 +829,7 @@ unsigned int vp9_sub_pixel_variance8x16_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[9 * 16]; // Temp data bufffer used in filtering
+ uint16_t fdata3[9 * 16]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
const int16_t *hfilter, *vfilter;
@@ -851,7 +851,7 @@ unsigned int vp9_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[9 * 16]; // Temp data bufffer used in filtering
+ uint16_t fdata3[9 * 16]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 8 * 16); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -873,7 +873,7 @@ unsigned int vp9_sub_pixel_variance8x4_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[8 * 5]; // Temp data bufffer used in filtering
+ uint16_t fdata3[8 * 5]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
const int16_t *hfilter, *vfilter;
@@ -895,7 +895,7 @@ unsigned int vp9_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[8 * 5]; // Temp data bufffer used in filtering
+ uint16_t fdata3[8 * 5]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 8 * 4); // compound pred buffer
const int16_t *hfilter, *vfilter;
@@ -917,7 +917,7 @@ unsigned int vp9_sub_pixel_variance4x8_c(const uint8_t *src_ptr,
const uint8_t *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- uint16_t fdata3[5 * 8]; // Temp data bufffer used in filtering
+ uint16_t fdata3[5 * 8]; // Temp data buffer used in filtering
// FIXME(jingning,rbultje): this temp2 buffer probably doesn't need to be
// of this big? same issue appears in all other block size settings.
uint8_t temp2[20 * 16];
@@ -941,7 +941,7 @@ unsigned int vp9_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr,
int dst_pixels_per_line,
unsigned int *sse,
const uint8_t *second_pred) {
- uint16_t fdata3[5 * 8]; // Temp data bufffer used in filtering
+ uint16_t fdata3[5 * 8]; // Temp data buffer used in filtering
uint8_t temp2[20 * 16];
DECLARE_ALIGNED_ARRAY(16, uint8_t, temp3, 4 * 8); // compound pred buffer
const int16_t *hfilter, *vfilter;