summaryrefslogtreecommitdiff
path: root/src/libvdpau
diff options
context:
space:
mode:
authorChristophe Thommeret <hftom@free.fr>2008-12-30 10:07:47 +0000
committerChristophe Thommeret <hftom@free.fr>2008-12-30 10:07:47 +0000
commitb6e460a73b8e741a838d9fb0f9d54b5248ee4407 (patch)
tree952737e65db58853a1c581124a723be6d5d91765 /src/libvdpau
parent2d6a44ccb38892f3456e389e12428cc7b320e6c1 (diff)
downloadxine-lib-b6e460a73b8e741a838d9fb0f9d54b5248ee4407.tar.gz
xine-lib-b6e460a73b8e741a838d9fb0f9d54b5248ee4407.tar.bz2
Minor cleanups & fixes.
Diffstat (limited to 'src/libvdpau')
-rw-r--r--src/libvdpau/vdpau_mpeg12.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/libvdpau/vdpau_mpeg12.c b/src/libvdpau/vdpau_mpeg12.c
index 763d3ff17..7978a7682 100644
--- a/src/libvdpau/vdpau_mpeg12.c
+++ b/src/libvdpau/vdpau_mpeg12.c
@@ -101,13 +101,6 @@ uint8_t mpeg2_scan_norm[64] = {
53,60,61,54,47,55,62,63
};
-uint8_t mpeg2_scan_alt[64] = {
- /* Alternate scan pattern */
- 0,8,16,24,1,9,2,10,17,25,32,40,48,56,57,49,
- 41,33,26,18,3,11,4,12,19,27,34,42,50,58,35,43,
- 51,59,20,28,5,13,6,14,21,29,36,44,52,60,37,45,
- 53,61,22,30,7,15,23,31,38,46,54,62,39,47,55,63
-};
typedef struct {
@@ -153,11 +146,13 @@ typedef struct {
} sequence_t;
+
typedef struct {
video_decoder_class_t decoder_class;
} vdpau_mpeg12_class_t;
+
typedef struct vdpau_mpeg12_decoder_s {
video_decoder_t video_decoder; /* parent video decoder structure */
@@ -585,11 +580,6 @@ static void decode_render( vdpau_mpeg12_decoder_t *vd, vdpau_accel_t *accel )
vd->decoder_height = seq->coded_height;
}
}
- /*if ( accel->surface==VDP_INVALID_HANDLE ) {
- st = accel->vdp_video_surface_create( accel->vdp_device, VDP_CHROMA_TYPE_420, seq->coded_width, seq->coded_height, &accel->surface);
- if ( st!=VDP_STATUS_OK )
- lprintf( "failed to create surface !! %s\n", accel->vdp_get_error_string( st ) );
- }*/
VdpBitstreamBuffer vbit;
vbit.struct_version = VDP_BITSTREAM_BUFFER_VERSION;
@@ -688,7 +678,11 @@ static void decode_picture( vdpau_mpeg12_decoder_t *vd )
img->bad_frame = 0;
img->duration = seq->video_step;
- img->top_field_first = pic->vdp_infos.top_field_first;
+ if ( pic->vdp_infos.top_field_first || pic->vdp_infos.picture_structure==PICTURE_FRAME )
+ img->top_field_first = 1;
+ else
+ img->top_field_first = 0;
+
// progressive_frame is unreliable with most mpeg2 streams //img->progressive_frame = pic->progressive_frame;
if ( pic->vdp_infos.picture_coding_type!=B_FRAME ) {