[FFmpeg-trac] #850(undetermined:new): jpg: fix colors for sequential RGB

FFmpeg trac at avcodec.org
Thu Dec 29 23:09:16 CET 2011


#850: jpg: fix colors for sequential RGB
-------------------------------------+-------------------------------------
             Reporter:  ami_stuff    |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 this hack seems to solve the problem

 mjpegdec.c:
 {{{
            av_log(s->avctx, AV_LOG_ERROR, "decode_sos: index(%d) out of
 components\n", index);
             return -1;
         }
         /* Metasoft MJPEG codec has Cb and Cr swapped */
 -        if (s->avctx->codec_tag == MKTAG('M', 'T', 'S', 'J')
 -            && nb_components == 3 && s->nb_components == 3 && i)
             index = 3 - i;

         if(nb_components == 3 && s->nb_components == 3 &&
 s->avctx->pix_fmt == PIX_FMT_GBR24P)
             index = (i+2)%3;

 }}}

-- 
Ticket URL: <http://ffmpeg.org/trac/ffmpeg/ticket/850>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list