Revision 7604246d libavcodec/msmpeg4.c

View differences:

libavcodec/msmpeg4.c
53 53
static uint32_t v2_dc_lum_table[512][2];
54 54
static uint32_t v2_dc_chroma_table[512][2];
55 55

  
56
#ifdef CONFIG_ENCODERS
56 57
static inline void msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n);
58
#endif //CONFIG_ENCODERS
57 59
static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
58 60
                                       int n, int coded, const uint8_t *scantable);
59 61
static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
60 62
static int msmpeg4_decode_motion(MpegEncContext * s, 
61 63
                                 int *mx_ptr, int *my_ptr);
64
#ifdef CONFIG_ENCODERS
62 65
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val);
66
#endif //CONFIG_ENCODERS
63 67
static void init_h263_dc_for_msmpeg4(void);
64 68
static inline void msmpeg4_memsetw(short *tab, int val, int n);
69
#ifdef CONFIG_ENCODERS
65 70
static int get_size_of_code(MpegEncContext * s, RLTable *rl, int last, int run, int level, int intra);
71
#endif //CONFIG_ENCODERS
66 72
static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
67 73
static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
68 74
static int wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
......
185 191
    }
186 192
}
187 193

  
194
#ifdef CONFIG_ENCODERS
195

  
188 196
/* build the table which associate a (x,y) motion vector to a vlc */
189 197
static void init_mv_table(MVTable *tab)
190 198
{
......
433 441
        }
434 442
}
435 443

  
444
#endif //CONFIG_ENCODERS
445

  
436 446
/* predict coded block */
437 447
static inline int coded_block_pred(MpegEncContext * s, int n, uint8_t **coded_block_ptr)
438 448
{
......
460 470
    return pred;
461 471
}
462 472

  
473
#ifdef CONFIG_ENCODERS
474

  
463 475
static void msmpeg4_encode_motion(MpegEncContext * s, 
464 476
                                  int mx, int my)
465 477
{
......
624 636
    }
625 637
}
626 638

  
639
#endif //CONFIG_ENCODERS
640

  
627 641
/* old ffmpeg msmpeg4v3 mode */
628 642
static void ff_old_msmpeg4_dc_scale(MpegEncContext * s)
629 643
{
......
817 831

  
818 832
#define DC_MAX 119
819 833

  
834
#ifdef CONFIG_ENCODERS
835

  
820 836
static void msmpeg4_encode_dc(MpegEncContext * s, int level, int n, int *dir_ptr)
821 837
{
822 838
    int sign, code;
......
1009 1025
    }
1010 1026
}
1011 1027

  
1028
#endif //CONFIG_ENCODERS
1029

  
1012 1030
/****************************************/
1013 1031
/* decoding stuff */
1014 1032

  
......
1391 1409
        tab[i] = val;
1392 1410
}
1393 1411

  
1412
#ifdef CONFIG_ENCODERS
1413

  
1394 1414
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val)
1395 1415
{
1396 1416
    int range, bit_size, sign, code, bits;
......
1424 1444
    }
1425 1445
}
1426 1446

  
1447
#endif //CONFIG_ENCODERS
1448

  
1427 1449
/* this is identical to h263 except that its range is multiplied by 2 */
1428 1450
static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code)
1429 1451
{

Also available in: Unified diff