• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

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

Revisión30c751f7b74c43021f33361c1baf2aa92acd0317 (tree)
Tiempo2018-09-04 10:44:04
AutorFurongZhang <furong.zhang@inte...>
CommiterXinfengZhang

Log Message

High Dynamic Range

Cambiar Resumen

Diferencia incremental

--- a/va/va_vpp.h
+++ b/va/va_vpp.h
@@ -251,6 +251,8 @@ typedef enum _VAProcFilterType {
251251 VAProcFilterTotalColorCorrection,
252252 /** \brief Human Vision System(HVS) Noise reduction filter. */
253253 VAProcFilterHVSNoiseReduction,
254+ /** \brief High Dynamic Range Tone Mapping. */
255+ VAProcFilterHighDynamicRangeToneMapping,
254256 /** \brief Number of video filters. */
255257 VAProcFilterCount
256258 } VAProcFilterType;
@@ -401,6 +403,10 @@ typedef enum _VAProcColorStandardType {
401403 /** \brief Explicitly specified color properties.
402404 *
403405 * Use corresponding color properties section.
406+ * For example, HDR10 content:
407+ * colour_primaries = 9 (BT2020)
408+ * transfer_characteristics = 16 (SMPTE ST2084)
409+ * matrix_coefficients = 9
404410 */
405411 VAProcColorStandardExplicit,
406412 /** \brief Number of color standards. */
@@ -425,6 +431,34 @@ typedef enum _VAProcTotalColorCorrectionType {
425431 /** \brief Number of color correction attributes. */
426432 VAProcTotalColorCorrectionCount
427433 } VAProcTotalColorCorrectionType;
434+
435+/** \brief High Dynamic Range Metadata types. */
436+typedef enum _VAProcHighDynamicRangeMetadataType {
437+ VAProcHighDynamicRangeMetadataNone = 0,
438+ /** \brief Metadata type for HDR10. */
439+ VAProcHighDynamicRangeMetadataHDR10
440+} VAProcHighDynamicRangeMetadataType;
441+
442+/** \brief Video Processing Mode. */
443+typedef enum _VAProcMode {
444+ /**
445+ * \brief Default Mode.
446+ * In this mode, pipeline is decided in driver to the appropriate mode.
447+ * e.g. a mode that's a balance between power and performance.
448+ */
449+ VAProcDefaultMode = 0,
450+ /**
451+ * \brief Power Saving Mode.
452+ * In this mode, pipeline is optimized for power saving.
453+ */
454+ VAProcPowerSavingMode,
455+ /**
456+ * \brief Performance Mode.
457+ * In this mode, pipeline is optimized for performance.
458+ */
459+ VAProcPerformanceMode
460+} VAProcMode;
461+
428462 /** @name Video blending flags */
429463 /**@{*/
430464 /** \brief Global alpha blending. */
@@ -522,6 +556,18 @@ typedef struct _VABlendState {
522556 #define VA_SOURCE_RANGE_REDUCED 1
523557 #define VA_SOURCE_RANGE_FULL 2
524558
559+/** @name Tone Mapping flags multiple HDR mode*/
560+/**@{*/
561+/** \brief Tone Mapping from HDR content to HDR display. */
562+#define VA_TONE_MAPPING_HDR_TO_HDR 0x0001
563+/** \brief Tone Mapping from HDR content to SDR display. */
564+#define VA_TONE_MAPPING_HDR_TO_SDR 0x0002
565+/** \brief Tone Mapping from HDR content to EDR display. */
566+#define VA_TONE_MAPPING_HDR_TO_EDR 0x0004
567+/** \brief Tone Mapping from SDR content to HDR display. */
568+#define VA_TONE_MAPPING_SDR_TO_HDR 0x0008
569+/**@}*/
570+
525571 /** \brief Video processing pipeline capabilities. */
526572 typedef struct _VAProcPipelineCaps {
527573 /** \brief Pipeline flags. See VAProcPipelineParameterBuffer::pipeline_flags. */
@@ -609,9 +655,9 @@ typedef struct _VAProcPipelineCaps {
609655 uint32_t min_output_height;
610656 /** \brief Reserved bytes for future use, must be zero */
611657 #if defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) || defined(__LP64__)
612- uint32_t va_reserved[VA_PADDING_HIGH - 2];
658+ uint32_t va_reserved[VA_PADDING_HIGH - 2];
613659 #else
614- uint32_t va_reserved[VA_PADDING_HIGH];
660+ uint32_t va_reserved[VA_PADDING_HIGH];
615661 #endif
616662 } VAProcPipelineCaps;
617663
@@ -627,7 +673,7 @@ typedef struct _VAProcFilterValueRange {
627673 float step;
628674
629675 /** \brief Reserved bytes for future use, must be zero */
630- uint32_t va_reserved[VA_PADDING_LOW];
676+ uint32_t va_reserved[VA_PADDING_LOW];
631677 } VAProcFilterValueRange;
632678
633679 typedef struct _VAProcColorProperties {
@@ -657,6 +703,102 @@ typedef struct _VAProcColorProperties {
657703 uint8_t reserved[3];
658704 } VAProcColorProperties;
659705
706+/** \berief Describes High Dynamic Range Meta Data for HDR10. */
707+typedef struct _VAHdrMetaDataHDR10
708+{
709+ /**
710+ * \brief X chromaticity coordinate of the mastering display.
711+ *
712+ * Index value c equal to 0 should correspond to the green primary.
713+ * Index value c equal to 1 should correspond to the blue primary.
714+ * Index value c equal to 2 should correspond to the red primary.
715+ * The value for display_primaries_x shall be in the range of 0 to 50000 inclusive.
716+ */
717+ uint16_t display_primaries_x[3];
718+ /**
719+ * \brief Y chromaticity coordinate of the mastering display.
720+ *
721+ * Index value c equal to 0 should correspond to the green primary.
722+ * Index value c equal to 1 should correspond to the blue primary.
723+ * Index value c equal to 2 should correspond to the red primary.
724+ * The value for display_primaries_y shall be in the range of 0 to 50000 inclusive.
725+ */
726+ uint16_t display_primaries_y[3];
727+ /**
728+ * \brief X chromaticity coordinate of the white point of the mastering display.
729+ *
730+ * The value for white_point_x shall be in the range of 0 to 50000 inclusive.
731+ */
732+ uint16_t white_point_x;
733+ /**
734+ * \brief Y chromaticity coordinate of the white point of the mastering display.
735+ *
736+ * The value for white_point_y shall be in the range of 0 to 50000 inclusive.
737+ */
738+ uint16_t white_point_y;
739+ /**
740+ * \brief The maximum display luminance of the mastering display.
741+ *
742+ * The value is in units of 0.0001 candelas per square metre.
743+ */
744+ uint32_t max_display_mastering_luminance;
745+ /**
746+ * \brief The minumum display luminance of the mastering display.
747+ *
748+ * The value is in units of 0.0001 candelas per square metre.
749+ */
750+ uint32_t min_display_mastering_luminance;
751+ /**
752+ * \brief The maximum content light level.
753+ *
754+ * The value is in units of 0.0001 candelas per square metre.
755+ */
756+ uint16_t max_content_light_level;
757+ /**
758+ * \brief The maximum picture average light level.
759+ *
760+ * The value is in units of 0.0001 candelas per square metre.
761+ */
762+ uint16_t max_pic_average_light_level;
763+ /** Resevered */
764+ uint16_t reserved[VA_PADDING_HIGH];
765+} VAHdrMetaDataHDR10;
766+
767+/** \brief Capabilities specification for the High Dynamic Range filter. */
768+typedef struct _VAProcFilterCapHighDynamicRange {
769+ /** \brief high dynamic range type. */
770+ VAProcHighDynamicRangeMetadataType metadata_type;
771+ /**
772+ * \brief flag for high dynamic range tone mapping
773+ *
774+ * The flag is the combination of VA_TONE_MAPPING_XXX_TO_XXX.
775+ * It could be VA_TONE_MAPPING_HDR_TO_HDR | VA_TONE_MAPPING_HDR_TO_SDR.
776+ * SDR content to SDR display is always supported by default since it is legacy path.
777+ */
778+ uint16_t caps_flag;
779+ /** \brief Reserved bytes for future use, must be zero */
780+ uint16_t va_reserved[VA_PADDING_HIGH];
781+} VAProcFilterCapHighDynamicRange;
782+
783+/** \brief High Dynamic Range Meta Data. */
784+typedef struct _VAHdrMetaData
785+{
786+ /** \brief high dynamic range metadata type, HDR10 etc. */
787+ VAProcHighDynamicRangeMetadataType metadata_type;
788+ /**
789+ * \brief Pointer to high dynamic range metadata.
790+ *
791+ * The pointer could point to VAHdrMetaDataHDR10 or other HDR meta data.
792+ */
793+ void* metadata;
794+ /**
795+ * \brief Size of high dynamic range metadata.
796+ */
797+ uint32_t metadata_size;
798+ /** \brief Reserved bytes for future use, must be zero */
799+ uint32_t reserved[VA_PADDING_LOW];
800+} VAHdrMetaData;
801+
660802 /**
661803 * \brief Video processing pipeline configuration.
662804 *
@@ -719,7 +861,7 @@ typedef struct _VAProcPipelineParameterBuffer {
719861 *
720862 * Pointer to a #VARectangle defining the region within the output
721863 * surface that receives the processed pixels. If NULL, \c output_region
722- * implies the whole surface.
864+ * implies the whole surface.
723865 *
724866 * Note that any pixels residing outside the specified region will
725867 * be filled in with the \ref output_background_color.
@@ -768,7 +910,7 @@ typedef struct _VAProcPipelineParameterBuffer {
768910 * \c VA_BOTTOM_FIELD. Note that any deinterlacing filter
769911 * (#VAProcFilterDeinterlacing) will override those flags.
770912 * - Color space conversion: \c VA_SRC_BT601, \c VA_SRC_BT709,
771- * \c VA_SRC_SMPTE_240.
913+ * \c VA_SRC_SMPTE_240.
772914 * - Scaling: \c VA_FILTER_SCALING_DEFAULT, \c VA_FILTER_SCALING_FAST,
773915 * \c VA_FILTER_SCALING_HQ, \c VA_FILTER_SCALING_NL_ANAMORPHIC.
774916 */
@@ -787,15 +929,15 @@ typedef struct _VAProcPipelineParameterBuffer {
787929 */
788930 VABufferID *filters;
789931 /** \brief Actual number of filters. */
790- uint32_t num_filters;
932+ uint32_t num_filters;
791933 /** \brief Array of forward reference frames. */
792934 VASurfaceID *forward_references;
793935 /** \brief Number of forward reference frames that were supplied. */
794- uint32_t num_forward_references;
936+ uint32_t num_forward_references;
795937 /** \brief Array of backward reference frames. */
796938 VASurfaceID *backward_references;
797939 /** \brief Number of backward reference frames that were supplied. */
798- uint32_t num_backward_references;
940+ uint32_t num_backward_references;
799941 /**
800942 * \brief Rotation state. See rotation angles.
801943 *
@@ -866,16 +1008,30 @@ typedef struct _VAProcPipelineParameterBuffer {
8661008 * bit 1~31 for future
8671009 */
8681010 uint32_t output_surface_flag;
869-
1011+ /**
1012+ * \brief Input Color Properties. See "VAProcColorProperties".
1013+ */
8701014 VAProcColorProperties input_color_properties;
871-
1015+ /**
1016+ * \brief Output Color Properties. See "VAProcColorProperties".
1017+ */
8721018 VAProcColorProperties output_color_properties;
1019+ /**
1020+ * \brief Processing mode. See "VAProcMode".
1021+ */
1022+ VAProcMode processing_mode;
1023+ /**
1024+ * \brief Output High Dynamic Metadata.
1025+ *
1026+ * If output_metadata is NULL, then output default to SDR.
1027+ */
1028+ VAHdrMetaData *output_hdr_metadata;
8731029
8741030 /** \brief Reserved bytes for future use, must be zero */
8751031 #if defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__)|| defined(__LP64__)
876- uint32_t va_reserved[VA_PADDING_LARGE - 13];
1032+ uint32_t va_reserved[VA_PADDING_LARGE - 16];
8771033 #else
878- uint32_t va_reserved[VA_PADDING_LARGE - 11];
1034+ uint32_t va_reserved[VA_PADDING_LARGE - 13];
8791035 #endif
8801036 } VAProcPipelineParameterBuffer;
8811037