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

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

Issue 1169543007: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 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/vpx/svc_context.h ('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_
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 /*!\brief Codec control function to turn on/off SVC in encoder. 444 /*!\brief Codec control function to turn on/off SVC in encoder.
445 * \note Return value is VPX_CODEC_INVALID_PARAM if the encoder does not 445 * \note Return value is VPX_CODEC_INVALID_PARAM if the encoder does not
446 * support SVC in its current encoding mode 446 * support SVC in its current encoding mode
447 * 0: off, 1: on 447 * 0: off, 1: on
448 * 448 *
449 * Supported in codecs: VP9 449 * Supported in codecs: VP9
450 */ 450 */
451 VP9E_SET_SVC, 451 VP9E_SET_SVC,
452 452
453 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
454 /*!\brief Codec control function to set parameters for SVC. 453 /*!\brief Codec control function to set parameters for SVC.
455 * \note Parameters contain min_q, max_q, scaling factor for each of the 454 * \note Parameters contain min_q, max_q, scaling factor for each of the
456 * SVC layers. 455 * SVC layers.
457 * 456 *
458 * Supported in codecs: VP9 457 * Supported in codecs: VP9
459 */ 458 */
460 VP9E_SET_SVC_PARAMETERS, 459 VP9E_SET_SVC_PARAMETERS,
461 #endif
462 460
463 /*!\brief Codec control function to set svc layer for spatial and temporal. 461 /*!\brief Codec control function to set svc layer for spatial and temporal.
464 * \note Valid ranges: 0..#vpx_codec_enc_cfg::ss_number_layers for spatial 462 * \note Valid ranges: 0..#vpx_codec_enc_cfg::ss_number_layers for spatial
465 * layer and 0..#vpx_codec_enc_cfg::ts_number_layers for 463 * layer and 0..#vpx_codec_enc_cfg::ts_number_layers for
466 * temporal layer. 464 * temporal layer.
467 * 465 *
468 * Supported in codecs: VP9 466 * Supported in codecs: VP9
469 */ 467 */
470 VP9E_SET_SVC_LAYER_ID, 468 VP9E_SET_SVC_LAYER_ID,
471 469
472 /*!\brief Codec control function to set content type. 470 /*!\brief Codec control function to set content type.
473 * \note Valid parameter range: 471 * \note Valid parameter range:
474 * VP9E_CONTENT_DEFAULT = Regular video content (Default) 472 * VP9E_CONTENT_DEFAULT = Regular video content (Default)
475 * VP9E_CONTENT_SCREEN = Screen capture content 473 * VP9E_CONTENT_SCREEN = Screen capture content
476 * 474 *
477 * Supported in codecs: VP9 475 * Supported in codecs: VP9
478 */ 476 */
479 VP9E_SET_TUNE_CONTENT, 477 VP9E_SET_TUNE_CONTENT,
480 478
481 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
482 /*!\brief Codec control function to get svc layer ID. 479 /*!\brief Codec control function to get svc layer ID.
483 * \note The layer ID returned is for the data packet from the registered 480 * \note The layer ID returned is for the data packet from the registered
484 * callback function. 481 * callback function.
485 * 482 *
486 * Supported in codecs: VP9 483 * Supported in codecs: VP9
487 */ 484 */
488 VP9E_GET_SVC_LAYER_ID, 485 VP9E_GET_SVC_LAYER_ID,
489 486
490 /*!\brief Codec control function to register callback to get per layer packet. 487 /*!\brief Codec control function to register callback to get per layer packet.
491 * \note Parameter for this control function is a structure with a callback 488 * \note Parameter for this control function is a structure with a callback
492 * function and a pointer to private data used by the callback. 489 * function and a pointer to private data used by the callback.
493 * 490 *
494 * Supported in codecs: VP9 491 * Supported in codecs: VP9
495 */ 492 */
496 VP9E_REGISTER_CX_CALLBACK, 493 VP9E_REGISTER_CX_CALLBACK,
497 #endif
498 494
499 /*!\brief Codec control function to set color space info. 495 /*!\brief Codec control function to set color space info.
500 * \note Valid ranges: 0..7, default is "UNKNOWN". 496 * \note Valid ranges: 0..7, default is "UNKNOWN".
501 * 0 = UNKNOWN, 497 * 0 = UNKNOWN,
502 * 1 = BT_601 498 * 1 = BT_601
503 * 2 = BT_709 499 * 2 = BT_709
504 * 3 = SMPTE_170 500 * 3 = SMPTE_170
505 * 4 = SMPTE_240 501 * 4 = SMPTE_240
506 * 5 = BT_2020 502 * 5 = BT_2020
507 * 6 = RESERVED 503 * 6 = RESERVED
508 * 7 = SRGB 504 * 7 = SRGB
509 * 505 *
510 * Supported in codecs: VP9 506 * Supported in codecs: VP9
511 */ 507 */
512 VP9E_SET_COLOR_SPACE, 508 VP9E_SET_COLOR_SPACE,
513 509
510 /*!\brief Codec control function to set temporal layering mode.
511 * \note Valid ranges: 0..3, default is "0" (VP9E_TEMPORAL_LAYERING_MODE_NOLAY ERING).
512 * 0 = VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING
513 * 1 = VP9E_TEMPORAL_LAYERING_MODE_BYPASS
514 * 2 = VP9E_TEMPORAL_LAYERING_MODE_0101
515 * 3 = VP9E_TEMPORAL_LAYERING_MODE_0212
516 *
517 * Supported in codecs: VP9
518 */
519 VP9E_SET_TEMPORAL_LAYERING_MODE,
520
514 /*!\brief Codec control function to get an Active map back from the encoder. 521 /*!\brief Codec control function to get an Active map back from the encoder.
515 * 522 *
516 * Supported in codecs: VP9 523 * Supported in codecs: VP9
517 */ 524 */
518 VP9E_GET_ACTIVEMAP, 525 VP9E_GET_ACTIVEMAP,
519 }; 526 };
520 527
521 /*!\brief vpx 1-D scaling mode 528 /*!\brief vpx 1-D scaling mode
522 * 529 *
523 * This set of constants define 1-D vpx scaling modes 530 * This set of constants define 1-D vpx scaling modes
524 */ 531 */
525 typedef enum vpx_scaling_mode_1d { 532 typedef enum vpx_scaling_mode_1d {
526 VP8E_NORMAL = 0, 533 VP8E_NORMAL = 0,
527 VP8E_FOURFIVE = 1, 534 VP8E_FOURFIVE = 1,
528 VP8E_THREEFIVE = 2, 535 VP8E_THREEFIVE = 2,
529 VP8E_ONETWO = 3 536 VP8E_ONETWO = 3
530 } VPX_SCALING_MODE; 537 } VPX_SCALING_MODE;
531 538
539 /*!\brief Temporal layering mode enum for VP9 SVC.
540 *
541 * This set of macros define the different temporal layering modes.
542 * Supported codecs: VP9 (in SVC mode)
543 *
544 */
545 typedef enum vp9e_temporal_layering_mode {
546 /*!\brief No temporal layering.
547 * Used when only spatial layering is used.
548 */
549 VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING = 0,
550
551 /*!\brief Bypass mode.
552 * Used when application needs to control temporal layering.
553 * This will only work when the number of spatial layers equals 1.
554 */
555 VP9E_TEMPORAL_LAYERING_MODE_BYPASS = 1,
556
557 /*!\brief 0-1-0-1... temporal layering scheme with two temporal layers.
558 */
559 VP9E_TEMPORAL_LAYERING_MODE_0101 = 2,
560
561 /*!\brief 0-2-1-2... temporal layering scheme with three temporal layers.
562 */
563 VP9E_TEMPORAL_LAYERING_MODE_0212 = 3
564 } VP9E_TEMPORAL_LAYERING_MODE;
532 565
533 /*!\brief vpx region of interest map 566 /*!\brief vpx region of interest map
534 * 567 *
535 * These defines the data structures for the region of interest map 568 * These defines the data structures for the region of interest map
536 * 569 *
537 */ 570 */
538 571
539 typedef struct vpx_roi_map { 572 typedef struct vpx_roi_map {
540 /*! An id between 0 and 3 for each 16x16 region within a frame. */ 573 /*! An id between 0 and 3 for each 16x16 region within a frame. */
541 unsigned char *roi_map; 574 unsigned char *roi_map;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 /*!\brief VP8 model tuning parameters 630 /*!\brief VP8 model tuning parameters
598 * 631 *
599 * Changes the encoder to tune for certain types of input material. 632 * Changes the encoder to tune for certain types of input material.
600 * 633 *
601 */ 634 */
602 typedef enum { 635 typedef enum {
603 VP8_TUNE_PSNR, 636 VP8_TUNE_PSNR,
604 VP8_TUNE_SSIM 637 VP8_TUNE_SSIM
605 } vp8e_tuning; 638 } vp8e_tuning;
606 639
607 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
608 /*!\brief vp9 svc layer parameters 640 /*!\brief vp9 svc layer parameters
609 * 641 *
610 * This defines the spatial and temporal layer id numbers for svc encoding. 642 * This defines the spatial and temporal layer id numbers for svc encoding.
611 * This is used with the #VP9E_SET_SVC_LAYER_ID control to set the spatial and 643 * This is used with the #VP9E_SET_SVC_LAYER_ID control to set the spatial and
612 * temporal layer id for the current frame. 644 * temporal layer id for the current frame.
613 * 645 *
614 */ 646 */
615 typedef struct vpx_svc_layer_id { 647 typedef struct vpx_svc_layer_id {
616 int spatial_layer_id; /**< Spatial layer id number. */ 648 int spatial_layer_id; /**< Spatial layer id number. */
617 int temporal_layer_id; /**< Temporal layer id number. */ 649 int temporal_layer_id; /**< Temporal layer id number. */
618 } vpx_svc_layer_id_t; 650 } vpx_svc_layer_id_t;
619 #else
620 /*!\brief vp9 svc layer parameters
621 *
622 * This defines the temporal layer id numbers for svc encoding.
623 * This is used with the #VP9E_SET_SVC_LAYER_ID control to set the
624 * temporal layer id for the current frame.
625 *
626 */
627 typedef struct vpx_svc_layer_id {
628 int temporal_layer_id; /**< Temporal layer id number. */
629 } vpx_svc_layer_id_t;
630 #endif
631 651
632 /*!\brief VP8 encoder control function parameter type 652 /*!\brief VP8 encoder control function parameter type
633 * 653 *
634 * Defines the data types that VP8E control functions take. Note that 654 * Defines the data types that VP8E control functions take. Note that
635 * additional common controls are defined in vp8.h 655 * additional common controls are defined in vp8.h
636 * 656 *
637 */ 657 */
638 658
639 659
640 /* These controls have been deprecated in favor of the flags parameter to 660 /* These controls have been deprecated in favor of the flags parameter to
641 * vpx_codec_encode(). See the definition of VP8_EFLAG_* above. 661 * vpx_codec_encode(). See the definition of VP8_EFLAG_* above.
642 */ 662 */
643 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_ENTROPY, int) 663 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_ENTROPY, int)
644 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_REFERENCE, int) 664 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_REFERENCE, int)
645 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_USE_REFERENCE, int) 665 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_USE_REFERENCE, int)
646 666
647 VPX_CTRL_USE_TYPE(VP8E_SET_FRAME_FLAGS, int) 667 VPX_CTRL_USE_TYPE(VP8E_SET_FRAME_FLAGS, int)
648 VPX_CTRL_USE_TYPE(VP8E_SET_TEMPORAL_LAYER_ID, int) 668 VPX_CTRL_USE_TYPE(VP8E_SET_TEMPORAL_LAYER_ID, int)
649 VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, vpx_roi_map_t *) 669 VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, vpx_roi_map_t *)
650 VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, vpx_active_map_t *) 670 VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, vpx_active_map_t *)
651 VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, vpx_scaling_mode_t *) 671 VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, vpx_scaling_mode_t *)
652 672
653 VPX_CTRL_USE_TYPE(VP9E_SET_SVC, int) 673 VPX_CTRL_USE_TYPE(VP9E_SET_SVC, int)
654 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
655 VPX_CTRL_USE_TYPE(VP9E_SET_SVC_PARAMETERS, void *) 674 VPX_CTRL_USE_TYPE(VP9E_SET_SVC_PARAMETERS, void *)
656 VPX_CTRL_USE_TYPE(VP9E_REGISTER_CX_CALLBACK, void *) 675 VPX_CTRL_USE_TYPE(VP9E_REGISTER_CX_CALLBACK, void *)
657 #endif
658 VPX_CTRL_USE_TYPE(VP9E_SET_SVC_LAYER_ID, vpx_svc_layer_id_t *) 676 VPX_CTRL_USE_TYPE(VP9E_SET_SVC_LAYER_ID, vpx_svc_layer_id_t *)
659 677
660 VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int) 678 VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int)
661 VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int) 679 VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int)
662 VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int) 680 VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int)
663 VPX_CTRL_USE_TYPE(VP8E_SET_SHARPNESS, unsigned int) 681 VPX_CTRL_USE_TYPE(VP8E_SET_SHARPNESS, unsigned int)
664 VPX_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD, unsigned int) 682 VPX_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD, unsigned int)
665 VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, int) /* vp8e_token_partitions */ 683 VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, int) /* vp8e_token_partitions */
666 684
667 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES, unsigned int) 685 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES, unsigned int)
668 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH, unsigned int) 686 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH, unsigned int)
669 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ARNR_TYPE, unsigned int) 687 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ARNR_TYPE, unsigned int)
670 VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vp8e_tuning */ 688 VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vp8e_tuning */
671 VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL, unsigned int) 689 VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL, unsigned int)
672 690
673 VPX_CTRL_USE_TYPE(VP9E_SET_TILE_COLUMNS, int) 691 VPX_CTRL_USE_TYPE(VP9E_SET_TILE_COLUMNS, int)
674 VPX_CTRL_USE_TYPE(VP9E_SET_TILE_ROWS, int) 692 VPX_CTRL_USE_TYPE(VP9E_SET_TILE_ROWS, int)
675 693
676 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *) 694 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *)
677 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *) 695 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *)
678 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
679 VPX_CTRL_USE_TYPE(VP9E_GET_SVC_LAYER_ID, vpx_svc_layer_id_t *) 696 VPX_CTRL_USE_TYPE(VP9E_GET_SVC_LAYER_ID, vpx_svc_layer_id_t *)
680 #endif
681 697
682 VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int) 698 VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
683 VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTER_BITRATE_PCT, unsigned int) 699 VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTER_BITRATE_PCT, unsigned int)
684 700
685 VPX_CTRL_USE_TYPE(VP8E_SET_SCREEN_CONTENT_MODE, unsigned int) 701 VPX_CTRL_USE_TYPE(VP8E_SET_SCREEN_CONTENT_MODE, unsigned int)
686 702
687 VPX_CTRL_USE_TYPE(VP9E_SET_GF_CBR_BOOST_PCT, unsigned int) 703 VPX_CTRL_USE_TYPE(VP9E_SET_GF_CBR_BOOST_PCT, unsigned int)
688 704
689 VPX_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int) 705 VPX_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int)
690 706
691 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int) 707 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)
692 708
693 VPX_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int) 709 VPX_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int)
694 710
695 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int) 711 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int)
696 712
697 VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int) 713 VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int)
698 714
699 VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */ 715 VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */
700 716
701 VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int) 717 VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int)
702 718
703 VPX_CTRL_USE_TYPE(VP9E_GET_ACTIVEMAP, vpx_active_map_t *) 719 VPX_CTRL_USE_TYPE(VP9E_GET_ACTIVEMAP, vpx_active_map_t *)
704 /*! @} - end defgroup vp8_encoder */ 720 /*! @} - end defgroup vp8_encoder */
705 #ifdef __cplusplus 721 #ifdef __cplusplus
706 } // extern "C" 722 } // extern "C"
707 #endif 723 #endif
708 724
709 #endif // VPX_VP8CX_H_ 725 #endif // VPX_VP8CX_H_
OLDNEW
« no previous file with comments | « source/libvpx/vpx/svc_context.h ('k') | source/libvpx/vpx/vp8dx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698