summaryrefslogtreecommitdiff
path: root/vp8/common/onyx.h
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/common/onyx.h')
-rw-r--r--vp8/common/onyx.h140
1 files changed, 79 insertions, 61 deletions
diff --git a/vp8/common/onyx.h b/vp8/common/onyx.h
index 67cb77c51..766b4ea1e 100644
--- a/vp8/common/onyx.h
+++ b/vp8/common/onyx.h
@@ -94,83 +94,101 @@ extern "C"
typedef struct
{
- int Version; // 4 versions of bitstream defined 0 best quality/slowest decode, 3 lowest quality/fastest decode
- int Width; // width of data passed to the compressor
- int Height; // height of data passed to the compressor
+ /* 4 versions of bitstream defined:
+ * 0 best quality/slowest decode, 3 lowest quality/fastest decode
+ */
+ int Version;
+ int Width;
+ int Height;
struct vpx_rational timebase;
- unsigned int target_bandwidth; // bandwidth to be used in kilobits per second
+ unsigned int target_bandwidth; /* kilobits per second */
- int noise_sensitivity; // parameter used for applying pre processing blur: recommendation 0
- int Sharpness; // parameter used for sharpening output: recommendation 0:
+ /* parameter used for applying pre processing blur: recommendation 0 */
+ int noise_sensitivity;
+
+ /* parameter used for sharpening output: recommendation 0: */
+ int Sharpness;
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
- // longer amount of time to encode.. ( speed setting ignored )
- 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 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
-
- // buffer targeting aggressiveness
+ /* 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 longer amount of time to encode.. ( speed setting
+ * ignored )
+ */
+ int Mode;
+
+ /* Key Framing Operations */
+ int auto_key; /* automatically detect cut scenes */
+ int key_freq; /* maximum distance to key frame. */
+
+ /* lagged compression (if allow_lag == 0 lag_in_frames is ignored) */
+ int allow_lag;
+ int lag_in_frames; /* how many frames lag before we start encoding */
+
+ /*
+ * DATARATE CONTROL OPTIONS
+ */
+
+ int end_usage; /* vbr or cbr */
+
+ /* buffer targeting aggressiveness */
int under_shoot_pct;
int over_shoot_pct;
- // buffering parameters
- int64_t starting_buffer_level; // in bytes
+ /* buffering parameters */
+ int64_t starting_buffer_level;
int64_t optimal_buffer_level;
int64_t maximum_buffer_size;
- int64_t starting_buffer_level_in_ms; // in milli-seconds
+ int64_t starting_buffer_level_in_ms;
int64_t optimal_buffer_level_in_ms;
int64_t maximum_buffer_size_in_ms;
- // controlling quality
+ /* controlling quality */
int fixed_q;
int worst_allowed_q;
int best_allowed_q;
int cq_level;
- // allow internal resizing ( currently disabled in the build !!!!!)
+ /* allow internal resizing */
int allow_spatial_resampling;
int resample_down_water_mark;
int resample_up_water_mark;
- // allow internal frame rate alterations
+ /* allow internal frame rate alterations */
int allow_df;
int drop_frames_water_mark;
- // two pass datarate control
- int two_pass_vbrbias; // two pass datarate control tweaks
+ /* two pass datarate control */
+ int two_pass_vbrbias;
int two_pass_vbrmin_section;
int two_pass_vbrmax_section;
- // END DATARATE CONTROL OPTIONS
- //----------------------------------------------------------------
+ /*
+ * END DATARATE CONTROL OPTIONS
+ */
- // these parameters aren't to be used in final build don't use!!!
+ /* these parameters aren't to be used in final build don't use!!! */
int play_alternate;
int alt_freq;
int alt_q;
@@ -178,26 +196,28 @@ extern "C"
int gold_q;
- int multi_threaded; // how many threads to run the encoder on
- int token_partitions; // how many token partitions to create for multi core decoding
- int encode_breakout; // early breakout encode threshold : for video conf recommend 800
+ int multi_threaded; /* how many threads to run the encoder on */
+ int token_partitions; /* how many token partitions to create */
+
+ /* early breakout threshold: for video conf recommend 800 */
+ int encode_breakout;
- unsigned int error_resilient_mode; // Bitfield defining the error
- // resiliency features to enable. Can provide
- // decodable frames after losses in previous
- // frames and decodable partitions after
- // losses in the same frame.
+ /* Bitfield defining the error resiliency features to enable.
+ * Can provide decodable frames after losses in previous
+ * frames and decodable partitions after losses in the same frame.
+ */
+ unsigned int error_resilient_mode;
int arnr_max_frames;
- int arnr_strength ;
- int arnr_type ;
+ int arnr_strength;
+ int arnr_type;
- struct vpx_fixed_buf two_pass_stats_in;
+ struct vpx_fixed_buf two_pass_stats_in;
struct vpx_codec_pkt_list *output_pkt_list;
vp8e_tuning tuning;
- // Temporal scaling parameters
+ /* Temporal scaling parameters */
unsigned int number_of_layers;
unsigned int target_bitrate[VPX_TS_MAX_PERIODICITY];
unsigned int rate_decimator[VPX_TS_MAX_PERIODICITY];
@@ -228,8 +248,6 @@ extern "C"
void vp8_init_config(struct VP8_COMP* onyx, VP8_CONFIG *oxcf);
void vp8_change_config(struct VP8_COMP* onyx, VP8_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..
int vp8_receive_raw_frame(struct VP8_COMP* comp, unsigned int frame_flags, YV12_BUFFER_CONFIG *sd, int64_t time_stamp, int64_t end_time_stamp);
int vp8_get_compressed_data(struct VP8_COMP* comp, unsigned int *frame_flags, unsigned long *size, unsigned char *dest, unsigned char *dest_end, int64_t *time_stamp, int64_t *time_end, int flush);
int vp8_get_preview_raw_frame(struct VP8_COMP* comp, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t *flags);