On Tue, 2014-06-17 at 17:54 +1000, Jean-Yves Avenard wrote:
> On 17 June 2014 17:27, Peter Frühberger <[email protected]> wrote:
> > Hi,
> >
> > we implemented the SSE4 copy code arround that was referenced here
> > into xbmc arround christmas, cause we wanted to use state of the art
> > deinterlacing with ffmpeg's yadif.
> > Here are some benchmarks with 8K vs 4K buffer and 1080p vs 4K surface sizes:
> 
> Except that getting the picture via vaDeriveImage returns a NV12 image
> (at least with Intel, AMD VAAPI doesn't implement vaDeriveImage), in
> which case that routine serves no purpose until of course you can
> natively display NV12 image.
> 
> And vaGetImage returns a YV12 image, which isn't a USMC map memory,
> and the SSE4 routine is in this case three times as slow as the plain
> C version using memcpy.

Hi, 

Can you give a try with the attached patch ? It uses
drm_intel_gem_bo_map_gtt() to map a buffer through the aperture rather
than directly to its CPU cacheable memory

Thanks
Haihao



> 
> We always get back to the problem I mentioned in my first email.
> Unfortunately, there's not a generic solution that can be adapted.
> If memory used is USWC, you must use SSE4, if not, you certainly don't
> want to use SSE4 and a buffer
> 
> > Fun fact:
> > Slow Baytrail Chips are faster and more stable doing VAAPI Decoder +
> > sse4 transfert + software deinterlacing than using VPP with Bobbing.
> 
> You don't have to use VPP for Bob.
> But yeah, I see your point for other type of VPP's deinterlacers
> _______________________________________________
> Libva mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/libva

>From 3a94a08e89e0abdce13db14cebfe70883c265c6f Mon Sep 17 00:00:00 2001
From: "Xiang, Haihao" <[email protected]>
Date: Tue, 17 Jun 2014 16:44:49 +0800
Subject: [PATCH] vaMapBuffer(): always use drm_intel_gem_bo_map_gtt() to map a
 Image buffer

Signed-off-by: Xiang, Haihao <[email protected]>
---
 src/i965_drv_video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index b7a0485..c01d88d 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -2052,7 +2052,7 @@ i965_MapBuffer(VADriverContextP ctx,
 
         dri_bo_get_tiling(obj_buffer->buffer_store->bo, &tiling, &swizzle);
 
-        if (tiling != I915_TILING_NONE)
+        if (tiling != I915_TILING_NONE || obj_buffer->type == VAImageBufferType)
             drm_intel_gem_bo_map_gtt(obj_buffer->buffer_store->bo);
         else
             dri_bo_map(obj_buffer->buffer_store->bo, 1);
@@ -2135,7 +2135,7 @@ i965_UnmapBuffer(VADriverContextP ctx, VABufferID buf_id)
 
         dri_bo_get_tiling(obj_buffer->buffer_store->bo, &tiling, &swizzle);
 
-        if (tiling != I915_TILING_NONE)
+        if (tiling != I915_TILING_NONE || obj_buffer->type == VAImageBufferType)
             drm_intel_gem_bo_unmap_gtt(obj_buffer->buffer_store->bo);
         else
             dri_bo_unmap(obj_buffer->buffer_store->bo);
-- 
1.8.3.2

_______________________________________________
Libva mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to