static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){
    const int b_stride= s->b_width << s->block_max_depth;
    BlockNode *block= &s->block[mb_x + mb_y * b_stride];
    BlockNode backup= *block;
    int rd, index, value;
    assert(mb_x>=0 && mb_y>=0);
    assert(mb_x<b_stride);
    if(intra){
        block->color[0] = p[0];
        block->color[1] = p[1];
        block->color[2] = p[2];
        block->type |= BLOCK_INTRA;
    }else{
        index= (p[0] + 31*p[1]) & (ME_CACHE_SIZE-1);
        value= s->me_cache_generation + (p[0]>>10) + (p[1]<<6) + (block->ref<<12);
        if(s->me_cache[index] == value)
            return 0;
        s->me_cache[index]= value;
        block->mx= p[0];
        block->my= p[1];
        block->type &= ~BLOCK_INTRA;
    }
    rd= get_block_rd(s, mb_x, mb_y, 0, obmc_edged);
    if(rd < *best_rd){
        *best_rd= rd;
        return 1;
    }else{
        *block= backup;
        return 0;
    }
}
['static av_always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, const uint8_t *obmc_edged, int *best_rd){\n    int p[2] = {p0, p1};\n    return check_block(s, mb_x, mb_y, p, 0, obmc_edged, best_rd);\n}', 'static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){\n    const int b_stride= s->b_width << s->block_max_depth;\n    BlockNode *block= &s->block[mb_x + mb_y * b_stride];\n    BlockNode backup= *block;\n    int rd, index, value;\n    assert(mb_x>=0 && mb_y>=0);\n    assert(mb_x<b_stride);\n    if(intra){\n        block->color[0] = p[0];\n        block->color[1] = p[1];\n        block->color[2] = p[2];\n        block->type |= BLOCK_INTRA;\n    }else{\n        index= (p[0] + 31*p[1]) & (ME_CACHE_SIZE-1);\n        value= s->me_cache_generation + (p[0]>>10) + (p[1]<<6) + (block->ref<<12);\n        if(s->me_cache[index] == value)\n            return 0;\n        s->me_cache[index]= value;\n        block->mx= p[0];\n        block->my= p[1];\n        block->type &= ~BLOCK_INTRA;\n    }\n    rd= get_block_rd(s, mb_x, mb_y, 0, obmc_edged);\n    if(rd < *best_rd){\n        *best_rd= rd;\n        return 1;\n    }else{\n        *block= backup;\n        return 0;\n    }\n}']