Revision 50ba3fd7 libavcodec/vp3.c

View differences:

libavcodec/vp3.c
1233 1233
 */
1234 1234
#define COMPATIBLE_FRAME(x) \
1235 1235
  (compatible_frame[s->all_fragments[x].coding_method] == current_frame_type)
1236
#define FRAME_CODED(x) (s->all_fragments[x].coding_method != MODE_COPY)
1237 1236
#define DC_COEFF(u) (s->coeffs[u].index ? 0 : s->coeffs[u].coeff) //FIXME do somethin to simplify this
1238 1237

  
1239 1238
static void reverse_dc_prediction(Vp3DecodeContext *s,
......
1290 1289
     * from other INTRA blocks. There are 2 golden frame coding types;
1291 1290
     * blocks encoding in these modes can only predict from other blocks
1292 1291
     * that were encoded with these 1 of these 2 modes. */
1293
    static const unsigned char compatible_frame[8] = {
1292
    static const unsigned char compatible_frame[9] = {
1294 1293
        1,    /* MODE_INTER_NO_MV */
1295 1294
        0,    /* MODE_INTRA */
1296 1295
        1,    /* MODE_INTER_PLUS_MV */
......
1298 1297
        1,    /* MODE_INTER_PRIOR_MV */
1299 1298
        2,    /* MODE_USING_GOLDEN */
1300 1299
        2,    /* MODE_GOLDEN_MV */
1301
        1     /* MODE_INTER_FOUR_MV */
1300
        1,    /* MODE_INTER_FOUR_MV */
1301
        3     /* MODE_COPY */
1302 1302
    };
1303 1303
    int current_frame_type;
1304 1304

  
......
1326 1326
                if(x){
1327 1327
                    l= i-1;
1328 1328
                    vl = DC_COEFF(l);
1329
                    if(FRAME_CODED(l) && COMPATIBLE_FRAME(l))
1329
                    if(COMPATIBLE_FRAME(l))
1330 1330
                        transform |= PL;
1331 1331
                }
1332 1332
                if(y){
1333 1333
                    u= i-fragment_width;
1334 1334
                    vu = DC_COEFF(u);
1335
                    if(FRAME_CODED(u) && COMPATIBLE_FRAME(u))
1335
                    if(COMPATIBLE_FRAME(u))
1336 1336
                        transform |= PU;
1337 1337
                    if(x){
1338 1338
                        ul= i-fragment_width-1;
1339 1339
                        vul = DC_COEFF(ul);
1340
                        if(FRAME_CODED(ul) && COMPATIBLE_FRAME(ul))
1340
                        if(COMPATIBLE_FRAME(ul))
1341 1341
                            transform |= PUL;
1342 1342
                    }
1343 1343
                    if(x + 1 < fragment_width){
1344 1344
                        ur= i-fragment_width+1;
1345 1345
                        vur = DC_COEFF(ur);
1346
                        if(FRAME_CODED(ur) && COMPATIBLE_FRAME(ur))
1346
                        if(COMPATIBLE_FRAME(ur))
1347 1347
                            transform |= PUR;
1348 1348
                    }
1349 1349
                }

Also available in: Unified diff