[FFmpeg-trac] #9939(avcodec:new): JPEG 2000 images are decoded twice and needlessly slow
FFmpeg
trac at avcodec.org
Fri Sep 23 18:17:17 EEST 2022
#9939: JPEG 2000 images are decoded twice and needlessly slow
--------------------------------------+-----------------------------------
Reporter: Tomas Härdin | Owner: (none)
Type: enhancement | Status: new
Priority: wish | Component: avcodec
Version: git-master | Resolution:
Keywords: j2k | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------------+-----------------------------------
Comment (by Tomas Härdin):
Replying to [comment:1 mkver]:
> As I have already told you on IRC: The jpeg2000 decoder needs to set the
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM cap internal (and needs to export the
relevant info even if the frame is discarded due to skip_frame being to
set to AVDISCARD_ALL). Then the frame won't be decoded in
avformat_find_stream_info().
I implemented a very hackish solution like this and it does indeed work.
Basically jpeg2000_read_main_headers(), ff_thread_get_buffer(), cleanup
and then returning. I'm using pngdec.c as my reference.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9939#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list