[Libva] Is it possible to accelerate some portion of H264 encoding using libva?

ykzhao yakui.zhao at intel.com
Sun Aug 18 18:32:34 PDT 2013


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