On 06/08/2010, at 3:22 AM, Igor R wrote:
You need libjpeg.
I never worked with ppm, but as for bmp, I convert it to jpeg without
libjpeg. First I scale it with sws_scale() from RGB to
PIX_FMT_YUV420P, then encode with avcodec_encode_video() to
PIX_FMT_YUVJ420P.
I would recommend avoid using PIX_FMT_YUV420P for jpeg files, instead
convert straight from RGB to PIX_FMT_YUVJ420P.
YUV420P has a smaller dynamic range than YUVJ420P and is only useful
for video.
You may even want to consider using a 422 codec rather than a 420 (or
even 444), depending on how high quality you want your jpeg.
Mark
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user