[Mesa-dev] Decode hi10p with mesa uvd vdpau

Peter Frühberger peter.fruehberger at gmail.com
Sat Oct 26 16:31:14 CEST 2013


Hi,

I looked at the openmax decoder posted yesterday and have seen that
only two fields are missing to also decode hi10p with the current
vdpau uvd infrastructure in place.

I mailed two patches to the vdpau mailing list in order to get the API
bumped to "ship" those two fields via the h264 structure to later have
them available, the rest is already there with [1].

In mesa it is currently handled with the already given profiles, see
attached patch. This is - I think - a minimal way of get it decoded.
Happy to discuss a more general approach.

Input welcome, I will especially update, when I get feedback on the
vdpau Mailinglist (bumped versions are only to be seen prototypical).

[1] http://lists.freedesktop.org/archives/mesa-dev/2013-October/046944.html

Best regards
Peter

>From 9f9df1a397a7d9a0b6471e16c49e9a330c13172d Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger at gmail.com>
Date: Sat, 26 Oct 2013 15:52:46 +0200
Subject: [PATCH 1/3] hi10p: vdpau state tracker patch

---
 src/gallium/state_trackers/vdpau/vdpau_private.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h
b/src/gallium/state_trackers/vdpau/vdpau_private.h
index 60196ac..99bad8f 100644
--- a/src/gallium/state_trackers/vdpau/vdpau_private.h
+++ b/src/gallium/state_trackers/vdpau/vdpau_private.h
@@ -260,6 +260,8 @@ ProfileToPipe(VdpDecoderProfile vdpau_profile)
          return PIPE_VIDEO_PROFILE_VC1_MAIN;
       case VDP_DECODER_PROFILE_VC1_ADVANCED:
          return PIPE_VIDEO_PROFILE_VC1_ADVANCED;
+      case VDP_DECODER_PROFILE_H264_HI10;
+         return PIPE_VIDEO_PROFILE_MPEG4_AVC_HI10;
       default:
          return PIPE_VIDEO_PROFILE_UNKNOWN;
    }
@@ -281,6 +283,8 @@ PipeToProfile(enum pipe_video_profile p_profile)
          return VDP_DECODER_PROFILE_H264_MAIN;
       case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
          return VDP_DECODER_PROFILE_H264_HIGH;
+      case PIPE_VIDEO_PROFILE_MPEG4_AVC_HI10:
+         return VDP_DECODER_PROFILE_H264_HI10;
       case PIPE_VIDEO_PROFILE_MPEG4_SIMPLE:
          return VDP_DECODER_PROFILE_MPEG4_PART2_SP;
       case PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE:
-- 
1.8.1.2

>From 34f20f645edfe71ca2d827b3d3b2a70260365af7 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger at gmail.com>
Date: Sat, 26 Oct 2013 15:53:00 +0200
Subject: [PATCH 2/3] hi10p: Auxiliary helpers updated

---
 src/gallium/auxiliary/util/u_video.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_video.h
b/src/gallium/auxiliary/util/u_video.h
index 276e460..836b28b 100644
--- a/src/gallium/auxiliary/util/u_video.h
+++ b/src/gallium/auxiliary/util/u_video.h
@@ -61,7 +61,8 @@ u_reduce_video_profile(enum pipe_video_profile profile)
       case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
       case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
       case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
-         return PIPE_VIDEO_FORMAT_MPEG4_AVC;
+      case PIPE_VIDEO_PROFILE_MPEG4_AVC_HI10:
+         return PIPE_VIDEO_PROFILE_MPEG4_AVC;

       default:
          return PIPE_VIDEO_FORMAT_UNKNOWN;
-- 
1.8.1.2

>From 631f5534b9a563799d23fa1110fbe1f418307737 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger at gmail.com>
Date: Sat, 26 Oct 2013 15:53:25 +0200
Subject: [PATCH 3/3] hi10p: bump libvdpau depends to a version which supports
 hi10p

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 91b9871..4919cdd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1313,7 +1313,7 @@ fi
 AM_CONDITIONAL(HAVE_ST_XVMC, test "x$enable_xvmc" = xyes)

 if test "x$enable_vdpau" = xyes; then
-    PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.4.1 x11-xcb xcb-dri2 >= 1.8])
+    PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.8.0 x11-xcb xcb-dri2 >= 1.8])
     GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vdpau"
 fi
 AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes)
-- 
1.8.1.2


-- 
                   Key-ID:     0x1A995A9B
                   keyserver: pgp.mit.edu
==============================================================
Fingerprint: 4606 DA19 EC2E 9A0B 0157  C81B DA07 CF63 1A99 5A9B


More information about the mesa-dev mailing list