summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2014-09-12 15:30:23 -0700
committerAaron Plattner <aplattner@nvidia.com>2014-10-28 08:18:30 -0700
commit178f33ec5ad1c7f0cb31458fa6eb675bb96f0420 (patch)
tree2ef0393126bb86a6be832a0ba5da540fdac7a455
parentd53f9271ccaff73a964c43cedcf8ed2cdb0bd353 (diff)
vdpauinfo: print supported PutBits indexed color formats
This parallels the loop that prints supported YCbCr formats. There is only one palette color format currently, so just use that for the query. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: José Hiram Soltren <jsoltren@nvidia.com>
-rw-r--r--vdpauinfo.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/vdpauinfo.cpp b/vdpauinfo.cpp
index bcca6aa..5e97f5b 100644
--- a/vdpauinfo.cpp
+++ b/vdpauinfo.cpp
@@ -25,8 +25,6 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/
-/// TODO
-/// - list color table formats for queryOutputSurface
#include <stdarg.h>
#include <stdlib.h>
@@ -96,11 +94,6 @@ Desc indexed_types[] = {
};
const size_t indexed_type_count = sizeof(indexed_types)/sizeof(Desc);
-Desc color_table_formats[] = {
-{"B8G8R8X8", VDP_COLOR_TABLE_FORMAT_B8G8R8X8},
-};
-const size_t color_table_format_count = sizeof(color_table_formats)/sizeof(Desc);
-
void queryVideoSurface(VDPDeviceImpl *device)
{
@@ -166,11 +159,24 @@ void queryOutputSurface(VDPDeviceImpl *device)
printf("%s ", ycbcr_types[y].name);
}
}
+
+ for(int y=0; y<indexed_type_count; ++y)
+ {
+ // There is currently only one color table format. This will
+ // have to be reconsidered if additional color table formats are
+ // added.
+ rv = device->OutputSurfaceQueryPutBitsIndexedCapabilities(
+ device->device, rgb_types[x].id, indexed_types[y].id,
+ VDP_COLOR_TABLE_FORMAT_B8G8R8X8, &is_supported);
+ if(rv == VDP_STATUS_OK && is_supported)
+ {
+ printf("%s ", indexed_types[y].name);
+ }
+ }
+
printf("\n");
}
}
- // OutputSurfaceQueryPutBitsIndexedCapabilities
- // rgba, idx, colortable -> supported
}
/***************** Bitmap surface ****************/