Revision 48d1b9a1 libavcodec/snow.c

View differences:

libavcodec/snow.c
3145 3145
 */
3146 3146
            rate += get_block_bits(s, mb_x + (i&1) - (i>>1), mb_y + (i>>1), 1);
3147 3147
        }
3148
        if(mb_x == b_stride-2)
3149
            rate += get_block_bits(s, mb_x + 1, mb_y + 1, 1);
3148 3150
    }
3149 3151
    return distortion + rate*penalty_factor;
3150 3152
}
......
3389 3391
                    color[i]= get_dc(s, mb_x, mb_y, i);
3390 3392

  
3391 3393
                // get previous score (cant be cached due to OBMC)
3392
                check_block_inter(s, mb_x, mb_y, block->mx, block->my, 0, *obmc_edged, &best_rd);
3394
                if(pass > 0 && (block->type&BLOCK_INTRA)){
3395
                    int color0[3]= {block->color[0], block->color[1], block->color[2]};
3396
                    check_block(s, mb_x, mb_y, color0, 1, *obmc_edged, &best_rd);
3397
                }else
3398
                    check_block_inter(s, mb_x, mb_y, block->mx, block->my, 0, *obmc_edged, &best_rd);
3399

  
3393 3400
                check_block_inter(s, mb_x, mb_y, 0, 0, 0, *obmc_edged, &best_rd);
3394 3401
                check_block_inter(s, mb_x, mb_y, tb->mx, tb->my, 0, *obmc_edged, &best_rd);
3395 3402
                check_block_inter(s, mb_x, mb_y, lb->mx, lb->my, 0, *obmc_edged, &best_rd);

Also available in: Unified diff