Commit 49fb20cb authored by Aurelien Jacobs's avatar Aurelien Jacobs

replace all occurrence of ENABLE_ by the corresponding CONFIG_, HAVE_ or ARCH_

and remove all ENABLE_ definitions.

Originally committed as revision 16600 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 7356aaa7
......@@ -427,11 +427,9 @@ print_config(){
ucname="`toupper $cfg`"
if enabled $cfg; then
echo "#define ${pfx}${ucname} 1" >> $header
echo "#define ENABLE_${ucname} 1" >> $header
echo "${pfx}${ucname}=yes" >> $makefile
else
echo "#define ${pfx}${ucname} 0" >> $header
echo "#define ENABLE_${ucname} 0" >> $header
fi
done
}
......
......@@ -768,7 +768,7 @@ static void pre_process_video_frame(AVInputStream *ist, AVPicture *picture, void
picture2 = picture;
}
if (ENABLE_VHOOK)
if (CONFIG_VHOOK)
frame_hook_process(picture2, dec->pix_fmt, dec->width, dec->height,
1000000 * ist->pts / AV_TIME_BASE);
......
......@@ -28,18 +28,18 @@
#define REGISTER_ENCODER(X,x) { \
extern AVCodec x##_encoder; \
if(ENABLE_##X##_ENCODER) register_avcodec(&x##_encoder); }
if(CONFIG_##X##_ENCODER) register_avcodec(&x##_encoder); }
#define REGISTER_DECODER(X,x) { \
extern AVCodec x##_decoder; \
if(ENABLE_##X##_DECODER) register_avcodec(&x##_decoder); }
if(CONFIG_##X##_DECODER) register_avcodec(&x##_decoder); }
#define REGISTER_ENCDEC(X,x) REGISTER_ENCODER(X,x); REGISTER_DECODER(X,x)
#define REGISTER_PARSER(X,x) { \
extern AVCodecParser x##_parser; \
if(ENABLE_##X##_PARSER) av_register_codec_parser(&x##_parser); }
if(CONFIG_##X##_PARSER) av_register_codec_parser(&x##_parser); }
#define REGISTER_BSF(X,x) { \
extern AVBitStreamFilter x##_bsf; \
if(ENABLE_##X##_BSF) av_register_bitstream_filter(&x##_bsf); }
if(CONFIG_##X##_BSF) av_register_bitstream_filter(&x##_bsf); }
void avcodec_register_all(void)
{
......
......@@ -118,7 +118,7 @@ static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block)
int mm_support(void)
{
return ENABLE_IWMMXT * FF_MM_IWMMXT;
return HAVE_IWMMXT * FF_MM_IWMMXT;
}
void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
......
......@@ -82,7 +82,7 @@ void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
if(length==0) return;
if(ENABLE_SMALL || words < 16 || put_bits_count(pb)&7){
if(CONFIG_SMALL || words < 16 || put_bits_count(pb)&7){
for(i=0; i<words; i++) put_bits(pb, 16, be2me_16(srcw[i]));
}else{
for(i=0; put_bits_count(pb)&31; i++)
......
......@@ -2842,7 +2842,7 @@ static void put_mspel8_mc22_c(uint8_t *dst, uint8_t *src, int stride){
}
static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
if(ENABLE_ANY_H263) {
if(CONFIG_ANY_H263) {
int x;
const int strength= ff_h263_loop_filter_strength[qscale];
......@@ -2879,7 +2879,7 @@ static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
}
static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){
if(ENABLE_ANY_H263) {
if(CONFIG_ANY_H263) {
int y;
const int strength= ff_h263_loop_filter_strength[qscale];
......@@ -4285,7 +4285,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
#endif //CONFIG_ENCODERS
if(avctx->lowres==1){
if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !ENABLE_H264_DECODER){
if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !CONFIG_H264_DECODER){
c->idct_put= ff_jref_idct4_put;
c->idct_add= ff_jref_idct4_add;
}else{
......@@ -4310,7 +4310,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
c->idct_add= ff_jref_idct_add;
c->idct = j_rev_dct;
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
}else if((ENABLE_VP3_DECODER || ENABLE_VP5_DECODER || ENABLE_VP6_DECODER || ENABLE_THEORA_DECODER ) &&
}else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER || CONFIG_THEORA_DECODER ) &&
avctx->idct_algo==FF_IDCT_VP3){
c->idct_put= ff_vp3_idct_put_c;
c->idct_add= ff_vp3_idct_add_c;
......@@ -4326,7 +4326,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
c->idct_add= ff_faanidct_add;
c->idct = ff_faanidct;
c->idct_permutation_type= FF_NO_IDCT_PERM;
}else if(ENABLE_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
}else if(CONFIG_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
c->idct_put= ff_ea_idct_put_c;
c->idct_permutation_type= FF_NO_IDCT_PERM;
}else{ //accurate/default
......@@ -4337,7 +4337,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
}
}
if (ENABLE_H264_DECODER) {
if (CONFIG_H264_DECODER) {
c->h264_idct_add= ff_h264_idct_add_c;
c->h264_idct8_add= ff_h264_idct8_add_c;
c->h264_idct_dc_add= ff_h264_idct_dc_add_c;
......@@ -4572,12 +4572,12 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_c;
c->h264_loop_filter_strength= NULL;
if (ENABLE_ANY_H263) {
if (CONFIG_ANY_H263) {
c->h263_h_loop_filter= h263_h_loop_filter_c;
c->h263_v_loop_filter= h263_v_loop_filter_c;
}
if (ENABLE_VP3_DECODER || ENABLE_THEORA_DECODER) {
if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
c->vp3_h_loop_filter= ff_vp3_h_loop_filter_c;
c->vp3_v_loop_filter= ff_vp3_v_loop_filter_c;
}
......@@ -4623,15 +4623,15 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
memset(c->put_2tap_qpel_pixels_tab, 0, sizeof(c->put_2tap_qpel_pixels_tab));
memset(c->avg_2tap_qpel_pixels_tab, 0, sizeof(c->avg_2tap_qpel_pixels_tab));
if (ENABLE_MMX) dsputil_init_mmx (c, avctx);
if (ENABLE_ARM) dsputil_init_arm (c, avctx);
if (ENABLE_MLIB) dsputil_init_mlib (c, avctx);
if (ENABLE_VIS) dsputil_init_vis (c, avctx);
if (ENABLE_ALPHA) dsputil_init_alpha (c, avctx);
if (ENABLE_PPC) dsputil_init_ppc (c, avctx);
if (ENABLE_MMI) dsputil_init_mmi (c, avctx);
if (ENABLE_SH4) dsputil_init_sh4 (c, avctx);
if (ENABLE_BFIN) dsputil_init_bfin (c, avctx);
if (HAVE_MMX) dsputil_init_mmx (c, avctx);
if (ARCH_ARM) dsputil_init_arm (c, avctx);
if (CONFIG_MLIB) dsputil_init_mlib (c, avctx);
if (HAVE_VIS) dsputil_init_vis (c, avctx);
if (ARCH_ALPHA) dsputil_init_alpha (c, avctx);
if (ARCH_PPC) dsputil_init_ppc (c, avctx);
if (HAVE_MMI) dsputil_init_mmi (c, avctx);
if (ARCH_SH4) dsputil_init_sh4 (c, avctx);
if (ARCH_BFIN) dsputil_init_bfin (c, avctx);
for(i=0; i<64; i++){
if(!c->put_2tap_qpel_pixels_tab[0][i])
......
......@@ -62,7 +62,7 @@ typedef struct DVVideoContext {
#define TEX_VLC_BITS 9
#if ENABLE_SMALL
#if CONFIG_SMALL
#define DV_VLC_MAP_RUN_SIZE 15
#define DV_VLC_MAP_LEV_SIZE 23
#else
......@@ -326,7 +326,7 @@ static av_cold int dvvideo_init(AVCodecContext *avctx)
for (i = 0; i < NB_DV_VLC - 1; i++) {
if (dv_vlc_run[i] >= DV_VLC_MAP_RUN_SIZE)
continue;
#if ENABLE_SMALL
#if CONFIG_SMALL
if (dv_vlc_level[i] >= DV_VLC_MAP_LEV_SIZE)
continue;
#endif
......@@ -340,7 +340,7 @@ static av_cold int dvvideo_init(AVCodecContext *avctx)
dv_vlc_len[i] + (!!dv_vlc_level[i]);
}
for (i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) {
#if ENABLE_SMALL
#if CONFIG_SMALL
for (j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) {
if (dv_vlc_map[i][j].size == 0) {
dv_vlc_map[i][j].vlc = dv_vlc_map[0][j].vlc |
......@@ -692,7 +692,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, DVwork_chunk *work_chu
return 0;
}
#if ENABLE_SMALL
#if CONFIG_SMALL
/* Converts run and level (where level != 0) pair into vlc, returning bit size */
static av_always_inline int dv_rl2vlc(int run, int level, int sign, uint32_t* vlc)
{
......
......@@ -2355,7 +2355,7 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n
{
int vo_ver_id;
if (!ENABLE_MPEG4_ENCODER) return;
if (!CONFIG_MPEG4_ENCODER) return;
if(s->max_b_frames || s->quarter_sample){
vo_ver_id= 5;
......
......@@ -25,22 +25,22 @@
#include "config.h"
#include "msmpeg4.h"
#define ENABLE_ANY_H263_DECODER (ENABLE_H263_DECODER || \
ENABLE_H263I_DECODER || \
ENABLE_FLV_DECODER || \
ENABLE_RV10_DECODER || \
ENABLE_RV20_DECODER || \
ENABLE_MPEG4_DECODER || \
ENABLE_MSMPEG4_DECODER || \
ENABLE_WMV_DECODER)
#define ENABLE_ANY_H263_ENCODER (ENABLE_H263_ENCODER || \
ENABLE_H263P_ENCODER || \
ENABLE_FLV_ENCODER || \
ENABLE_RV10_ENCODER || \
ENABLE_RV20_ENCODER || \
ENABLE_MPEG4_ENCODER || \
ENABLE_MSMPEG4_ENCODER || \
ENABLE_WMV_ENCODER)
#define ENABLE_ANY_H263 (ENABLE_ANY_H263_DECODER || ENABLE_ANY_H263_ENCODER)
#define CONFIG_ANY_H263_DECODER (CONFIG_H263_DECODER || \
CONFIG_H263I_DECODER || \
CONFIG_FLV_DECODER || \
CONFIG_RV10_DECODER || \
CONFIG_RV20_DECODER || \
CONFIG_MPEG4_DECODER || \
CONFIG_MSMPEG4_DECODER || \
CONFIG_WMV_DECODER)
#define CONFIG_ANY_H263_ENCODER (CONFIG_H263_ENCODER || \
CONFIG_H263P_ENCODER || \
CONFIG_FLV_ENCODER || \
CONFIG_RV10_ENCODER || \
CONFIG_RV20_ENCODER || \
CONFIG_MPEG4_ENCODER || \
CONFIG_MSMPEG4_ENCODER || \
CONFIG_WMV_ENCODER)
#define CONFIG_ANY_H263 (CONFIG_ANY_H263_DECODER || CONFIG_ANY_H263_ENCODER)
#endif /* AVCODEC_H263_H */
......@@ -111,7 +111,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
if (MPV_common_init(s) < 0)
return -1;
if (ENABLE_MSMPEG4_DECODER && s->h263_msmpeg4)
if (CONFIG_MSMPEG4_DECODER && s->h263_msmpeg4)
ff_msmpeg4_decode_init(s);
else
h263_decode_init_vlc(s);
......@@ -355,9 +355,9 @@ uint64_t time= rdtsc();
if(s->flags&CODEC_FLAG_TRUNCATED){
int next;
if(ENABLE_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size);
}else if(ENABLE_H263_DECODER && s->codec_id==CODEC_ID_H263){
}else if(CONFIG_H263_DECODER && s->codec_id==CODEC_ID_H263){
next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size);
}else{
av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n");
......@@ -390,9 +390,9 @@ retry:
}
/* let's go :-) */
if (ENABLE_WMV2_DECODER && s->msmpeg4_version==5) {
if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5) {
ret= ff_wmv2_decode_picture_header(s);
} else if (ENABLE_MSMPEG4_DECODER && s->msmpeg4_version) {
} else if (CONFIG_MSMPEG4_DECODER && s->msmpeg4_version) {
ret = msmpeg4_decode_picture_header(s);
} else if (s->h263_pred) {
if(s->avctx->extradata_size && s->picture_number==0){
......@@ -620,7 +620,7 @@ retry:
//the second part of the wmv2 header contains the MB skip bits which are stored in current_picture->mb_type
//which is not available before MPV_frame_start()
if (ENABLE_WMV2_DECODER && s->msmpeg4_version==5){
if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5){
ret = ff_wmv2_decode_secondary_picture_header(s);
if(ret<0) return ret;
if(ret==1) goto intrax8_decoded;
......@@ -647,7 +647,7 @@ retry:
}
if (s->h263_msmpeg4 && s->msmpeg4_version<4 && s->pict_type==FF_I_TYPE)
if(!ENABLE_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
if(!CONFIG_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
s->error_status_table[s->mb_num-1]= AC_ERROR|DC_ERROR|MV_ERROR;
}
......
......@@ -1641,7 +1641,7 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square,
qpix_op[luma_xy](dest_y + delta, src_y + delta, h->mb_linesize);
}
if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
if(MB_FIELD){
// chroma offset when predicting from a field of opposite parity
......@@ -2286,7 +2286,7 @@ static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src
if(!MB_MBAFF){
*(uint64_t*)(h->top_borders[0][s->mb_x]+ 0)= *(uint64_t*)(src_y + 15*linesize);
*(uint64_t*)(h->top_borders[0][s->mb_x]+ 8)= *(uint64_t*)(src_y +8+15*linesize);
if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
*(uint64_t*)(h->top_borders[0][s->mb_x]+16)= *(uint64_t*)(src_cb+7*uvlinesize);
*(uint64_t*)(h->top_borders[0][s->mb_x]+24)= *(uint64_t*)(src_cr+7*uvlinesize);
}
......@@ -2294,7 +2294,7 @@ static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src
}else{
if(!MB_MBAFF){
h->left_border[0]= h->top_borders[0][s->mb_x][15];
if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
h->left_border[34 ]= h->top_borders[0][s->mb_x][16+7 ];
h->left_border[34+18]= h->top_borders[0][s->mb_x][16+8+7];
}
......@@ -2317,7 +2317,7 @@ static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src
*(uint64_t*)(h->top_borders[top_idx][s->mb_x]+0)= *(uint64_t*)(src_y + 16*linesize);
*(uint64_t*)(h->top_borders[top_idx][s->mb_x]+8)= *(uint64_t*)(src_y +8+16*linesize);
if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
h->left_border[uvoffset+34 ]= h->top_borders[top_idx][s->mb_x][16+7];
h->left_border[uvoffset+34+18]= h->top_borders[top_idx][s->mb_x][24+7];
for(i=1; i<9 - skiplast; i++){
......@@ -2387,7 +2387,7 @@ b= t;
}
}
if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(deblock_left){
for(i = !deblock_top; i<8; i++){
XCHG(h->left_border[uvoffset+34 +i*step], src_cb[i*uvlinesize], temp8, xchg);
......@@ -2415,7 +2415,7 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){
int *block_offset = &h->block_offset[0];
const int transform_bypass = !simple && (s->qscale == 0 && h->sps.transform_bypass);
/* is_h264 should always be true if SVQ3 is disabled. */
const int is_h264 = !ENABLE_SVQ3_DECODER || simple || s->codec_id == CODEC_ID_H264;
const int is_h264 = !CONFIG_SVQ3_DECODER || simple || s->codec_id == CODEC_ID_H264;
void (*idct_add)(uint8_t *dst, DCTELEM *block, int stride);
void (*idct_dc_add)(uint8_t *dst, DCTELEM *block, int stride);
......@@ -2471,7 +2471,7 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){
if(h->deblocking_filter)
xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 1, simple);
if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
h->hpc.pred8x8[ h->chroma_pred_mode ](dest_cb, uvlinesize);
h->hpc.pred8x8[ h->chroma_pred_mode ](dest_cr, uvlinesize);
}
......@@ -2606,7 +2606,7 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){
}
}
if((simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)) && (h->cbp&0x30)){
if((simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)) && (h->cbp&0x30)){
uint8_t *dest[2] = {dest_cb, dest_cr};
if(transform_bypass){
if(IS_INTRA(mb_type) && h->sps.profile_idc==244 && (h->chroma_pred_mode==VERT_PRED8x8 || h->chroma_pred_mode==HOR_PRED8x8)){
......@@ -2676,9 +2676,9 @@ static void hl_decode_mb(H264Context *h){
MpegEncContext * const s = &h->s;
const int mb_xy= h->mb_xy;
const int mb_type= s->current_picture.mb_type[mb_xy];
int is_complex = ENABLE_SMALL || h->is_complex || IS_INTRA_PCM(mb_type) || s->qscale == 0;
int is_complex = CONFIG_SMALL || h->is_complex || IS_INTRA_PCM(mb_type) || s->qscale == 0;
if(ENABLE_H264_ENCODER && !s->decode)
if(CONFIG_H264_ENCODER && !s->decode)
return;
if (is_complex)
......@@ -6589,7 +6589,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
s->mb_skip_run= -1;
h->is_complex = FRAME_MBAFF || s->picture_structure != PICT_FRAME || s->codec_id != CODEC_ID_H264 ||
(ENABLE_GRAY && (s->flags&CODEC_FLAG_GRAY)) || (ENABLE_H264_ENCODER && s->encoding);
(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY)) || (CONFIG_H264_ENCODER && s->encoding);
if( h->pps.cabac ) {
int i;
......@@ -7423,7 +7423,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
&& (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=FF_B_TYPE)
&& (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE)
&& avctx->skip_frame < AVDISCARD_ALL){
if(ENABLE_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU){
if(CONFIG_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU){
static const uint8_t start_code[] = {0x00, 0x00, 0x01};
ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code));
ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed], consumed );
......@@ -7624,7 +7624,7 @@ static int decode_frame(AVCodecContext *avctx,
s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264;
s->current_picture_ptr->pict_type= s->pict_type;
if (ENABLE_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU)
if (CONFIG_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU)
ff_vdpau_h264_set_reference_frames(s);
if(!s->dropable) {
......@@ -7635,7 +7635,7 @@ static int decode_frame(AVCodecContext *avctx,
h->prev_frame_num_offset= h->frame_num_offset;
h->prev_frame_num= h->frame_num;
if (ENABLE_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU)
if (CONFIG_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU)
ff_vdpau_h264_picture_complete(s);
/*
......
......@@ -86,8 +86,8 @@
#define CHROMA 1
#endif
#ifndef ENABLE_H264_ENCODER
#define ENABLE_H264_ENCODER 0
#ifndef CONFIG_H264_ENCODER
#define CONFIG_H264_ENCODER 0
#endif
#define EXTENDED_SAR 255
......
......@@ -977,7 +977,7 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s)
skip_bits(&s->gb, 8);
if(s->lossless){
if(ENABLE_JPEGLS_DECODER && s->ls){
if(CONFIG_JPEGLS_DECODER && s->ls){
// for(){
// reset_ls_coding_parameters(s, 0);
......@@ -1418,7 +1418,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
return -1;
break;
case LSE:
if (!ENABLE_JPEGLS_DECODER || ff_jpegls_decode_lse(s) < 0)
if (!CONFIG_JPEGLS_DECODER || ff_jpegls_decode_lse(s) < 0)
return -1;
break;
case EOI:
......
......@@ -1448,7 +1448,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based,
src_x, src_y<<field_based, h_edge_pos, v_edge_pos);
ptr_y = s->edge_emu_buffer;
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
ff_emulated_edge_mc(uvbuf , ptr_cb, s->uvlinesize, 9, 9+field_based,
uvsrc_x, uvsrc_y<<field_based, h_edge_pos>>1, v_edge_pos>>1);
......@@ -1475,7 +1475,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
sy <<= 2 - lowres;
pix_op[lowres-1](dest_y, ptr_y, linesize, h, sx, sy);
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
uvsx <<= 2 - lowres;
uvsy <<= 2 - lowres;
pix_op[lowres](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
......@@ -1581,7 +1581,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s,
my += s->mv[dir][i][1];
}
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))
chroma_4mv_motion_lowres(s, dest_cb, dest_cr, ref_picture, pix_op, mx, my);
break;
case MV_TYPE_FIELD:
......@@ -1870,7 +1870,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
add_dequant_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
add_dequant_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if (s->chroma_y_shift){
add_dequant_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
add_dequant_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
......@@ -1889,7 +1889,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize);
add_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize);
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(s->chroma_y_shift){//Chroma420
add_dct(s, block[4], 4, dest_cb, uvlinesize);
add_dct(s, block[5], 5, dest_cr, uvlinesize);
......@@ -1911,7 +1911,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
}
}//fi gray
}
else if (ENABLE_WMV2) {
else if (CONFIG_WMV2) {
ff_wmv2_add_mb(s, block, dest_y, dest_cb, dest_cr);
}
} else {
......@@ -1922,7 +1922,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
put_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(s->chroma_y_shift){
put_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
put_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
......@@ -1941,7 +1941,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
s->dsp.idct_put(dest_y + dct_offset , dct_linesize, block[2]);
s->dsp.idct_put(dest_y + dct_offset + block_size, dct_linesize, block[3]);
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(s->chroma_y_shift){
s->dsp.idct_put(dest_cb, uvlinesize, block[4]);
s->dsp.idct_put(dest_cr, uvlinesize, block[5]);
......
......@@ -103,7 +103,7 @@ static inline void gmc1_motion(MpegEncContext *s,
}
}
if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
motion_x= s->sprite_offset[1][0];
motion_y= s->sprite_offset[1][1];
......@@ -172,7 +172,7 @@ static inline void gmc_motion(MpegEncContext *s,
a+1, (1<<(2*a+1)) - s->no_rounding,
s->h_edge_pos, s->v_edge_pos);
if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
ox= s->sprite_offset[1][0] + s->sprite_delta[0][0]*s->mb_x*8 + s->sprite_delta[0][1]*s->mb_y*8;
oy= s->sprite_offset[1][1] + s->sprite_delta[1][0]*s->mb_x*8 + s->sprite_delta[1][1]*s->mb_y*8;
......@@ -321,7 +321,7 @@ if(s->quarter_sample)
src_x, src_y<<field_based,
s->h_edge_pos, s->v_edge_pos);
ptr_y = s->edge_emu_buffer;
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
ff_emulated_edge_mc(uvbuf ,
ptr_cb, s->uvlinesize,
......@@ -352,13 +352,13 @@ if(s->quarter_sample)
pix_op[0][dxy](dest_y, ptr_y, linesize, h);
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
pix_op[s->chroma_x_shift][uvdxy]
(dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift);
pix_op[s->chroma_x_shift][uvdxy]
(dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift);
}
if(!is_mpeg12 && (ENABLE_H261_ENCODER || ENABLE_H261_DECODER) &&
if(!is_mpeg12 && (CONFIG_H261_ENCODER || CONFIG_H261_DECODER) &&
s->out_format == FMT_H261){
ff_h261_loop_filter(s);
}
......@@ -517,7 +517,7 @@ static inline void qpel_motion(MpegEncContext *s,
17, 17+field_based, src_x, src_y<<field_based,
s->h_edge_pos, s->v_edge_pos);
ptr_y= s->edge_emu_buffer;
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
uint8_t *uvbuf= s->edge_emu_buffer + 18*s->linesize;
ff_emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize,
9, 9 + field_based,
......@@ -551,7 +551,7 @@ static inline void qpel_motion(MpegEncContext *s,
qpix_op[1][dxy](dest_y , ptr_y , linesize);
qpix_op[1][dxy](dest_y+8, ptr_y+8, linesize);
}
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
pix_op[1][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> 1);
pix_op[1][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> 1);
}
......@@ -705,7 +705,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s,
mx += mv[0][0];
my += mv[0][1];
}
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))
chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
return;
......@@ -726,7 +726,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s,
0, 0, 0,
ref_picture, pix_op, qpix_op,
s->mv[dir][0][0], s->mv[dir][0][1], 16);
}else if(!is_mpeg12 && ENABLE_WMV2 && s->mspel){
}else if(!is_mpeg12 && CONFIG_WMV2 && s->mspel){
ff_mspel_motion(s, dest_y, dest_cb, dest_cr,
ref_picture, pix_op,
s->mv[dir][0][0], s->mv[dir][0][1], 16);
......@@ -791,7 +791,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s,
}
}
if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))