diff options
author | Mark Thompson <[email protected]> | 2017-01-27 22:03:10 +0000 |
---|---|---|
committer | Christian König <[email protected]> | 2017-03-06 14:04:59 +0100 |
commit | c93a157078591847a226265edf1c701d81635fc1 (patch) | |
tree | 52d136386cb34526ced04fbfb04f57fc18aaf6f7 /src/gallium/state_trackers/va/picture.c | |
parent | 012b6d3fe7937d1624f906351b2ba555d9e7e112 (diff) |
st/va: Support fractional framerate in misc parameter
Signed-off-by: Mark Thompson <[email protected]>
Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va/picture.c')
-rw-r--r-- | src/gallium/state_trackers/va/picture.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index 53bb9eb9e32..ef8b57a47f5 100644 --- a/src/gallium/state_trackers/va/picture.c +++ b/src/gallium/state_trackers/va/picture.c @@ -348,7 +348,13 @@ static VAStatus handleVAEncMiscParameterTypeFrameRate(vlVaContext *context, VAEncMiscParameterBuffer *misc) { VAEncMiscParameterFrameRate *fr = (VAEncMiscParameterFrameRate *)misc->data; - context->desc.h264enc.rate_ctrl.frame_rate_num = fr->framerate; + if (fr->framerate & 0xffff0000) { + context->desc.h264enc.rate_ctrl.frame_rate_num = fr->framerate & 0xffff; + context->desc.h264enc.rate_ctrl.frame_rate_den = fr->framerate >> 16 & 0xffff; + } else { + context->desc.h264enc.rate_ctrl.frame_rate_num = fr->framerate; + context->desc.h264enc.rate_ctrl.frame_rate_den = 1; + } return VA_STATUS_SUCCESS; } |