summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
Diffstat (limited to 'vp8')
-rw-r--r--vp8/common/blockd.h4
-rw-r--r--vp8/common/extend.c3
-rw-r--r--vp8/common/modecont.c36
-rw-r--r--vp8/common/x86/vp8_asm_stubs.c8
-rw-r--r--vp8/decoder/ec_types.h4
-rw-r--r--vp8/decoder/onyxd_int.h4
-rw-r--r--vp8/decoder/threading.c21
-rw-r--r--vp8/encoder/firstpass.c34
-rw-r--r--vp8/encoder/ratectrl.c5
-rw-r--r--vp8/encoder/rdopt.c6
-rw-r--r--vp8/encoder/treewriter.h6
-rw-r--r--vp8/vp8_cx_iface.c5
12 files changed, 61 insertions, 75 deletions
diff --git a/vp8/common/blockd.h b/vp8/common/blockd.h
index 1a3aad16a..f8a2ec899 100644
--- a/vp8/common/blockd.h
+++ b/vp8/common/blockd.h
@@ -37,7 +37,9 @@ extern "C" {
#define SEGMENT_DELTADATA 0
#define SEGMENT_ABSDATA 1
-typedef struct { int r, c; } POS;
+typedef struct {
+ int r, c;
+} POS;
#define PLANE_TYPE_Y_NO_DC 0
#define PLANE_TYPE_Y2 1
diff --git a/vp8/common/extend.c b/vp8/common/extend.c
index 2d67b516b..f4dbce2cd 100644
--- a/vp8/common/extend.c
+++ b/vp8/common/extend.c
@@ -20,8 +20,7 @@ static void copy_and_extend_plane(unsigned char *s, /* source */
int et, /* extend top border */
int el, /* extend left border */
int eb, /* extend bottom border */
- int er /* extend right border */
- ) {
+ int er) { /* extend right border */
int i;
unsigned char *src_ptr1, *src_ptr2;
unsigned char *dest_ptr1, *dest_ptr2;
diff --git a/vp8/common/modecont.c b/vp8/common/modecont.c
index d6ad9bb99..bab410374 100644
--- a/vp8/common/modecont.c
+++ b/vp8/common/modecont.c
@@ -11,28 +11,16 @@
#include "entropy.h"
const int vp8_mode_contexts[6][4] = {
- {
- /* 0 */
- 7, 1, 1, 143,
- },
- {
- /* 1 */
- 14, 18, 14, 107,
- },
- {
- /* 2 */
- 135, 64, 57, 68,
- },
- {
- /* 3 */
- 60, 56, 128, 65,
- },
- {
- /* 4 */
- 159, 134, 128, 34,
- },
- {
- /* 5 */
- 234, 188, 128, 28,
- },
+ { /* 0 */
+ 7, 1, 1, 143 },
+ { /* 1 */
+ 14, 18, 14, 107 },
+ { /* 2 */
+ 135, 64, 57, 68 },
+ { /* 3 */
+ 60, 56, 128, 65 },
+ { /* 4 */
+ 159, 134, 128, 34 },
+ { /* 5 */
+ 234, 188, 128, 28 },
};
diff --git a/vp8/common/x86/vp8_asm_stubs.c b/vp8/common/x86/vp8_asm_stubs.c
index de59b3894..de836f19d 100644
--- a/vp8/common/x86/vp8_asm_stubs.c
+++ b/vp8/common/x86/vp8_asm_stubs.c
@@ -95,9 +95,7 @@ void vp8_sixtap_predict4x4_mmx(unsigned char *src_ptr, int src_pixels_per_line,
void vp8_sixtap_predict16x16_sse2(unsigned char *src_ptr,
int src_pixels_per_line, int xoffset,
int yoffset, unsigned char *dst_ptr,
- int dst_pitch
-
- ) {
+ int dst_pitch) {
DECLARE_ALIGNED(16, unsigned short,
FData2[24 * 24]); /* Temp data bufffer used in filtering */
@@ -236,9 +234,7 @@ extern void vp8_filter_block1d4_v6_ssse3(unsigned char *src_ptr,
void vp8_sixtap_predict16x16_ssse3(unsigned char *src_ptr,
int src_pixels_per_line, int xoffset,
int yoffset, unsigned char *dst_ptr,
- int dst_pitch
-
- ) {
+ int dst_pitch) {
DECLARE_ALIGNED(16, unsigned char, FData2[24 * 24]);
if (xoffset) {
diff --git a/vp8/decoder/ec_types.h b/vp8/decoder/ec_types.h
index 0ab08b649..8da561f47 100644
--- a/vp8/decoder/ec_types.h
+++ b/vp8/decoder/ec_types.h
@@ -34,7 +34,9 @@ typedef struct {
/* Structure used to hold all the overlaps of a macroblock. The overlaps of a
* macroblock is further divided into block overlaps.
*/
-typedef struct { B_OVERLAP overlaps[16]; } MB_OVERLAP;
+typedef struct {
+ B_OVERLAP overlaps[16];
+} MB_OVERLAP;
/* Structure for keeping track of motion vectors and which reference frame they
* refer to. Used for motion vector interpolation.
diff --git a/vp8/decoder/onyxd_int.h b/vp8/decoder/onyxd_int.h
index 5ecacdbb9..3689258f1 100644
--- a/vp8/decoder/onyxd_int.h
+++ b/vp8/decoder/onyxd_int.h
@@ -31,7 +31,9 @@ typedef struct {
void *ptr2;
} DECODETHREAD_DATA;
-typedef struct { MACROBLOCKD mbd; } MB_ROW_DEC;
+typedef struct {
+ MACROBLOCKD mbd;
+} MB_ROW_DEC;
typedef struct {
int enabled;
diff --git a/vp8/decoder/threading.c b/vp8/decoder/threading.c
index d0213f75c..aadc8dc71 100644
--- a/vp8/decoder/threading.c
+++ b/vp8/decoder/threading.c
@@ -739,24 +739,21 @@ void vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows) {
/* Allocate memory for above_row buffers. */
CALLOC_ARRAY(pbi->mt_yabove_row, pc->mb_rows);
for (i = 0; i < pc->mb_rows; ++i)
- CHECK_MEM_ERROR(
- pbi->mt_yabove_row[i],
- vpx_memalign(
- 16, sizeof(unsigned char) * (width + (VP8BORDERINPIXELS << 1))));
+ CHECK_MEM_ERROR(pbi->mt_yabove_row[i],
+ vpx_memalign(16, sizeof(unsigned char) *
+ (width + (VP8BORDERINPIXELS << 1))));
CALLOC_ARRAY(pbi->mt_uabove_row, pc->mb_rows);
for (i = 0; i < pc->mb_rows; ++i)
- CHECK_MEM_ERROR(
- pbi->mt_uabove_row[i],
- vpx_memalign(16,
- sizeof(unsigned char) * (uv_width + VP8BORDERINPIXELS)));
+ CHECK_MEM_ERROR(pbi->mt_uabove_row[i],
+ vpx_memalign(16, sizeof(unsigned char) *
+ (uv_width + VP8BORDERINPIXELS)));
CALLOC_ARRAY(pbi->mt_vabove_row, pc->mb_rows);
for (i = 0; i < pc->mb_rows; ++i)
- CHECK_MEM_ERROR(
- pbi->mt_vabove_row[i],
- vpx_memalign(16,
- sizeof(unsigned char) * (uv_width + VP8BORDERINPIXELS)));
+ CHECK_MEM_ERROR(pbi->mt_vabove_row[i],
+ vpx_memalign(16, sizeof(unsigned char) *
+ (uv_width + VP8BORDERINPIXELS)));
/* Allocate memory for left_col buffers. */
CALLOC_ARRAY(pbi->mt_yleft_col, pc->mb_rows);
diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c
index 70f924341..4ea991e52 100644
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -989,11 +989,11 @@ static int estimate_max_q(VP8_COMP *cpi, FIRSTPASS_STATS *fpstats,
bits_per_mb_at_this_q =
vp8_bits_per_mb[INTER_FRAME][Q] + overhead_bits_per_mb;
- bits_per_mb_at_this_q = (int)(.5 +
- err_correction_factor * speed_correction *
- cpi->twopass.est_max_qcorrection_factor *
- cpi->twopass.section_max_qfactor *
- (double)bits_per_mb_at_this_q);
+ bits_per_mb_at_this_q =
+ (int)(.5 + err_correction_factor * speed_correction *
+ cpi->twopass.est_max_qcorrection_factor *
+ cpi->twopass.section_max_qfactor *
+ (double)bits_per_mb_at_this_q);
/* Mode and motion overhead */
/* As Q rises in real encode loop rd code will force overhead down
@@ -1086,9 +1086,8 @@ static int estimate_cq(VP8_COMP *cpi, FIRSTPASS_STATS *fpstats,
vp8_bits_per_mb[INTER_FRAME][Q] + overhead_bits_per_mb;
bits_per_mb_at_this_q =
- (int)(.5 +
- err_correction_factor * speed_correction * clip_iifactor *
- (double)bits_per_mb_at_this_q);
+ (int)(.5 + err_correction_factor * speed_correction * clip_iifactor *
+ (double)bits_per_mb_at_this_q);
/* Mode and motion overhead */
/* As Q rises in real encode loop rd code will force overhead down
@@ -1273,9 +1272,8 @@ void vp8_init_second_pass(VP8_COMP *cpi) {
* sum duration is not. Its calculated based on the actual durations of
* all frames from the first pass.
*/
- vp8_new_framerate(cpi,
- 10000000.0 * cpi->twopass.total_stats.count /
- cpi->twopass.total_stats.duration);
+ vp8_new_framerate(cpi, 10000000.0 * cpi->twopass.total_stats.count /
+ cpi->twopass.total_stats.duration);
cpi->output_framerate = cpi->framerate;
cpi->twopass.bits_left = (int64_t)(cpi->twopass.total_stats.duration *
@@ -1739,10 +1737,11 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) {
/* Dont break out very close to a key frame */
((cpi->twopass.frames_to_key - i) >= MIN_GF_INTERVAL) &&
((boost_score > 20.0) || (next_frame.pcnt_inter < 0.75)) &&
- (!flash_detected) && ((mv_ratio_accumulator > 100.0) ||
- (abs_mv_in_out_accumulator > 3.0) ||
- (mv_in_out_accumulator < -2.0) ||
- ((boost_score - old_boost_score) < 2.0)))) {
+ (!flash_detected) &&
+ ((mv_ratio_accumulator > 100.0) ||
+ (abs_mv_in_out_accumulator > 3.0) ||
+ (mv_in_out_accumulator < -2.0) ||
+ ((boost_score - old_boost_score) < 2.0)))) {
boost_score = old_boost_score;
break;
}
@@ -1815,8 +1814,9 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) {
(next_frame.pcnt_inter > 0.75) &&
((mv_in_out_accumulator / (double)i > -0.2) ||
(mv_in_out_accumulator > -2.0)) &&
- (cpi->gfu_boost > 100) && (cpi->twopass.gf_decay_rate <=
- (ARF_DECAY_THRESH + (cpi->gfu_boost / 200))))
+ (cpi->gfu_boost > 100) &&
+ (cpi->twopass.gf_decay_rate <=
+ (ARF_DECAY_THRESH + (cpi->gfu_boost / 200))))
#endif
{
int Boost;
diff --git a/vp8/encoder/ratectrl.c b/vp8/encoder/ratectrl.c
index ab9b8fdc8..fc833bccc 100644
--- a/vp8/encoder/ratectrl.c
+++ b/vp8/encoder/ratectrl.c
@@ -1052,9 +1052,8 @@ void vp8_update_rate_correction_factors(VP8_COMP *cpi, int damp_var) {
* overflow when values are large
*/
projected_size_based_on_q =
- (int)(((.5 +
- rate_correction_factor *
- vp8_bits_per_mb[cpi->common.frame_type][Q]) *
+ (int)(((.5 + rate_correction_factor *
+ vp8_bits_per_mb[cpi->common.frame_type][Q]) *
cpi->common.MBs) /
(1 << BPER_MB_NORMBITS));
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c
index e210b4410..fa5dde15d 100644
--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -770,9 +770,9 @@ static void rd_pick_intra_mbuv_mode(MACROBLOCK *x, int *rate,
vp8_quantize_mbuv(x);
rate_to = rd_cost_mbuv(x);
- this_rate = rate_to +
- x->intra_uv_mode_cost[xd->frame_type]
- [xd->mode_info_context->mbmi.uv_mode];
+ this_rate =
+ rate_to + x->intra_uv_mode_cost[xd->frame_type]
+ [xd->mode_info_context->mbmi.uv_mode];
this_distortion = vp8_mbuverror(x) / 4;
diff --git a/vp8/encoder/treewriter.h b/vp8/encoder/treewriter.h
index dadbbe3f8..e76699092 100644
--- a/vp8/encoder/treewriter.h
+++ b/vp8/encoder/treewriter.h
@@ -56,8 +56,7 @@ static INLINE unsigned int vp8_cost_branch(const unsigned int ct[2],
static void vp8_treed_write(vp8_writer *const w, vp8_tree t,
const vp8_prob *const p, int v,
- int n /* number of bits in v, assumed nonzero */
- ) {
+ int n) { /* number of bits in v, assumed nonzero */
vp8_tree_index i = 0;
do {
@@ -73,8 +72,7 @@ static INLINE void vp8_write_token(vp8_writer *const w, vp8_tree t,
}
static int vp8_treed_cost(vp8_tree t, const vp8_prob *const p, int v,
- int n /* number of bits in v, assumed nonzero */
- ) {
+ int n) { /* number of bits in v, assumed nonzero */
int c = 0;
vp8_tree_index i = 0;
diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c
index 8f0a782bc..a24d8c3db 100644
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -1261,6 +1261,9 @@ CODEC_INTERFACE(vpx_codec_vp8_cx) = {
vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t cfg_maps; */
vp8e_encode, /* vpx_codec_encode_fn_t encode; */
vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t get_cx_data; */
- vp8e_set_config, NULL, vp8e_get_preview, vp8e_mr_alloc_mem,
+ vp8e_set_config,
+ NULL,
+ vp8e_get_preview,
+ vp8e_mr_alloc_mem,
} /* encoder functions */
};