summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder/vp9_encoder.h')
-rw-r--r--vp9/encoder/vp9_encoder.h73
1 files changed, 33 insertions, 40 deletions
diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h
index d18c8047b..b6d7cabad 100644
--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -72,7 +72,6 @@ typedef struct {
FRAME_CONTEXT fc;
} CODING_CONTEXT;
-
typedef enum {
// encode_breakout is disabled.
ENCODE_BREAKOUT_DISABLED = 0,
@@ -83,10 +82,10 @@ typedef enum {
} ENCODE_BREAKOUT_TYPE;
typedef enum {
- NORMAL = 0,
- FOURFIVE = 1,
- THREEFIVE = 2,
- ONETWO = 3
+ NORMAL = 0,
+ FOURFIVE = 1,
+ THREEFIVE = 2,
+ ONETWO = 3
} VPX_SCALING;
typedef enum {
@@ -106,7 +105,7 @@ typedef enum {
} MODE;
typedef enum {
- FRAMEFLAGS_KEY = 1 << 0,
+ FRAMEFLAGS_KEY = 1 << 0,
FRAMEFLAGS_GOLDEN = 1 << 1,
FRAMEFLAGS_ALTREF = 1 << 2,
} FRAMETYPE_FLAGS;
@@ -129,14 +128,14 @@ typedef enum {
typedef struct VP9EncoderConfig {
BITSTREAM_PROFILE profile;
vpx_bit_depth_t bit_depth; // Codec bit-depth.
- int width; // width of data passed to the compressor
- int height; // height of data passed to the compressor
+ int width; // width of data passed to the compressor
+ int height; // height of data passed to the compressor
unsigned int input_bit_depth; // Input bit depth.
- double init_framerate; // set to passed in framerate
- int64_t target_bandwidth; // bandwidth to be used in bits per second
+ double init_framerate; // set to passed in framerate
+ int64_t target_bandwidth; // bandwidth to be used in bits per second
int noise_sensitivity; // pre processing blur: recommendation 0
- int sharpness; // sharpening output: recommendation 0:
+ int sharpness; // sharpening output: recommendation 0:
int speed;
// maximum allowed bitrate for any intra frame in % of bitrate target.
unsigned int rc_max_intra_bitrate_pct;
@@ -188,7 +187,7 @@ typedef struct VP9EncoderConfig {
int frame_periodic_boost;
// two pass datarate control
- int two_pass_vbrbias; // two pass datarate control tweaks
+ int two_pass_vbrbias; // two pass datarate control tweaks
int two_pass_vbrmin_section;
int two_pass_vbrmax_section;
// END DATARATE CONTROL OPTIONS
@@ -289,15 +288,10 @@ typedef struct ActiveMap {
unsigned char *map;
} ActiveMap;
-typedef enum {
- Y,
- U,
- V,
- ALL
-} STAT_TYPE;
+typedef enum { Y, U, V, ALL } STAT_TYPE;
typedef struct IMAGE_STAT {
- double stat[ALL+1];
+ double stat[ALL + 1];
double worst;
} ImageStat;
@@ -333,7 +327,7 @@ typedef struct {
uint64_t max_luma_sample_rate;
uint32_t max_luma_picture_size;
double average_bitrate; // in kilobits per second
- double max_cpb_size; // in kilobits
+ double max_cpb_size; // in kilobits
double compression_ratio;
uint8_t max_col_tiles;
uint32_t min_altref_distance;
@@ -375,8 +369,8 @@ typedef struct VP9_COMP {
DECLARE_ALIGNED(16, int16_t, uv_dequant[QINDEX_RANGE][8]);
VP9_COMMON common;
VP9EncoderConfig oxcf;
- struct lookahead_ctx *lookahead;
- struct lookahead_entry *alt_ref_source;
+ struct lookahead_ctx *lookahead;
+ struct lookahead_entry *alt_ref_source;
YV12_BUFFER_CONFIG *Source;
YV12_BUFFER_CONFIG *Last_Source; // NULL for first frame and alt_ref frames
@@ -439,11 +433,11 @@ typedef struct VP9_COMP {
int interp_filter_selected[MAX_REF_FRAMES][SWITCHABLE];
- struct vpx_codec_pkt_list *output_pkt_list;
+ struct vpx_codec_pkt_list *output_pkt_list;
MBGRAPH_FRAME_STATS mbgraph_stats[MAX_LAG_BUFFERS];
- int mbgraph_n_frames; // number of frames filled in the above
- int static_mb_pct; // % forced skip mbs by segmentation
+ int mbgraph_n_frames; // number of frames filled in the above
+ int static_mb_pct; // % forced skip mbs by segmentation
int ref_frame_flags;
SPEED_FEATURES sf;
@@ -500,7 +494,7 @@ typedef struct VP9_COMP {
double total_blockiness;
double worst_blockiness;
- int bytes;
+ int bytes;
double summed_quality;
double summed_weights;
double summedp_quality;
@@ -606,15 +600,15 @@ void vp9_remove_compressor(VP9_COMP *cpi);
void vp9_change_config(VP9_COMP *cpi, const VP9EncoderConfig *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_COMP *cpi, unsigned int frame_flags,
YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
int64_t end_time_stamp);
int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
- size_t *size, uint8_t *dest,
- int64_t *time_stamp, int64_t *time_end, int flush);
+ size_t *size, uint8_t *dest, int64_t *time_stamp,
+ int64_t *time_end, int flush);
int vp9_get_preview_raw_frame(VP9_COMP *cpi, YV12_BUFFER_CONFIG *dest,
vp9_ppflags_t *flags);
@@ -635,8 +629,8 @@ int vp9_set_active_map(VP9_COMP *cpi, unsigned char *map, int rows, int cols);
int vp9_get_active_map(VP9_COMP *cpi, unsigned char *map, int rows, int cols);
-int vp9_set_internal_size(VP9_COMP *cpi,
- VPX_SCALING horiz_mode, VPX_SCALING vert_mode);
+int vp9_set_internal_size(VP9_COMP *cpi, VPX_SCALING horiz_mode,
+ VPX_SCALING vert_mode);
int vp9_set_size_literal(VP9_COMP *cpi, unsigned int width,
unsigned int height);
@@ -646,8 +640,7 @@ void vp9_set_svc(VP9_COMP *cpi, int use_svc);
int vp9_get_quantizer(struct VP9_COMP *cpi);
static INLINE int frame_is_kf_gf_arf(const VP9_COMP *cpi) {
- return frame_is_intra_only(&cpi->common) ||
- cpi->refresh_alt_ref_frame ||
+ return frame_is_intra_only(&cpi->common) || cpi->refresh_alt_ref_frame ||
(cpi->refresh_golden_frame && !cpi->rc.is_src_frame_alt_ref);
}
@@ -673,8 +666,8 @@ static INLINE YV12_BUFFER_CONFIG *get_ref_frame_buffer(
VP9_COMP *cpi, MV_REFERENCE_FRAME ref_frame) {
VP9_COMMON *const cm = &cpi->common;
const int buf_idx = get_ref_frame_buf_idx(cpi, ref_frame);
- return
- buf_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[buf_idx].buf : NULL;
+ return buf_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[buf_idx].buf
+ : NULL;
}
static INLINE int get_token_alloc(int mb_rows, int mb_cols) {
@@ -737,10 +730,10 @@ static INLINE int is_altref_enabled(const VP9_COMP *const cpi) {
static INLINE void set_ref_ptrs(VP9_COMMON *cm, MACROBLOCKD *xd,
MV_REFERENCE_FRAME ref0,
MV_REFERENCE_FRAME ref1) {
- xd->block_refs[0] = &cm->frame_refs[ref0 >= LAST_FRAME ? ref0 - LAST_FRAME
- : 0];
- xd->block_refs[1] = &cm->frame_refs[ref1 >= LAST_FRAME ? ref1 - LAST_FRAME
- : 0];
+ xd->block_refs[0] =
+ &cm->frame_refs[ref0 >= LAST_FRAME ? ref0 - LAST_FRAME : 0];
+ xd->block_refs[1] =
+ &cm->frame_refs[ref1 >= LAST_FRAME ? ref1 - LAST_FRAME : 0];
}
static INLINE int get_chessboard_index(const int frame_index) {