Revision 00182190 libavcodec/pnmenc.c

View differences:

libavcodec/pnmenc.c
63 63
    switch(avctx->pix_fmt) {
64 64
    default:
65 65
        return -1;
66
    case PIX_FMT_RGB48BE:
67
        n = avctx->width * 6;
68
        goto do_read;
66 69
    case PIX_FMT_RGB24:
67 70
        n = avctx->width * 3;
68 71
        goto do_read;
......
195 198
        c = '6';
196 199
        n = avctx->width * 3;
197 200
        break;
201
    case PIX_FMT_RGB48BE:
202
        c = '6';
203
        n = avctx->width * 6;
204
        break;
198 205
    case PIX_FMT_YUV420P:
199 206
        c = '5';
200 207
        n = avctx->width;
......
209 216
    s->bytestream += strlen(s->bytestream);
210 217
    if (avctx->pix_fmt != PIX_FMT_MONOWHITE) {
211 218
        snprintf(s->bytestream, s->bytestream_end - s->bytestream,
212
                 "%d\n", (avctx->pix_fmt != PIX_FMT_GRAY16BE) ? 255 : 65535);
219
                 "%d\n", (avctx->pix_fmt != PIX_FMT_GRAY16BE && avctx->pix_fmt != PIX_FMT_RGB48BE) ? 255 : 65535);
213 220
        s->bytestream += strlen(s->bytestream);
214 221
    }
215 222

  
......
394 401
    pnm_encode_frame,
395 402
    NULL, //encode_end,
396 403
    pnm_decode_frame,
397
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_NONE},
404
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE},
398 405
    .long_name= NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
399 406
};
400 407
#endif // CONFIG_PPM_ENCODER

Also available in: Unified diff