]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vdpau.c
Use "!exp" instead of "exp == NULL" in if condition.
[ffmpeg] / libavcodec / vdpau.c
index 805fe79fe9ab11b28048da1f3136f66dbef6e0f3..4a7c86c0a863d934fc9bc9d92cc019541bf6cb4a 100644 (file)
@@ -147,7 +147,7 @@ void ff_vdpau_h264_picture_complete(MpegEncContext *s)
         render->info.h264.field_order_cnt[i] = foc;
     }
 
-    render->info.h264.is_reference                           = s->current_picture_ptr->reference ? VDP_TRUE : VDP_FALSE;
+    render->info.h264.is_reference                           = (s->current_picture_ptr->reference & 3) ? VDP_TRUE : VDP_FALSE;
     render->info.h264.frame_num                              = h->frame_num;
     render->info.h264.field_pic_flag                         = s->picture_structure != PICT_FRAME;
     render->info.h264.bottom_field_flag                      = s->picture_structure == PICT_BOTTOM_FIELD;
@@ -165,7 +165,7 @@ void ff_vdpau_h264_picture_complete(MpegEncContext *s)
     render->info.h264.num_ref_idx_l1_active_minus1           = h->pps.ref_count[1] - 1;
     render->info.h264.log2_max_frame_num_minus4              = h->sps.log2_max_frame_num - 4;
     render->info.h264.pic_order_cnt_type                     = h->sps.poc_type;
-    render->info.h264.log2_max_pic_order_cnt_lsb_minus4      = h->sps.log2_max_poc_lsb - 4;
+    render->info.h264.log2_max_pic_order_cnt_lsb_minus4      = h->sps.poc_type ? 0 : h->sps.log2_max_poc_lsb - 4;
     render->info.h264.delta_pic_order_always_zero_flag       = h->sps.delta_pic_order_always_zero_flag;
     render->info.h264.direct_8x8_inference_flag              = h->sps.direct_8x8_inference_flag;
     render->info.h264.entropy_coding_mode_flag               = h->pps.cabac;
@@ -270,7 +270,7 @@ void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf,
     /* Specific to simple/main profile only */
     render->info.vc1.multires           = v->multires;
     render->info.vc1.syncmarker         = v->s.resync_marker;
-    render->info.vc1.rangered           = v->rangered;
+    render->info.vc1.rangered           = v->rangered | (v->rangeredfrm << 1);
     render->info.vc1.maxbframes         = v->s.max_b_frames;
 
     render->info.vc1.deblockEnable      = v->postprocflag & 1;