diff options
author | Mark Thompson <sw@jkqxz.net> | 2016-12-22 18:22:00 +0000 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2016-12-23 21:45:47 +0800 |
commit | acbc209b9bed133e2feadb74a07d34f8c933dcc0 (patch) | |
tree | c1ffbee51536881db264c830eab3cab8831fdbd1 | |
parent | 598fb9ee175b237e2db737039c2714bc1a63b0e2 (diff) | |
download | libva-acbc209b9bed133e2feadb74a07d34f8c933dcc0.tar.gz |
va.h: Improve the comment on the encode framerate parameter
Signed-off-by: Mark Thompson <sw@jkqxz.net>
-rw-r--r-- | va/va.h | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -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 |