vl: add interlacing capabilities
authorChristian König <deathsimple@vodafone.de>
Wed, 1 Feb 2012 22:38:45 +0000 (23:38 +0100)
committerChristian König <deathsimple@vodafone.de>
Mon, 6 Feb 2012 09:35:58 +0000 (10:35 +0100)
Let the driver control interlaced or progressive
format of video buffers.

Signed-off-by: Christian König <deathsimple@vodafone.de>
src/gallium/drivers/nouveau/nouveau_video.c
src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/include/pipe/p_video_enums.h

index 47d332a12b57ec9c7a4c38f2c154d232b8bb25a5..cfbf857a969c784530936f166940f8d7863399a9 100644 (file)
@@ -837,6 +837,12 @@ nouveau_screen_get_video_param(struct pipe_screen *pscreen,
       return vl_video_buffer_max_size(pscreen);
    case PIPE_VIDEO_CAP_PREFERED_FORMAT:
       return PIPE_FORMAT_NV12;
+   case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
+      return false;
+   case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
+      return false;
+   case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE:
+      return true;
    default:
       debug_printf("unknown video param: %d\n", param);
       return 0;
index 623903ab7566cea1272f06aa07c8326c8780875c..ba1a2423d4bab63be9d1e4dc86008054d8b6d385 100644 (file)
@@ -236,6 +236,12 @@ nvfx_screen_get_video_param(struct pipe_screen *screen,
                return vl_video_buffer_max_size(screen);
        case PIPE_VIDEO_CAP_PREFERED_FORMAT:
                return PIPE_FORMAT_NV12;
+       case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
+               return false;
+       case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
+               return false;
+       case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE:
+               return true;
        default:
                return 0;
        }
index 9a9418bc92734aa7ed730fda57fb61f268af0e71..eb233a0b0be929f095604d3a66c34a54252da943 100644 (file)
@@ -314,6 +314,12 @@ static int r300_get_video_param(struct pipe_screen *screen,
          return vl_video_buffer_max_size(screen);
       case PIPE_VIDEO_CAP_PREFERED_FORMAT:
          return PIPE_FORMAT_NV12;
+      case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
+         return false;
+      case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
+         return false;
+      case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE:
+         return true;
       default:
          return 0;
    }
index 351ecfe843746abdda6c8f3999121a32df8ab374..140ae11af9a60ea7fbf0af4cb337791e8cd2665a 100644 (file)
@@ -535,6 +535,12 @@ static int r600_get_video_param(struct pipe_screen *screen,
                return vl_video_buffer_max_size(screen);
        case PIPE_VIDEO_CAP_PREFERED_FORMAT:
                return PIPE_FORMAT_NV12;
+       case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
+               return false;
+       case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
+               return false;
+       case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE:
+               return true;
        default:
                return 0;
        }
index 6cafeafbe198aa29745b470d47e5449ed99e9a44..6d61d003975b97adae54e93ff808ac1bd696ffb6 100644 (file)
@@ -209,6 +209,12 @@ softpipe_get_video_param(struct pipe_screen *screen,
       return vl_video_buffer_max_size(screen);
    case PIPE_VIDEO_CAP_PREFERED_FORMAT:
       return PIPE_FORMAT_NV12;
+   case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
+      return false;
+   case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
+      return false;
+   case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE:
+      return true;
    default:
       return 0;
    }
index 3b61601536ecd928218fa752767ebd83644a344a..deacf8d1d9cf0f551227ce0f0c1899a507fcb45a 100644 (file)
@@ -51,7 +51,10 @@ enum pipe_video_cap
    PIPE_VIDEO_CAP_NPOT_TEXTURES = 1,
    PIPE_VIDEO_CAP_MAX_WIDTH = 2,
    PIPE_VIDEO_CAP_MAX_HEIGHT = 3,
-   PIPE_VIDEO_CAP_PREFERED_FORMAT = 4
+   PIPE_VIDEO_CAP_PREFERED_FORMAT = 4,
+   PIPE_VIDEO_CAP_PREFERS_INTERLACED = 5,
+   PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE = 6,
+   PIPE_VIDEO_CAP_SUPPORTS_INTERLACED = 7
 };
 
 enum pipe_video_codec