~ubuntu-branches/ubuntu/precise/ffmpeg-debian/precise

« back to all changes in this revision

Viewing changes to libavcodec/mpegvideo_common.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-01-20 09:20:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120092053-izz63p40hc98qfgp
Tags: 3:0.svn20090119-1ubuntu1
* merge from debian. LP: #318501
* new version fixes CVE-2008-3230, LP: #253767

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
        }
104
104
    }
105
105
 
106
 
    if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
 
106
    if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
107
107
 
108
108
    motion_x= s->sprite_offset[1][0];
109
109
    motion_y= s->sprite_offset[1][1];
172
172
           a+1, (1<<(2*a+1)) - s->no_rounding,
173
173
           s->h_edge_pos, s->v_edge_pos);
174
174
 
175
 
    if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
 
175
    if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
176
176
 
177
177
    ox= s->sprite_offset[1][0] + s->sprite_delta[0][0]*s->mb_x*8 + s->sprite_delta[0][1]*s->mb_y*8;
178
178
    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
321
                                src_x, src_y<<field_based,
322
322
                                s->h_edge_pos, s->v_edge_pos);
323
323
            ptr_y = s->edge_emu_buffer;
324
 
            if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
 
324
            if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
325
325
                uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
326
326
                ff_emulated_edge_mc(uvbuf ,
327
327
                                    ptr_cb, s->uvlinesize,
352
352
 
353
353
    pix_op[0][dxy](dest_y, ptr_y, linesize, h);
354
354
 
355
 
    if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
 
355
    if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
356
356
        pix_op[s->chroma_x_shift][uvdxy]
357
357
                (dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift);
358
358
        pix_op[s->chroma_x_shift][uvdxy]
359
359
                (dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift);
360
360
    }
361
 
    if(!is_mpeg12 && (ENABLE_H261_ENCODER || ENABLE_H261_DECODER) &&
 
361
    if(!is_mpeg12 && (CONFIG_H261_ENCODER || CONFIG_H261_DECODER) &&
362
362
         s->out_format == FMT_H261){
363
363
        ff_h261_loop_filter(s);
364
364
    }
371
371
                 uint8_t **ref_picture, op_pixels_func (*pix_op)[4],
372
372
                 int motion_x, int motion_y, int h)
373
373
{
374
 
#ifndef CONFIG_SMALL
 
374
#if !CONFIG_SMALL
375
375
    if(s->out_format == FMT_MPEG1)
376
376
        mpeg_motion_internal(s, dest_y, dest_cb, dest_cr, field_based,
377
377
                    bottom_field, field_select, ref_picture, pix_op,
517
517
                            17, 17+field_based, src_x, src_y<<field_based,
518
518
                            s->h_edge_pos, s->v_edge_pos);
519
519
        ptr_y= s->edge_emu_buffer;
520
 
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
 
520
        if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
521
521
            uint8_t *uvbuf= s->edge_emu_buffer + 18*s->linesize;
522
522
            ff_emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize,
523
523
                                9, 9 + field_based,
551
551
        qpix_op[1][dxy](dest_y  , ptr_y  , linesize);
552
552
        qpix_op[1][dxy](dest_y+8, ptr_y+8, linesize);
553
553
    }
554
 
    if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
 
554
    if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
555
555
        pix_op[1][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> 1);
556
556
        pix_op[1][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> 1);
557
557
    }
705
705
            mx += mv[0][0];
706
706
            my += mv[0][1];
707
707
        }
708
 
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
 
708
        if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))
709
709
            chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
710
710
 
711
711
        return;
726
726
                        0, 0, 0,
727
727
                        ref_picture, pix_op, qpix_op,
728
728
                        s->mv[dir][0][0], s->mv[dir][0][1], 16);
729
 
        }else if(!is_mpeg12 && ENABLE_WMV2 && s->mspel){
 
729
        }else if(!is_mpeg12 && CONFIG_WMV2 && s->mspel){
730
730
            ff_mspel_motion(s, dest_y, dest_cb, dest_cr,
731
731
                        ref_picture, pix_op,
732
732
                        s->mv[dir][0][0], s->mv[dir][0][1], 16);
791
791
            }
792
792
        }
793
793
 
794
 
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
 
794
        if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))
795
795
            chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
796
796
    }
797
797
        break;
888
888
                              op_pixels_func (*pix_op)[4],
889
889
                              qpel_mc_func (*qpix_op)[16])
890
890
{
891
 
#ifndef CONFIG_SMALL
 
891
#if !CONFIG_SMALL
892
892
    if(s->out_format == FMT_MPEG1)
893
893
        MPV_motion_internal(s, dest_y, dest_cb, dest_cr, dir,
894
894
                            ref_picture, pix_op, qpix_op, 1);