X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fffv1.c;h=0dc7c07df5222eea84f7299f0ad9e60af7a703a3;hb=892d226857f9276d94f7734b0cd9af9ac3385086;hp=14e39ca4a2810e5beb2d5eec004cb740b7f435a5;hpb=98a6fff98c3f2e963783e52fb193529bdc14e040;p=ffmpeg diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 14e39ca4a28..0dc7c07df52 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -768,7 +768,9 @@ static inline void decode_line(FFV1Context *s, int w, int_fast16_t *sample[2], i static void decode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride, int plane_index){ int x, y; int_fast16_t sample_buffer[2][w+6]; - int_fast16_t *sample[2]= {sample_buffer[0]+3, sample_buffer[1]+3}; + int_fast16_t *sample[2]; + sample[0]=sample_buffer[0]+3; + sample[1]=sample_buffer[1]+3; s->run_index=0; @@ -795,10 +797,11 @@ static void decode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride, static void decode_rgb_frame(FFV1Context *s, uint32_t *src, int w, int h, int stride){ int x, y, p; int_fast16_t sample_buffer[3][2][w+6]; - int_fast16_t *sample[3][2]= { - {sample_buffer[0][0]+3, sample_buffer[0][1]+3}, - {sample_buffer[1][0]+3, sample_buffer[1][1]+3}, - {sample_buffer[2][0]+3, sample_buffer[2][1]+3}}; + int_fast16_t *sample[3][2]; + for(x=0; x<3; x++){ + sample[x][0] = sample_buffer[x][0]+3; + sample[x][1] = sample_buffer[x][1]+3; + } s->run_index=0; @@ -1022,7 +1025,8 @@ AVCodec ffv1_decoder = { common_end, decode_frame, CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, - NULL + NULL, + .long_name= "FFmpeg codec #1", }; #ifdef CONFIG_ENCODERS @@ -1034,6 +1038,7 @@ AVCodec ffv1_encoder = { encode_init, encode_frame, common_end, - .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGB32, -1}, + .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGB32, PIX_FMT_NONE}, + .long_name= "FFmpeg codec #1", }; #endif