vl: add entrypoint to is_video_format_supported
authorChristian König <christian.koenig@amd.com>
Mon, 15 Jul 2013 14:48:41 +0000 (08:48 -0600)
committerChristian König <christian.koenig@amd.com>
Mon, 19 Aug 2013 08:21:15 +0000 (10:21 +0200)
Signed-off-by: Christian König <christian.koenig@amd.com>
12 files changed:
src/gallium/auxiliary/vl/vl_video_buffer.c
src/gallium/auxiliary/vl/vl_video_buffer.h
src/gallium/drivers/ilo/ilo_format.c
src/gallium/drivers/nouveau/nouveau_vp3_video.c
src/gallium/drivers/nouveau/nouveau_vp3_video.h
src/gallium/drivers/nv50/nv50_context.h
src/gallium/drivers/nv50/nv84_video.c
src/gallium/drivers/radeon/radeon_uvd.c
src/gallium/drivers/radeon/radeon_uvd.h
src/gallium/include/pipe/p_screen.h
src/gallium/state_trackers/vdpau/decode.c
src/gallium/state_trackers/vdpau/query.c

index d81c1815abfdf743ba3b522804257b14b0fc7e8a..f0ba3891eb6dbe232dc1395ed862aa85a0dc0100 100644 (file)
@@ -147,7 +147,8 @@ vl_video_buffer_surface_format(enum pipe_format format)
 boolean
 vl_video_buffer_is_format_supported(struct pipe_screen *screen,
                                     enum pipe_format format,
-                                    enum pipe_video_profile profile)
+                                    enum pipe_video_profile profile,
+                                    enum pipe_video_entrypoint entrypoint)
 {
    const enum pipe_format *resource_formats;
    unsigned i;
index e92e270311611f03d1390677dd4e5b35e76af988..b936a378e1e0bf8763248f0505cffbfafd61a1ae 100644 (file)
@@ -73,7 +73,8 @@ vl_video_buffer_max_size(struct pipe_screen *screen);
 boolean
 vl_video_buffer_is_format_supported(struct pipe_screen *screen,
                                     enum pipe_format format,
-                                    enum pipe_video_profile profile);
+                                    enum pipe_video_profile profile,
+                                    enum pipe_video_entrypoint entrypoint);
 
 /*
  * set the associated data for the given video buffer
index 65fb82017266d3dfa170a73a777f4fc7a9ba1d75..40b5ffa75c703e355039f5d76ab1a16673c534b5 100644 (file)
@@ -671,9 +671,10 @@ ilo_is_format_supported(struct pipe_screen *screen,
 static boolean
 ilo_is_video_format_supported(struct pipe_screen *screen,
                               enum pipe_format format,
-                              enum pipe_video_profile profile)
+                              enum pipe_video_profile profile,
+                              enum pipe_video_entrypoint entrypoint)
 {
-   return vl_video_buffer_is_format_supported(screen, format, profile);
+   return vl_video_buffer_is_format_supported(screen, format, profile, entrypoint);
 }
 
 /**
index 1659c5f7e72d1003a33fbad307685de14a7e3500..07ce0163f6018873e7df1d896c0b1ea0326e4174 100644 (file)
@@ -416,10 +416,11 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
 boolean
 nouveau_vp3_screen_video_supported(struct pipe_screen *screen,
                                    enum pipe_format format,
-                                   enum pipe_video_profile profile)
+                                   enum pipe_video_profile profile,
+                                   enum pipe_video_entrypoint entrypoint)
 {
    if (profile != PIPE_VIDEO_PROFILE_UNKNOWN)
       return format == PIPE_FORMAT_NV12;
 
-   return vl_video_buffer_is_format_supported(screen, format, profile);
+   return vl_video_buffer_is_format_supported(screen, format, profile, entrypoint);
 }
index 8aedfd08da2dfbf7bd716ae4820df88c3dc84cc9..0193ed02ddb2956353f08968017f6ca0b91b35c5 100644 (file)
@@ -226,4 +226,5 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
 boolean
 nouveau_vp3_screen_video_supported(struct pipe_screen *screen,
                                    enum pipe_format format,
-                                   enum pipe_video_profile profile);
+                                   enum pipe_video_profile profile,
+                                   enum pipe_video_entrypoint entrypoint);
index 3600f70a29c69d70887c55b8000c0aae5cf0120c..ed4ef242f3af0f2bb6ba67e09303ff3a4a6c0791 100644 (file)
@@ -307,7 +307,8 @@ nv84_screen_get_video_param(struct pipe_screen *pscreen,
 boolean
 nv84_screen_video_supported(struct pipe_screen *screen,
                             enum pipe_format format,
-                            enum pipe_video_profile profile);
+                            enum pipe_video_profile profile,
+                            enum pipe_video_entrypoint entrypoint);
 
 /* nv98_video.c */
 struct pipe_video_codec *
