[Libva] bitrate woes....

Xiang, Haihao haihao.xiang at intel.com
Sun Jan 11 19:55:53 PST 2015


Hi Tony,

h264encode with CBR was broken for a while, please try with avcenc.

Thanks
Haihao
  

> I'm having a very hard time getting libva to honor my bitrate
> settings, and it appears that the test program at 
> 
> 
> http://cgit.freedesktop.org/libva/tree/test/encode/h264encode.c 
> 
> 
> also isn't working. The only modification I made to h264encode.c was
> getting it to get it's VADisplay from the drm device
> (vaGetDisplayDRM(fd)).
> 
> 
> I am using the built in image as the YUV source in my testing. Here is
> how I am running it:
> 
> 
> sudo ./h264encode -n 300 --bitrate 500000 -rcmode VBR
> 
> 
> For all of the rate control modes (except for CBR) I see an error like
> the following:
> 
> 
> Support rate control mode (0x12):CBR CQP 
> Warning: Don't support the specified RateControl mode: VBR!!!, switch
> to RateControl mode: CQP
> 
> 
> And the file is always the same size (regardless of the bitrate I pass
> in).
> 
> 
> If I use CBR the output is slightly different:
> 
> 
> Support rate control mode (0x12):CBR CQP
> 
> 
> 
> Similar to the above, except it doesn't have the Warning. The other
> problem is that the file created has 0 length.
> 
> 
> If I use CQP as the rate control mode I get no warnings, but the file
> is always the same size regardless of the bitrate I pass in.
> 
> 
> Here is the output from vainfo on my machine:
> 
> 
> [td at localhost enc]$ vainfo
> libva info: VA-API version 0.36.0
> libva info: va_getDriverName() returns 0
> libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
> libva info: Found init function __vaDriverInit_0_36
> libva info: va_openDriver() returns 0
> vainfo: VA-API version: 0.36 (libva 1.4.0)
> vainfo: Driver version: Intel i965 driver for Intel(R) Sandybridge
> Mobile - 1.4.0
> vainfo: Supported profile and entrypoints
>       VAProfileMPEG2Simple            : VAEntrypointVLD
>       VAProfileMPEG2Main              : VAEntrypointVLD
>       VAProfileH264ConstrainedBaseline: VAEntrypointVLD
>       VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
>       VAProfileH264Main               : VAEntrypointVLD
>       VAProfileH264Main               : VAEntrypointEncSlice
>       VAProfileH264High               : VAEntrypointVLD
>       VAProfileH264High               : VAEntrypointEncSlice
>       VAProfileH264StereoHigh         : VAEntrypointVLD
>       VAProfileVC1Simple              : VAEntrypointVLD
>       VAProfileVC1Main                : VAEntrypointVLD
>       VAProfileVC1Advanced            : VAEntrypointVLD
>       VAProfileNone                   : VAEntrypointVideoProc
> 
> 
> Does libva actually support the bitrate setting?
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva




More information about the Libva mailing list