|
|
@@ -1435,6 +1435,8 @@ static int decode_slice(AVCodecContext *c, void *arg){ |
|
|
|
|
|
|
|
|
decode_plane(fs, p->data[1] + ps*cx+cy*p->linesize[1], chroma_width, chroma_height, p->linesize[1], 1); |
|
|
decode_plane(fs, p->data[1] + ps*cx+cy*p->linesize[1], chroma_width, chroma_height, p->linesize[1], 1); |
|
|
decode_plane(fs, p->data[2] + ps*cx+cy*p->linesize[1], chroma_width, chroma_height, p->linesize[2], 1); |
|
|
decode_plane(fs, p->data[2] + ps*cx+cy*p->linesize[1], chroma_width, chroma_height, p->linesize[2], 1); |
|
|
|
|
|
if (fs->transparency) |
|
|
|
|
|
decode_plane(fs, p->data[3] + ps*x + y*p->linesize[3], width, height, p->linesize[3], 2); |
|
|
}else{ |
|
|
}else{ |
|
|
decode_rgb_frame(fs, (uint32_t*)p->data[0] + ps*x + y*(p->linesize[0]/4), width, height, p->linesize[0]/4); |
|
|
decode_rgb_frame(fs, (uint32_t*)p->data[0] + ps*x + y*(p->linesize[0]/4), width, height, p->linesize[0]/4); |
|
|
} |
|
|
} |
|
|
@@ -1571,7 +1573,7 @@ static int read_header(FFV1Context *f){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(f->colorspace==0){ |
|
|
if(f->colorspace==0){ |
|
|
if(f->avctx->bits_per_raw_sample<=8){ |
|
|
|
|
|
|
|
|
if(f->avctx->bits_per_raw_sample<=8 && !f->transparency){ |
|
|
switch(16*f->chroma_h_shift + f->chroma_v_shift){ |
|
|
switch(16*f->chroma_h_shift + f->chroma_v_shift){ |
|
|
case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P; break; |
|
|
case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P; break; |
|
|
case 0x10: f->avctx->pix_fmt= PIX_FMT_YUV422P; break; |
|
|
case 0x10: f->avctx->pix_fmt= PIX_FMT_YUV422P; break; |
|
|
@@ -1582,6 +1584,13 @@ static int read_header(FFV1Context *f){ |
|
|
av_log(f->avctx, AV_LOG_ERROR, "format not supported\n"); |
|
|
av_log(f->avctx, AV_LOG_ERROR, "format not supported\n"); |
|
|
return -1; |
|
|
return -1; |
|
|
} |
|
|
} |
|
|
|
|
|
}else if(f->avctx->bits_per_raw_sample<=8 && f->transparency){ |
|
|
|
|
|
switch(16*f->chroma_h_shift + f->chroma_v_shift){ |
|
|
|
|
|
case 0x11: f->avctx->pix_fmt= PIX_FMT_YUVA420P; break; |
|
|
|
|
|
default: |
|
|
|
|
|
av_log(f->avctx, AV_LOG_ERROR, "format not supported\n"); |
|
|
|
|
|
return -1; |
|
|
|
|
|
} |
|
|
}else if(f->avctx->bits_per_raw_sample==9) { |
|
|
}else if(f->avctx->bits_per_raw_sample==9) { |
|
|
switch(16*f->chroma_h_shift + f->chroma_v_shift){ |
|
|
switch(16*f->chroma_h_shift + f->chroma_v_shift){ |
|
|
case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P16; break; |
|
|
case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P16; break; |
|
|
|