On 15/12/16 08:54, Xiang, Haihao wrote: > > Hi Mark, > > Thanks for your patch, is there any benefit to use a fraction? using > 100 as framerate_den works well in the driver.
Everything the driver interacts with directly, on both sides, uses a fraction: * In VAAPI, VAEncMiscParameterFrameRate contains a 16 / 16 fraction. * Newer hardware uses a fraction directly where it requires a framerate (gen9_vp9_encoder.c:1204, gen9_vdenc.c:1648). * H.264 and H.265 streams contain num_units_in_tick / time_scale. * gstreamer (GstVideoInfo.fps_[nd]), libyami (VideoFrameRate.frameRate{Num,Denom}) and libavcodec (AVCodecContext.{time_base,framerate} are fraction structures) all represent framerate as a fraction. The driver should use a fraction as well to preserve the exact value and be consistent with everything it interacts with. Do you have any other concerns about the patch? If there are additional references outside the core driver code which I have missed somehow then I would be happy to update them as well. Thanks, - Mark _______________________________________________ Libva mailing list Libva@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libva