Revision 20e5d64a libavcodec/msvideo1enc.c

View differences:

libavcodec/msvideo1enc.c
78 78
    *p = *pict;
79 79
    if(!c->prev)
80 80
        c->prev = av_malloc(avctx->width * 3 * (avctx->height + 3));
81
    prevptr = c->prev + avctx->width * 3 * (((avctx->height + 3)&~3) - 1);
82
    src = (uint16_t*)(p->data[0] + p->linesize[0]*(((avctx->height + 3)&~3) - 1));
81
    prevptr = c->prev + avctx->width * 3 * (FFALIGN(avctx->height, 4) - 1);
82
    src = (uint16_t*)(p->data[0] + p->linesize[0]*(FFALIGN(avctx->height, 4) - 1));
83 83
    if(c->keyint >= avctx->keyint_min)
84 84
        keyframe = 1;
85 85

  
......
96 96
                for(i = 0; i < 4; i++){
97 97
                    uint16_t val = src[x + i - j*p->linesize[0]/2];
98 98
                    for(k = 0; k < 3; k++){
99
                        c->block[(i + j*4)*3 + k] = (val >> (10-k*5)) & 0x1F;
99
                        c->block[(i + j*4)*3 + k] =
100 100
                        c->block2[remap[i + j*4]*3 + k] = (val >> (10-k*5)) & 0x1F;
101 101
                    }
102 102
                }
......
293 293
    encode_init,
294 294
    encode_frame,
295 295
    encode_end,
296
    .pix_fmts = (enum PixelFormat[]){PIX_FMT_RGB555, PIX_FMT_NONE},
296
    .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB555, PIX_FMT_NONE},
297 297
    .long_name = NULL_IF_CONFIG_SMALL("Microsoft Video-1"),
298 298
};

Also available in: Unified diff