| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 { | 102 { |
| 103 int Version; // 4 versions of bitstream defined 0 best qualit
y/slowest decode, 3 lowest quality/fastest decode | 103 int Version; // 4 versions of bitstream defined 0 best qualit
y/slowest decode, 3 lowest quality/fastest decode |
| 104 int Width; // width of data passed to the compressor | 104 int Width; // width of data passed to the compressor |
| 105 int Height; // height of data passed to the compressor | 105 int Height; // height of data passed to the compressor |
| 106 double frame_rate; // set to passed in framerate | 106 double frame_rate; // set to passed in framerate |
| 107 int target_bandwidth; // bandwidth to be used in kilobits per second | 107 int target_bandwidth; // bandwidth to be used in kilobits per second |
| 108 | 108 |
| 109 int noise_sensitivity; // parameter used for applying pre processing b
lur: recommendation 0 | 109 int noise_sensitivity; // parameter used for applying pre processing b
lur: recommendation 0 |
| 110 int Sharpness; // parameter used for sharpening output: recomme
ndation 0: | 110 int Sharpness; // parameter used for sharpening output: recomme
ndation 0: |
| 111 int cpu_used; | 111 int cpu_used; |
| 112 unsigned int rc_max_intra_bitrate_pct; |
| 112 | 113 |
| 113 // mode -> | 114 // mode -> |
| 114 //(0)=Realtime/Live Encoding. This mode is optimized for realtim encodin
g (for example, capturing | 115 //(0)=Realtime/Live Encoding. This mode is optimized for realtim encodin
g (for example, capturing |
| 115 // a television signal or feed from a live camera). ( speed setting c
ontrols how fast ) | 116 // a television signal or feed from a live camera). ( speed setting c
ontrols how fast ) |
| 116 //(1)=Good Quality Fast Encoding. The encoder balances quality with the
amount of time it takes to | 117 //(1)=Good Quality Fast Encoding. The encoder balances quality with the
amount of time it takes to |
| 117 // encode the output. ( speed setting controls how fast ) | 118 // encode the output. ( speed setting controls how fast ) |
| 118 //(2)=One Pass - Best Quality. The encoder places priority on the qualit
y of the output over encoding | 119 //(2)=One Pass - Best Quality. The encoder places priority on the qualit
y of the output over encoding |
| 119 // speed. The output is compressed at the highest possible quality. T
his option takes the longest | 120 // speed. The output is compressed at the highest possible quality. T
his option takes the longest |
| 120 // amount of time to encode. ( speed setting ignored ) | 121 // amount of time to encode. ( speed setting ignored ) |
| 121 //(3)=Two Pass - First Pass. The encoder generates a file of statistics
for use in the second encoding | 122 //(3)=Two Pass - First Pass. The encoder generates a file of statistics
for use in the second encoding |
| (...skipping 10 matching lines...) Expand all Loading... |
| 132 int key_freq; // maximum distance to key frame. | 133 int key_freq; // maximum distance to key frame. |
| 133 | 134 |
| 134 int allow_lag; // allow lagged compression (if 0 lagin frames
is ignored) | 135 int allow_lag; // allow lagged compression (if 0 lagin frames
is ignored) |
| 135 int lag_in_frames; // how many frames lag before we start encodin
g | 136 int lag_in_frames; // how many frames lag before we start encodin
g |
| 136 | 137 |
| 137 //---------------------------------------------------------------- | 138 //---------------------------------------------------------------- |
| 138 // DATARATE CONTROL OPTIONS | 139 // DATARATE CONTROL OPTIONS |
| 139 | 140 |
| 140 int end_usage; // vbr or cbr | 141 int end_usage; // vbr or cbr |
| 141 | 142 |
| 142 // shoot to keep buffer full at all times by undershooting a bit 95 reco
mmended | 143 // buffer targeting aggressiveness |
| 143 int under_shoot_pct; | 144 int under_shoot_pct; |
| 145 int over_shoot_pct; |
| 144 | 146 |
| 145 // buffering parameters | 147 // buffering parameters |
| 146 int starting_buffer_level; // in seconds | 148 int starting_buffer_level; // in seconds |
| 147 int optimal_buffer_level; | 149 int optimal_buffer_level; |
| 148 int maximum_buffer_size; | 150 int maximum_buffer_size; |
| 149 | 151 |
| 150 // controlling quality | 152 // controlling quality |
| 151 int fixed_q; | 153 int fixed_q; |
| 152 int worst_allowed_q; | 154 int worst_allowed_q; |
| 153 int best_allowed_q; | 155 int best_allowed_q; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 175 int alt_freq; | 177 int alt_freq; |
| 176 int alt_q; | 178 int alt_q; |
| 177 int key_q; | 179 int key_q; |
| 178 int gold_q; | 180 int gold_q; |
| 179 | 181 |
| 180 | 182 |
| 181 int multi_threaded; // how many threads to run the encoder on | 183 int multi_threaded; // how many threads to run the encoder on |
| 182 int token_partitions; // how many token partitions to create for multi c
ore decoding | 184 int token_partitions; // how many token partitions to create for multi c
ore decoding |
| 183 int encode_breakout; // early breakout encode threshold : for video con
f recommend 800 | 185 int encode_breakout; // early breakout encode threshold : for video con
f recommend 800 |
| 184 | 186 |
| 185 int error_resilient_mode; // if running over udp networks provides deco
dable frames after a | 187 unsigned int error_resilient_mode; // Bitfield defining the error |
| 186 // dropped packet | 188 // resiliency features to enable. Can provide |
| 189 // decodable frames after losses in previous |
| 190 // frames and decodable partitions after |
| 191 // losses in the same frame. |
| 187 | 192 |
| 188 int arnr_max_frames; | 193 int arnr_max_frames; |
| 189 int arnr_strength ; | 194 int arnr_strength ; |
| 190 int arnr_type ; | 195 int arnr_type ; |
| 191 | 196 |
| 192 struct vpx_fixed_buf two_pass_stats_in; | 197 struct vpx_fixed_buf two_pass_stats_in; |
| 193 struct vpx_codec_pkt_list *output_pkt_list; | 198 struct vpx_codec_pkt_list *output_pkt_list; |
| 194 | 199 |
| 195 vp8e_tuning tuning; | 200 vp8e_tuning tuning; |
| 196 } VP8_CONFIG; | 201 } VP8_CONFIG; |
| 197 | 202 |
| 198 | 203 |
| 199 void vp8_initialize(); | 204 void vp8_initialize(); |
| 200 | 205 |
| 201 VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf); | 206 VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf); |
| 202 void vp8_remove_compressor(VP8_PTR *comp); | 207 void vp8_remove_compressor(VP8_PTR *comp); |
| 203 | 208 |
| 204 void vp8_init_config(VP8_PTR onyx, VP8_CONFIG *oxcf); | 209 void vp8_init_config(VP8_PTR onyx, VP8_CONFIG *oxcf); |
| 205 void vp8_change_config(VP8_PTR onyx, VP8_CONFIG *oxcf); | 210 void vp8_change_config(VP8_PTR onyx, VP8_CONFIG *oxcf); |
| 206 | 211 |
| 207 // receive a frames worth of data caller can assume that a copy of this frame is
made | 212 // receive a frames worth of data caller can assume that a copy of this frame is
made |
| 208 // and not just a copy of the pointer.. | 213 // and not just a copy of the pointer.. |
| 209 int vp8_receive_raw_frame(VP8_PTR comp, unsigned int frame_flags, YV12_BUFFE
R_CONFIG *sd, INT64 time_stamp, INT64 end_time_stamp); | 214 int vp8_receive_raw_frame(VP8_PTR comp, unsigned int frame_flags, YV12_BUFFE
R_CONFIG *sd, int64_t time_stamp, int64_t end_time_stamp); |
| 210 int vp8_get_compressed_data(VP8_PTR comp, unsigned int *frame_flags, unsigne
d long *size, unsigned char *dest, INT64 *time_stamp, INT64 *time_end, int flush
); | 215 int vp8_get_compressed_data(VP8_PTR comp, unsigned int *frame_flags, unsigne
d long *size, unsigned char *dest, int64_t *time_stamp, int64_t *time_end, int f
lush); |
| 211 int vp8_get_preview_raw_frame(VP8_PTR comp, YV12_BUFFER_CONFIG *dest, vp8_pp
flags_t *flags); | 216 int vp8_get_preview_raw_frame(VP8_PTR comp, YV12_BUFFER_CONFIG *dest, vp8_pp
flags_t *flags); |
| 212 | 217 |
| 213 int vp8_use_as_reference(VP8_PTR comp, int ref_frame_flags); | 218 int vp8_use_as_reference(VP8_PTR comp, int ref_frame_flags); |
| 214 int vp8_update_reference(VP8_PTR comp, int ref_frame_flags); | 219 int vp8_update_reference(VP8_PTR comp, int ref_frame_flags); |
| 215 int vp8_get_reference(VP8_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER
_CONFIG *sd); | 220 int vp8_get_reference(VP8_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER
_CONFIG *sd); |
| 216 int vp8_set_reference(VP8_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER
_CONFIG *sd); | 221 int vp8_set_reference(VP8_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER
_CONFIG *sd); |
| 217 int vp8_update_entropy(VP8_PTR comp, int update); | 222 int vp8_update_entropy(VP8_PTR comp, int update); |
| 218 int vp8_set_roimap(VP8_PTR comp, unsigned char *map, unsigned int rows, unsi
gned int cols, int delta_q[4], int delta_lf[4], unsigned int threshold[4]); | 223 int vp8_set_roimap(VP8_PTR comp, unsigned char *map, unsigned int rows, unsi
gned int cols, int delta_q[4], int delta_lf[4], unsigned int threshold[4]); |
| 219 int vp8_set_active_map(VP8_PTR comp, unsigned char *map, unsigned int rows,
unsigned int cols); | 224 int vp8_set_active_map(VP8_PTR comp, unsigned char *map, unsigned int rows,
unsigned int cols); |
| 220 int vp8_set_internal_size(VP8_PTR comp, VPX_SCALING horiz_mode, VPX_SCALING
vert_mode); | 225 int vp8_set_internal_size(VP8_PTR comp, VPX_SCALING horiz_mode, VPX_SCALING
vert_mode); |
| 221 int vp8_get_quantizer(VP8_PTR c); | 226 int vp8_get_quantizer(VP8_PTR c); |
| 222 | 227 |
| 223 #ifdef __cplusplus | 228 #ifdef __cplusplus |
| 224 } | 229 } |
| 225 #endif | 230 #endif |
| 226 | 231 |
| 227 #endif | 232 #endif |
| OLD | NEW |