summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2009-09-04 12:27:12 -0700
committerAaron Plattner <aplattner@nvidia.com>2009-09-04 12:27:12 -0700
commit46e791147ac43ecd2fbfbc6bdf3bebda9030b51e (patch)
tree2f2dcdacb58a58096c3f8423f66400d79099cf24
parent50925e6b95aa9eaebd26c35f1f8f6af7acec4814 (diff)
Updates for the NVIDIA 190.32 driver release.
Add profiles for MPEG-4 part 2, DivX 4, and DivX 5. Also add new high quality scaling options.
-rw-r--r--include/vdpau/vdpau.h146
-rw-r--r--trace/vdpau_trace.cpp56
2 files changed, 201 insertions, 1 deletions
diff --git a/include/vdpau/vdpau.h b/include/vdpau/vdpau.h
index 110b3af..7648008 100644
--- a/include/vdpau/vdpau.h
+++ b/include/vdpau/vdpau.h
@@ -6,7 +6,7 @@
/*
* This copyright notice applies to this header file:
*
- * Copyright (c) 2008 NVIDIA Corporation
+ * Copyright (c) 2008-2009 NVIDIA Corporation
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -2358,6 +2358,26 @@ typedef uint32_t VdpDecoderProfile;
#define VDP_DECODER_PROFILE_VC1_MAIN (VdpDecoderProfile)10
/** \hideinitializer */
#define VDP_DECODER_PROFILE_VC1_ADVANCED (VdpDecoderProfile)11
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_MPEG4_PART2_SP (VdpDecoderProfile)12
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_MPEG4_PART2_ASP (VdpDecoderProfile)13
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_DIVX4_QMOBILE (VdpDecoderProfile)14
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_DIVX4_MOBILE (VdpDecoderProfile)15
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_DIVX4_HOME_THEATER (VdpDecoderProfile)16
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_DIVX4_HD_1080P (VdpDecoderProfile)17
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_DIVX5_QMOBILE (VdpDecoderProfile)18
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_DIVX5_MOBILE (VdpDecoderProfile)19
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_DIVX5_HOME_THEATER (VdpDecoderProfile)20
+/** \hideinitializer */
+#define VDP_DECODER_PROFILE_DIVX5_HD_1080P (VdpDecoderProfile)21
/** \hideinitializer */
#define VDP_DECODER_LEVEL_MPEG1_NA 0
@@ -2427,6 +2447,31 @@ typedef uint32_t VdpDecoderProfile;
/** \hideinitializer */
#define VDP_DECODER_LEVEL_VC1_ADVANCED_L4 4
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L0 0
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L1 1
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L2 2
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L3 3
+
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L0 0
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L1 1
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L2 2
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L3 3
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L4 4
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L5 5
+
+/** \hideinitializer */
+#define VDP_DECODER_LEVEL_DIVX_NA 0
+
/**
* \brief Query the implementation's VdpDecoder capabilities.
* \param[in] device The device to query.
@@ -2824,6 +2869,75 @@ typedef struct {
} VdpPictureInfoVC1;
/**
+ * \brief Picture parameter information for an MPEG-4 Part 2 picture.
+ *
+ * Note: References to "copy of bitstream field" in the field descriptions
+ * may refer to data literally parsed from the bitstream, or derived from
+ * the bitstream using a mechanism described in the specification.
+ */
+typedef struct {
+ /**
+ * Reference used by B and P frames.
+ * Set to VDP_INVALID_HANDLE when not used.
+ */
+ VdpVideoSurface forward_reference;
+ /**
+ * Reference used by B frames.
+ * Set to VDP_INVALID_HANDLE when not used.
+ */
+ VdpVideoSurface backward_reference;
+
+ /** Copy of the bitstream field. */
+ int32_t trd[2];
+ /** Copy of the bitstream field. */
+ int32_t trb[2];
+ /** Copy of the bitstream field. */
+ uint16_t vop_time_increment_resolution;
+ /** Copy of the bitstream field. */
+ uint8_t vop_coding_type;
+ /** Copy of the bitstream field. */
+ uint8_t vop_fcode_forward;
+ /** Copy of the bitstream field. */
+ uint8_t vop_fcode_backward;
+ /** Copy of the bitstream field. */
+ uint8_t resync_marker_disable;
+ /** Copy of the bitstream field. */
+ uint8_t interlaced;
+ /** Copy of the bitstream field. */
+ uint8_t quant_type;
+ /** Copy of the bitstream field. */
+ uint8_t quarter_sample;
+ /** Copy of the bitstream field. */
+ uint8_t short_video_header;
+ /** Derived from vop_rounding_type bitstream field. */
+ uint8_t rounding_control;
+ /** Copy of the bitstream field. */
+ uint8_t alternate_vertical_scan_flag;
+ /** Copy of the bitstream field. */
+ uint8_t top_field_first;
+ /** Copy of the bitstream field. */
+ uint8_t intra_quantizer_matrix[64];
+ /** Copy of the bitstream field. */
+ uint8_t non_intra_quantizer_matrix[64];
+} VdpPictureInfoMPEG4Part2;
+
+/**
+ * \brief Picture parameter information for a DivX 4 picture.
+ *
+ * Due to similarites between MPEG-4 Part 2 and DivX 4, the picture
+ * parameter structure is re-used.
+ */
+typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX4;
+
+/**
+ * \brief Picture parameter information for a DivX 5 picture.
+ *
+ * Due to similarites between MPEG-4 Part 2 and DivX 5, the picture
+ * parameter structure is re-used.
+ */
+typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX5;
+
+/**
* \brief Decode a compressed field/frame and render the result
* into a \ref VdpVideoSurface "VdpVideoSurface".
* \param[in] decoder The decoder object that will perform the
@@ -2993,6 +3107,36 @@ typedef uint32_t VdpVideoMixerFeature;
* keying is performed after scaling and de-interlacing.
*/
#define VDP_VIDEO_MIXER_FEATURE_LUMA_KEY (VdpVideoMixerFeature)5
+/**
+ * \hideinitializer
+ * \brief A VdpVideoMixerFeature.
+ *
+ * A VDPAU implementation may support multiple scaling algorithms of
+ * differing quality, and may potentially support a different subset
+ * of algorithms on different hardware.
+ *
+ * In some cases, higher quality algorithms may require more resources
+ * (memory size, memory bandwidth, etc.) to operate. Hence, these high
+ * quality algorithms must be explicitly requested and enabled by the client
+ * application. This allows applications operating in a resource-constrained
+ * environment to have some level of control over resource usage.
+ *
+ * Basic scaling is always built into any video mixer, and is known as
+ * level 0. Scaling quality increases beginning with optional level 1,
+ * through optional level 9.
+ *
+ * If an application requests and enables multiple high quality scaling
+ * algorithms, the highest level enabled scaling algorithm will be used.
+ */
+#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 (VdpVideoMixerFeature)11
+#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L2 (VdpVideoMixerFeature)12
+#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3 (VdpVideoMixerFeature)13
+#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L4 (VdpVideoMixerFeature)14
+#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5 (VdpVideoMixerFeature)15
+#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L6 (VdpVideoMixerFeature)16
+#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L7 (VdpVideoMixerFeature)17
+#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L8 (VdpVideoMixerFeature)18
+#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L9 (VdpVideoMixerFeature)19
/**
* \brief A VdpVideoMixer creation parameter.
diff --git a/trace/vdpau_trace.cpp b/trace/vdpau_trace.cpp
index 7225baa..35fe095 100644
--- a/trace/vdpau_trace.cpp
+++ b/trace/vdpau_trace.cpp
@@ -444,6 +444,62 @@ static void _vdp_cap_dump_picture_info(
);
}
break;
+ case VDP_DECODER_PROFILE_MPEG4_PART2_SP:
+ case VDP_DECODER_PROFILE_MPEG4_PART2_ASP:
+ case VDP_DECODER_PROFILE_DIVX4_QMOBILE:
+ case VDP_DECODER_PROFILE_DIVX4_MOBILE:
+ case VDP_DECODER_PROFILE_DIVX4_HOME_THEATER:
+ case VDP_DECODER_PROFILE_DIVX4_HD_1080P:
+ case VDP_DECODER_PROFILE_DIVX5_QMOBILE:
+ case VDP_DECODER_PROFILE_DIVX5_MOBILE:
+ case VDP_DECODER_PROFILE_DIVX5_HOME_THEATER:
+ case VDP_DECODER_PROFILE_DIVX5_HD_1080P:
+ {
+ VdpPictureInfoMPEG4Part2 const * picture_info_mpeg4 =
+ (VdpPictureInfoMPEG4Part2 const *)picture_info;
+
+ fprintf(
+ _vdp_cap_data.fp,
+ "{%u, %u, {%d, %d}, {%d, %d}, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, {",
+ picture_info_mpeg4->forward_reference,
+ picture_info_mpeg4->backward_reference,
+ (int32_t)picture_info_mpeg4->trd[0],
+ (int32_t)picture_info_mpeg4->trd[1],
+ (int32_t)picture_info_mpeg4->trb[0],
+ (int32_t)picture_info_mpeg4->trb[1],
+ (uint32_t)picture_info_mpeg4->vop_time_increment_resolution,
+ (uint32_t)picture_info_mpeg4->vop_coding_type,
+ (uint32_t)picture_info_mpeg4->vop_fcode_forward,
+ (uint32_t)picture_info_mpeg4->vop_fcode_backward,
+ (uint32_t)picture_info_mpeg4->resync_marker_disable,
+ (uint32_t)picture_info_mpeg4->interlaced,
+ (uint32_t)picture_info_mpeg4->quant_type,
+ (uint32_t)picture_info_mpeg4->quarter_sample,
+ (uint32_t)picture_info_mpeg4->short_video_header,
+ (uint32_t)picture_info_mpeg4->rounding_control,
+ (uint32_t)picture_info_mpeg4->alternate_vertical_scan_flag,
+ (uint32_t)picture_info_mpeg4->top_field_first
+ );
+ for (uint32_t i = 0; i < _VDP_TRACE_ARSIZE(picture_info_mpeg4->intra_quantizer_matrix); ++i) {
+ fprintf(
+ _vdp_cap_data.fp,
+ "%s%u",
+ (i == 0) ? "" : ", ",
+ (uint32_t)picture_info_mpeg4->intra_quantizer_matrix[i]
+ );
+ }
+ fputs("}, {", _vdp_cap_data.fp);
+ for (uint32_t i = 0; i < _VDP_TRACE_ARSIZE(picture_info_mpeg4->non_intra_quantizer_matrix); ++i) {
+ fprintf(
+ _vdp_cap_data.fp,
+ "%s%u",
+ (i == 0) ? "" : ", ",
+ (uint32_t)picture_info_mpeg4->non_intra_quantizer_matrix[i]
+ );
+ }
+ fputs("}}", _vdp_cap_data.fp);
+ }
+ break;
default:
fputs("{...}", _vdp_cap_data.fp);
break;