* The simplest mpeg encoder (well, it was the simplest!).
*/
-#ifndef MPEGVIDEO_COMMON_H
-#define MPEGVIDEO_COMMON_H
+#ifndef FFMPEG_MPEGVIDEO_COMMON_H
+#define FFMPEG_MPEGVIDEO_COMMON_H
#include "avcodec.h"
#include "dsputil.h"
}
}
- if(s->flags&CODEC_FLAG_GRAY) return;
+ if(ENABLE_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(s->flags&CODEC_FLAG_GRAY) return;
+ if(ENABLE_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;
ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 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(!(s->flags&CODEC_FLAG_GRAY)){
+ if(!ENABLE_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, s->h_edge_pos>>1, s->v_edge_pos>>1);
pix_op[0][dxy](dest_y, ptr_y, linesize, h);
- if(!(s->flags&CODEC_FLAG_GRAY)){
+ if(!ENABLE_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);
}
ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 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(!(s->flags&CODEC_FLAG_GRAY)){
+ if(!ENABLE_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, s->h_edge_pos>>1, s->v_edge_pos>>1);
qpix_op[1][dxy](dest_y , ptr_y , linesize);
qpix_op[1][dxy](dest_y+8, ptr_y+8, linesize);
}
- if(!(s->flags&CODEC_FLAG_GRAY)){
+ if(!ENABLE_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);
}
prefetch_motion(s, ref_picture, dir);
- if(s->obmc && s->pict_type != B_TYPE){
+ if(s->obmc && s->pict_type != FF_B_TYPE){
int16_t mv_cache[4][4][2];
const int xy= s->mb_x + s->mb_y*s->mb_stride;
const int mot_stride= s->b8_stride;
mx += mv[0][0];
my += mv[0][1];
}
- if(!(s->flags&CODEC_FLAG_GRAY))
+ if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
return;
}
}
- if(!(s->flags&CODEC_FLAG_GRAY))
+ if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
break;
case MV_TYPE_FIELD:
s->mv[dir][1][0], s->mv[dir][1][1], 8);
}
} else {
- if(s->picture_structure != s->field_select[dir][0] + 1 && s->pict_type != B_TYPE && !s->first_field){
+ if(s->picture_structure != s->field_select[dir][0] + 1 && s->pict_type != FF_B_TYPE && !s->first_field){
ref_picture= s->current_picture_ptr->data;
}
for(i=0; i<2; i++){
uint8_t ** ref2picture;
- if(s->picture_structure == s->field_select[dir][i] + 1 || s->pict_type == B_TYPE || s->first_field){
+ if(s->picture_structure == s->field_select[dir][i] + 1 || s->pict_type == FF_B_TYPE || s->first_field){
ref2picture= ref_picture;
}else{
ref2picture= s->current_picture_ptr->data;
}
}
-#endif /* MPEGVIDEO_COMMON_H */
+#endif /* FFMPEG_MPEGVIDEO_COMMON_H */