~ubuntu-branches/ubuntu/quantal/libav/quantal-updates

« back to all changes in this revision

Viewing changes to libavcodec/error_resilience.c

  • Committer: Package Import Robot
  • Author(s): Micah Gersten
  • Date: 2012-03-21 21:18:24 UTC
  • mfrom: (1.2.10)
  • Revision ID: package-import@ubuntu.com-20120321211824-n63p3v3s99q3mxrb
Tags: 4:0.8.1-0ubuntu1
* New upstream bug and security fix release (FFe: LP: #960949)
  - fixes the following CVEs:
    CVE-2012-0848, CVE-2012-0853, CVE-2012-0858, CVE-2011-3929,
    CVE-2011-3936, CVE-2011-3937, CVE-2011-3940, CVE-2011-3945,
    CVE-2011-3947, CVE-2011-3951, CVE-2011-3952

* Pull fix from Debian git to fix installation of avserver.conf and
  recordshow.sh into libav-tools; Thanks to Julien Cristau for spotting this!
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
419
419
    if ((!(s->avctx->error_concealment&FF_EC_GUESS_MVS)) ||
420
420
        num_avail <= mb_width / 2) {
421
421
        for (mb_y = 0; mb_y < s->mb_height; mb_y++) {
 
422
            s->mb_x = 0;
 
423
            s->mb_y = mb_y;
 
424
            ff_init_block_index(s);
422
425
            for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
423
426
                const int mb_xy = mb_x + mb_y * s->mb_stride;
424
427
 
 
428
                ff_update_block_index(s);
 
429
 
425
430
                if (IS_INTRA(s->current_picture.f.mb_type[mb_xy]))
426
431
                    continue;
427
432
                if (!(s->error_status_table[mb_xy] & ER_MV_ERROR))
456
461
 
457
462
            changed = 0;
458
463
            for (mb_y = 0; mb_y < s->mb_height; mb_y++) {
 
464
                s->mb_x = 0;
 
465
                s->mb_y = mb_y;
 
466
                ff_init_block_index(s);
459
467
                for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
460
468
                    const int mb_xy        = mb_x + mb_y * s->mb_stride;
461
469
                    int mv_predictor[8][2] = { { 0 } };
467
475
                    const int mot_index    = (mb_x + mb_y * mot_stride) * mot_step;
468
476
                    int prev_x, prev_y, prev_ref;
469
477
 
 
478
                    ff_update_block_index(s);
 
479
 
470
480
                    if ((mb_x ^ mb_y ^ pass) & 1)
471
481
                        continue;
472
482
 
1072
1082
 
1073
1083
    /* handle inter blocks with damaged AC */
1074
1084
    for (mb_y = 0; mb_y < s->mb_height; mb_y++) {
 
1085
        s->mb_x = 0;
 
1086
        s->mb_y = mb_y;
 
1087
        ff_init_block_index(s);
1075
1088
        for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
1076
1089
            const int mb_xy   = mb_x + mb_y * s->mb_stride;
1077
1090
            const int mb_type = s->current_picture.f.mb_type[mb_xy];
1078
1091
            int dir           = !s->last_picture.f.data[0];
1079
1092
 
 
1093
            ff_update_block_index(s);
 
1094
 
1080
1095
            error = s->error_status_table[mb_xy];
1081
1096
 
1082
1097
            if (IS_INTRA(mb_type))
1114
1129
    /* guess MVs */
1115
1130
    if (s->pict_type == AV_PICTURE_TYPE_B) {
1116
1131
        for (mb_y = 0; mb_y < s->mb_height; mb_y++) {
 
1132
            s->mb_x = 0;
 
1133
            s->mb_y = mb_y;
 
1134
            ff_init_block_index(s);
1117
1135
            for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
1118
1136
                int       xy      = mb_x * 2 + mb_y * 2 * s->b8_stride;
1119
1137
                const int mb_xy   = mb_x + mb_y * s->mb_stride;
1120
1138
                const int mb_type = s->current_picture.f.mb_type[mb_xy];
1121
1139
 
 
1140
                ff_update_block_index(s);
 
1141
 
1122
1142
                error = s->error_status_table[mb_xy];
1123
1143
 
1124
1144
                if (IS_INTRA(mb_type))