[Libva] [PATCH 1/4] i965_encoder: consistently represent framerate as a fraction

Sean V Kelley sean.v.kelley at intel.com
Thu Dec 15 17:22:25 UTC 2016


I'm fine with this change and it adds consistency.

lgtm

Thanks,

Sean

On Thu, Dec 15, 2016 at 4:26 AM, Mark Thompson <sw at jkqxz.net> wrote:

> 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libva
>



-- 
Sean V. Kelley <sean.v.kelley at intel.com>
Open Source Technology Center / SSG
Intel Corp.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libva/attachments/20161215/7f747b9b/attachment-0001.html>


More information about the Libva mailing list