[Libva] Directly encoding a surface after decoding

ykzhao yakui.zhao at intel.com
Thu Jan 24 17:38:39 PST 2013


On Thu, 2013-01-24 at 17:31 -0700, Timo Rothenpieler wrote:
> Hi,
> 
> I'm currently trying to write a transcoder which uses the latest 
> libva+intel-driver from git staging.
> The encoder and decoder on it's own work fine, but now i'm trying to 
> combine them, so that the encoder takes the VASurfaceID from the decoder 
> as input surface. This is to avoid the overhead of copying the image 
> contents to ram, just to copy them back after.

Will you please describe more clearly how you combine them together? It
will be better that you can attach your test case.

> 
> But when i try to run this, all i get is:
> i965_encoder.c:78: intel_encoder_check_yuv_surface: Assertion 
> `obj_surface && obj_surface->bo' failed.
> 

It seems that the surface for encoding can't be accessed. Will you
please describe how you use the decoding/encoding in the combined
transcoder?

thanks
    Yakui
> This happens on the call to vaEndPicture. The surfaceId from the decoder 
> was used as surfaceId for vaBeginPicture, like i did with my manualy 
> filled surface before.
> 
> I tried to just call vaDeriveImage/vaDestroyImage before using the 
> surface. This avoids the assertion, but i get a full green output video.
> 
> I'm totaly confused about this, as i can use the SurfaceID from the 
> decoder for a deinterlacing video processor.
> 
> Also, the next thing i'd do with the surface is calling 
> vaDeriveImage+MapBuffer and copy out the YUV data, respectively copying 
> in the YUV data on the encoder side, which works fine, but is slow.
> 
> Why can't i use the surface from the decoder, which apperently already 
> contains yuv data, as input for the encoder?
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva




More information about the Libva mailing list