~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/ituh263enc.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
    coded_frame_rate= 1800000;
127
127
    coded_frame_rate_base= (1000+best_clock_code)*best_divisor;
128
128
 
129
 
    align_put_bits(&s->pb);
 
129
    avpriv_align_put_bits(&s->pb);
130
130
 
131
131
    /* Update the pointer to last GOB */
132
132
    s->ptr_lastgob = put_bits_ptr(&s->pb);
275
275
 */
276
276
void ff_clean_h263_qscales(MpegEncContext *s){
277
277
    int i;
278
 
    int8_t * const qscale_table= s->current_picture.qscale_table;
 
278
    int8_t * const qscale_table = s->current_picture.f.qscale_table;
279
279
 
280
280
    ff_init_qscale_tab(s);
281
281
 
302
302
static const int dquant_code[5]= {1,0,9,2,3};
303
303
 
304
304
/**
305
 
 * encodes a 8x8 block.
 
305
 * Encode an 8x8 block.
306
306
 * @param block the 8x8 block
307
307
 * @param n block index (0-3 are luma, 4-5 are chroma)
308
308
 */
529
529
                /* motion vectors: 8x8 mode*/
530
530
                h263_pred_motion(s, i, 0, &pred_x, &pred_y);
531
531
 
532
 
                motion_x= s->current_picture.motion_val[0][ s->block_index[i] ][0];
533
 
                motion_y= s->current_picture.motion_val[0][ s->block_index[i] ][1];
 
532
                motion_x = s->current_picture.f.motion_val[0][s->block_index[i]][0];
 
533
                motion_y = s->current_picture.f.motion_val[0][s->block_index[i]][1];
534
534
                if (!s->umvplus) {
535
535
                    ff_h263_encode_motion_vector(s, motion_x - pred_x,
536
536
                                                    motion_y - pred_y, 1);
657
657
 
658
658
void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code)
659
659
{
660
 
    int range, l, bit_size, sign, code, bits;
 
660
    int range, bit_size, sign, code, bits;
661
661
 
662
662
    if (val == 0) {
663
663
        /* zero vector */
667
667
        bit_size = f_code - 1;
668
668
        range = 1 << bit_size;
669
669
        /* modulo encoding */
670
 
        l= INT_BIT - 6 - bit_size;
671
 
        val = (val<<l)>>l;
 
670
        val = sign_extend(val, 6 + bit_size);
672
671
        sign = val>>31;
673
672
        val= (val^sign)-sign;
674
673
        sign&=1;