Revision cde9e780 libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
1554 1554
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based,
1555 1555
                             src_x, src_y<<field_based, h_edge_pos, v_edge_pos);
1556 1556
            ptr_y = s->edge_emu_buffer;
1557
            if(!(s->flags&CODEC_FLAG_GRAY)){
1557
            if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1558 1558
                uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
1559 1559
                ff_emulated_edge_mc(uvbuf  , ptr_cb, s->uvlinesize, 9, 9+field_based,
1560 1560
                                 uvsrc_x, uvsrc_y<<field_based, h_edge_pos>>1, v_edge_pos>>1);
......
1581 1581
    sy <<= 2 - lowres;
1582 1582
    pix_op[lowres-1](dest_y, ptr_y, linesize, h, sx, sy);
1583 1583

  
1584
    if(!(s->flags&CODEC_FLAG_GRAY)){
1584
    if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1585 1585
        uvsx <<= 2 - lowres;
1586 1586
        uvsy <<= 2 - lowres;
1587 1587
        pix_op[lowres](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
......
1687 1687
                my += s->mv[dir][i][1];
1688 1688
            }
1689 1689

  
1690
        if(!(s->flags&CODEC_FLAG_GRAY))
1690
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
1691 1691
            chroma_4mv_motion_lowres(s, dest_cb, dest_cr, ref_picture, pix_op, mx, my);
1692 1692
        break;
1693 1693
    case MV_TYPE_FIELD:
......
1974 1974
                add_dequant_dct(s, block[2], 2, dest_y + dct_offset             , dct_linesize, s->qscale);
1975 1975
                add_dequant_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
1976 1976

  
1977
                if(!(s->flags&CODEC_FLAG_GRAY)){
1977
                if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1978 1978
                    if (s->chroma_y_shift){
1979 1979
                        add_dequant_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
1980 1980
                        add_dequant_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
......
1993 1993
                add_dct(s, block[2], 2, dest_y + dct_offset             , dct_linesize);
1994 1994
                add_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize);
1995 1995

  
1996
                if(!(s->flags&CODEC_FLAG_GRAY)){
1996
                if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1997 1997
                    if(s->chroma_y_shift){//Chroma420
1998 1998
                        add_dct(s, block[4], 4, dest_cb, uvlinesize);
1999 1999
                        add_dct(s, block[5], 5, dest_cr, uvlinesize);
......
2026 2026
                put_dct(s, block[2], 2, dest_y + dct_offset             , dct_linesize, s->qscale);
2027 2027
                put_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
2028 2028

  
2029
                if(!(s->flags&CODEC_FLAG_GRAY)){
2029
                if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2030 2030
                    if(s->chroma_y_shift){
2031 2031
                        put_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
2032 2032
                        put_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
......
2045 2045
                s->dsp.idct_put(dest_y + dct_offset             , dct_linesize, block[2]);
2046 2046
                s->dsp.idct_put(dest_y + dct_offset + block_size, dct_linesize, block[3]);
2047 2047

  
2048
                if(!(s->flags&CODEC_FLAG_GRAY)){
2048
                if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2049 2049
                    if(s->chroma_y_shift){
2050 2050
                        s->dsp.idct_put(dest_cb, uvlinesize, block[4]);
2051 2051
                        s->dsp.idct_put(dest_cr, uvlinesize, block[5]);

Also available in: Unified diff