and remove all ENABLE_ definitions.
Originally committed as revision 16600 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
}
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);
#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)
{
int mm_support(void)
{
- return ENABLE_IWMMXT * FF_MM_IWMMXT;
+ return HAVE_IWMMXT * FF_MM_IWMMXT;
}
void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
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++)
}
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];
}
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];
#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{
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;
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
}
}
- 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;
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;
}
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])
#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
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
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 |
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)
{
{
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;
#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 */
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);
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");
}
/* 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){
//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;
}
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;
}
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
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);
}
}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];
}
*(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++){
}
}
- 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);
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);
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);
}
}
}
- 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)){
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)
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;
&& (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 );
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) {
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);
/*
#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
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);
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:
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);
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);
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:
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);
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);
}
}//fi gray
}
- else if (ENABLE_WMV2) {
+ else if (CONFIG_WMV2) {
ff_wmv2_add_mb(s, block, dest_y, dest_cb, dest_cr);
}
} else {
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);
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]);
}
}
- 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];
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;
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,
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);
}
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,
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);
}
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;
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);
}
}
- 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);
}
break;
s->mjpeg_hsample[0] = 2;
s->mjpeg_hsample[1] = 2>>chroma_h_shift;
s->mjpeg_hsample[2] = 2>>chroma_h_shift;
- if (!(ENABLE_MJPEG_ENCODER || ENABLE_LJPEG_ENCODER)
+ if (!(CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER)
|| ff_mjpeg_encode_init(s) < 0)
return -1;
avctx->delay=0;
s->low_delay=1;
break;
case CODEC_ID_H261:
- if (!ENABLE_H261_ENCODER) return -1;
+ if (!CONFIG_H261_ENCODER) return -1;
if (ff_h261_get_picture_format(s->width, s->height) < 0) {
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);
return -1;
s->low_delay=1;
break;
case CODEC_ID_H263:
- if (!ENABLE_H263_ENCODER) return -1;
+ if (!CONFIG_H263_ENCODER) return -1;
if (h263_get_picture_format(s->width, s->height) == 7) {
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);
return -1;
if(avctx->trellis)
s->dct_quantize = dct_quantize_trellis_c;
- if((ENABLE_H263P_ENCODER || ENABLE_RV20_ENCODER) && s->modified_quant)
+ if((CONFIG_H263P_ENCODER || CONFIG_RV20_ENCODER) && s->modified_quant)
s->chroma_qscale_table= ff_h263_chroma_qscale_table;
s->progressive_frame=
s->progressive_sequence= !(avctx->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN));
ff_set_cmp(&s->dsp, s->dsp.ildct_cmp, s->avctx->ildct_cmp);
ff_set_cmp(&s->dsp, s->dsp.frame_skip_cmp, s->avctx->frame_skip_cmp);
- if (ENABLE_H261_ENCODER && s->out_format == FMT_H261)
+ if (CONFIG_H261_ENCODER && s->out_format == FMT_H261)
ff_h261_encode_init(s);
- if (ENABLE_ANY_H263_ENCODER && s->out_format == FMT_H263)
+ if (CONFIG_ANY_H263_ENCODER && s->out_format == FMT_H263)
h263_encode_init(s);
- if (ENABLE_MSMPEG4_ENCODER && s->msmpeg4_version)
+ if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version)
ff_msmpeg4_encode_init(s);
- if ((ENABLE_MPEG1VIDEO_ENCODER || ENABLE_MPEG2VIDEO_ENCODER)
+ if ((CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
&& s->out_format == FMT_MPEG1)
ff_mpeg1_encode_init(s);
/* init q matrix */
for(i=0;i<64;i++) {
int j= s->dsp.idct_permutation[i];
- if(ENABLE_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->mpeg_quant){
+ if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->mpeg_quant){
s->intra_matrix[j] = ff_mpeg4_default_intra_matrix[i];
s->inter_matrix[j] = ff_mpeg4_default_non_intra_matrix[i];
}else if(s->out_format == FMT_H263 || s->out_format == FMT_H261){
ff_rate_control_uninit(s);
MPV_common_end(s);
- if ((ENABLE_MJPEG_ENCODER || ENABLE_LJPEG_ENCODER) && s->out_format == FMT_MJPEG)
+ if ((CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER) && s->out_format == FMT_MJPEG)
ff_mjpeg_encode_close(s);
av_freep(&avctx->extradata);
MPV_frame_end(s);
- if (ENABLE_MJPEG_ENCODER && s->out_format == FMT_MJPEG)
+ if (CONFIG_MJPEG_ENCODER && s->out_format == FMT_MJPEG)
ff_mjpeg_encode_picture_trailer(s);
if(avctx->rc_buffer_size){
switch(s->codec_id){ //FIXME funct ptr could be slightly faster
case CODEC_ID_MPEG1VIDEO:
case CODEC_ID_MPEG2VIDEO:
- if (ENABLE_MPEG1VIDEO_ENCODER || ENABLE_MPEG2VIDEO_ENCODER)
+ if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
mpeg1_encode_mb(s, s->block, motion_x, motion_y);
break;
case CODEC_ID_MPEG4:
- if (ENABLE_MPEG4_ENCODER)
+ if (CONFIG_MPEG4_ENCODER)
mpeg4_encode_mb(s, s->block, motion_x, motion_y);
break;
case CODEC_ID_MSMPEG4V2:
case CODEC_ID_MSMPEG4V3:
case CODEC_ID_WMV1:
- if (ENABLE_MSMPEG4_ENCODER)
+ if (CONFIG_MSMPEG4_ENCODER)
msmpeg4_encode_mb(s, s->block, motion_x, motion_y);
break;
case CODEC_ID_WMV2:
- if (ENABLE_WMV2_ENCODER)
+ if (CONFIG_WMV2_ENCODER)
ff_wmv2_encode_mb(s, s->block, motion_x, motion_y);
break;
case CODEC_ID_H261:
- if (ENABLE_H261_ENCODER)
+ if (CONFIG_H261_ENCODER)
ff_h261_encode_mb(s, s->block, motion_x, motion_y);
break;
case CODEC_ID_H263:
case CODEC_ID_FLV1:
case CODEC_ID_RV10:
case CODEC_ID_RV20:
- if (ENABLE_H263_ENCODER || ENABLE_H263P_ENCODER ||
- ENABLE_FLV_ENCODER || ENABLE_RV10_ENCODER || ENABLE_RV20_ENCODER)
+ if (CONFIG_H263_ENCODER || CONFIG_H263P_ENCODER ||
+ CONFIG_FLV_ENCODER || CONFIG_RV10_ENCODER || CONFIG_RV20_ENCODER)
h263_encode_mb(s, s->block, motion_x, motion_y);
break;
case CODEC_ID_MJPEG:
- if (ENABLE_MJPEG_ENCODER)
+ if (CONFIG_MJPEG_ENCODER)
ff_mjpeg_encode_mb(s, s->block);
break;
default:
}
static void write_slice_end(MpegEncContext *s){
- if(ENABLE_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4){
+ if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4){
if(s->partitioned_frame){
ff_mpeg4_merge_partitions(s);
}
ff_mpeg4_stuffing(&s->pb);
- }else if(ENABLE_MJPEG_ENCODER && s->out_format == FMT_MJPEG){
+ }else if(CONFIG_MJPEG_ENCODER && s->out_format == FMT_MJPEG){
ff_mjpeg_encode_stuffing(&s->pb);
}
case CODEC_ID_H263:
case CODEC_ID_H263P:
case CODEC_ID_FLV1:
- if (ENABLE_H263_ENCODER || ENABLE_H263P_ENCODER || ENABLE_FLV_ENCODER)
+ if (CONFIG_H263_ENCODER || CONFIG_H263P_ENCODER || CONFIG_FLV_ENCODER)
s->gob_index = ff_h263_get_gob_height(s);
break;
case CODEC_ID_MPEG4:
- if(ENABLE_MPEG4_ENCODER && s->partitioned_frame)
+ if(CONFIG_MPEG4_ENCODER && s->partitioned_frame)
ff_mpeg4_init_partitions(s);
break;
}
s->mb_y = mb_y; // moved into loop, can get changed by H.261
ff_update_block_index(s);
- if(ENABLE_H261_ENCODER && s->codec_id == CODEC_ID_H261){
+ if(CONFIG_H261_ENCODER && s->codec_id == CODEC_ID_H261){
ff_h261_reorder_mb_index(s);
xy= s->mb_y*s->mb_stride + s->mb_x;
mb_type= s->mb_type[xy];
if(s->start_mb_y != mb_y || mb_x!=0){
write_slice_end(s);
- if(ENABLE_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->partitioned_frame){
+ if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->partitioned_frame){
ff_mpeg4_init_partitions(s);
}
}
switch(s->codec_id){
case CODEC_ID_MPEG4:
- if (ENABLE_MPEG4_ENCODER) {
+ if (CONFIG_MPEG4_ENCODER) {
ff_mpeg4_encode_video_packet_header(s);
ff_mpeg4_clean_buffers(s);
}
break;
case CODEC_ID_MPEG1VIDEO:
case CODEC_ID_MPEG2VIDEO:
- if (ENABLE_MPEG1VIDEO_ENCODER || ENABLE_MPEG2VIDEO_ENCODER) {
+ if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) {
ff_mpeg1_encode_slice_header(s);
ff_mpeg1_clean_buffers(s);
}
break;
case CODEC_ID_H263:
case CODEC_ID_H263P:
- if (ENABLE_H263_ENCODER || ENABLE_H263P_ENCODER)
+ if (CONFIG_H263_ENCODER || CONFIG_H263P_ENCODER)
h263_encode_gob_header(s, mb_y);
break;
}
}
}
}
- if(ENABLE_MPEG4_ENCODER && mb_type&CANDIDATE_MB_TYPE_DIRECT){
+ if(CONFIG_MPEG4_ENCODER && mb_type&CANDIDATE_MB_TYPE_DIRECT){
int mx= s->b_direct_mv_table[xy][0];
int my= s->b_direct_mv_table[xy][1];
encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_DIRECT, pb, pb2, tex_pb,
&dmin, &next_block, mx, my);
}
- if(ENABLE_MPEG4_ENCODER && mb_type&CANDIDATE_MB_TYPE_DIRECT0){
+ if(CONFIG_MPEG4_ENCODER && mb_type&CANDIDATE_MB_TYPE_DIRECT0){
backup_s.dquant = 0;
s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
s->mb_intra= 0;
if(coded){
int mx,my;
memcpy(s->mv, best_s.mv, sizeof(s->mv));
- if(ENABLE_MPEG4_ENCODER && best_s.mv_dir & MV_DIRECT){
+ if(CONFIG_MPEG4_ENCODER && best_s.mv_dir & MV_DIRECT){
mx=my=0; //FIXME find the one we actually used
ff_mpeg4_set_direct_mv(s, mx, my);
}else if(best_s.mv_dir&MV_DIR_BACKWARD){
}
s->last_bits= put_bits_count(&s->pb);
- if (ENABLE_ANY_H263_ENCODER &&
+ if (CONFIG_ANY_H263_ENCODER &&
s->out_format == FMT_H263 && s->pict_type!=FF_B_TYPE)
ff_h263_update_motion_val(s);
}
break;
case CANDIDATE_MB_TYPE_DIRECT:
- if (ENABLE_MPEG4_ENCODER) {
+ if (CONFIG_MPEG4_ENCODER) {
s->mv_dir = MV_DIR_FORWARD|MV_DIR_BACKWARD|MV_DIRECT;
s->mb_intra= 0;
motion_x=s->b_direct_mv_table[xy][0];
}
break;
case CANDIDATE_MB_TYPE_DIRECT0:
- if (ENABLE_MPEG4_ENCODER) {
+ if (CONFIG_MPEG4_ENCODER) {
s->mv_dir = MV_DIR_FORWARD|MV_DIR_BACKWARD|MV_DIRECT;
s->mb_intra= 0;
ff_mpeg4_set_direct_mv(s, 0, 0);
// RAL: Update last macroblock type
s->last_mv_dir = s->mv_dir;
- if (ENABLE_ANY_H263_ENCODER &&
+ if (CONFIG_ANY_H263_ENCODER &&
s->out_format == FMT_H263 && s->pict_type!=FF_B_TYPE)
ff_h263_update_motion_val(s);
s->dest[2], w>>1, h>>s->chroma_y_shift, s->uvlinesize);
}
if(s->loop_filter){
- if(ENABLE_ANY_H263_ENCODER && s->out_format == FMT_H263)
+ if(CONFIG_ANY_H263_ENCODER && s->out_format == FMT_H263)
ff_h263_loop_filter(s);
}
//printf("MB %d %d bits\n", s->mb_x+s->mb_y*s->mb_stride, put_bits_count(&s->pb));
}
//not beautiful here but we must write it before flushing so it has to be here
- if (ENABLE_MSMPEG4_ENCODER && s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == FF_I_TYPE)
+ if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == FF_I_TYPE)
msmpeg4_encode_ext_header(s);
write_slice_end(s);
if(s->adaptive_quant){
switch(s->codec_id){
case CODEC_ID_MPEG4:
- if (ENABLE_MPEG4_ENCODER)
+ if (CONFIG_MPEG4_ENCODER)
ff_clean_mpeg4_qscales(s);
break;
case CODEC_ID_H263:
case CODEC_ID_H263P:
case CODEC_ID_FLV1:
- if (ENABLE_H263_ENCODER||ENABLE_H263P_ENCODER||ENABLE_FLV_ENCODER)
+ if (CONFIG_H263_ENCODER||CONFIG_H263P_ENCODER||CONFIG_FLV_ENCODER)
ff_clean_h263_qscales(s);
break;
}
// RAL: Condition added for MPEG1VIDEO
if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->h263_msmpeg4))
set_frame_distances(s);
- if(ENABLE_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4)
+ if(CONFIG_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4)
ff_set_mpeg4_time(s);
s->me.scene_change_score=0;
s->last_bits= put_bits_count(&s->pb);
switch(s->out_format) {
case FMT_MJPEG:
- if (ENABLE_MJPEG_ENCODER)
+ if (CONFIG_MJPEG_ENCODER)
ff_mjpeg_encode_picture_header(s);
break;
case FMT_H261:
- if (ENABLE_H261_ENCODER)
+ if (CONFIG_H261_ENCODER)
ff_h261_encode_picture_header(s, picture_number);
break;
case FMT_H263:
- if (ENABLE_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2)
+ if (CONFIG_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2)
ff_wmv2_encode_picture_header(s, picture_number);
- else if (ENABLE_MSMPEG4_ENCODER && s->h263_msmpeg4)
+ else if (CONFIG_MSMPEG4_ENCODER && s->h263_msmpeg4)
msmpeg4_encode_picture_header(s, picture_number);
- else if (ENABLE_MPEG4_ENCODER && s->h263_pred)
+ else if (CONFIG_MPEG4_ENCODER && s->h263_pred)
mpeg4_encode_picture_header(s, picture_number);
- else if (ENABLE_RV10_ENCODER && s->codec_id == CODEC_ID_RV10)
+ else if (CONFIG_RV10_ENCODER && s->codec_id == CODEC_ID_RV10)
rv10_encode_picture_header(s, picture_number);
- else if (ENABLE_RV20_ENCODER && s->codec_id == CODEC_ID_RV20)
+ else if (CONFIG_RV20_ENCODER && s->codec_id == CODEC_ID_RV20)
rv20_encode_picture_header(s, picture_number);
- else if (ENABLE_FLV_ENCODER && s->codec_id == CODEC_ID_FLV1)
+ else if (CONFIG_FLV_ENCODER && s->codec_id == CODEC_ID_FLV1)
ff_flv_encode_picture_header(s, picture_number);
- else if (ENABLE_ANY_H263_ENCODER)
+ else if (CONFIG_ANY_H263_ENCODER)
h263_encode_picture_header(s, picture_number);
break;
case FMT_MPEG1:
- if (ENABLE_MPEG1VIDEO_ENCODER || ENABLE_MPEG2VIDEO_ENCODER)
+ if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
mpeg1_encode_picture_header(s, picture_number);
break;
case FMT_H264:
s->decode_mb= msmpeg4v34_decode_mb;
break;
case 5:
- if (ENABLE_WMV2_DECODER)
+ if (CONFIG_WMV2_DECODER)
s->decode_mb= ff_wmv2_decode_mb;
case 6:
//FIXME + TODO VC1 decode mb
int n, int coded, const uint8_t *scan_table);
int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
-#define ENABLE_MSMPEG4_DECODER (ENABLE_MSMPEG4V1_DECODER || \
- ENABLE_MSMPEG4V2_DECODER || \
- ENABLE_MSMPEG4V3_DECODER || \
- ENABLE_WMV2_DECODER || \
- ENABLE_VC1_DECODER || \
- ENABLE_WMV3_DECODER)
-#define ENABLE_MSMPEG4_ENCODER (ENABLE_MSMPEG4V1_ENCODER || \
- ENABLE_MSMPEG4V2_ENCODER || \
- ENABLE_MSMPEG4V3_ENCODER || \
- ENABLE_WMV2_ENCODER)
-#define ENABLE_MSMPEG4 (ENABLE_MSMPEG4_DECODER || ENABLE_MSMPEG4_ENCODER)
-#define ENABLE_WMV2 (ENABLE_WMV2_DECODER || ENABLE_WMV2_ENCODER)
-#define ENABLE_WMV_DECODER (ENABLE_WMV1_DECODER || ENABLE_WMV2_DECODER)
-#define ENABLE_WMV_ENCODER (ENABLE_WMV1_ENCODER || ENABLE_WMV2_ENCODER)
+#define CONFIG_MSMPEG4_DECODER (CONFIG_MSMPEG4V1_DECODER || \
+ CONFIG_MSMPEG4V2_DECODER || \
+ CONFIG_MSMPEG4V3_DECODER || \
+ CONFIG_WMV2_DECODER || \
+ CONFIG_VC1_DECODER || \
+ CONFIG_WMV3_DECODER)
+#define CONFIG_MSMPEG4_ENCODER (CONFIG_MSMPEG4V1_ENCODER || \
+ CONFIG_MSMPEG4V2_ENCODER || \
+ CONFIG_MSMPEG4V3_ENCODER || \
+ CONFIG_WMV2_ENCODER)
+#define CONFIG_MSMPEG4 (CONFIG_MSMPEG4_DECODER || CONFIG_MSMPEG4_ENCODER)
+#define CONFIG_WMV2 (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER)
+#define CONFIG_WMV_DECODER (CONFIG_WMV1_DECODER || CONFIG_WMV2_DECODER)
+#define CONFIG_WMV_ENCODER (CONFIG_WMV1_ENCODER || CONFIG_WMV2_ENCODER)
#endif /* AVCODEC_MSMPEG4_H */
c->hadamard8_diff[0] = hadamard8_diff16_altivec;
c->hadamard8_diff[1] = hadamard8_diff8x8_altivec;
- if (ENABLE_VORBIS_DECODER)
+ if (CONFIG_VORBIS_DECODER)
c->vorbis_inverse_coupling = vorbis_inverse_coupling_altivec;
}
}
#if HAVE_ALTIVEC
- if(ENABLE_H264_DECODER) dsputil_h264_init_ppc(c, avctx);
+ if(CONFIG_H264_DECODER) dsputil_h264_init_ppc(c, avctx);
if (has_altivec()) {
mm_flags |= FF_MM_ALTIVEC;
dsputil_init_altivec(c, avctx);
- if(ENABLE_SNOW_DECODER) snow_init_altivec(c, avctx);
- if(ENABLE_VC1_DECODER || ENABLE_WMV3_DECODER)
+ if(CONFIG_SNOW_DECODER) snow_init_altivec(c, avctx);
+ if(CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER)
vc1dsp_init_altivec(c, avctx);
float_init_altivec(c, avctx);
int_init_altivec(c, avctx);
return -1;
}
- if (ENABLE_THREADS && avctx->thread_opaque)
+ if (HAVE_THREADS && avctx->thread_opaque)
avcodec_thread_free(avctx);
if (avctx->codec->close)
avctx->codec->close(avctx);
"paddb %%mm1, %%mm6 \n\t"
static void h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale){
- if(ENABLE_ANY_H263) {
+ if(CONFIG_ANY_H263) {
const int strength= ff_h263_loop_filter_strength[qscale];
__asm__ volatile(
}
static void h263_h_loop_filter_mmx(uint8_t *src, int stride, int qscale){
- if(ENABLE_ANY_H263) {
+ if(CONFIG_ANY_H263) {
const int strength= ff_h263_loop_filter_strength[qscale];
DECLARE_ALIGNED(8, uint64_t, temp[4]);
uint8_t *btemp= (uint8_t*)temp;
}
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
#endif
- }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) &&
idct_algo==FF_IDCT_VP3){
if(mm_flags & FF_MM_SSE2){
c->idct_put= ff_vp3_idct_put_sse2;
c->draw_edges = draw_edges_mmx;
- if (ENABLE_ANY_H263) {
+ if (CONFIG_ANY_H263) {
c->h263_v_loop_filter= h263_v_loop_filter_mmx;
c->h263_h_loop_filter= h263_h_loop_filter_mmx;
}
c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mmx2;
c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mmx2;
- if (ENABLE_VP3_DECODER || ENABLE_THEORA_DECODER) {
+ if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
c->vp3_v_loop_filter= ff_vp3_v_loop_filter_mmx2;
c->vp3_h_loop_filter= ff_vp3_h_loop_filter_mmx2;
}
c->biweight_h264_pixels_tab[6]= ff_h264_biweight_4x4_mmx2;
c->biweight_h264_pixels_tab[7]= ff_h264_biweight_4x2_mmx2;
- if (ENABLE_CAVS_DECODER)
+ if (CONFIG_CAVS_DECODER)
ff_cavsdsp_init_mmx2(c, avctx);
- if (ENABLE_VC1_DECODER || ENABLE_WMV3_DECODER)
+ if (CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER)
ff_vc1dsp_init_mmx(c, avctx);
c->add_png_paeth_prediction= add_png_paeth_prediction_mmx2;
c->avg_rv40_chroma_pixels_tab[0]= avg_rv40_chroma_mc8_3dnow;
c->avg_rv40_chroma_pixels_tab[1]= avg_rv40_chroma_mc4_3dnow;
- if (ENABLE_CAVS_DECODER)
+ if (CONFIG_CAVS_DECODER)
ff_cavsdsp_init_3dnow(c, avctx);
}
}
}
- if (ENABLE_ENCODERS)
+ if (CONFIG_ENCODERS)
dsputilenc_init_mmx(c, avctx);
#if 0
c->sum_abs_dctelem= sum_abs_dctelem_sse2;
c->hadamard8_diff[0]= hadamard8_diff16_sse2;
c->hadamard8_diff[1]= hadamard8_diff_sse2;
- if (ENABLE_FLAC_ENCODER)
+ if (CONFIG_FLAC_ENCODER)
c->flac_compute_autocorr = ff_flac_compute_autocorr_sse2;
}
#define REGISTER_MUXER(X,x) { \
extern AVOutputFormat x##_muxer; \
- if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); }
+ if(CONFIG_##X##_MUXER) av_register_output_format(&x##_muxer); }
#define REGISTER_DEMUXER(X,x) { \
extern AVInputFormat x##_demuxer; \
- if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
+ if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
void avdevice_register_all(void)
#include "config.h"
#include "libavformat/avformat.h"
-#if ENABLE_LIBDC1394_2
+#if HAVE_LIBDC1394_2
#include <dc1394/dc1394.h>
-#elif ENABLE_LIBDC1394_1
+#elif HAVE_LIBDC1394_1
#include <libraw1394/raw1394.h>
#include <libdc1394/dc1394_control.h>
#undef free
typedef struct dc1394_data {
-#if ENABLE_LIBDC1394_1
+#if HAVE_LIBDC1394_1
raw1394handle_t handle;
dc1394_cameracapture camera;
-#elif ENABLE_LIBDC1394_2
+#elif HAVE_LIBDC1394_2
dc1394_t *d;
dc1394camera_t *camera;
dc1394video_frame_t *frame;
return -1;
}
-#if ENABLE_LIBDC1394_1
+#if HAVE_LIBDC1394_1
static int dc1394_v1_read_header(AVFormatContext *c, AVFormatParameters * ap)
{
dc1394_data* dc1394 = c->priv_data;
return 0;
}
-#elif ENABLE_LIBDC1394_2
+#elif HAVE_LIBDC1394_2
static int dc1394_v2_read_header(AVFormatContext *c, AVFormatParameters * ap)
{
dc1394_data* dc1394 = c->priv_data;
};
#endif
-#if ENABLE_LIBDC1394_1
+#if HAVE_LIBDC1394_1
AVInputFormat libdc1394_demuxer = {
.name = "libdc1394",
.long_name = NULL_IF_CONFIG_SMALL("dc1394 v.1 A/V grab"),
#define REGISTER_FILTER(X,x,y) { \
extern AVFilter avfilter_##y##_##x ; \
- if(ENABLE_##X##_FILTER ) avfilter_register(&avfilter_##y##_##x ); }
+ if(CONFIG_##X##_FILTER ) avfilter_register(&avfilter_##y##_##x ); }
void avfilter_register_all(void)
{
#define REGISTER_MUXER(X,x) { \
extern AVOutputFormat x##_muxer; \
- if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); }
+ if(CONFIG_##X##_MUXER) av_register_output_format(&x##_muxer); }
#define REGISTER_DEMUXER(X,x) { \
extern AVInputFormat x##_demuxer; \
- if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
+ if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
#define REGISTER_PROTOCOL(X,x) { \
extern URLProtocol x##_protocol; \
- if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
+ if(CONFIG_##X##_PROTOCOL) register_protocol(&x##_protocol); }
/* If you do not call this function, then you can select exactly which
formats you want to support */
av_freep(&s->streams[0]->codec->extradata);
av_freep(&s->streams[0]);
s->nb_streams = 0;
- if (ENABLE_DV_DEMUXER) {
+ if (CONFIG_DV_DEMUXER) {
avi->dv_demux = dv_init_demux(s);
if (!avi->dv_demux)
goto fail;
int64_t i, sync;
void* dstr;
- if (ENABLE_DV_DEMUXER && avi->dv_demux) {
+ if (CONFIG_DV_DEMUXER && avi->dv_demux) {
size = dv_get_packet(avi->dv_demux, pkt);
if (size >= 0)
return size;
memcpy(pkt->data + pkt->size - 4*256, ast->pal, 4*256);
}
- if (ENABLE_DV_DEMUXER && avi->dv_demux) {
+ if (CONFIG_DV_DEMUXER && avi->dv_demux) {
dstr = pkt->destruct;
size = dv_produce_packet(avi->dv_demux, pkt,
pkt->data, pkt->size);
// av_log(NULL, AV_LOG_DEBUG, "XX %"PRId64" %d %"PRId64"\n", timestamp, index, st->index_entries[index].timestamp);
- if (ENABLE_DV_DEMUXER && avi->dv_demux) {
+ if (CONFIG_DV_DEMUXER && avi->dv_demux) {
/* One and only one real stream for DV in AVI, and it has video */
/* offsets. Calling with other stream indexes should have failed */
/* the av_index_search_timestamp call above. */
int video_bitrate;
s->packet_number = 0;
- s->is_vcd = (ENABLE_MPEG1VCD_MUXER && ctx->oformat == &mpeg1vcd_muxer);
- s->is_svcd = (ENABLE_MPEG2SVCD_MUXER && ctx->oformat == &mpeg2svcd_muxer);
- s->is_mpeg2 = ((ENABLE_MPEG2VOB_MUXER && ctx->oformat == &mpeg2vob_muxer) ||
- (ENABLE_MPEG2DVD_MUXER && ctx->oformat == &mpeg2dvd_muxer) ||
- (ENABLE_MPEG2SVCD_MUXER && ctx->oformat == &mpeg2svcd_muxer));
- s->is_dvd = (ENABLE_MPEG2DVD_MUXER && ctx->oformat == &mpeg2dvd_muxer);
+ s->is_vcd = (CONFIG_MPEG1VCD_MUXER && ctx->oformat == &mpeg1vcd_muxer);
+ s->is_svcd = (CONFIG_MPEG2SVCD_MUXER && ctx->oformat == &mpeg2svcd_muxer);
+ s->is_mpeg2 = ((CONFIG_MPEG2VOB_MUXER && ctx->oformat == &mpeg2vob_muxer) ||
+ (CONFIG_MPEG2DVD_MUXER && ctx->oformat == &mpeg2dvd_muxer) ||
+ (CONFIG_MPEG2SVCD_MUXER && ctx->oformat == &mpeg2svcd_muxer));
+ s->is_dvd = (CONFIG_MPEG2DVD_MUXER && ctx->oformat == &mpeg2dvd_muxer);
if(ctx->packet_size)
s->packet_size = ctx->packet_size;