index e7c715c8ef6603dc61f9ab0335e6b1b7aefa31f7..0627bab1461fe2d56364bcc493671ca49394f684 100644 (file)
@@ -787,10 +787,11 @@ nv84_screen_get_video_param(struct pipe_screen *pscreen,
 boolean
 nv84_screen_video_supported(struct pipe_screen *screen,
                             enum pipe_format format,
-                            enum pipe_video_profile profile)
+                            enum pipe_video_profile profile,
+                            enum pipe_video_entrypoint entrypoint)
 {
    if (profile != PIPE_VIDEO_PROFILE_UNKNOWN)
       return format == PIPE_FORMAT_NV12;
 
-   return vl_video_buffer_is_format_supported(screen, format, profile);
+   return vl_video_buffer_is_format_supported(screen, format, profile, entrypoint);
 }
index 86f4c5592fb946a33297b93822e19df486f397d2..f3652a64c9c33a1d71f13370d00a9c018eec3f6d 100644 (file)
@@ -1134,7 +1134,8 @@ int ruvd_get_video_param(struct pipe_screen *screen,
 
 boolean ruvd_is_format_supported(struct pipe_screen *screen,
                                 enum pipe_format format,
-                                enum pipe_video_profile profile)
+                                enum pipe_video_profile profile,
+                                enum pipe_video_entrypoint entrypoint)
 {
        /* we can only handle this one anyway */
        return format == PIPE_FORMAT_NV12;
index 8c1ab79e1f8e86aca822301ddb6ba4e76d2e7d92..dedb3c7040d72dcc3a4089dd0bd52954dc149288 100644 (file)
@@ -369,6 +369,7 @@ int ruvd_get_video_param(struct pipe_screen *screen,
 /* the hardware only supports NV12 */
 boolean ruvd_is_format_supported(struct pipe_screen *screen,
                                 enum pipe_format format,
-                                enum pipe_video_profile profile);
+                                enum pipe_video_profile profile,
+                                enum pipe_video_entrypoint entrypoint);
 
 #endif
index f490736670666e9363406497c5be2a0125c35292..3ed7f269e4f86639e4dfb05ff81ecb9c05add4a6 100644 (file)
@@ -136,7 +136,8 @@ struct pipe_screen {
     */
    boolean (*is_video_format_supported)( struct pipe_screen *,
                                          enum pipe_format format,
-                                         enum pipe_video_profile profile );
+                                         enum pipe_video_profile profile,
+                                         enum pipe_video_entrypoint entrypoint );
 
    /**
     * Check if we can actually create the given resource (test the dimension,
index f25a0eb8c49cedee3439d52b1e6912f60cbb0a3e..684ded891c695ec93213b53dcee1a58c9b785da2 100644 (file)
@@ -466,7 +466,8 @@ vlVdpDecoderRender(VdpDecoder decoder,
                                                PIPE_VIDEO_CAP_SUPPORTS_INTERLACED);
 
    if (vlsurf->video_buffer == NULL ||
-       !screen->is_video_format_supported(screen, vlsurf->video_buffer->buffer_format, dec->profile) ||
+       !screen->is_video_format_supported(screen, vlsurf->video_buffer->buffer_format,
+                                          dec->profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM) ||
        !buffer_support[vlsurf->video_buffer->interlaced]) {
 
       /* destroy the old one */
index fff7d6ba55bee1d49bdb46e3f4c5cf0b1d1469a3..8c1b27f5ab8844d1b1ea5aaaadb8af7018d1ede6 100644 (file)
@@ -141,7 +141,8 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp
    (
       pscreen,
       FormatYCBCRToPipe(bits_ycbcr_format),
-      PIPE_VIDEO_PROFILE_UNKNOWN
+      PIPE_VIDEO_PROFILE_UNKNOWN,
+      PIPE_VIDEO_ENTRYPOINT_BITSTREAM
    );
    pipe_mutex_unlock(dev->mutex);
 
@@ -391,7 +392,8 @@ vlVdpOutputSurfaceQueryPutBitsYCbCrCapabilities(VdpDevice device, VdpRGBAFormat
    *is_supported &= pscreen->is_video_format_supported
    (
       pscreen, ycbcr_format,
-      PIPE_VIDEO_PROFILE_UNKNOWN
+      PIPE_VIDEO_PROFILE_UNKNOWN,
+      PIPE_VIDEO_ENTRYPOINT_BITSTREAM
    );
    pipe_mutex_unlock(dev->mutex);