diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index ac94345..0e5cdf2 100644
|
a
|
b
|
int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
| 380 | 380 | else { |
| 381 | 381 | if (s->adobe_transform == 0 && s->bits <= 8) { |
| 382 | 382 | s->avctx->pix_fmt = AV_PIX_FMT_GBRAP; |
| | 383 | } else if (s->adobe_transform == 2 && s->bits <= 8) { |
| | 384 | av_log(s->avctx, AV_LOG_WARNING, |
| | 385 | "Adobe CYYK not completely supported, output colours will be wrong.\n"); |
| | 386 | s->avctx->pix_fmt = AV_PIX_FMT_YUVA444P; |
| 383 | 387 | } else { |
| 384 | 388 | s->avctx->pix_fmt = s->bits <= 8 ? AV_PIX_FMT_YUVA444P : AV_PIX_FMT_YUVA444P16; |
| 385 | 389 | s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; |
| … |
… |
the_end:
|
| 2092 | 2096 | } |
| 2093 | 2097 | } |
| 2094 | 2098 | } |
| | 2099 | if (s->adobe_transform == 2 && s->avctx->pix_fmt == AV_PIX_FMT_YUVA444P) { |
| | 2100 | int w = s->picture_ptr->width; |
| | 2101 | int h = s->picture_ptr->height; |
| | 2102 | for (i=0; i<h; i++) { |
| | 2103 | int j; |
| | 2104 | uint8_t *dst[4]; |
| | 2105 | for (index=0; index<4; index++) { |
| | 2106 | dst[index] = s->picture_ptr->data[index] |
| | 2107 | + s->picture_ptr->linesize[index]*i; |
| | 2108 | } |
| | 2109 | for (j=0; j<w; j++) { |
| | 2110 | dst[0][j] = 255 - dst[0][j]; |
| | 2111 | dst[1][j] = 255 - dst[1][j]; |
| | 2112 | dst[2][j] = 255 - dst[2][j]; |
| | 2113 | dst[3][j] = 255; |
| | 2114 | } |
| | 2115 | } |
| | 2116 | } |
| 2095 | 2117 | |
| 2096 | 2118 | if (s->stereo3d) { |
| 2097 | 2119 | AVStereo3D *stereo = av_stereo3d_create_side_data(data); |