[Libva] [PATCH 2/3] Add the comment for framerate in VAEncMiscParameterFrameRate

Xiang, Haihao haihao.xiang at intel.com
Tue Sep 6 13:25:28 UTC 2016


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 at intel.com>
---
 va/va.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/va/va.h b/va/va.h
index ed5bb73..33cfde2 100644
--- a/va/va.h
+++ b/va/va.h
@@ -1258,6 +1258,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
     {
-- 
1.9.1



More information about the Libva mailing list