Mercurial > libavcodec.hg
comparison pnm.c @ 9002:eb98d61af310 libavcodec
Support 48-bit RGB PPM image.
| author | pross |
|---|---|
| date | Sun, 22 Feb 2009 00:56:55 +0000 |
| parents | 04423b2f6e0b |
| children | de31b10455cc |
comparison
equal
deleted
inserted
replaced
| 9001:ec04c3c5a3e5 | 9002:eb98d61af310 |
|---|---|
| 136 if (s->maxval >= 256) { | 136 if (s->maxval >= 256) { |
| 137 if (avctx->pix_fmt == PIX_FMT_GRAY8) { | 137 if (avctx->pix_fmt == PIX_FMT_GRAY8) { |
| 138 avctx->pix_fmt = PIX_FMT_GRAY16BE; | 138 avctx->pix_fmt = PIX_FMT_GRAY16BE; |
| 139 if (s->maxval != 65535) | 139 if (s->maxval != 65535) |
| 140 avctx->pix_fmt = PIX_FMT_GRAY16; | 140 avctx->pix_fmt = PIX_FMT_GRAY16; |
| 141 } if (avctx->pix_fmt == PIX_FMT_RGB24) { | |
| 142 if (s->maxval > 255) | |
| 143 avctx->pix_fmt = PIX_FMT_RGB48BE; | |
| 141 } else { | 144 } else { |
| 142 av_log(avctx, AV_LOG_ERROR, "16-bit components are only supported for grayscale\n"); | 145 av_log(avctx, AV_LOG_ERROR, "Unsupported pixel format\n"); |
| 143 avctx->pix_fmt = PIX_FMT_NONE; | 146 avctx->pix_fmt = PIX_FMT_NONE; |
| 144 return -1; | 147 return -1; |
| 145 } | 148 } |
| 146 } | 149 } |
| 147 } | 150 } |
