summaryrefslogtreecommitdiff
path: root/src/libvdpau/vdpau_mpeg12.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libvdpau/vdpau_mpeg12.c')
-rw-r--r--src/libvdpau/vdpau_mpeg12.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libvdpau/vdpau_mpeg12.c b/src/libvdpau/vdpau_mpeg12.c
index 1ac6e398d..5406bcf5a 100644
--- a/src/libvdpau/vdpau_mpeg12.c
+++ b/src/libvdpau/vdpau_mpeg12.c
@@ -176,7 +176,7 @@ typedef struct vdpau_mpeg12_decoder_s {
static void reset_picture( picture_t *pic )
{
- printf( "reset_picture\n" );
+ lprintf( "reset_picture\n" );
pic->vdp_infos.picture_structure = 0;
pic->vdp_infos2.intra_dc_precision = pic->vdp_infos.intra_dc_precision = 0;
pic->vdp_infos2.frame_pred_frame_dct = pic->vdp_infos.frame_pred_frame_dct = 1;
@@ -353,11 +353,11 @@ static void picture_header( sequence_t *sequence, uint8_t *buf, int len )
lprintf( "picture_coding_type: %d\n", get_bits( buf,10,3 ) );
infos->forward_reference = VDP_INVALID_HANDLE;
infos->backward_reference = VDP_INVALID_HANDLE;
- if ( infos->picture_coding_type>1 ) {
+ if ( infos->picture_coding_type > I_FRAME ) {
infos->full_pel_forward_vector = get_bits( buf+2,13,1 );
infos->f_code[0][0] = infos->f_code[0][1] = get_bits( buf+2,14,3 );
- if ( infos->picture_coding_type==3 ) {
- infos->full_pel_forward_vector = get_bits( buf+2,17,1 );
+ if ( infos->picture_coding_type==B_FRAME ) {
+ infos->full_pel_backward_vector = get_bits( buf+2,17,1 );
infos->f_code[1][0] = infos->f_code[1][1] = get_bits( buf+2,18,3 );
}
}
@@ -571,10 +571,10 @@ static void decode_render( vdpau_mpeg12_decoder_t *vd, vdpau_accel_t *accel )
if ( st!=VDP_STATUS_OK )
lprintf( "decoder failed : %d!! %s\n", st, accel->vdp_get_error_string( st ) );
else {
- printf( "DECODER SUCCESS : frame_type:%d, slices=%d, slices_bytes=%d, current=%d, forwref:%d, backref:%d, pts:%lld\n",
+ lprintf( "DECODER SUCCESS : frame_type:%d, slices=%d, slices_bytes=%d, current=%d, forwref:%d, backref:%d, pts:%lld\n",
pic->vdp_infos.picture_coding_type, pic->vdp_infos.slice_count, vbit.bitstream_bytes, accel->surface, pic->vdp_infos.forward_reference, pic->vdp_infos.backward_reference, seq->seq_pts );
VdpPictureInfoMPEG1Or2 *info = &pic->vdp_infos;
- printf("%d %d %d %d %d %d %d %d %d %d %d %d %d\n", info->intra_dc_precision, info->frame_pred_frame_dct, info->concealment_motion_vectors, info->intra_vlc_format, info->alternate_scan, info->q_scale_type, info->top_field_first, info->full_pel_forward_vector, info->full_pel_backward_vector, info->f_code[0][0], info->f_code[0][1], info->f_code[1][0], info->f_code[1][1] );
+ lprintf("%d %d %d %d %d %d %d %d %d %d %d %d %d\n", info->intra_dc_precision, info->frame_pred_frame_dct, info->concealment_motion_vectors, info->intra_vlc_format, info->alternate_scan, info->q_scale_type, info->top_field_first, info->full_pel_forward_vector, info->full_pel_backward_vector, info->f_code[0][0], info->f_code[0][1], info->f_code[1][0], info->f_code[1][1] );
}
if ( pic->vdp_infos.picture_structure != PICTURE_FRAME ) {
@@ -759,7 +759,7 @@ static void vdpau_mpeg12_flush (video_decoder_t *this_gen) {
vdpau_mpeg12_decoder_t *this = (vdpau_mpeg12_decoder_t *) this_gen;
printf( "vdpau_mpeg12: vdpau_mpeg12_flush\n" );
- //reset_sequence( &this->sequence );
+ reset_sequence( &this->sequence );
}
/*
@@ -781,7 +781,7 @@ static void vdpau_mpeg12_discontinuity (video_decoder_t *this_gen) {
vdpau_mpeg12_decoder_t *this = (vdpau_mpeg12_decoder_t *) this_gen;
printf( "vdpau_mpeg12: vdpau_mpeg12_discontinuity\n" );
- //reset_sequence( &this->sequence );
+ reset_sequence( &this->sequence );
}