Revision 15025553 libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
30 30
#include "avcodec.h"
31 31
#include "dsputil.h"
32 32
#include "mpegvideo.h"
33
#include "msmpeg4.h"
33 34
#include "faandct.h"
34 35
#include <limits.h>
35 36

  
......
1354 1355
#endif
1355 1356
    if (s->out_format == FMT_H263)
1356 1357
        h263_encode_init(s);
1357
    if(s->msmpeg4_version)
1358
    if (ENABLE_MSMPEG4_ENCODER && s->msmpeg4_version)
1358 1359
        ff_msmpeg4_encode_init(s);
1359 1360
    if (s->out_format == FMT_MPEG1)
1360 1361
        ff_mpeg1_encode_init(s);
......
3552 3553
                        0, 0, 0,
3553 3554
                        ref_picture, pix_op, qpix_op,
3554 3555
                        s->mv[dir][0][0], s->mv[dir][0][1], 16);
3555
        }else if(s->mspel){
3556
        }else if(ENABLE_WMV2 && s->mspel){
3556 3557
            ff_mspel_motion(s, dest_y, dest_cb, dest_cr,
3557 3558
                        ref_picture, pix_op,
3558 3559
                        s->mv[dir][0][0], s->mv[dir][0][1], 16);
......
4076 4077
                    }
4077 4078
                }//fi gray
4078 4079
            }
4079
            else{
4080
            else if (ENABLE_WMV2) {
4080 4081
                ff_wmv2_add_mb(s, block, dest_y, dest_cb, dest_cr);
4081 4082
            }
4082 4083
        } else {
......
4581 4582
    case CODEC_ID_MSMPEG4V2:
4582 4583
    case CODEC_ID_MSMPEG4V3:
4583 4584
    case CODEC_ID_WMV1:
4585
        if (ENABLE_MSMPEG4_ENCODER)
4584 4586
        msmpeg4_encode_mb(s, s->block, motion_x, motion_y); break;
4585 4587
    case CODEC_ID_WMV2:
4588
        if (ENABLE_WMV2_ENCODER)
4586 4589
         ff_wmv2_encode_mb(s, s->block, motion_x, motion_y); break;
4587 4590
#ifdef CONFIG_H261_ENCODER
4588 4591
    case CODEC_ID_H261:
......
5508 5511
    }
5509 5512

  
5510 5513
    //not beautiful here but we must write it before flushing so it has to be here
5511
    if (s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == I_TYPE)
5514
    if (ENABLE_MSMPEG4_ENCODER && s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == I_TYPE)
5512 5515
        msmpeg4_encode_ext_header(s);
5513 5516

  
5514 5517
    write_slice_end(s);
......
5772 5775
        break;
5773 5776
#endif
5774 5777
    case FMT_H263:
5775
        if (s->codec_id == CODEC_ID_WMV2)
5778
        if (ENABLE_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2)
5776 5779
            ff_wmv2_encode_picture_header(s, picture_number);
5777
        else if (s->h263_msmpeg4)
5780
        else if (ENABLE_MSMPEG4_ENCODER && s->h263_msmpeg4)
5778 5781
            msmpeg4_encode_picture_header(s, picture_number);
5779 5782
        else if (s->h263_pred)
5780 5783
            mpeg4_encode_picture_header(s, picture_number);

Also available in: Unified diff