Opened 3 years ago

Closed 10 days ago

#4772 closed defect (fixed)

mjpeg: wrong colors (CMYK)

Reported by: pszemus Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: mjpeg
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)

static1.money.pl_i_h_71_362567__hpb.jpg (455.9 KB) - added by pszemus 3 years ago.

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by pszemus

comment:1 Changed 3 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords mjpeg added
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

Patch sent.

comment:2 Changed 3 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Fixed in 84170d4be053a4c7901965fe1977970b5c5e85e5 - thank you for the sample!

comment:3 follow-up: Changed 10 days ago by erok

  • Resolution fixed deleted
  • Status changed from closed to reopened

It seems the problem is not fixed. Reproduced on 4.0.3.

comment:4 in reply to: ↑ 3 Changed 10 days ago by cehoyos

  • Resolution set to fixed
  • Status changed from reopened to 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).

Note: See TracTickets for help on using tickets.