Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: source/libvpx/vpx/vp8cx.h

Issue 800493003: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Keep vp9_iht8x8_add_neon disabled because of http://llvm.org/bugs/show_bug.cgi?id=22178 Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/vp9/vp9dx.mk ('k') | source/libvpx/vpx/vp8dx.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef VPX_VP8CX_H_ 10 #ifndef VPX_VP8CX_H_
11 #define VPX_VP8CX_H_ 11 #define VPX_VP8CX_H_
12 12
13 /*!\defgroup vp8_encoder WebM VP8 Encoder 13 /*!\defgroup vp8_encoder WebM VP8/VP9 Encoder
14 * \ingroup vp8 14 * \ingroup vp8
15 * 15 *
16 * @{ 16 * @{
17 */ 17 */
18 #include "./vp8.h" 18 #include "./vp8.h"
19 19
20 /*!\file 20 /*!\file
21 * \brief Provides definitions for using the VP8 encoder algorithm within the 21 * \brief Provides definitions for using VP8 or VP9 encoder algorithm within the
22 * vpx Codec Interface. 22 * vpx Codec Interface.
23 */ 23 */
24 24
25 #ifdef __cplusplus 25 #ifdef __cplusplus
26 extern "C" { 26 extern "C" {
27 #endif 27 #endif
28 28
29 /*!\name Algorithm interface for VP8 29 /*!\name Algorithm interface for VP8
30 * 30 *
31 * This interface provides the capability to encode raw VP8 streams, as would 31 * This interface provides the capability to encode raw VP8 streams.
32 * be found in AVI files.
33 * @{ 32 * @{
34 */ 33 */
35 extern vpx_codec_iface_t vpx_codec_vp8_cx_algo; 34 extern vpx_codec_iface_t vpx_codec_vp8_cx_algo;
36 extern vpx_codec_iface_t *vpx_codec_vp8_cx(void); 35 extern vpx_codec_iface_t *vpx_codec_vp8_cx(void);
36 /*!@} - end algorithm interface member group*/
37 37
38 /* TODO(jkoleszar): These move to VP9 in a later patch set. */ 38 /*!\name Algorithm interface for VP9
39 *
40 * This interface provides the capability to encode raw VP9 streams.
41 * @{
42 */
39 extern vpx_codec_iface_t vpx_codec_vp9_cx_algo; 43 extern vpx_codec_iface_t vpx_codec_vp9_cx_algo;
40 extern vpx_codec_iface_t *vpx_codec_vp9_cx(void); 44 extern vpx_codec_iface_t *vpx_codec_vp9_cx(void);
41
42 /*!@} - end algorithm interface member group*/ 45 /*!@} - end algorithm interface member group*/
43 46
44 47
45 /* 48 /*
46 * Algorithm Flags 49 * Algorithm Flags
47 */ 50 */
48 51
49 /*!\brief Don't reference the last frame 52 /*!\brief Don't reference the last frame
50 * 53 *
51 * When this flag is set, the encoder will not use the last frame as a 54 * When this flag is set, the encoder will not use the last frame as a
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 * 230 *
228 * For temporal scalability: this control allows the application to set the 231 * For temporal scalability: this control allows the application to set the
229 * layer id for each frame to be encoded. Note that this control must be set 232 * layer id for each frame to be encoded. Note that this control must be set
230 * for every frame prior to encoding. The usage of this control function 233 * for every frame prior to encoding. The usage of this control function
231 * supersedes the internal temporal pattern counter, which is now deprecated. 234 * supersedes the internal temporal pattern counter, which is now deprecated.
232 */ 235 */
233 VP8E_SET_TEMPORAL_LAYER_ID, 236 VP8E_SET_TEMPORAL_LAYER_ID,
234 237
235 VP8E_SET_SCREEN_CONTENT_MODE, /**<control function to set encoder screen cont ent mode */ 238 VP8E_SET_SCREEN_CONTENT_MODE, /**<control function to set encoder screen cont ent mode */
236 239
237 /* TODO(jkoleszar): Move to vp9cx.h */ 240 /*!\brief Codec control function to set lossless encoding mode
241 *
242 * VP9 can operate in lossless encoding mode, in which the bitstream
243 * produced will be able to decode and reconstruct a perfect copy of
244 * input source. This control function provides a mean to switch encoder
245 * into lossless coding mode(1) or normal coding mode(0) that may be lossy.
246 * 0 = lossy coding mode
247 * 1 = lossless coding mode
248 *
249 * By default, encoder operates in normal coding mode (maybe lossy).
250 */
238 VP9E_SET_LOSSLESS, 251 VP9E_SET_LOSSLESS,
252
253 /*!\brief Codec control function to set number of tile columns
254 *
255 * In encoding and decoding, VP9 allows an input image frame be partitioned
256 * into separated vertical tile columns, which can be encoded or decoded
257 * independently. This enables easy implementation of parallel encoding and
258 * decoding. This control requests the encoder to use column tiles in
259 * encoding an input frame, with number of tile columns (in Log2 unit) as
260 * the parameter:
261 * 0 = 1 tile column
262 * 1 = 2 tile columns
263 * 2 = 4 tile columns
264 * .....
265 * n = 2**n tile columns
266 * The requested tile columns will be capped by encoder based on image size
267 * limitation (The minimum width of a tile column is 256 pixel, the maximum
268 * is 4096).
269 *
270 * By default, the value is 0, i.e. one single column tile for entire image.
271 */
239 VP9E_SET_TILE_COLUMNS, 272 VP9E_SET_TILE_COLUMNS,
273
274 /*!\brief Codec control function to set number of tile rows
275 *
276 * In encoding and decoding, VP9 allows an input image frame be partitioned
277 * into separated horizontal tile rows. Tile rows are encoded or decoded
278 * sequentially. Even though encoding/decoding of later tile rows depends on
279 * earlier ones, this allows the encoder to output data packets for tile rows
280 * prior to completely processing all tile rows in a frame, thereby reducing
281 * the latency in processing between input and output. The parameter
282 * for this control describes the number of tile rows, which has a valid
283 * range [0, 2]:
284 * 0 = 1 tile row
285 * 1 = 2 tile rows
286 * 2 = 4 tile rows
287 *
288 * By default, the value is 0, i.e. one single row tile for entire image.
289 */
240 VP9E_SET_TILE_ROWS, 290 VP9E_SET_TILE_ROWS,
291
292 /*!\brief Codec control function to enable frame parallel decoding feature
293 *
294 * VP9 has a bitstream feature to reduce decoding dependency between frames
295 * by turning off backward update of probability context used in encoding
296 * and decoding. This allows staged parallel processing of more than one
297 * video frames in the decoder. This control function provides a mean to
298 * turn this feature on or off for bitstreams produced by encoder.
299 *
300 * By default, this feature is off.
301 */
241 VP9E_SET_FRAME_PARALLEL_DECODING, 302 VP9E_SET_FRAME_PARALLEL_DECODING,
303
304 /*!\brief Codec control function to set adaptive quantization mode
305 *
306 * VP9 has a segment based feature that allows encoder to adaptively change
307 * quantization parameter for each segment within a frame to improve the
308 * subjective quality. This control makes encoder operate in one of the
309 * several AQ_modes supported.
310 *
311 * By default, encoder operates with AQ_Mode 0(adaptive quantization off).
312 */
242 VP9E_SET_AQ_MODE, 313 VP9E_SET_AQ_MODE,
314
315 /*!\brief Codec control function to enable/disable periodic Q boost
316 *
317 * One VP9 encoder speed feature is to enable quality boost by lowering
318 * frame level Q periodically. This control function provides a mean to
319 * turn on/off this feature.
320 * 0 = off
321 * 1 = on
322 *
323 * By default, the encoder is allowed to use this feature for appropriate
324 * encoding modes.
325 */
243 VP9E_SET_FRAME_PERIODIC_BOOST, 326 VP9E_SET_FRAME_PERIODIC_BOOST,
327
244 /*!\brief control function to set noise sensitivity 328 /*!\brief control function to set noise sensitivity
245 * 329 *
246 * 0: off, 1: OnYOnly 330 * 0: off, 1: OnYOnly
247 */ 331 */
248 VP9E_SET_NOISE_SENSITIVITY, 332 VP9E_SET_NOISE_SENSITIVITY,
249 333
334 /*!\brief control function to turn on/off SVC in encoder.
335 * \note Return value is VPX_CODEC_INVALID_PARAM if the encoder does not
336 * support SVC in its current encoding mode
337 * 0: off, 1: on
338 */
250 VP9E_SET_SVC, 339 VP9E_SET_SVC,
340
341 /*!\brief control function to set parameters for SVC.
342 * \note Parameters contain min_q, max_q, scaling factor for each of the
343 * SVC layers.
344 */
251 VP9E_SET_SVC_PARAMETERS, 345 VP9E_SET_SVC_PARAMETERS,
252 346
253 /*!\brief control function to set svc layer for spatial and temporal. 347 /*!\brief control function to set svc layer for spatial and temporal.
254 * \note Valid ranges: 0..#vpx_codec_enc_cfg::ss_number_layers for spatial 348 * \note Valid ranges: 0..#vpx_codec_enc_cfg::ss_number_layers for spatial
255 * layer and 0..#vpx_codec_enc_cfg::ts_number_layers for 349 * layer and 0..#vpx_codec_enc_cfg::ts_number_layers for
256 * temporal layer. 350 * temporal layer.
257 */ 351 */
258 VP9E_SET_SVC_LAYER_ID, 352 VP9E_SET_SVC_LAYER_ID,
353
354 /*!\brief control function to set content type.
355 * \note Valid parameter range:
356 * VP9E_CONTENT_DEFAULT = Regular video content (Default)
357 * VP9E_CONTENT_SCREEN = Screen capture content
358 */
259 VP9E_SET_TUNE_CONTENT, 359 VP9E_SET_TUNE_CONTENT,
360
361 /*!\brief control function to get svc layer ID.
362 * \note The layer ID returned is for the data packet from the registered
363 * callback function.
364 */
260 VP9E_GET_SVC_LAYER_ID, 365 VP9E_GET_SVC_LAYER_ID,
366
367 /*!\brief control function to register callback for getting per layer packet.
368 * \note Parameter for this control function is a structure with a callback
369 * function and a pointer to private data used by the callback.
370 */
261 VP9E_REGISTER_CX_CALLBACK, 371 VP9E_REGISTER_CX_CALLBACK,
372
373 /*!\brief control function to set color space info.
374 * \note Valid ranges: 0..7, default is "UNKNOWN".
375 * 0 = UNKNOWN,
376 * 1 = BT_601
377 * 2 = BT_709
378 * 3 = SMPTE_170
379 * 4 = SMPTE_240
380 * 5 = BT_2020
381 * 6 = RESERVED
382 * 7 = SRGB
383 */
384 VP9E_SET_COLOR_SPACE,
262 }; 385 };
263 386
264 /*!\brief vpx 1-D scaling mode 387 /*!\brief vpx 1-D scaling mode
265 * 388 *
266 * This set of constants define 1-D vpx scaling modes 389 * This set of constants define 1-D vpx scaling modes
267 */ 390 */
268 typedef enum vpx_scaling_mode_1d { 391 typedef enum vpx_scaling_mode_1d {
269 VP8E_NORMAL = 0, 392 VP8E_NORMAL = 0,
270 VP8E_FOURFIVE = 1, 393 VP8E_FOURFIVE = 1,
271 VP8E_THREEFIVE = 2, 394 VP8E_THREEFIVE = 2,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 539
417 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int) 540 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)
418 541
419 VPX_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int) 542 VPX_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int)
420 543
421 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int) 544 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int)
422 545
423 VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int) 546 VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int)
424 547
425 VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */ 548 VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */
549
550 VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int)
426 /*! @} - end defgroup vp8_encoder */ 551 /*! @} - end defgroup vp8_encoder */
427 #ifdef __cplusplus 552 #ifdef __cplusplus
428 } // extern "C" 553 } // extern "C"
429 #endif 554 #endif
430 555
431 #endif // VPX_VP8CX_H_ 556 #endif // VPX_VP8CX_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/vp9dx.mk ('k') | source/libvpx/vpx/vp8dx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698