• 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

Revision250b3dc8f370bc6d85be767c9722fd98e8b02ebb (tree)
Time2018-09-20 16:13:28
AuthorWang, Chengwei C <chengwei.c.wang@inte...>
CommiterXinfengZhang

Log Message

Add max frame size parameters for multiple pass case in legacy mode

Add new data structure and parameter buffer type for max frame size parameters in multiple pass case.

Signed-off-by: Wang, Chengwei C <chengwei.c.wang@intel.com>

Change Summary

Incremental Difference

--- a/va/va.h
+++ b/va/va.h
@@ -1748,6 +1748,8 @@ typedef enum
17481748 VAEncMiscParameterTypeSkipFrame = 9,
17491749 /** \brief Buffer type used for region-of-interest (ROI) parameters. */
17501750 VAEncMiscParameterTypeROI = 10,
1751+ /** \brief Buffer type used to express a maximum frame size (in bytes) settings for multiple pass. */
1752+ VAEncMiscParameterTypeMultiPassFrameSize = 11,
17511753 /** \brief Buffer type used for temporal layer structure */
17521754 VAEncMiscParameterTypeTemporalLayerStructure = 12,
17531755 /** \brief Buffer type used for dirty region-of-interest (ROI) parameters. */
@@ -2116,6 +2118,31 @@ typedef struct _VAEncMiscParameterBufferMaxFrameSize {
21162118 } VAEncMiscParameterBufferMaxFrameSize;
21172119
21182120 /**
2121+ * \brief Maximum frame size (in bytes) settings for multiple pass.
2122+ *
2123+ * This misc parameter buffer defines the maximum size of a frame (in
2124+ * bytes) settings for multiple pass. currently only AVC encoder can
2125+ * support this settings in multiple pass case. If the frame size exceeds
2126+ * this size, the encoder will do more pak passes to adjust the QP value
2127+ * to control the frame size.
2128+ */
2129+typedef struct _VAEncMiscParameterBufferMultiPassFrameSize {
2130+ /** \brief Type. Shall be set to #VAEncMiscParameterTypeMultiPassMaxFrameSize. */
2131+ VAEncMiscParameterType type;
2132+ /** \brief Maximum size of a frame (in byte) */
2133+ uint32_t max_frame_size;
2134+ /** \brief Reserved bytes for future use, must be zero */
2135+ uint32_t reserved;
2136+ /** \brief number of passes, every pass has different QP, currently AVC encoder can support up to 4 passes */
2137+ uint8_t num_passes;
2138+ /** \brief delta QP list for every pass */
2139+ uint8_t *delta_qp;
2140+
2141+ /** \brief Reserved bytes for future use, must be zero */
2142+ unsigned long va_reserved[VA_PADDING_LOW];
2143+} VAEncMiscParameterBufferMultiPassFrameSize;
2144+
2145+/**
21192146 * \brief Encoding quality level.
21202147 *
21212148 * The encoding quality could be set through this structure, if the implementation
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -3241,6 +3241,18 @@ static void va_TraceVAEncMiscParameterBuffer(
32413241 va_TraceMsg(trace_ctx, "\tmax_frame_size = %d\n", p->max_frame_size);
32423242 break;
32433243 }
3244+ case VAEncMiscParameterTypeMultiPassFrameSize:
3245+ {
3246+ int i;
3247+ VAEncMiscParameterBufferMultiPassFrameSize *p = (VAEncMiscParameterBufferMultiPassFrameSize *)tmp->data;
3248+
3249+ va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterTypeMultiPassFrameSize\n");
3250+ va_TraceMsg(trace_ctx, "\tmax_frame_size = %d\n", p->max_frame_size);
3251+ va_TraceMsg(trace_ctx, "\tnum_passes = %d\n", p->num_passes);
3252+ for(i = 0; i<p->num_passes; ++i)
3253+ va_TraceMsg(trace_ctx, "\tdelta_qp[%d] = %d\n", i, p->delta_qp[i]);
3254+ break;
3255+ }
32443256 case VAEncMiscParameterTypeQualityLevel:
32453257 {
32463258 VAEncMiscParameterBufferQualityLevel *p = (VAEncMiscParameterBufferQualityLevel *)tmp->data;