* [FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size
@ 2022-03-11 20:20 Michael Niedermayer
2022-03-11 20:20 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for DFA Michael Niedermayer
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-03-11 20:20 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Timeout
Fixes: 45170/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEGB_fuzzer-5874820431085568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/mjpegbdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c
index 218be41192..c3d3125142 100644
--- a/libavcodec/mjpegbdec.c
+++ b/libavcodec/mjpegbdec.c
@@ -57,6 +57,7 @@ static int mjpegb_decode_frame(AVCodecContext *avctx,
buf_end = buf + buf_size;
s->got_picture = 0;
s->adobe_transform = -1;
+ s->buf_size = buf_size;
read_header:
/* reset on every SOI */
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for DFA
2022-03-11 20:20 [FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size Michael Niedermayer
@ 2022-03-11 20:20 ` Michael Niedermayer
2022-03-14 18:54 ` Michael Niedermayer
2022-03-11 20:20 ` [FFmpeg-devel] [PATCH 3/3] avcodec/dfa: Optimize output reshuffle loop Michael Niedermayer
2022-03-17 19:23 ` [FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size Michael Niedermayer
2 siblings, 1 reply; 6+ messages in thread
From: Michael Niedermayer @ 2022-03-11 20:20 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Timeout
Fixes: 45351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFA_fuzzer-5768895011618816
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
tools/target_dec_fuzzer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index cef71e1e0a..23b0184059 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -157,6 +157,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
case AV_CODEC_ID_BINKVIDEO: maxpixels /= 32; break;
case AV_CODEC_ID_CFHD: maxpixels /= 128; break;
case AV_CODEC_ID_COOK: maxsamples /= 1<<20; break;
+ case AV_CODEC_ID_DFA: maxpixels /= 1024; break;
case AV_CODEC_ID_DIRAC: maxpixels /= 8192; break;
case AV_CODEC_ID_DST: maxsamples /= 1<<20; break;
case AV_CODEC_ID_DVB_SUBTITLE: av_dict_set_int(&opts, "compute_clut", -2, 0); break;
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for DFA
2022-03-11 20:20 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for DFA Michael Niedermayer
@ 2022-03-14 18:54 ` Michael Niedermayer
0 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-03-14 18:54 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 617 bytes --]
On Fri, Mar 11, 2022 at 09:20:24PM +0100, Michael Niedermayer wrote:
> Fixes: Timeout
> Fixes: 45351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFA_fuzzer-5768895011618816
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> tools/target_dec_fuzzer.c | 1 +
> 1 file changed, 1 insertion(+)
will apply
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The worst form of inequality is to try to make unequal things equal.
-- Aristotle
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* [FFmpeg-devel] [PATCH 3/3] avcodec/dfa: Optimize output reshuffle loop
2022-03-11 20:20 [FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size Michael Niedermayer
2022-03-11 20:20 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for DFA Michael Niedermayer
@ 2022-03-11 20:20 ` Michael Niedermayer
2022-03-17 19:23 ` Michael Niedermayer
2022-03-17 19:23 ` [FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size Michael Niedermayer
2 siblings, 1 reply; 6+ messages in thread
From: Michael Niedermayer @ 2022-03-11 20:20 UTC (permalink / raw)
To: FFmpeg development discussions and patches
18035 -> 4018 dezicycles (Tested with LOGOS.DFA, gcc 7, 3950X)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/dfa.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 0cf3641a38..ab78d66763 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -388,9 +388,17 @@ static int dfa_decode_frame(AVCodecContext *avctx,
for (i = 0; i < avctx->height; i++) {
if(version == 0x100) {
int j;
- for(j = 0; j < avctx->width; j++) {
- dst[j] = buf[ (i&3)*(avctx->width /4) + (j/4) +
- ((j&3)*(avctx->height/4) + (i/4))*avctx->width];
+ const uint8_t *buf1 = buf + (i&3)*(avctx->width/4) + (i/4)*avctx->width;
+ int stride = (avctx->height/4)*avctx->width;
+ for(j = 0; j < avctx->width/4; j++) {
+ dst[4*j+0] = buf1[j + 0*stride];
+ dst[4*j+1] = buf1[j + 1*stride];
+ dst[4*j+2] = buf1[j + 2*stride];
+ dst[4*j+3] = buf1[j + 3*stride];
+ }
+ j *= 4;
+ for(; j < avctx->width; j++) {
+ dst[j] = buf1[(j/4) + (j&3)*stride];
}
} else {
memcpy(dst, buf, avctx->width);
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] avcodec/dfa: Optimize output reshuffle loop
2022-03-11 20:20 ` [FFmpeg-devel] [PATCH 3/3] avcodec/dfa: Optimize output reshuffle loop Michael Niedermayer
@ 2022-03-17 19:23 ` Michael Niedermayer
0 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-03-17 19:23 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 609 bytes --]
On Fri, Mar 11, 2022 at 09:20:25PM +0100, Michael Niedermayer wrote:
> 18035 -> 4018 dezicycles (Tested with LOGOS.DFA, gcc 7, 3950X)
>
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/dfa.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
will apply
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size
2022-03-11 20:20 [FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size Michael Niedermayer
2022-03-11 20:20 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for DFA Michael Niedermayer
2022-03-11 20:20 ` [FFmpeg-devel] [PATCH 3/3] avcodec/dfa: Optimize output reshuffle loop Michael Niedermayer
@ 2022-03-17 19:23 ` Michael Niedermayer
2 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-03-17 19:23 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 809 bytes --]
On Fri, Mar 11, 2022 at 09:20:23PM +0100, Michael Niedermayer wrote:
> Fixes: Timeout
> Fixes: 45170/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEGB_fuzzer-5874820431085568
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/mjpegbdec.c | 1 +
> 1 file changed, 1 insertion(+)
will apply
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-17 19:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 20:20 [FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size Michael Niedermayer
2022-03-11 20:20 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for DFA Michael Niedermayer
2022-03-14 18:54 ` Michael Niedermayer
2022-03-11 20:20 ` [FFmpeg-devel] [PATCH 3/3] avcodec/dfa: Optimize output reshuffle loop Michael Niedermayer
2022-03-17 19:23 ` Michael Niedermayer
2022-03-17 19:23 ` [FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size Michael Niedermayer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git