ref: 68b8d1ea0a9cb7d751b21673bc9f4e97c5dbd845
parent: 821b987486c5fcb472bb728f8e2de16620a66ab0
parent: 716d37f8bfc7c1e9347f405a1a62ddee0fc99f57
author: Jim Bankoski <jimbankoski@google.com>
date: Mon Sep 30 04:26:00 EDT 2013
Merge changes Ia7969baa,Ic5807152,I1c3943cd,I0b5af849,I01cbd1b0 * changes: fixed cpplint issue with vp9_scale.h vp9_entropymv.c cpplint issues resolved cpplint fixes to debug modes cpplint issues in vp9_onyx.h cpplint issues resolved in vp9_dx_iface.c
--- a/vp9/common/vp9_debugmodes.c
+++ b/vp9/common/vp9_debugmodes.c
@@ -63,9 +63,9 @@
print_mi_data(cm, mvs, "Transform:", offsetof(MB_MODE_INFO, tx_size));
print_mi_data(cm, mvs, "UV Modes:", offsetof(MB_MODE_INFO, uv_mode));
- log_frame_info(cm, "Vectors ",mvs);
+ log_frame_info(cm, "Vectors ", mvs);
for (mi_row = 0; mi_row < rows; mi_row++) {
- fprintf(mvs,"V ");
+ fprintf(mvs, "V ");
for (mi_col = 0; mi_col < cols; mi_col++) {
fprintf(mvs, "%4d:%4d ", mi_8x8[mi_index]->mbmi.mv[0].as_mv.row,
mi_8x8[mi_index]->mbmi.mv[0].as_mv.col);
--- a/vp9/common/vp9_entropymv.c
+++ b/vp9/common/vp9_entropymv.c
@@ -39,12 +39,12 @@
};
struct vp9_token vp9_mv_class_encodings[MV_CLASSES];
-const vp9_tree_index vp9_mv_class0_tree [2 * CLASS0_SIZE - 2] = {
+const vp9_tree_index vp9_mv_class0_tree[2 * CLASS0_SIZE - 2] = {
-0, -1,
};
struct vp9_token vp9_mv_class0_encodings[CLASS0_SIZE];
-const vp9_tree_index vp9_mv_fp_tree [2 * 4 - 2] = {
+const vp9_tree_index vp9_mv_fp_tree[2 * 4 - 2] = {
-0, 2,
-1, 4,
-2, -3
@@ -53,8 +53,8 @@
static const nmv_context default_nmv_context = {
{32, 64, 96},
- {
- { /* vert component */
+ { // NOLINT
+ { /* vert component */ // NOLINT
128, /* sign */
{224, 144, 192, 168, 192, 176, 192, 198, 198, 245}, /* class */
{216}, /* class0 */
@@ -64,7 +64,7 @@
160, /* class0_hp bit */
128, /* hp */
},
- { /* hor component */
+ { /* hor component */ // NOLINT
128, /* sign */
{216, 128, 176, 160, 176, 176, 192, 198, 198, 208}, /* class */
{208}, /* class0 */
@@ -149,7 +149,7 @@
static void inc_mv_component(int v, nmv_component_counts *comp_counts,
int incr, int usehp) {
int s, z, c, o, d, e, f;
- assert (v != 0); /* should not be zero */
+ assert(v != 0); /* should not be zero */
s = v < 0;
comp_counts->sign[s] += incr;
z = (s ? -v : v) - 1; /* magnitude - 1 */
@@ -198,8 +198,6 @@
vp9_prob this_probs[],
const vp9_prob last_probs[],
const unsigned int num_events[]) {
-
-
const unsigned int left = tree[i] <= 0
? num_events[-tree[i]]
: adapt_probs(tree[i], tree, this_probs, last_probs, num_events);
--- a/vp9/common/vp9_onyx.h
+++ b/vp9/common/vp9_onyx.h
@@ -13,7 +13,7 @@
#ifdef __cplusplus
extern "C"
-{
+{ // NOLINT
#endif
#include "./vpx_config.h"
@@ -33,7 +33,6 @@
FOURFIVE = 1,
THREEFIVE = 2,
ONETWO = 3
-
} VPX_SCALING;
typedef enum {
@@ -71,42 +70,48 @@
// 3 - lowest quality/fastest decode
int width; // width of data passed to the compressor
int height; // height of data passed to the compressor
- double framerate; // set to passed in framerate
- int64_t target_bandwidth; // bandwidth to be used in kilobits per second
+ double framerate; // set to passed in framerate
+ int64_t target_bandwidth; // bandwidth to be used in kilobits per second
- int noise_sensitivity; // parameter used for applying pre processing blur: recommendation 0
- int Sharpness; // parameter used for sharpening output: recommendation 0:
+ int noise_sensitivity; // pre processing blur: recommendation 0
+ int Sharpness; // sharpening output: recommendation 0:
int cpu_used;
unsigned int rc_max_intra_bitrate_pct;
// mode ->
- // (0)=Realtime/Live Encoding. This mode is optimized for realtim encoding (for example, capturing
- // a television signal or feed from a live camera). ( speed setting controls how fast )
- // (1)=Good Quality Fast Encoding. The encoder balances quality with the amount of time it takes to
- // encode the output. ( speed setting controls how fast )
- // (2)=One Pass - Best Quality. The encoder places priority on the quality of the output over encoding
- // speed. The output is compressed at the highest possible quality. This option takes the longest
- // amount of time to encode. ( speed setting ignored )
- // (3)=Two Pass - First Pass. The encoder generates a file of statistics for use in the second encoding
- // pass. ( speed setting controls how fast )
- // (4)=Two Pass - Second Pass. The encoder uses the statistics that were generated in the first encoding
- // pass to create the compressed output. ( speed setting controls how fast )
- // (5)=Two Pass - Second Pass Best. The encoder uses the statistics that were generated in the first
- // encoding pass to create the compressed output using the highest possible quality, and taking a
+ // (0)=Realtime/Live Encoding. This mode is optimized for realtime
+ // encoding (for example, capturing a television signal or feed from
+ // a live camera). ( speed setting controls how fast )
+ // (1)=Good Quality Fast Encoding. The encoder balances quality with the
+ // amount of time it takes to encode the output. ( speed setting
+ // controls how fast )
+ // (2)=One Pass - Best Quality. The encoder places priority on the
+ // quality of the output over encoding speed. The output is compressed
+ // at the highest possible quality. This option takes the longest
+ // amount of time to encode. ( speed setting ignored )
+ // (3)=Two Pass - First Pass. The encoder generates a file of statistics
+ // for use in the second encoding pass. ( speed setting controls how
+ // fast )
+ // (4)=Two Pass - Second Pass. The encoder uses the statistics that were
+ // generated in the first encoding pass to create the compressed
+ // output. ( speed setting controls how fast )
+ // (5)=Two Pass - Second Pass Best. The encoder uses the statistics that
+ // were generated in the first encoding pass to create the compressed
+ // output using the highest possible quality, and taking a
// longer amount of time to encode.. ( speed setting ignored )
- int Mode; //
+ int Mode;
// Key Framing Operations
- int auto_key; // automatically detect cut scenes and set the keyframes
- int key_freq; // maximum distance to key frame.
+ int auto_key; // autodetect cut scenes and set the keyframes
+ int key_freq; // maximum distance to key frame.
- int allow_lag; // allow lagged compression (if 0 lagin frames is ignored)
- int lag_in_frames; // how many frames lag before we start encoding
+ int allow_lag; // allow lagged compression (if 0 lagin frames is ignored)
+ int lag_in_frames; // how many frames lag before we start encoding
// ----------------------------------------------------------------
// DATARATE CONTROL OPTIONS
- int end_usage; // vbr or cbr
+ int end_usage; // vbr or cbr
// buffer targeting aggressiveness
int under_shoot_pct;
@@ -138,7 +143,7 @@
int play_alternate;
int alt_freq;
- int encode_breakout; // early breakout encode threshold : for video conf recommend 800
+ int encode_breakout; // early breakout : for video conf recommend 800
/* Bitfield defining the error resiliency features to enable.
* Can provide decodable frames after losses in previous
@@ -173,8 +178,8 @@
void vp9_change_config(VP9_PTR onyx, VP9_CONFIG *oxcf);
-// receive a frames worth of data caller can assume that a copy of this frame is made
-// and not just a copy of the pointer..
+ // receive a frames worth of data. caller can assume that a copy of this
+ // frame is made and not just a copy of the pointer..
int vp9_receive_raw_frame(VP9_PTR comp, unsigned int frame_flags,
YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
int64_t end_time_stamp);
--- a/vp9/common/vp9_scale.h
+++ b/vp9/common/vp9_scale.h
@@ -48,4 +48,4 @@
sf->y_scale_fp != REF_NO_SCALE;
}
-#endif // VP9_COMMON_VP9_SCALE_H_
+#endif // VP9_COMMON_VP9_SCALE_H_
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -14,7 +14,7 @@
#include "vpx/vpx_decoder.h"
#include "vpx/vp8dx.h"
#include "vpx/internal/vpx_codec_internal.h"
-#include "vpx_version.h"
+#include "./vpx_version.h"
#include "vp9/decoder/vp9_onyxd.h"
#include "vp9/decoder/vp9_onyxd_int.h"
#include "vp9/decoder/vp9_read_bit_buffer.h"
@@ -205,7 +205,6 @@
static vpx_codec_err_t vp9_get_si(vpx_codec_alg_priv_t *ctx,
vpx_codec_stream_info_t *si) {
-
unsigned int sz;
if (si->sz >= sizeof(vp9_stream_info_t))
@@ -323,15 +322,20 @@
vp9_ppflags_t flags = {0};
if (ctx->base.init_flags & VPX_CODEC_USE_POSTPROC) {
- flags.post_proc_flag = ctx->postproc_cfg.post_proc_flag
+ flags.post_proc_flag =
#if CONFIG_POSTPROC_VISUALIZER
-
- | ((ctx->dbg_color_ref_frame_flag != 0) ? VP9D_DEBUG_CLR_FRM_REF_BLKS : 0)
- | ((ctx->dbg_color_mb_modes_flag != 0) ? VP9D_DEBUG_CLR_BLK_MODES : 0)
- | ((ctx->dbg_color_b_modes_flag != 0) ? VP9D_DEBUG_CLR_BLK_MODES : 0)
- | ((ctx->dbg_display_mv_flag != 0) ? VP9D_DEBUG_DRAW_MV : 0)
+ ((ctx->dbg_color_ref_frame_flag != 0) ?
+ VP9D_DEBUG_CLR_FRM_REF_BLKS : 0)
+ | ((ctx->dbg_color_mb_modes_flag != 0) ?
+ VP9D_DEBUG_CLR_BLK_MODES : 0)
+ | ((ctx->dbg_color_b_modes_flag != 0) ?
+ VP9D_DEBUG_CLR_BLK_MODES : 0)
+ | ((ctx->dbg_display_mv_flag != 0) ?
+ VP9D_DEBUG_DRAW_MV : 0)
+ |
#endif
-;
+ ctx->postproc_cfg.post_proc_flag;
+
flags.deblocking_level = ctx->postproc_cfg.deblocking_level;
flags.noise_level = ctx->postproc_cfg.noise_level;
#if CONFIG_POSTPROC_VISUALIZER
@@ -496,8 +500,9 @@
mmap->sz = seg_iter->calc_sz(ctx->config.dec, ctx->init_flags);
res = VPX_CODEC_OK;
- } else
+ } else {
res = VPX_CODEC_LIST_END;
+ }
} while (!mmap->sz && res != VPX_CODEC_LIST_END);
return res;
@@ -542,7 +547,6 @@
static vpx_codec_err_t set_reference(vpx_codec_alg_priv_t *ctx,
int ctr_id,
va_list args) {
-
vpx_ref_frame_t *data = va_arg(args, vpx_ref_frame_t *);
if (data) {
@@ -553,15 +557,14 @@
return vp9_set_reference_dec(ctx->pbi,
(VP9_REFFRAME)frame->frame_type, &sd);
- } else
+ } else {
return VPX_CODEC_INVALID_PARAM;
-
+ }
}
static vpx_codec_err_t copy_reference(vpx_codec_alg_priv_t *ctx,
int ctr_id,
va_list args) {
-
vpx_ref_frame_t *data = va_arg(args, vpx_ref_frame_t *);
if (data) {
@@ -572,9 +575,9 @@
return vp9_copy_reference_dec(ctx->pbi,
(VP9_REFFRAME)frame->frame_type, &sd);
- } else
+ } else {
return VPX_CODEC_INVALID_PARAM;
-
+ }
}
static vpx_codec_err_t get_reference(vpx_codec_alg_priv_t *ctx,
@@ -603,9 +606,9 @@
ctx->postproc_cfg_set = 1;
ctx->postproc_cfg = *((vp8_postproc_cfg_t *)data);
return VPX_CODEC_OK;
- } else
+ } else {
return VPX_CODEC_INVALID_PARAM;
-
+ }
#else
return VPX_CODEC_INCAPABLE;
#endif
@@ -642,8 +645,9 @@
*update_info = pbi->refresh_frame_flags;
return VPX_CODEC_OK;
- } else
+ } else {
return VPX_CODEC_INVALID_PARAM;
+ }
}
@@ -650,7 +654,6 @@
static vpx_codec_err_t get_frame_corrupted(vpx_codec_alg_priv_t *ctx,
int ctrl_id,
va_list args) {
-
int *corrupted = va_arg(args, int *);
if (corrupted) {
@@ -658,9 +661,9 @@
*corrupted = pbi->common.frame_to_show->corrupted;
return VPX_CODEC_OK;
- } else
+ } else {
return VPX_CODEC_INVALID_PARAM;
-
+ }
}
static vpx_codec_err_t set_invert_tile_order(vpx_codec_alg_priv_t *ctx,
@@ -699,13 +702,13 @@
ctf_maps, /* vpx_codec_ctrl_fn_map_t *ctrl_maps; */
vp9_xma_get_mmap, /* vpx_codec_get_mmap_fn_t get_mmap; */
vp9_xma_set_mmap, /* vpx_codec_set_mmap_fn_t set_mmap; */
- {
+ { // NOLINT
vp9_peek_si, /* vpx_codec_peek_si_fn_t peek_si; */
vp9_get_si, /* vpx_codec_get_si_fn_t get_si; */
vp9_decode, /* vpx_codec_decode_fn_t decode; */
vp9_get_frame, /* vpx_codec_frame_get_fn_t frame_get; */
},
- {
+ { // NOLINT
/* encoder functions */
NOT_IMPLEMENTED,
NOT_IMPLEMENTED,