#4772 closed defect (fixed)
mjpeg: wrong colors (CMYK)
Reported by: | pszemus | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | mjpeg cmyk |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
http://static1.money.pl/i/h/71/362567_hpb.jpg image decodes with wrong colors.
$ ~/ffmpeg/ffmpeg -i http://static1.money.pl/i/h/71/362567_hpb.jpg ffmpeg version N-74416-gacbd78a Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9) configuration: --prefix=/home/pszemus/ffmpeg/build --enable-pic --enable-pthreads --enable-libmp3lame --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-gpl --enable-nonfree --enable-libvpx --enable-libvorbis --enable-libx264 --pkg-config-flags=--static --enable-protocol=https --enable-openssl --extra-cflags=-I/opt/WP/common.libs/inc --extra-ldflags='-L/opt/WP/common.libs/lib -ldl' libavutil 54. 30.100 / 54. 30.100 libavcodec 56. 57.100 / 56. 57.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 33.100 / 5. 33.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, image2, from 'http://static1.money.pl/i/h/71/362567_hpb.jpg': Duration: 00:00:00.04, start: 0.000000, bitrate: 93362 kb/s Stream #0:0: Video: mjpeg, yuva444p(pc, bt470bg/unknown/unknown), 506x329, 25 tbr, 25 tbn, 25 tbc
GraphicsMagick shows CMYK colorspace:
$ gm identify -verbose http://static1.money.pl/i/h/71/362567_hpb.jpg Image: /tmp/gmby7PZM Format: JPEG (Joint Photographic Experts Group JFIF format) Geometry: 506x329 Class: DirectClass Type: color separated Depth: 8 bits-per-pixel component Channel Depths: Cyan: 8 bits Magenta: 8 bits Yellow: 8 bits Black: 8 bits Channel Statistics: Cyan: Minimum: 0.00 (0.0000) Maximum: 255.00 (1.0000) Mean: 141.88 (0.5564) Standard Deviation: 54.21 (0.2126) Magenta: Minimum: 0.00 (0.0000) Maximum: 255.00 (1.0000) Mean: 80.67 (0.3163) Standard Deviation: 41.22 (0.1616) Yellow: Minimum: 0.00 (0.0000) Maximum: 255.00 (1.0000) Mean: 117.62 (0.4613) Standard Deviation: 58.96 (0.2312) Black: Minimum: 0.00 (0.0000) Maximum: 255.00 (1.0000) Mean: 86.65 (0.3398) Standard Deviation: 74.67 (0.2928) Filesize: 455.9Ki Interlace: No Orientation: Unknown Background Color: white Border Color: #DFDFDF Matte Color: #BDBDBD Page geometry: 506x329+0+0 Compose: Over Dispose: Undefined Iterations: 0 Compression: JPEG JPEG-Quality: 99 JPEG-Colorspace: 4 JPEG-Colorspace-Name: CMYK JPEG-Sampling-factors: 1x1,1x1,1x1,1x1 Signature: c7c0e660247730f70c121c2770689eb8069ca4fe0b73ee06b5deae51ee1d792b Tainted: False User Time: 0.020u
Remote file attached.
Attachments (1)
Change History (9)
by , 9 years ago
Attachment: | static1.money.pl_i_h_71_362567__hpb.jpg added |
---|
comment:1 by , 9 years ago
Component: | undetermined → avcodec |
---|---|
Keywords: | mjpeg added |
Reproduced by developer: | set |
Status: | new → open |
Version: | unspecified → git-master |
follow-up: 6 comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fixed in 84170d4be053a4c7901965fe1977970b5c5e85e5 - thank you for the sample!
follow-up: 4 comment:3 by , 6 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It seems the problem is not fixed. Reproduced on 4.0.3.
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Replying to erok:
It seems the problem is not fixed. Reproduced on 4.0.3.
Feel free to provide a sample (and to open a new ticket).
comment:5 by , 6 years ago
Keywords: | cmyk added |
---|
comment:6 by , 4 years ago
Resolution: | fixed → duplicate |
---|
Replying to cehoyos:
Fixed in 84170d4be053a4c7901965fe1977970b5c5e85e5 - thank you for the sample!
Your patch is wrong. It should be
s->adobe_transform = 1;
or whatever you use to force CMYK. (P.S. maybe it is actually a subsamling issue)
That is why it is different from Windows.
I suppose you looked into APP14 and saw 0, which is wrong, it stands for Unknown (RGB or CMYK), unknown is 4.
And anyway this is a duplicate of #3424
comment:7 by , 4 years ago
Resolution: | duplicate → fixed |
---|
comment:8 by , 4 years ago
This also looks too green. I think that is the main issue. It is not YCCK. Again compare to Windows...
Patch sent.