[FFmpeg-devel] [RFC] ffv1: 16bit gray support
Michael Niedermayer
michaelni at gmx.at
Sat Feb 4 05:31:03 CET 2012
On Sat, Feb 04, 2012 at 01:35:14AM +0000, Paul B Mahol wrote:
>
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> libavcodec/ffv1.c | 26 +++++++++++++++++++++++---
> 1 files changed, 23 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
> index 667b8ea..3cf218a 100644
> --- a/libavcodec/ffv1.c
> +++ b/libavcodec/ffv1.c
> @@ -912,6 +912,18 @@ static av_cold int encode_init(AVCodecContext *avctx)
>
> avctx->coded_frame= &s->picture;
> switch(avctx->pix_fmt){
> + case PIX_FMT_GRAY16:
> + if(avctx->bits_per_raw_sample <=8){
> + av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample invalid\n");
> + return -1;
> + }
> + if(!s->ac){
> + av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample of more than 8 needs -coder 1 currently\n");
> + return -1;
> + }
> + s->colorspace= 2;
this should be colorspace = 0 and grayscale = 1
ok we have no grayscale variable in the implementation but the spec
does have one.
put_rac(c, state, 1); //chroma planes <------grayscale
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120204/3c4123de/attachment.asc>
More information about the ffmpeg-devel
mailing list