OSDN Git Service

Add the comment for framerate in VAEncMiscParameterFrameRate
authorXiang, Haihao <haihao.xiang@intel.com>
Tue, 6 Sep 2016 13:25:28 +0000 (21:25 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 31 Oct 2016 00:59:38 +0000 (08:59 +0800)
To express a frame rate, such as 7.5, we have to use 'numerator / denominator'.
The high 2 bytes will be used as denominator and the low 2 bytes will be used
as numerator.

To keep backward compatible, the low 2 bytes is the real frame rate when the high
2 bytes is 0.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 1ca62cedd41ed2061c3a9ddafadc59a4692a07c9)

va/va.h

diff --git a/va/va.h b/va/va.h
index e919f6f..665aafb 100644 (file)
--- a/va/va.h
+++ b/va/va.h
@@ -1261,6 +1261,14 @@ typedef struct _VAEncMiscParameterRateControl
 
 typedef struct _VAEncMiscParameterFrameRate
 {
+    /*
+     * fps = numerator / denominator
+     * The high 2 bytes (bits 16 to 31) of framerate specifies the numerator, and
+     * the low 2 bytes (bits 0 to 15) of framerate specifies the denominator. For
+     * example, ((100 < 16 ) | 750) is 7.5 fps
+     *
+     * If the high 2 btyes is 0, the frame rate is specified by the low 2 bytes.
+     */
     unsigned int framerate;
     union
     {