[Libva] [PATCH Libva-intel-driver] Add one option of bypassing rendering function to test decoding
Gwenole Beauchesne
gb.devel at gmail.com
Fri May 9 02:45:39 PDT 2014
Hi,
2014-05-06 6:44 GMT+02:00 Xu, Guangxin <guangxin.xu at intel.com>:
> Hi Yakui
> This will introduce side effect to normal case. It will search string in environment list. No matter INTEL_DECODE_BENCH defined or not.
Yes, agreed. We cannot introduce changes in the VA driver, and nowhere
else either for sanity, that rely on environment variables. If you
don't want to use vaPutSurface(), then just don't use vaPutSurface()
and call vaSyncSurface() instead. :)
For mplayer purposes, there is a per-VO options mechanism that could
be used for example to notify the VO to not render at all. I don't say
that option exist, it needs to be written, but there is infrastructure
for per-VO options. That's the recommended way to do.
An alternative would be to use `ffmpeg' with VA/DRM backend. Though, I
don't know what you intend to benchmark to begin with.
Regards,
Gwenole.
> -----Original Message-----
> From: Libva [mailto:libva-bounces at lists.freedesktop.org] On Behalf Of Zhao Yakui
> Sent: Tuesday, May 6, 2014 12:36 PM
> To: Xiang, Haihao
> Cc: Zhao at freedesktop.org; libva at lists.freedesktop.org
> Subject: Re: [Libva] [PATCH Libva-intel-driver] Add one option of bypassing rendering function to test decoding
>
> On Mon, 2014-05-05 at 22:19 -0600, Xiang, Haihao wrote:
>> It would be better not to call vaPutSurface() in your benchmark if you
>> want to ignore rendering.
>
> Thanks for your review.
>
> It is also one solution. Currently the bench test is based on the mplayer-vaapi. In such case it is not easy to bypass the vaPutSurface.
> At the same time it also needs to add the function of waiting for the completion of decoding.
>
>>
>> Thanks
>> Haihao
>>
>>
>> > From: Zhao Yakui <yakui.zhao at intel.com>
>> >
>> > Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
>> > ---
>> > src/i965_drv_video.h | 3 +++
>> > src/i965_output_dri.c | 4 ++++
>> > 2 files changed, 7 insertions(+)
>> >
>> > diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h index
>> > 0e32f7d..70755d2 100644
>> > --- a/src/i965_drv_video.h
>> > +++ b/src/i965_drv_video.h
>> > @@ -432,6 +432,9 @@ extern VAStatus i965_CreateSurfaces(VADriverContextP ctx,
>> > int format,
>> > int num_surfaces,
>> > VASurfaceID *surfaces);
>> > +extern VAStatus i965_SyncSurface(VADriverContextP ctx,
>> > + VASurfaceID render_target);
>> > +
>> >
>> > #define I965_SURFACE_MEM_NATIVE 0
>> > #define I965_SURFACE_MEM_GEM_FLINK 1
>> > diff --git a/src/i965_output_dri.c b/src/i965_output_dri.c index
>> > 717ee9a..645a7d1 100644
>> > --- a/src/i965_output_dri.c
>> > +++ b/src/i965_output_dri.c
>> > @@ -140,6 +140,10 @@ i965_put_surface_dri(
>> > if (!obj_surface || !obj_surface->bo)
>> > return VA_STATUS_SUCCESS;
>> >
>> > + if (getenv("INTEL_DECODE_BENCH")) {
>> > + i965_SyncSurface(ctx, surface);
>> > + return VA_STATUS_SUCCESS;
>> > + }
>> > _i965LockMutex(&i965->render_mutex);
>> >
>> > dri_drawable = dri_vtable->get_drawable(ctx, (Drawable)draw);
>>
>>
>
>
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva
More information about the Libva
mailing list