summaryrefslogtreecommitdiff
path: root/libavcodec/j2kenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-09-27 21:02:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-27 21:32:39 +0200
commit2214a67de582d47ee1ba84771df61e8466cc9c92 (patch)
tree47d73d4324dd26a942508df63b72c18de4450a1e /libavcodec/j2kenc.c
parent9e0438c903d39a04cce071766894e1c1f4dce30c (diff)
downloadffmpeg-2214a67de582d47ee1ba84771df61e8466cc9c92.tar.gz
j2kenc: fix colors on yuv444
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/j2kenc.c')
-rw-r--r--libavcodec/j2kenc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index 1c2e89a922..4832b295f1 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