summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-12-22 18:22:00 +0000
committerXiang, Haihao <haihao.xiang@intel.com>2016-12-23 21:45:47 +0800
commitacbc209b9bed133e2feadb74a07d34f8c933dcc0 (patch)
treec1ffbee51536881db264c830eab3cab8831fdbd1
parent598fb9ee175b237e2db737039c2714bc1a63b0e2 (diff)
va.h: Improve the comment on the encode framerate parameter
Signed-off-by: Mark Thompson <sw@jkqxz.net>
-rw-r--r--va/va.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/va/va.h b/va/va.h
index 8791906..a1ab4a8 100644
--- a/va/va.h
+++ b/va/va.h
@@ -1277,12 +1277,22 @@ 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
+ * The framerate is specified as a number of frames per second, as a
+ * fraction. The denominator of the fraction is given in the top half
+ * (the high two bytes) of the framerate field, and the numerator is
+ * given in the bottom half (the low two bytes).
*
- * If the high 2 btyes is 0, the frame rate is specified by the low 2 bytes.
+ * That is:
+ * denominator = framerate >> 16 & 0xffff;
+ * numerator = framerate & 0xffff;
+ * fps = numerator / denominator;
+ *
+ * For example, if framerate is set to (100 << 16 | 750), this is
+ * 750 / 100, hence 7.5fps.
+ *
+ * If the denominator is zero (the high two bytes are both zero) then
+ * it takes the value one instead, so the framerate is just the integer
+ * in the low 2 bytes.
*/
unsigned int framerate;
union