Revision cde9e780 libavcodec/mpegvideo_common.h

View differences:

libavcodec/mpegvideo_common.h
104 104
        }
105 105
    }
106 106

  
107
    if(s->flags&CODEC_FLAG_GRAY) return;
107
    if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
108 108

  
109 109
    motion_x= s->sprite_offset[1][0];
110 110
    motion_y= s->sprite_offset[1][1];
......
173 173
           a+1, (1<<(2*a+1)) - s->no_rounding,
174 174
           s->h_edge_pos, s->v_edge_pos);
175 175

  
176
    if(s->flags&CODEC_FLAG_GRAY) return;
176
    if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
177 177

  
178 178
    ox= s->sprite_offset[1][0] + s->sprite_delta[0][0]*s->mb_x*8 + s->sprite_delta[0][1]*s->mb_y*8;
179 179
    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 318
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based,
319 319
                             src_x, src_y<<field_based, s->h_edge_pos, s->v_edge_pos);
320 320
            ptr_y = s->edge_emu_buffer;
321
            if(!(s->flags&CODEC_FLAG_GRAY)){
321
            if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
322 322
                uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
323 323
                ff_emulated_edge_mc(uvbuf  , ptr_cb, s->uvlinesize, 9, 9+field_based,
324 324
                                 uvsrc_x, uvsrc_y<<field_based, s->h_edge_pos>>1, s->v_edge_pos>>1);
......
343 343

  
344 344
    pix_op[0][dxy](dest_y, ptr_y, linesize, h);
345 345

  
346
    if(!(s->flags&CODEC_FLAG_GRAY)){
346
    if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
347 347
        pix_op[s->chroma_x_shift][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift);
348 348
        pix_op[s->chroma_x_shift][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift);
349 349
    }
......
485 485
        ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based,
486 486
                         src_x, src_y<<field_based, s->h_edge_pos, s->v_edge_pos);
487 487
        ptr_y= s->edge_emu_buffer;
488
        if(!(s->flags&CODEC_FLAG_GRAY)){
488
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
489 489
            uint8_t *uvbuf= s->edge_emu_buffer + 18*s->linesize;
490 490
            ff_emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize, 9, 9 + field_based,
491 491
                             uvsrc_x, uvsrc_y<<field_based, s->h_edge_pos>>1, s->v_edge_pos>>1);
......
515 515
        qpix_op[1][dxy](dest_y  , ptr_y  , linesize);
516 516
        qpix_op[1][dxy](dest_y+8, ptr_y+8, linesize);
517 517
    }
518
    if(!(s->flags&CODEC_FLAG_GRAY)){
518
    if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
519 519
        pix_op[1][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> 1);
520 520
        pix_op[1][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> 1);
521 521
    }
......
663 663
            mx += mv[0][0];
664 664
            my += mv[0][1];
665 665
        }
666
        if(!(s->flags&CODEC_FLAG_GRAY))
666
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
667 667
            chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
668 668

  
669 669
        return;
......
745 745
            }
746 746
        }
747 747

  
748
        if(!(s->flags&CODEC_FLAG_GRAY))
748
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
749 749
            chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
750 750
        break;
751 751
    case MV_TYPE_FIELD:

Also available in: Unified diff