• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/libva


Commit MetaInfo

Révision2c78d8b2753f1edf785d570aa125c526b7daf081 (tree)
l'heure2017-11-22 16:27:31
AuteurJonathan Bian <jonathan.bian@inte...>
CommiterXiang, Haihao

Message de Log

add Encoding quantization

quary or get whether the driver supports certain types of quantization methods
for encoding (e.g. trellis).then set quantization setting by VAEncMiscParameterQuantization

Signed-off-by: Carl.Zhang <carl.zhang@intel.com>

Change Summary

Modification

--- a/va/va.h
+++ b/va/va.h
@@ -536,6 +536,13 @@ typedef enum
536536 */
537537 VAConfigAttribEncQualityRange = 21,
538538 /**
539+ * \brief Encoding quantization attribute. Read-only.
540+ *
541+ * This attribute conveys whether the driver supports certain types of quantization methods
542+ * for encoding (e.g. trellis). See \c VA_ENC_QUANTIZATION_xxx for the list of quantization methods
543+ */
544+ VAConfigAttribEncQuantization = 22,
545+ /**
539546 * \brief Encoding skip frame attribute. Read-only.
540547 *
541548 * This attribute conveys whether the driver supports sending skip frame parameters
@@ -736,6 +743,13 @@ typedef union _VAConfigAttribValEncJPEG {
736743 uint32_t value;
737744 } VAConfigAttribValEncJPEG;
738745
746+/** @name Attribute values for VAConfigAttribEncQuantization */
747+/**@{*/
748+/** \brief Driver does not support special types of quantization */
749+#define VA_ENC_QUANTIZATION_NONE 0x00000000
750+/** \brief Driver supports trellis quantization */
751+#define VA_ENC_QUANTIZATION_TRELLIS_SUPPORTED 0x00000001
752+/**@}*/
739753 /** \brief Attribute value for VAConfigAttribEncROI */
740754 typedef union _VAConfigAttribValEncROI {
741755 struct {
@@ -1380,6 +1394,8 @@ typedef enum
13801394 /** \brief Buffer type used for HRD parameters. */
13811395 VAEncMiscParameterTypeHRD = 5,
13821396 VAEncMiscParameterTypeQualityLevel = 6,
1397+ /** \brief Buffer type used for quantization parameters, it's per-sequence parameter*/
1398+ VAEncMiscParameterTypeQuantization = 8,
13831399 /** \brief Buffer type used for sending skip frame parameters to the encoder's
13841400 * rate control, when the user has externally skipped frames. */
13851401 VAEncMiscParameterTypeSkipFrame = 9,
@@ -1625,6 +1641,33 @@ typedef struct _VAEncMiscParameterBufferQualityLevel {
16251641 } VAEncMiscParameterBufferQualityLevel;
16261642
16271643 /**
1644+ * \brief Quantization settings for encoding.
1645+ *
1646+ * Some encoders support special types of quantization such as trellis, and this structure
1647+ * can be used by the app to control these special types of quantization by the encoder.
1648+ */
1649+typedef struct _VAEncMiscParameterQuantization
1650+{
1651+ union
1652+ {
1653+ /* if no flags is set then quantization is determined by the driver */
1654+ struct
1655+ {
1656+ /* \brief disable trellis for all frames/fields */
1657+ uint64_t disable_trellis : 1;
1658+ /* \brief enable trellis for I frames/fields */
1659+ uint64_t enable_trellis_I : 1;
1660+ /* \brief enable trellis for P frames/fields */
1661+ uint64_t enable_trellis_P : 1;
1662+ /* \brief enable trellis for B frames/fields */
1663+ uint64_t enable_trellis_B : 1;
1664+ uint64_t reserved : 28;
1665+ } bits;
1666+ uint64_t value;
1667+ } quantization_flags;
1668+} VAEncMiscParameterQuantization;
1669+
1670+/**
16281671 * \brief Encoding skip frame.
16291672 *
16301673 * The application may choose to skip frames externally to the encoder (e.g. drop completely or
--- a/va/va_str.c
+++ b/va/va_str.c
@@ -101,6 +101,7 @@ const char *vaConfigAttribTypeStr(VAConfigAttribType configAttribType)
101101 TOSTR(VAConfigAttribDecJPEG);
102102 TOSTR(VAConfigAttribMaxPictureWidth);
103103 TOSTR(VAConfigAttribMaxPictureHeight);
104+ TOSTR(VAConfigAttribEncQuantization);
104105 case VAConfigAttribTypeMax: break;
105106 }
106107 return "<unknown config attribute type>";