~ubuntu-branches/ubuntu/trusty/gst-libav1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavcodec/ituh263dec.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-09-24 17:07:00 UTC
  • mfrom: (1.1.17) (7.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130924170700-4dg62s3pwl0pdakz
Tags: 1.2.0-1
* New upstream stable release:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
230
230
int ff_h263_resync(MpegEncContext *s){
231
231
    int left, pos, ret;
232
232
 
233
 
    if(s->codec_id==CODEC_ID_MPEG4){
 
233
    if(s->codec_id==AV_CODEC_ID_MPEG4){
234
234
        skip_bits1(&s->gb);
235
235
        align_get_bits(&s->gb);
236
236
    }
237
237
 
238
238
    if(show_bits(&s->gb, 16)==0){
239
239
        pos= get_bits_count(&s->gb);
240
 
        if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4)
241
 
            ret= mpeg4_decode_video_packet_header(s);
 
240
        if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4)
 
241
            ret= ff_mpeg4_decode_video_packet_header(s);
242
242
        else
243
243
            ret= h263_decode_gob_header(s);
244
244
        if(ret>=0)
254
254
            GetBitContext bak= s->gb;
255
255
 
256
256
            pos= get_bits_count(&s->gb);
257
 
            if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4)
258
 
                ret= mpeg4_decode_video_packet_header(s);
 
257
            if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4)
 
258
                ret= ff_mpeg4_decode_video_packet_header(s);
259
259
            else
260
260
                ret= h263_decode_gob_header(s);
261
261
            if(ret>=0)
458
458
        }
459
459
    } else if (s->mb_intra) {
460
460
        /* DC coef */
461
 
        if(s->codec_id == CODEC_ID_RV10){
 
461
        if(s->codec_id == AV_CODEC_ID_RV10){
462
462
#if CONFIG_RV10_DECODER
463
463
          if (s->rv10_version == 3 && s->pict_type == AV_PICTURE_TYPE_I) {
464
464
            int component, diff;
465
465
            component = (n <= 3 ? 0 : n - 4 + 1);
466
466
            level = s->last_dc[component];
467
467
            if (s->rv10_first_dc_coded[component]) {
468
 
                diff = rv_decode_dc(s, n);
 
468
                diff = ff_rv_decode_dc(s, n);
469
469
                if (diff == 0xffff)
470
470
                    return -1;
471
471
                level += diff;
517
517
                run = get_bits(&s->gb, 6);
518
518
                level = (int8_t)get_bits(&s->gb, 8);
519
519
                if(level == -128){
520
 
                    if (s->codec_id == CODEC_ID_RV10) {
 
520
                    if (s->codec_id == AV_CODEC_ID_RV10) {
521
521
                        /* XXX: should patch encoder too */
522
522
                        level = get_sbits(&s->gb, 12);
523
523
                    }else{
1083
1083
        skip_bits(&s->gb, 2); /* Quantization information for B-pictures */
1084
1084
    }
1085
1085
 
 
1086
    if (s->pict_type!=AV_PICTURE_TYPE_B) {
 
1087
        s->time            = s->picture_number;
 
1088
        s->pp_time         = s->time - s->last_non_b_time;
 
1089
        s->last_non_b_time = s->time;
 
1090
    }else{
 
1091
        s->time    = s->picture_number;
 
1092
        s->pb_time = s->pp_time - (s->last_non_b_time - s->time);
 
1093
        if (s->pp_time <=s->pb_time ||
 
1094
            s->pp_time <= s->pp_time - s->pb_time ||
 
1095
            s->pp_time <= 0){
 
1096
            s->pp_time = 2;
 
1097
            s->pb_time = 1;
 
1098
        }
 
1099
        ff_mpeg4_init_direct_mv(s);
 
1100
    }
 
1101
 
1086
1102
    /* PEI */
1087
1103
    while (get_bits1(&s->gb) != 0) {
1088
1104
        skip_bits(&s->gb, 8);