[Libva] Is it possible to accelerate some portion of H264 encoding using libva?
Wen Gao
Wen.Gao at harmonicinc.com
Mon Aug 19 07:42:19 PDT 2013
Thanks for your reply.
You are right that the it's better to offload motion compensation and CABAC operations to GPU. However, in some use cases, we want to have our own mode decision algorithm or our own rate control algorithm to fine tune the video quality. That's why I want to know libVA provides such kind of flexibility. Based on my own investigation, the answer seems no for current version of libVA.
Regards,
Wen
-----Original Message-----
From: ykzhao [mailto:yakui.zhao at intel.com]
Sent: Sunday, August 18, 2013 9:33 PM
To: Wen Gao
Cc: libva at lists.freedesktop.org
Subject: Re: [Libva] Is it possible to accelerate some portion of H264 encoding using libva?
On Wed, 2013-08-14 at 14:56 -0600, Wen Gao wrote:
> In libva, there are two example encoders, i.e., h264encode and avcenc,
> which demonstrate how the hardware encoding can be done using libva.
> However, the encoding is done as a whole including the motion
> compensation, mode decision and rate control.
>
>
>
> I have following question:
>
>
>
> Is it possible to only accelerate part of the H264 encoding? For
> example, I have a software encoder and I just want to offload the
> motion estimation , or the CABAC operation to Intel GPU. I wonder if
> anyone has done this. Any suggestions or sample code are appreciated.
Why do you only hope to accelerate part of the H264 encoding? Does the encoded bit-stream of hardware encoding meet with your requirement?(Performance and quality)?
As we know, the keypoint of H264 encoding is to get the appropriate the mode/motion vector estimation. The CABAC operation(entropy coding) only uses the result of motion vector estimation to output the expected bit-stream.
For the CABAC(CAVLC) operation: This is the mature algorithm and needs a lot of mathematical operation. So it is appropriate to implement it on GPU.
For the motion vector estimation: It also needs a lot of mathematical operation in order to search the appropriate mode/motion vector. Now it is accelerated by the specific hardware unit on Intel GPU. And the result is directly used for the CABAC/CAVLC operation.
Because the above operations are appropriate to implement on GPU, it seems unnecessary that only part of H264 encoding is accelerated by GPU and the other part is done on CPU.
Thanks
>
>
>
> Regards,
>
>
>
> Wen
>
More information about the Libva
mailing list