[FFmpeg-devel] [PATCH 1/2] lavfi/sidedata: add missed frame side data type
From: Jun Zhao add missed frame side data type Signed-off-by: Jun Zhao --- libavfilter/f_sidedata.c | 38 ++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c index 45d246b..381da5a 100644 --- a/libavfilter/f_sidedata.c +++ b/libavfilter/f_sidedata.c @@ -43,6 +43,7 @@ typedef struct SideDataContext { } SideDataContext; #define OFFSET(x) offsetof(SideDataContext, x) +#if FF_API_FRAME_QP #define DEFINE_OPTIONS(filt_name, FLAGS) \ static const AVOption filt_name##_options[] = { \ { "mode", "set a mode of operation", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, SIDEDATA_NB-1, FLAGS, "mode" }, \ @@ -62,8 +63,45 @@ static const AVOption filt_name##_options[] = { \ { "AUDIO_SERVICE_TYPE", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_AUDIO_SERVICE_TYPE }, 0, 0, FLAGS, "type" }, \ { "MASTERING_DISPLAY_METADATA", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_MASTERING_DISPLAY_METADATA }, 0, 0, FLAGS, "type" }, \ { "GOP_TIMECODE", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_GOP_TIMECODE }, 0, 0, FLAGS, "type" }, \ +{ "SPHERICAL", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_SPHERICAL }, 0, 0, FLAGS, "type" }, \ +{ "CONTENT_LIGHT_LEVEL","", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_CONTENT_LIGHT_LEVEL}, 0, 0, FLAGS, "type" }, \ +{ "ICC_PROFILE","", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_ICC_PROFILE}, 0, 0, FLAGS, "type" }, \ +{ "QP_TABLE_PROPERTIES","", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_QP_TABLE_PROPERTIES}, 0, 0, FLAGS, "type" }, \ +{ "QP_TABLE_DATA", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_QP_TABLE_DATA }, 0, 0, FLAGS, "type" }, \ +{ "S12M_TIMECOD", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_S12M_TIMECODE }, 0, 0, FLAGS, "type" }, \ +{ "DYNAMIC_HDR_PLUS", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_DYNAMIC_HDR_PLUS }, 0, 0, FLAGS, "type" }, \ +{ "REGIONS_OF_INTEREST","", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_REGIONS_OF_INTEREST}, 0, 0, FLAGS, "type" }, \ { NULL } \ } +#else +#define DEFINE_OPTIONS(filt_name, FLAGS) \ +static const AVOption filt_name##_options[] = { \ +{ "mode", "set a mode of operation", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, SIDEDATA_NB-1, FLAGS, "mode" }, \ +{ "select", "select frame",0, AV_OPT_TYPE_CONST, {.i64 = SIDEDATA_SELECT }, 0, 0, FLAGS, "mode" }, \ +{ "delete", "delete side data",0, AV_OPT_TYPE_CONST, {.i64 = SIDEDATA_DELETE }, 0, 0, FLAGS, "mode" }, \ +{ "type", "set side data type",OFFSET(type), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, INT_MAX, FLAGS, "type" }, \ +{ "PANSCAN","", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_PANSCAN}, 0, 0, FLAGS, "type" }, \ +{ "A53_CC", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_A53_CC }, 0, 0, FLAGS, "type" }, \ +{ "STEREO3D", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_STEREO3D }, 0, 0, FLAGS, "type" }, \ +{ "MATRIXENCODING", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_MATRIXENCODING }, 0, 0, FLAGS, "type" }, \ +{ "DOWNMIX_INFO", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_DOWNMIX_INFO }, 0, 0, FLAGS, "type" }, \ +{ "REPLAYGAIN", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_REPLAYGAIN }, 0, 0, FLAGS, "type" }, \ +{ "DISPLAYMATRIX", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_DISPLAYMATRIX }, 0, 0, FLAGS, "type" }, \ +{ "AFD","", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_AFD}, 0, 0, FLAGS, "type" }, \ +{ "MOTION_VECTORS", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_MOTION_VECTORS }, 0, 0, FLAGS, "type" }, \ +{ "SKIP_SAMPLES", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_SKIP_SAMPLES }, 0, 0, FLAGS, "type" }, \ +{ "AUDIO_SERVICE_TYPE", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_AUDIO_SERVICE_TYPE }, 0, 0, FLAGS, "type" }, \ +{ "MASTERING_DISPLAY_METADATA", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_MASTERING_DISPLAY_METADATA }, 0, 0
[FFmpeg-devel] [PATCH 2/2] lavfi/showinfo: support regions of interest sidedata
From: Jun Zhao support regions of interest sidedata Signed-off-by: Jun Zhao --- libavfilter/vf_showinfo.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 9e84197..b51c1ae 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -111,6 +111,26 @@ static void dump_stereo3d(AVFilterContext *ctx, AVFrameSideData *sd) av_log(ctx, AV_LOG_INFO, " (inverted)"); } +static void dump_roi(AVFilterContext *ctx, AVFrameSideData *sd) +{ +AVRegionOfInterest *roi; +int nb_rois; + +if (sd->size < sizeof(*roi)) { +av_log(ctx, AV_LOG_INFO, "invalid data"); +return; +} + +roi = (AVRegionOfInterest *)sd->data; +nb_rois = sd->size / sizeof(*roi); + +av_log(ctx, AV_LOG_INFO, "Regions Of Interest(RoI) informations: "); +for (int index = 0; index < nb_rois; index++) { +av_log(ctx, AV_LOG_INFO, "index: %d, region: (%d %d)/(%d %d), qp offset: %d/%d", + index, roi->left, roi->top, roi->right, roi->bottom, roi->qoffset.num, roi->qoffset.den); +} +} + static void dump_color_property(AVFilterContext *ctx, AVFrame *frame) { const char *color_range_str = av_color_range_name(frame->color_range); @@ -246,6 +266,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) case AV_FRAME_DATA_AFD: av_log(ctx, AV_LOG_INFO, "afd: value of %"PRIu8, sd->data[0]); break; +case AV_FRAME_DATA_REGIONS_OF_INTEREST: +dump_roi(ctx, sd); +break; default: av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d bytes)", sd->type, sd->size); -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] lavfi/showinfo: support regions of interest sidedata
> -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of Jun Zhao > Sent: Saturday, March 09, 2019 4:34 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Jun Zhao > Subject: [FFmpeg-devel] [PATCH 2/2] lavfi/showinfo: support regions of > interest sidedata > > From: Jun Zhao > > support regions of interest sidedata > > Signed-off-by: Jun Zhao > --- > libavfilter/vf_showinfo.c | 23 +++ > 1 files changed, 23 insertions(+), 0 deletions(-) > > diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c > index 9e84197..b51c1ae 100644 > --- a/libavfilter/vf_showinfo.c > +++ b/libavfilter/vf_showinfo.c > @@ -111,6 +111,26 @@ static void dump_stereo3d(AVFilterContext *ctx, > AVFrameSideData *sd) > av_log(ctx, AV_LOG_INFO, " (inverted)"); > } > > +static void dump_roi(AVFilterContext *ctx, AVFrameSideData *sd) > +{ > +AVRegionOfInterest *roi; > +int nb_rois; > + > +if (sd->size < sizeof(*roi)) { > +av_log(ctx, AV_LOG_INFO, "invalid data"); > +return; > +} roi = (const AVRegionOfInterest *)sd->data; if (roi->self_size == 0 || sd->size % roi->self_size != 0) { //report error and return. } > + > +roi = (AVRegionOfInterest *)sd->data; > +nb_rois = sd->size / sizeof(*roi); nb_rois = sd->size / roi->self_size; > + > +av_log(ctx, AV_LOG_INFO, "Regions Of Interest(RoI) informations: "); > +for (int index = 0; index < nb_rois; index++) { > +av_log(ctx, AV_LOG_INFO, "index: %d, region: (%d %d)/(%d %d), qp > offset: %d/%d", > + index, roi->left, roi->top, roi->right, roi->bottom, > roi->qoffset.num, > roi->qoffset.den); > +} > +} > + > static void dump_color_property(AVFilterContext *ctx, AVFrame *frame) > { > const char *color_range_str = av_color_range_name(frame- > >color_range); > @@ -246,6 +266,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame > *frame) > case AV_FRAME_DATA_AFD: > av_log(ctx, AV_LOG_INFO, "afd: value of %"PRIu8, sd->data[0]); > break; > +case AV_FRAME_DATA_REGIONS_OF_INTEREST: > +dump_roi(ctx, sd); > +break; > default: > av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d > bytes)", > sd->type, sd->size); > -- > 1.7.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]lavc/tiff: Support decoding 16bit cmyk
Hi! Attached patch improves decoding this image, reported by Ulf Zibis: http://samples.ffmpeg.org/image-samples/flower-separated-contig-16.tif Please comment, Carl Eugen From 7e98c7167f62506ed726780a1f32216515f4e29f Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 9 Mar 2019 11:05:36 +0100 Subject: [PATCH] lavc/tiff: Support decoding 16bit cmyk. --- libavcodec/tiff.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 112f5b5..828ed9e 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1547,6 +1547,22 @@ again: } dst += p->linesize[plane]; } +} else if (s->photometric == TIFF_PHOTOMETRIC_SEPARATED && +s->avctx->pix_fmt == AV_PIX_FMT_RGBA64BE) { +dst = p->data[plane]; +for (i = 0; i < s->height; i++) { +for (j = 0; j < s->width; j++) { +uint64_t k = 65535 - AV_RB16(dst + 8 * j + 6); +uint64_t r = (65535 - AV_RB16(dst + 8 * j)) * k; +uint64_t g = (65535 - AV_RB16(dst + 8 * j + 2)) * k; +uint64_t b = (65535 - AV_RB16(dst + 8 * j + 4)) * k; +AV_WB16(dst + 8 * j, r * 65537 >> 32); +AV_WB16(dst + 8 * j + 2, g * 65537 >> 32); +AV_WB16(dst + 8 * j + 4, b * 65537 >> 32); +AV_WB16(dst + 8 * j + 6, 65535); +} +dst += p->linesize[plane]; +} } } -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices
Fixes / workarounds: https://bugs.freedesktop.org/show_bug.cgi?id=105368 [1]in ffmpeg This bug hits several AMD VAAPI users, especially those using h264 channels via DVB-X: https://github.com/xbmc/xbmc/issues/15704 Typical backtrace in ffmpeg code, which fits the description in [1]: #0 __memset_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:186 #1 0x7ff39a9607b4 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so #2 0x7ff39a6bf6a1 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so #3 0x7ff3d1763820 in vaEndPicture () from /usr/lib/x86_64-linux-gnu/libva.so.2 #4 0x55cd92b3655a in ff_vaapi_decode_issue () #5 0x55cd926dc8e1 in ?? () #6 0x55cd92a4975c in ff_h264_field_end () #7 0x55cd92455ca1 in ?? () #8 0x55cd923a3727 in ?? () #9 0x55cd923a6448 in avcodec_send_packet () -- Key-ID: 0x1A995A9B keyserver: pgp.mit.edu == Fingerprint: 4606 DA19 EC2E 9A0B 0157 C81B DA07 CF63 1A99 5A9B From 816e9156235a5d7d895b09c0235c9f8f1f7703e7 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 26 Jan 2019 19:48:35 +0100 Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices --- libavcodec/vaapi_h264.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index 5854587a25..81a46fa747 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) H264SliceContext *sl = &h->slice_ctx[0]; int ret; +if (pic->nb_slices == 0) { +ret = -1; +goto finish; +} + ret = ff_vaapi_decode_issue(avctx, pic); if (ret < 0) goto finish; -- 2.19.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices
From 816e9156235a5d7d895b09c0235c9f8f1f7703e7 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 26 Jan 2019 19:48:35 +0100 Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices --- libavcodec/vaapi_h264.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index 5854587a25..81a46fa747 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) H264SliceContext *sl = &h->slice_ctx[0]; int ret; +if (pic->nb_slices == 0) { +ret = -1; +goto finish; +} + ret = ff_vaapi_decode_issue(avctx, pic); if (ret < 0) goto finish; -- 2.19.1 Am Sa., 9. März 2019 um 12:46 Uhr schrieb Peter F : > > Fixes / workarounds: https://bugs.freedesktop.org/show_bug.cgi?id=105368 > [1]in ffmpeg > This bug hits several AMD VAAPI users, especially those using h264 channels > via DVB-X: https://github.com/xbmc/xbmc/issues/15704 > > Typical backtrace in ffmpeg code, which fits the description in [1]: > > #0 __memset_sse2_unaligned_erms () at > ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:186 > #1 0x7ff39a9607b4 in ?? () from > /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so > #2 0x7ff39a6bf6a1 in ?? () from > /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so > #3 0x7ff3d1763820 in vaEndPicture () from > /usr/lib/x86_64-linux-gnu/libva.so.2 > #4 0x55cd92b3655a in ff_vaapi_decode_issue () > #5 0x55cd926dc8e1 in ?? () > #6 0x55cd92a4975c in ff_h264_field_end () > #7 0x55cd92455ca1 in ?? () > #8 0x55cd923a3727 in ?? () > #9 0x55cd923a6448 in avcodec_send_packet () > > > > -- >Key-ID: 0x1A995A9B >keyserver: pgp.mit.edu > == > Fingerprint: 4606 DA19 EC2E 9A0B 0157 C81B DA07 CF63 1A99 5A9B -- Key-ID: 0x1A995A9B keyserver: pgp.mit.edu == Fingerprint: 4606 DA19 EC2E 9A0B 0157 C81B DA07 CF63 1A99 5A9B ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices
From 816e9156235a5d7d895b09c0235c9f8f1f7703e7 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 26 Jan 2019 19:48:35 +0100 Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices --- libavcodec/vaapi_h264.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index 5854587a25..81a46fa747 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) H264SliceContext *sl = &h->slice_ctx[0]; int ret; +if (pic->nb_slices == 0) { +ret = -1; +goto finish; +} + ret = ff_vaapi_decode_issue(avctx, pic); if (ret < 0) goto finish; -- 2.19.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] fate/proresenc_aw : Add fate test for interlace and 444 encoding
On Fri, Mar 08, 2019 at 12:11:47AM +0100, Martin Vignali wrote: > >> Can you check that and fix it? > >> > >> > > > Patch in attach fix for me vsynth3 interlace prores test : > make fate-vsynth3-prores_int;make fate-vsynth3-prores_444_int > > Pass fate test for me (os x X86_64) with and without > --enable-memory-poisoning > > Martin > libavcodec/proresenc_anatoliy.c |4 ++-- > tests/ref/vsynth/vsynth3-prores_444_int |8 > tests/ref/vsynth/vsynth3-prores_int |8 > 3 files changed, 10 insertions(+), 10 deletions(-) > 4dc0e29e35f88ba605b048fb841dc3c6a760b892 > 0001-avcodec-proresenc_aw-fix-interlace-encoding-for-unsa.patch > From 8203aa9eb65e616df0c7ad3926a83484bec930d5 Mon Sep 17 00:00:00 2001 > From: Martin Vignali > Date: Fri, 8 Mar 2019 00:06:01 +0100 > Subject: [PATCH] avcodec/proresenc_aw : fix interlace encoding for unsafe > height tested on x86-64 and qemu mips, works with memory poisoning thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Never trust a computer, one day, it may think you are the virus. -- Compn signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] How to filter private folders from GIT patch
Am 08.03.19 um 21:26 schrieb Moritz Barsnick: >> Are there other possibilities which are directly project-bounded? > Hoe about not committing them in the first place? (Don't use "git > commit -A", but instead carefully inspect everything "git status" > offers you.) Or, if you must, for your development desire, then commit > them in a separate commit which you then don't include in your exported > patch(es). > > I don't know about Netbeans, but e.g. Qt Creator offers me to add its > projects files to a detected revision control, but I can click "no > thanks" (or un-add them later, before committing). I don't see this in NetBeans, but I've found a solution. Thanks for your hints! I was in error about the interpretion of .git/info/exclude. I thought it was meant as path in $HOME folder. In the project's folder it does what I want, thanks Tobias. -Ulf ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/1] avcodec/aacenc: Validate and log bitrate changes made during encoding
Although accenc appears able to cope with dynamic bitrate changes, this patch makes sure that any such changes are validated in the same manner as the initial bitrate and also adds logging of such changes in verbose mode. 0001-avcodec-aacenc-Validate-and-log-bitrate-changes-made.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] CAA
On Sat, Feb 23, 2019 at 08:12:31PM +0100, Michael Niedermayer wrote: > Hi all > > if there are no objections then ill add the following > "Certificate Authority Authorization" entry: > > ffmpeg.org. IN CAA 0 issue "letsencrypt.org" > > to the zonefile done [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/dxv: Correct integer overflow in get_opcodes()
On Sun, Mar 03, 2019 at 01:11:34AM +0100, Michael Niedermayer wrote: > Fixes: > 13099/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5665598896340992 > Fixes: signed integer overflow: 2147483647 + 7 cannot be represented in type > 'int' > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/dxv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) will apply [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v5] avformat/mpegts: reduce buffering during initialization
On Fri, Mar 08, 2019 at 10:20:07PM -0500, Andriy Gelman wrote: > From: Andriy Gelman > > Reduces buffering latency with low bitrate streams, where > 8192 bytes can mean several seconds. > --- > libavformat/mpegts.c | 59 +++- > 1 file changed, 36 insertions(+), 23 deletions(-) will apply with a minor simplification [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices
should we return AVERROR_INVALIDDATA instead of -1? thanks On Sat, Mar 9, 2019 at 8:25 PM Peter F wrote: > From 816e9156235a5d7d895b09c0235c9f8f1f7703e7 Mon Sep 17 00:00:00 2001 > From: xbmc > Date: Sat, 26 Jan 2019 19:48:35 +0100 > Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices > > --- > libavcodec/vaapi_h264.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c > index 5854587a25..81a46fa747 100644 > --- a/libavcodec/vaapi_h264.c > +++ b/libavcodec/vaapi_h264.c > @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) > H264SliceContext *sl = &h->slice_ctx[0]; > int ret; > > +if (pic->nb_slices == 0) { > +ret = -1; > +goto finish; > +} > + > ret = ff_vaapi_decode_issue(avctx, pic); > if (ret < 0) > goto finish; > -- > 2.19.1 > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] lavfi/showinfo: support regions of interest sidedata
+for (int index = 0; index < nb_rois; index++) { +av_log(ctx, AV_LOG_INFO, "index: %d, region: (%d %d)/(%d %d), qp offset: %d/%d", + index, roi->left, roi->top, roi->right, roi->bottom, roi->qoffset.num, roi->qoffset.den); +} pointer roi never ++, it always point to the first AVRegionOfInterest structure. On Sat, Mar 9, 2019 at 5:36 PM Guo, Yejun wrote: > > > > -Original Message- > > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > > Of Jun Zhao > > Sent: Saturday, March 09, 2019 4:34 PM > > To: ffmpeg-devel@ffmpeg.org > > Cc: Jun Zhao > > Subject: [FFmpeg-devel] [PATCH 2/2] lavfi/showinfo: support regions of > > interest sidedata > > > > From: Jun Zhao > > > > support regions of interest sidedata > > > > Signed-off-by: Jun Zhao > > --- > > libavfilter/vf_showinfo.c | 23 +++ > > 1 files changed, 23 insertions(+), 0 deletions(-) > > > > diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c > > index 9e84197..b51c1ae 100644 > > --- a/libavfilter/vf_showinfo.c > > +++ b/libavfilter/vf_showinfo.c > > @@ -111,6 +111,26 @@ static void dump_stereo3d(AVFilterContext *ctx, > > AVFrameSideData *sd) > > av_log(ctx, AV_LOG_INFO, " (inverted)"); > > } > > > > +static void dump_roi(AVFilterContext *ctx, AVFrameSideData *sd) > > +{ > > +AVRegionOfInterest *roi; > > +int nb_rois; > > + > > +if (sd->size < sizeof(*roi)) { > > +av_log(ctx, AV_LOG_INFO, "invalid data"); > > +return; > > +} > > roi = (const AVRegionOfInterest *)sd->data; > if (roi->self_size == 0 || sd->size % roi->self_size != 0) { > //report error and return. > } > > > + > > +roi = (AVRegionOfInterest *)sd->data; > > +nb_rois = sd->size / sizeof(*roi); > > nb_rois = sd->size / roi->self_size; > > > + > > +av_log(ctx, AV_LOG_INFO, "Regions Of Interest(RoI) informations: "); > > +for (int index = 0; index < nb_rois; index++) { > > +av_log(ctx, AV_LOG_INFO, "index: %d, region: (%d %d)/(%d %d), qp > > offset: %d/%d", > > + index, roi->left, roi->top, roi->right, roi->bottom, > roi->qoffset.num, > > roi->qoffset.den); > > +} > > +} > > + > > static void dump_color_property(AVFilterContext *ctx, AVFrame *frame) > > { > > const char *color_range_str = av_color_range_name(frame- > > >color_range); > > @@ -246,6 +266,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame > > *frame) > > case AV_FRAME_DATA_AFD: > > av_log(ctx, AV_LOG_INFO, "afd: value of %"PRIu8, > sd->data[0]); > > break; > > +case AV_FRAME_DATA_REGIONS_OF_INTEREST: > > +dump_roi(ctx, sd); > > +break; > > default: > > av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d > > bytes)", > > sd->type, sd->size); > > -- > > 1.7.1 > > > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices
Yes, that makes sense. Thank you very much. Attached you find the updated version. Am Sa., 9. März 2019 um 16:32 Uhr schrieb Thomas Xu : > > should we return AVERROR_INVALIDDATA instead of -1? > thanks > > On Sat, Mar 9, 2019 at 8:25 PM Peter F wrote: > > > From 816e9156235a5d7d895b09c0235c9f8f1f7703e7 Mon Sep 17 00:00:00 2001 > > From: xbmc > > Date: Sat, 26 Jan 2019 19:48:35 +0100 > > Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices > > > > --- > > libavcodec/vaapi_h264.c | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c > > index 5854587a25..81a46fa747 100644 > > --- a/libavcodec/vaapi_h264.c > > +++ b/libavcodec/vaapi_h264.c > > @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) > > H264SliceContext *sl = &h->slice_ctx[0]; > > int ret; > > > > +if (pic->nb_slices == 0) { > > +ret = -1; > > +goto finish; > > +} > > + > > ret = ff_vaapi_decode_issue(avctx, pic); > > if (ret < 0) > > goto finish; > > -- > > 2.19.1 > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- Key-ID: 0x1A995A9B keyserver: pgp.mit.edu == Fingerprint: 4606 DA19 EC2E 9A0B 0157 C81B DA07 CF63 1A99 5A9B From 386c94489a86bb747b6531f727843cf259a24f5d Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 26 Jan 2019 19:48:35 +0100 Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices --- libavcodec/vaapi_h264.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index 5854587a25..f12fdc457a 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) H264SliceContext *sl = &h->slice_ctx[0]; int ret; +if (pic->nb_slices == 0) { +ret = AVERROR_INVALIDDATA; +goto finish; +} + ret = ff_vaapi_decode_issue(avctx, pic); if (ret < 0) goto finish; -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices
Resent - layer 8 issue with using a mail client, sorry for the noise: From 386c94489a86bb747b6531f727843cf259a24f5d Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 26 Jan 2019 19:48:35 +0100 Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices --- libavcodec/vaapi_h264.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index 5854587a25..f12fdc457a 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) H264SliceContext *sl = &h->slice_ctx[0]; int ret; +if (pic->nb_slices == 0) { +ret = AVERROR_INVALIDDATA; +goto finish; +} + ret = ff_vaapi_decode_issue(avctx, pic); if (ret < 0) goto finish; -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices
2019-03-09 16:49 GMT+01:00, Peter F : > Resent - layer 8 issue with using a mail client Attachments are fine... Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] fate/proresenc_aw : Add fate test for interlace and 444 encoding
Pushed, thanks for testing. Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices
On Sat, Mar 9, 2019 at 5:49 PM Peter F wrote: > > Resent - layer 8 issue with using a mail client, sorry for the noise: > > From 386c94489a86bb747b6531f727843cf259a24f5d Mon Sep 17 00:00:00 2001 > From: xbmc Is this author field meant to not have an actual name in it? Just verifying. > Date: Sat, 26 Jan 2019 19:48:35 +0100 > Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices Something along the lines of "avcodec/vaapi_h264: skip decoding if no slices were provided"? Also I would prefer if the reasoning for skipping decode on our layer would be explained in further lines of the commit message, like you have nicely explained it in the initial e-mail (to work-around a mesa vaapi driver bug). > > --- > libavcodec/vaapi_h264.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c > index 5854587a25..f12fdc457a 100644 > --- a/libavcodec/vaapi_h264.c > +++ b/libavcodec/vaapi_h264.c > @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) > H264SliceContext *sl = &h->slice_ctx[0]; > int ret; > > +if (pic->nb_slices == 0) { > +ret = AVERROR_INVALIDDATA; I don't remember the specifics of AVC, but are there valid VCL NAL units without slices (and would such end up in this code path to begin with)? I would guess that there would be no such valid VCL NAL units (or if there were, they wouldn't get to this point in the decode chain) - mostly just noting that this might be something we would like to check to verify if this should be an error or a "normal" state. The general idea I'm OK with since if we already know that there's no slices to decode, we might as well skip decoding as long as that doesn't cause issues with the state of the underlying libraries/drivers. Thus, I would mostly just wait for a reply from one of the VAAPI wrapper maintainers regarding if this skip should happen here or earlier in the decode process (where the buffers are being allocated). > +goto finish; > +} > + > ret = ff_vaapi_decode_issue(avctx, pic); > if (ret < 0) > goto finish; > -- > 2.20.1 Thanks for the contribution, Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] lavd: Remove libndi_newtek
They have not responded to any communications: https://trac.ffmpeg.org/ticket/7589 Kieran 0001-lavd-Remove-libndi_newtek.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavd: Remove libndi_newtek
2019-03-09 21:12 GMT+01:00, Kieran Kunhya : > They have not responded to any communications: > https://trac.ffmpeg.org/ticket/7589 Missing minor version bump and please also post a news entry. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavd: Remove libndi_newtek
2019-03-09 21:16 GMT+01:00, Carl Eugen Hoyos : > 2019-03-09 21:12 GMT+01:00, Kieran Kunhya : >> They have not responded to any communications: >> https://trac.ffmpeg.org/ticket/7589 > > Missing minor version bump Sorry about this, I used the wrong patch reading tool... > and please also post a news entry. Please do, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavd: Remove libndi_newtek
On Sat, 9 Mar 2019 at 23:19, Carl Eugen Hoyos wrote: > 2019-03-09 21:16 GMT+01:00, Carl Eugen Hoyos : > > 2019-03-09 21:12 GMT+01:00, Kieran Kunhya : > >> They have not responded to any communications: > >> https://trac.ffmpeg.org/ticket/7589 > > > > Missing minor version bump > > Sorry about this, I used the wrong patch reading tool... > > > and please also post a news entry. > > Please do, Carl Eugen > > Thanks for this. It's long overdue (3 months is more than enough time to respond and act on a license violation). ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices
Thank you very much for your reply. Am Sa., 9. März 2019 um 21:09 Uhr schrieb Jan Ekström : > > From 386c94489a86bb747b6531f727843cf259a24f5d Mon Sep 17 00:00:00 2001 > > From: xbmc > Is this author field meant to not have an actual name in it? Just verifying. It can stay as is. The original author sometimes uses fernetmenta / xbmc depending on his local git configuration. The email is unique though. I just transported it upstream and fixed the minors. > > > Date: Sat, 26 Jan 2019 19:48:35 +0100 > > Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices > > Something along the lines of "avcodec/vaapi_h264: skip decoding if no > slices were provided"? > > Also I would prefer if the reasoning for skipping decode on our layer > would be explained in further lines of the commit message, like you > have nicely explained it in the initial e-mail (to work-around a mesa > vaapi driver bug). > I don't remember the specifics of AVC, but are there valid VCL NAL > units without slices (and would such end up in this code path to begin > with)? I would guess that there would be no such valid VCL NAL units > (or if there were, they wouldn't get to this point in the decode > chain) - mostly just noting that this might be something we would like > to check to verify if this should be an error or a "normal" state. > > The general idea I'm OK with since if we already know that there's no > slices to decode, we might as well skip decoding as long as that > doesn't cause issues with the state of the underlying > libraries/drivers. Thus, I would mostly just wait for a reply from one > of the VAAPI wrapper maintainers regarding if this skip should happen > here or earlier in the decode process (where the buffers are being > allocated). > Yes I would also like to hear a statement from these guys. Especially as we (and most likely everyone else) just uses the ffmpeg send / receive API without feeling the need to introduce VAAPI workarounds in this generic application code Thanks again, please find attached the updated version Peter -- Key-ID: 0x1A995A9B keyserver: pgp.mit.edu == Fingerprint: 4606 DA19 EC2E 9A0B 0157 C81B DA07 CF63 1A99 5A9B From 3c4885579e86f6c002e614c4082a3bdb02d8426e Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 26 Jan 2019 19:48:35 +0100 Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices This fixes / workarounds https://bugs.freedesktop.org/show_bug.cgi?id=105368. It was hit frequently when watching h264 channels received via DVB-X. Corresponding kodi bug: https://github.com/xbmc/xbmc/issues/15704 --- libavcodec/vaapi_h264.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index 5854587a25..f12fdc457a 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) H264SliceContext *sl = &h->slice_ctx[0]; int ret; +if (pic->nb_slices == 0) { +ret = AVERROR_INVALIDDATA; +goto finish; +} + ret = ff_vaapi_decode_issue(avctx, pic); if (ret < 0) goto finish; -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavd: Remove libndi_newtek
On Sat, 9 Mar 2019, Dennis Mungai wrote: On Sat, 9 Mar 2019 at 23:19, Carl Eugen Hoyos wrote: 2019-03-09 21:16 GMT+01:00, Carl Eugen Hoyos : > 2019-03-09 21:12 GMT+01:00, Kieran Kunhya : >> They have not responded to any communications: >> https://trac.ffmpeg.org/ticket/7589 > > Missing minor version bump Sorry about this, I used the wrong patch reading tool... > and please also post a news entry. Please do, Carl Eugen Thanks for this. It's long overdue (3 months is more than enough time to respond and act on a license violation). Huh? Newtek removed the nonfree ffmpeg from their site, that was their response. So the company is no longer violating the license. You are not removing ndi because of the license violation, you are removing it because you don't like it. I and some others expressed already that we find it useful, so at least start a vote about it. Thanks, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavd: Remove libndi_newtek
They have not responded to any communications: > https://trac.ffmpeg.org/ticket/7589 > > I still do not understand the link between the ticket and the removal of lib ndi. Is it plan to remove all features used by people who doesn't respect the licence ? If this patch concerns the removal of a library that does not match to the freedom politic of this project It need a definition somewhere, on which lib can be used in the ffmpeg project, and which not. To avoid embedding a feature, and delete it later depending of current mood (which is not very interesting for users and contributors) The ndi patch history looks like this right now: - The support lib ndi was added in August 2017 - Several fixes for this feature have been reviewed and integrated since - then the original creator of ndi, commits a license violation of ffmpeg - now ndi becomes the devil, and all the previous work will disappear, breaking some user's tools, making all the work around it very frustrating for concerned people. Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavd: Remove libndi_newtek
Hi, On Sat, Mar 9, 2019 at 4:02 PM Martin Vignali wrote: > They have not responded to any communications: > > https://trac.ffmpeg.org/ticket/7589 > > > > > I still do not understand the link between the ticket and the removal of > lib ndi. > Is it plan to remove all features used by people who doesn't respect the > licence ? > I would not be against removing all closed-source support. I have voiced this before in the realvideo discussion: https://ffmpeg-devel.ffmpeg.narkive.com/Ok5y3HXO/patch-0-3-codec-wrapper-for-librv11-and-rmhd-muxer-demuxer Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avcodec/imm4: Unreference previous frame on frame size change
Fixes: Out of array access Fixes: 13552/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IMM4_fuzzer-5767949648920576 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/imm4.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libavcodec/imm4.c b/libavcodec/imm4.c index b66689acab..1a4d0decd7 100644 --- a/libavcodec/imm4.c +++ b/libavcodec/imm4.c @@ -446,11 +446,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, return AVERROR_PATCHWELCOME; } -if (!frame->key_frame && -(avctx->width != width || - avctx->height != height)) { -av_log(avctx, AV_LOG_ERROR, "Frame size change is unsupported.\n"); -return AVERROR_INVALIDDATA; +if (avctx->width != width || +avctx->height != height) { +if (!frame->key_frame) { +av_log(avctx, AV_LOG_ERROR, "Frame size change is unsupported.\n"); +return AVERROR_INVALIDDATA; +} +av_frame_unref(s->prev_frame); } ret = ff_set_dimensions(avctx, width, height); -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avcodec/mpeg4videodec: Check idx in mpeg4_decode_studio_block()
Fixes: Out of array access Fixes: 13500/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5769760178962432 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mpeg4videodec.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index ecd028a87c..bb9f1e3f2c 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1899,14 +1899,20 @@ static int mpeg4_decode_studio_block(MpegEncContext *s, int32_t block[64], int n code >>= 1; run = (1 << (additional_code_len - 1)) + code; idx += run; +if (idx > 63) +return AVERROR_INVALIDDATA; j = scantable[idx++]; block[j] = sign ? 1 : -1; } else if (group >= 13 && group <= 20) { /* Level value (Table B.49) */ +if (idx > 63) +return AVERROR_INVALIDDATA; j = scantable[idx++]; block[j] = get_xbits(&s->gb, additional_code_len); } else if (group == 21) { /* Escape */ +if (idx > 63) +return AVERROR_INVALIDDATA; j = scantable[idx++]; additional_code_len = s->avctx->bits_per_raw_sample + s->dct_precision + 4; flc = get_bits(&s->gb, additional_code_len); -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel