changeset 279:ae5c33165d5c libavcodec

mpeg1 & epzs fix
author michaelni
date Fri, 22 Mar 2002 04:35:46 +0000
parents 6a5293bc8089
children 3dc1ca4ba717
files mpegvideo.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Fri Mar 22 02:36:08 2002 +0000
+++ b/mpegvideo.c	Fri Mar 22 04:35:46 2002 +0000
@@ -174,7 +174,7 @@
         }
     }
     
-    if (s->out_format == FMT_H263) {
+    if (s->out_format == FMT_H263 || s->encoding) {
         int size;
         /* MV prediction */
         size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2);
@@ -961,8 +961,9 @@
     else if (s->h263_pred || s->h263_aic)
         s->mbintra_table[mb_x + mb_y*s->mb_width]=1;
 
-    /* update motion predictor, not for B-frames as they need the motion_val from the last P/S-Frame */
-    if (s->out_format == FMT_H263) {
+    /* update motion predictor, not for B-frames as they need the motion_val from the last P/S-Frame 
+       motion_val is needed for encodig too, as the ME needs it */
+    if (s->out_format == FMT_H263 || s->encoding) {
       if(s->pict_type!=B_TYPE){
         int xy, wrap, motion_x, motion_y;