diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-08-01 00:39:39 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-01 00:39:39 +0000 |
commit | cde9e7800128f5466d97279918e1d20fc250a33b (patch) | |
tree | 66c8c784b066770bb209dc117b707346f364bdfc /libavcodec/mpegvideo_common.h | |
parent | 01e795aba320692e6c3c2da8652b4d16ee3d4bb4 (diff) | |
download | ffmpeg-cde9e7800128f5466d97279918e1d20fc250a33b.tar.gz |
make grayscale only decoding checks in inner loops compiletime killable
Originally committed as revision 9846 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_common.h')
-rw-r--r-- | libavcodec/mpegvideo_common.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h index a5f41bc43c..0698e1ddfb 100644 --- a/libavcodec/mpegvideo_common.h +++ b/libavcodec/mpegvideo_common.h @@ -104,7 +104,7 @@ static inline void gmc1_motion(MpegEncContext *s, } } - 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]; @@ -173,7 +173,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(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; @@ -318,7 +318,7 @@ if(s->quarter_sample) 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); @@ -343,7 +343,7 @@ if(s->quarter_sample) 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); } @@ -485,7 +485,7 @@ static inline void qpel_motion(MpegEncContext *s, 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); @@ -515,7 +515,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(!(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); } @@ -663,7 +663,7 @@ static inline void MPV_motion(MpegEncContext *s, 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; @@ -745,7 +745,7 @@ static inline void MPV_motion(MpegEncContext *s, } } - 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: |