[FFmpeg-devel] [PATCH] lavc/libopenjpegenc: move opj_setup_encoder to libopenjpeg_encode_frame

Michael Niedermayer michaelni at gmx.at
Sat Jan 24 01:06:07 CET 2015


On Fri, Jan 23, 2015 at 11:57:26PM +0100, Jean First wrote:
> On Fri Jan 23 2015 23:39:21 GMT+0100 (CET), Michael Niedermayer wrote:
> >On Fri, Jan 23, 2015 at 11:34:35PM +0100, Michael Niedermayer wrote:
> >>On Fri, Jan 23, 2015 at 09:58:41PM +0100, Jean First wrote:
> >>>if the openjpeg parameter tcp_rates is not 0 ( using the ffmpeg compression_level option )
> >>>every 2nd image per thread is badly encoded. By moving the opj_setup_encoder function from
> >>>libopenjpeg_encode_init to libopenjpeg_encode_frame this can be prevented.
> >>>
> >>>This fixes ticket #3754.
> >>how can this be reproduced ?
> >note, ive tried:
> >ffmpeg -i matrixbench_mpeg2.mpg -an -compression_level 1 -vframes 30 -threads 1 -compression_level 1 -vcodec libopenjpeg test.nut
> >
> >and that results in grayscale only output before as well as after
> >the patch
> 
> you can try with:
> 
> ffmpeg -i matrixbench_mpeg2.mpg -pix_fmt xyz12 -format:v jp2
> -profile:v cinema2k -cinema_mode 2k_24 -prog_order cprl
> -numresolution 6 -numlayers 1 -compression_level 2 -threads 1
> test-%05d.j2c
> 
> and change the value for -compression_level

ok, bugfix confirmed

patch applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150124/aaf7e878/attachment.asc>


More information about the ffmpeg-devel mailing list