Revision 70724cba

View differences:

libavcodec/mpegvideo.c
1210 1210
        avctx->delay=0;
1211 1211
        s->low_delay=1;
1212 1212
        break;
1213
#ifdef CONFIG_H261_ENCODER
1214 1213
    case CODEC_ID_H261:
1214
        if (!ENABLE_H261_ENCODER)  return -1;
1215 1215
        if (ff_h261_get_picture_format(s->width, s->height) < 0) {
1216 1216
            av_log(avctx, AV_LOG_ERROR, "The specified picture size of %dx%d is not valid for the H.261 codec.\nValid sizes are 176x144, 352x288\n", s->width, s->height);
1217 1217
            return -1;
......
1220 1220
        avctx->delay=0;
1221 1221
        s->low_delay=1;
1222 1222
        break;
1223
#endif
1224 1223
    case CODEC_ID_H263:
1225 1224
        if (h263_get_picture_format(s->width, s->height) == 7) {
1226 1225
            av_log(avctx, AV_LOG_INFO, "The specified picture size of %dx%d is not valid for the H.263 codec.\nValid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+.\n", s->width, s->height);
......
1348 1347
    ff_set_cmp(&s->dsp, s->dsp.ildct_cmp, s->avctx->ildct_cmp);
1349 1348
    ff_set_cmp(&s->dsp, s->dsp.frame_skip_cmp, s->avctx->frame_skip_cmp);
1350 1349

  
1351
#ifdef CONFIG_H261_ENCODER
1352
    if (s->out_format == FMT_H261)
1350
    if (ENABLE_H261_ENCODER && s->out_format == FMT_H261)
1353 1351
        ff_h261_encode_init(s);
1354
#endif
1355 1352
    if (s->out_format == FMT_H263)
1356 1353
        h263_encode_init(s);
1357 1354
    if (ENABLE_MSMPEG4_ENCODER && s->msmpeg4_version)
......
3057 3054
        pix_op[s->chroma_x_shift][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift);
3058 3055
        pix_op[s->chroma_x_shift][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift);
3059 3056
    }
3060
#if defined(CONFIG_H261_ENCODER) || defined(CONFIG_H261_DECODER)
3061
    if(s->out_format == FMT_H261){
3057
    if((ENABLE_H261_ENCODER || ENABLE_H261_DECODER) && s->out_format == FMT_H261){
3062 3058
        ff_h261_loop_filter(s);
3063 3059
    }
3064
#endif
3065 3060
}
3066 3061

  
3067 3062
/* apply one mpeg motion vector to the three components */
......
4588 4583
        if (ENABLE_WMV2_ENCODER)
4589 4584
            ff_wmv2_encode_mb(s, s->block, motion_x, motion_y);
4590 4585
        break;
4591
#ifdef CONFIG_H261_ENCODER
4592 4586
    case CODEC_ID_H261:
4587
        if (ENABLE_H261_ENCODER)
4593 4588
        ff_h261_encode_mb(s, s->block, motion_x, motion_y); break;
4594
#endif
4595 4589
    case CODEC_ID_H263:
4596 4590
    case CODEC_ID_H263P:
4597 4591
    case CODEC_ID_FLV1:
......
5000 4994
            s->mb_y = mb_y;  // moved into loop, can get changed by H.261
5001 4995
            ff_update_block_index(s);
5002 4996

  
5003
#ifdef CONFIG_H261_ENCODER
5004
            if(s->codec_id == CODEC_ID_H261){
4997
            if(ENABLE_H261_ENCODER && s->codec_id == CODEC_ID_H261){
5005 4998
                ff_h261_reorder_mb_index(s);
5006 4999
                xy= s->mb_y*s->mb_stride + s->mb_x;
5007 5000
                mb_type= s->mb_type[xy];
5008 5001
            }
5009
#endif
5010 5002

  
5011 5003
            /* write gob / video packet header  */
5012 5004
            if(s->rtp_mode){
......
5773 5765
        if (ENABLE_MJPEG_ENCODER)
5774 5766
            mjpeg_picture_header(s);
5775 5767
        break;
5776
#ifdef CONFIG_H261_ENCODER
5777 5768
    case FMT_H261:
5769
        if (ENABLE_H261_ENCODER)
5778 5770
        ff_h261_encode_picture_header(s, picture_number);
5779 5771
        break;
5780
#endif
5781 5772
    case FMT_H263:
5782 5773
        if (ENABLE_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2)
5783 5774
            ff_wmv2_encode_picture_header(s, picture_number);
......
5785 5776
            msmpeg4_encode_picture_header(s, picture_number);
5786 5777
        else if (s->h263_pred)
5787 5778
            mpeg4_encode_picture_header(s, picture_number);
5788
#ifdef CONFIG_RV10_ENCODER
5789
        else if (s->codec_id == CODEC_ID_RV10)
5779
        else if (ENABLE_RV10_ENCODER && s->codec_id == CODEC_ID_RV10)
5790 5780
            rv10_encode_picture_header(s, picture_number);
5791
#endif
5792
#ifdef CONFIG_RV20_ENCODER
5793
        else if (s->codec_id == CODEC_ID_RV20)
5781
        else if (ENABLE_RV20_ENCODER && s->codec_id == CODEC_ID_RV20)
5794 5782
            rv20_encode_picture_header(s, picture_number);
5795
#endif
5796 5783
        else if (s->codec_id == CODEC_ID_FLV1)
5797 5784
            ff_flv_encode_picture_header(s, picture_number);
5798 5785
        else

Also available in: Unified diff