[FFmpeg-cvslog] j2kenc: fix colors on yuv444
Michael Niedermayer
git at videolan.org
Tue Sep 27 21:34:39 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 27 21:02:02 2011 +0200| [2214a67de582d47ee1ba84771df61e8466cc9c92] | committer: Michael Niedermayer
j2kenc: fix colors on yuv444
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2214a67de582d47ee1ba84771df61e8466cc9c92
---
libavcodec/j2kenc.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index 1c2e89a..4832b29 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -285,7 +285,11 @@ static int put_cod(J2kEncoderContext *s)
// SGcod
bytestream_put_byte(&s->buf, 0); // progression level
bytestream_put_be16(&s->buf, 1); // num of layers
- bytestream_put_byte(&s->buf, 0); // multiple component transformation
+ if(s->avctx->pix_fmt == PIX_FMT_YUV444P){
+ bytestream_put_byte(&s->buf, 2); // ICT
+ }else{
+ bytestream_put_byte(&s->buf, 0); // unspecified
+ }
// SPcod
bytestream_put_byte(&s->buf, codsty->nreslevels - 1); // num of decomp. levels
bytestream_put_byte(&s->buf, codsty->log2_cblk_width-2); // cblk width
More information about the ffmpeg-cvslog
mailing list