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
This commit is contained in:
parent
7356aaa786
commit
49fb20cb8a
2
configure
vendored
2
configure
vendored
@ -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
|
||||
}
|
||||
|
2
ffmpeg.c
2
ffmpeg.c
@ -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))
|
||||
chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
|
||||
}
|
||||
break;
|
||||
|
@ -518,14 +518,14 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
|
||||
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;
|
||||
@ -535,7 +535,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
|
||||
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;
|
||||
@ -661,7 +661,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
|
||||
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));
|
||||
@ -670,20 +670,20 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
|
||||
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){
|
||||
@ -722,7 +722,7 @@ av_cold int MPV_encode_end(AVCodecContext *avctx)
|
||||
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);
|
||||
@ -1226,7 +1226,7 @@ vbv_retry:
|
||||
|
||||
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){
|
||||
@ -1687,25 +1687,25 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x,
|
||||
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:
|
||||
@ -1713,12 +1713,12 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x,
|
||||
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:
|
||||
@ -1965,13 +1965,13 @@ static int mb_var_thread(AVCodecContext *c, void *arg){
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -2028,11 +2028,11 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
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;
|
||||
}
|
||||
@ -2072,7 +2072,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
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];
|
||||
@ -2105,7 +2105,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -2132,21 +2132,21 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
|
||||
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;
|
||||
}
|
||||
@ -2355,7 +2355,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
}
|
||||
}
|
||||
}
|
||||
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];
|
||||
|
||||
@ -2366,7 +2366,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
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;
|
||||
@ -2381,7 +2381,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
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){
|
||||
@ -2429,7 +2429,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
}
|
||||
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);
|
||||
|
||||
@ -2479,7 +2479,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
}
|
||||
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];
|
||||
@ -2488,7 +2488,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
}
|
||||
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);
|
||||
@ -2556,7 +2556,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
// 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);
|
||||
|
||||
@ -2587,7 +2587,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
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));
|
||||
@ -2595,7 +2595,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
}
|
||||
|
||||
//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);
|
||||
@ -2666,13 +2666,13 @@ static int estimate_qp(MpegEncContext *s, int dry_run){
|
||||
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;
|
||||
}
|
||||
@ -2716,7 +2716,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
|
||||
// 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;
|
||||
@ -2871,31 +2871,31 @@ static int encode_picture(MpegEncContext *s, int picture_number)
|
||||
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:
|
||||
|
@ -1142,7 +1142,7 @@ int ff_msmpeg4_decode_init(MpegEncContext *s)
|
||||
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
|
||||
|
@ -49,19 +49,19 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
|
||||
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 */
|
||||
|
@ -1450,6 +1450,6 @@ void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx)
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -262,14 +262,14 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
#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);
|
||||
|
@ -568,7 +568,7 @@ int avcodec_close(AVCodecContext *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);
|
||||
|
@ -620,7 +620,7 @@ static void add_bytes_l2_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
|
||||
"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(
|
||||
@ -670,7 +670,7 @@ static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int
|
||||
}
|
||||
|
||||
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;
|
||||
@ -2568,7 +2568,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
}
|
||||
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;
|
||||
@ -2631,7 +2631,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
|
||||
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;
|
||||
}
|
||||
@ -2684,7 +2684,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
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;
|
||||
}
|
||||
@ -2760,10 +2760,10 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
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;
|
||||
@ -2818,7 +2818,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
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);
|
||||
}
|
||||
|
||||
@ -2953,7 +2953,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (ENABLE_ENCODERS)
|
||||
if (CONFIG_ENCODERS)
|
||||
dsputilenc_init_mmx(c, avctx);
|
||||
|
||||
#if 0
|
||||
|
@ -1413,7 +1413,7 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -29,10 +29,10 @@ unsigned avdevice_version(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)
|
||||
|
||||
void avdevice_register_all(void)
|
||||
|
@ -23,9 +23,9 @@
|
||||
#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>
|
||||
|
||||
@ -45,10 +45,10 @@
|
||||
#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;
|
||||
@ -142,7 +142,7 @@ out:
|
||||
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;
|
||||
@ -236,7 +236,7 @@ static int dc1394_v1_close(AVFormatContext * context)
|
||||
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;
|
||||
@ -359,7 +359,7 @@ AVInputFormat libdc1394_demuxer = {
|
||||
};
|
||||
|
||||
#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"),
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#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)
|
||||
{
|
||||
|
@ -24,17 +24,17 @@
|
||||
|
||||
#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 */
|
||||
|
@ -350,7 +350,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
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;
|
||||
@ -636,7 +636,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
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;
|
||||
@ -721,7 +721,7 @@ resync:
|
||||
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);
|
||||
@ -1012,7 +1012,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
|
||||
|
||||
// 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. */
|
||||
|
@ -297,12 +297,12 @@ static int mpeg_mux_init(AVFormatContext *ctx)
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user