#include "pipe/p_video_decoder.h"
#include "util/u_debug.h"
+#include "util/u_rect.h"
#include "vl/vl_compositor.h"
+#include "vl/vl_matrix_filter.h"
+#include "vl/vl_median_filter.h"
#include "vl_winsys.h"
return PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN;
case VDP_DECODER_PROFILE_H264_HIGH:
return PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH;
+ case VDP_DECODER_PROFILE_MPEG4_PART2_SP:
+ return PIPE_VIDEO_PROFILE_MPEG4_SIMPLE;
+ case VDP_DECODER_PROFILE_MPEG4_PART2_ASP:
+ return PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE;
+ case VDP_DECODER_PROFILE_VC1_SIMPLE:
+ return PIPE_VIDEO_PROFILE_VC1_SIMPLE;
+ case VDP_DECODER_PROFILE_VC1_MAIN:
+ return PIPE_VIDEO_PROFILE_VC1_MAIN;
+ case VDP_DECODER_PROFILE_VC1_ADVANCED:
+ return PIPE_VIDEO_PROFILE_VC1_ADVANCED;
default:
return PIPE_VIDEO_PROFILE_UNKNOWN;
}
return VDP_DECODER_PROFILE_H264_MAIN;
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
return VDP_DECODER_PROFILE_H264_HIGH;
+ case PIPE_VIDEO_PROFILE_MPEG4_SIMPLE:
+ return VDP_DECODER_PROFILE_MPEG4_PART2_SP;
+ case PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE:
+ return VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
+ case PIPE_VIDEO_PROFILE_VC1_SIMPLE:
+ return VDP_DECODER_PROFILE_VC1_SIMPLE;
+ case PIPE_VIDEO_PROFILE_VC1_MAIN:
+ return VDP_DECODER_PROFILE_VC1_MAIN;
+ case PIPE_VIDEO_PROFILE_VC1_ADVANCED:
+ return VDP_DECODER_PROFILE_VC1_ADVANCED;
default:
assert(0);
return -1;
vlVdpDevice *device;
Drawable drawable;
struct vl_compositor compositor;
+ struct u_rect dirty_area;
} vlVdpPresentationQueue;
typedef struct
{
vlVdpDevice *device;
struct vl_compositor compositor;
+
+ struct {
+ bool supported, enabled;
+ unsigned level;
+ struct vl_median_filter *filter;
+ } noise_reduction;
+
+ struct {
+ bool supported, enabled;
+ float value;
+ struct vl_matrix_filter *filter;
+ } sharpness;
+
+ unsigned video_width, video_height;
+ enum pipe_video_chroma_format chroma_format;
+ unsigned max_layers, skip_chroma_deint, custom_csc;
+ float luma_key_min, luma_key_max;
+ float csc[16];
} vlVdpVideoMixer;
typedef struct
{
vlVdpDevice *device;
- struct pipe_video_buffer *video_buffer;
+ struct pipe_video_buffer templat, *video_buffer;
} vlVdpSurface;
typedef uint64_t vlVdpTime;
struct pipe_surface *surface;
struct pipe_sampler_view *sampler_view;
struct pipe_fence_handle *fence;
+ struct u_rect dirty_area;
} vlVdpOutputSurface;
typedef struct
{
vlVdpDevice *device;
struct pipe_video_decoder *decoder;
- unsigned num_buffers;
- void **buffers;
- unsigned cur_buffer;
} vlVdpDecoder;
typedef uint32_t vlHandle;