Hi! Attached patch allows lossless encoding of lena.pnm in yuv420p, yuv422p, yuv410p and yuv411p with the native jpeg 2000 encoder, fixes tickets #535 and #4524. Tested only with FFmpeg, all other decoders also fail for file3.jp2, the relevant sample from the reference file suite.
Please comment, Carl Eugen
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index 6d7b3f7..42489d8 100644 --- a/libavcodec/j2kenc.c +++ b/libavcodec/j2kenc.c @@ -1158,9 +1158,8 @@ AVCodec ff_jpeg2000_encoder = { .capabilities = CODEC_CAP_EXPERIMENTAL, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB24, AV_PIX_FMT_YUV444P, AV_PIX_FMT_GRAY8, -/* AV_PIX_FMT_YUV420P, - AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, - AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,*/ + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_NONE }, .priv_class = &j2k_class,
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel