Revision e1b24cfd

View differences:

libavcodec/dnxhdenc.c
33 33

  
34 34
#define LAMBDA_FRAC_BITS 10
35 35

  
36
static av_always_inline void dnxhd_get_pixels_8x4(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
37
{
38
    int i;
39
    for (i = 0; i < 4; i++) {
40
        block[0] = pixels[0]; block[1] = pixels[1];
41
        block[2] = pixels[2]; block[3] = pixels[3];
42
        block[4] = pixels[4]; block[5] = pixels[5];
43
        block[6] = pixels[6]; block[7] = pixels[7];
44
        pixels += line_size;
45
        block += 8;
46
    }
47
    memcpy(block   , block- 8, sizeof(*block)*8);
48
    memcpy(block+ 8, block-16, sizeof(*block)*8);
49
    memcpy(block+16, block-24, sizeof(*block)*8);
50
    memcpy(block+24, block-32, sizeof(*block)*8);
51
}
52

  
36 53
static int dnxhd_init_vlc(DNXHDEncContext *ctx)
37 54
{
38 55
    int i, j, level, run;
......
330 347
    return bits;
331 348
}
332 349

  
333
static av_always_inline void dnxhd_get_pixels_8x4(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
334
{
335
    int i;
336
    for (i = 0; i < 4; i++) {
337
        block[0] = pixels[0]; block[1] = pixels[1];
338
        block[2] = pixels[2]; block[3] = pixels[3];
339
        block[4] = pixels[4]; block[5] = pixels[5];
340
        block[6] = pixels[6]; block[7] = pixels[7];
341
        pixels += line_size;
342
        block += 8;
343
    }
344
    memcpy(block   , block- 8, sizeof(*block)*8);
345
    memcpy(block+ 8, block-16, sizeof(*block)*8);
346
    memcpy(block+16, block-24, sizeof(*block)*8);
347
    memcpy(block+24, block-32, sizeof(*block)*8);
348
}
349

  
350 350
static av_always_inline void dnxhd_get_blocks(DNXHDEncContext *ctx, int mb_x, int mb_y)
351 351
{
352 352
    const uint8_t *ptr_y = ctx->thread[0]->src[0] + ((mb_y << 4) * ctx->m.linesize)   + (mb_x << 4);

Also available in: Unified diff