static av_always_inline void dnxhd_get_pixels_4x8(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
{
    int i;
    for (i = 0; i < 4; i++) {
        block[0] = pixels[0];
        block[1] = pixels[1];
        block[2] = pixels[2];
        block[3] = pixels[3];
        block[4] = pixels[4];
        block[5] = pixels[5];
        block[6] = pixels[6];
        block[7] = pixels[7];
        pixels += line_size;
        block += 8;
    }
    memcpy(block   , block- 8, sizeof(*block)*8);
    memcpy(block+ 8, block-16, sizeof(*block)*8);
    memcpy(block+16, block-24, sizeof(*block)*8);
    memcpy(block+24, block-32, sizeof(*block)*8);
}
['static av_always_inline void dnxhd_get_blocks(DNXHDEncContext *ctx, int mb_x, int mb_y)\n{\n    const uint8_t *ptr_y = ctx->thread[0]->src[0] + ((mb_y << 4) * ctx->m.linesize)   + (mb_x << 4);\n    const uint8_t *ptr_u = ctx->thread[0]->src[1] + ((mb_y << 4) * ctx->m.uvlinesize) + (mb_x << 3);\n    const uint8_t *ptr_v = ctx->thread[0]->src[2] + ((mb_y << 4) * ctx->m.uvlinesize) + (mb_x << 3);\n    DSPContext *dsp = &ctx->m.dsp;\n    dsp->get_pixels(ctx->blocks[0], ptr_y    , ctx->m.linesize);\n    dsp->get_pixels(ctx->blocks[1], ptr_y + 8, ctx->m.linesize);\n    dsp->get_pixels(ctx->blocks[2], ptr_u    , ctx->m.uvlinesize);\n    dsp->get_pixels(ctx->blocks[3], ptr_v    , ctx->m.uvlinesize);\n    if (mb_y+1 == ctx->m.mb_height && ctx->m.avctx->height == 1080) {\n        if (ctx->interlaced) {\n            dnxhd_get_pixels_4x8(ctx->blocks[4], ptr_y + ctx->dct_y_offset    , ctx->m.linesize);\n            dnxhd_get_pixels_4x8(ctx->blocks[5], ptr_y + ctx->dct_y_offset + 8, ctx->m.linesize);\n            dnxhd_get_pixels_4x8(ctx->blocks[6], ptr_u + ctx->dct_uv_offset   , ctx->m.uvlinesize);\n            dnxhd_get_pixels_4x8(ctx->blocks[7], ptr_v + ctx->dct_uv_offset   , ctx->m.uvlinesize);\n        } else\n            memset(ctx->blocks[4], 0, 4*64*sizeof(DCTELEM));\n    } else {\n        dsp->get_pixels(ctx->blocks[4], ptr_y + ctx->dct_y_offset    , ctx->m.linesize);\n        dsp->get_pixels(ctx->blocks[5], ptr_y + ctx->dct_y_offset + 8, ctx->m.linesize);\n        dsp->get_pixels(ctx->blocks[6], ptr_u + ctx->dct_uv_offset   , ctx->m.uvlinesize);\n        dsp->get_pixels(ctx->blocks[7], ptr_v + ctx->dct_uv_offset   , ctx->m.uvlinesize);\n    }\n}', 'static av_always_inline void dnxhd_get_pixels_4x8(DCTELEM *restrict block, const uint8_t *pixels, int line_size)\n{\n    int i;\n    for (i = 0; i < 4; i++) {\n        block[0] = pixels[0];\n        block[1] = pixels[1];\n        block[2] = pixels[2];\n        block[3] = pixels[3];\n        block[4] = pixels[4];\n        block[5] = pixels[5];\n        block[6] = pixels[6];\n        block[7] = pixels[7];\n        pixels += line_size;\n        block += 8;\n    }\n    memcpy(block   , block- 8, sizeof(*block)*8);\n    memcpy(block+ 8, block-16, sizeof(*block)*8);\n    memcpy(block+16, block-24, sizeof(*block)*8);\n    memcpy(block+24, block-32, sizeof(*block)*8);\n}']