Tomas Härdin
cb204f007b
libavcodec/jpeg2000_parser: Localize m->bytes_read
...
Another 6%
2022-06-10 10:50:12 +02:00
Tomas Härdin
ffc2d95674
libavcodec/jpeg2000_parser: Reindent
2022-06-10 10:50:12 +02:00
Tomas Härdin
d6d7b78c46
libavcodec/jpeg2000_parser: Rearrange ifs
...
A modest 8% improvement
2022-06-10 10:50:12 +02:00
Tomas Härdin
01827beb70
libavcodec/jpeg2000_parser: LUTify info_marker()
...
This speeds find_frame_end() up by 39% according to valgrind
2022-06-10 10:50:12 +02:00
Tomas Härdin
6704c2dd19
libavcodec/jpeg2000_parser: next_state is just a temporary
2022-06-10 10:50:12 +02:00
Tomas Härdin
5cfc1b0595
libavcodec/jpeg2000_parser: Simplify, fix reset_context()
2022-06-10 10:50:12 +02:00
Tomas Härdin
1ee994e168
libavcodec/jpeg2000_parser: Speed up long skips
2022-06-10 10:50:12 +02:00
Michael Niedermayer
7dfa8040d6
avcodec/jpeg2000_parser: Check state!=0
...
Fixes: out of array read
Fixes: 37664/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5893420460146688
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-14 17:34:33 +02:00
Shaun Simpson
16102cada5
avcodec/jpeg2000_parser: Fix skipping of JP2 info markers by correctly reading marker size
...
Signed-off-by: Shaun Simpson <shauns2029@gmail.com >
2021-08-25 15:12:09 +02:00
Shaun Simpson
01284c01c1
avcodec/jpeg2000_parser: Fix parsing of tile-part header
...
And frames where the end of frame marker is at the end of the buffer.
Signed-off-by: Shaun Simpson <shauns2029@gmail.com >
2021-08-25 14:47:03 +02:00
Andreas Rheinhardt
e625ae6092
avcodec: Constify all the AVCodecParsers
...
Possible now that the next pointer no longer exists.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2021-04-27 10:43:16 -03:00
Gautam Ramakrishnan
d09c35677d
libavcodec/jpeg2000_parser: Add jpeg2000 parser
...
I have attempted to write a JPEG2000 Parser. Have tested
by generating a file containing 14 frames, as mentioned
by Micheal. Have also tried testing with various packet
sizes by setting -frame_size option. Additionally,
fixed a few formatting issues as pointed out by Micheal.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-06-07 01:23:40 +02:00