[FFmpeg-cvslog] README: fix typo and description of libavfilter

2021-10-07 Thread Gyan Doshi
ffmpeg | branch: master | Gyan Doshi  | Fri Oct  8 10:02:34 
2021 +0530| [f79be02be0abb7f4264fdc8467639eea7cd23d62] | committer: Gyan Doshi

README: fix typo and description of libavfilter

Thanks to Arif Driessen for bringing notice to the typo.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f79be02be0abb7f4264fdc8467639eea7cd23d62
---

 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 447347c700..f8c23f2870 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ such as audio, video, subtitles and related metadata.
 * `libavcodec` provides implementation of a wider range of codecs.
 * `libavformat` implements streaming protocols, container formats and basic 
I/O access.
 * `libavutil` includes hashers, decompressors and miscellaneous utility 
functions.
-* `libavfilter` provides a mean to alter decoded Audio and Video through chain 
of filters.
+* `libavfilter` provides means to alter decoded audio and video through a 
directed graph of connected filters.
 * `libavdevice` provides an abstraction to access capture and playback devices.
 * `libswresample` implements audio mixing and resampling routines.
 * `libswscale` implements color conversion and scaling routines.

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/vf_showinfo: minor adjustment for the dump format of ROI

2021-10-07 Thread Limin Wang
ffmpeg | branch: master | Limin Wang  | Wed Sep 29 
18:13:04 2021 +0800| [254652a34c5ca2b24215cf6652067764408a1b5c] | committer: 
Limin Wang

avfilter/vf_showinfo: minor adjustment for the dump format of ROI

Signed-off-by: Limin Wang 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=254652a34c5ca2b24215cf6652067764408a1b5c
---

 libavfilter/vf_showinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 87c2bed73d..c8c7b986b5 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -147,10 +147,10 @@ static void dump_roi(AVFilterContext *ctx, const 
AVFrameSideData *sd)
 }
 nb_rois = sd->size / roi_size;
 
-av_log(ctx, AV_LOG_INFO, "Regions Of Interest(RoI) information: ");
+av_log(ctx, AV_LOG_INFO, "Regions Of Interest(ROI) information:\n");
 for (int i = 0; i < nb_rois; i++) {
 roi = (const AVRegionOfInterest *)(sd->data + roi_size * i);
-av_log(ctx, AV_LOG_INFO, "index: %d, region: (%d, %d)/(%d, %d), qp 
offset: %d/%d.\n",
+av_log(ctx, AV_LOG_INFO, "index: %d, region: (%d, %d) -> (%d, %d), qp 
offset: %d/%d.\n",
i, roi->left, roi->top, roi->right, roi->bottom, 
roi->qoffset.num, roi->qoffset.den);
 }
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/hevcdec: set the film grain property if present

2021-10-07 Thread Limin Wang
ffmpeg | branch: master | Limin Wang  | Thu Sep 23 
18:16:26 2021 +0800| [00ec682a7015dd6f4b441bcc599c3fb2d60264a8] | committer: 
Limin Wang

avcodec/hevcdec: set the film grain property if present

Signed-off-by: Limin Wang 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00ec682a7015dd6f4b441bcc599c3fb2d60264a8
---

 libavcodec/hevcdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 57a61752a3..b4edb3b3cc 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -385,6 +385,9 @@ static int export_stream_params_from_sei(HEVCContext *s)
 avctx->color_trc = 
s->sei.alternative_transfer.preferred_transfer_characteristics;
 }
 
+if (s->sei.film_grain_characteristics.present)
+avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN;
+
 return 0;
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avutil/detection_bbox: Fix av_detection_bbox_alloc failed if nb_bboxes == 0

2021-10-07 Thread Limin Wang
ffmpeg | branch: master | Limin Wang  | Sat Sep 25 
10:27:10 2021 +0800| [9997047a1802b5174e423cf0863041639664ab87] | committer: 
Limin Wang

avutil/detection_bbox: Fix av_detection_bbox_alloc failed if nb_bboxes == 0

Signed-off-by: Limin Wang 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9997047a1802b5174e423cf0863041639664ab87
---

 libavutil/detection_bbox.c | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/libavutil/detection_bbox.c b/libavutil/detection_bbox.c
index b7d0c5575f..bae8f0642e 100644
--- a/libavutil/detection_bbox.c
+++ b/libavutil/detection_bbox.c
@@ -23,27 +23,29 @@ AVDetectionBBoxHeader *av_detection_bbox_alloc(uint32_t 
nb_bboxes, size_t *out_s
 size_t size;
 struct BBoxContext {
 AVDetectionBBoxHeader header;
-AVDetectionBBox boxes[1];
-} *ret;
+AVDetectionBBox boxes;
+};
 const size_t bboxes_offset = offsetof(struct BBoxContext, boxes);
+const size_t bbox_size = sizeof(AVDetectionBBox);
+AVDetectionBBoxHeader *header;
 
-size = sizeof(*ret);
-if (nb_bboxes - 1 > (SIZE_MAX - size) / sizeof(*ret->boxes))
+size = bboxes_offset;
+if (nb_bboxes > (SIZE_MAX - size) / bbox_size)
 return NULL;
-size += sizeof(*ret->boxes) * (nb_bboxes - 1);
+size += bbox_size * nb_bboxes;
 
-ret = av_mallocz(size);
-if (!ret)
+header = av_mallocz(size);
+if (!header)
 return NULL;
 
-ret->header.nb_bboxes = nb_bboxes;
-ret->header.bbox_size = sizeof(*ret->boxes);
-ret->header.bboxes_offset = bboxes_offset;
+header->nb_bboxes = nb_bboxes;
+header->bbox_size = bbox_size;
+header->bboxes_offset = bboxes_offset;
 
 if (out_size)
 *out_size = size;
 
-return >header;
+return header;
 }
 
 AVDetectionBBoxHeader *av_detection_bbox_create_side_data(AVFrame *frame, 
uint32_t nb_bboxes)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avutil/detection_bbox: use offsetof for bboxes_offset

2021-10-07 Thread Limin Wang
ffmpeg | branch: master | Limin Wang  | Sat Sep 25 
09:31:17 2021 +0800| [e724004fd8d2c5d7753f7b997e3d02a2155ceef6] | committer: 
Limin Wang

avutil/detection_bbox: use offsetof for bboxes_offset

Signed-off-by: Limin Wang 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e724004fd8d2c5d7753f7b997e3d02a2155ceef6
---

 libavutil/detection_bbox.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavutil/detection_bbox.c b/libavutil/detection_bbox.c
index 40711e6aa9..b7d0c5575f 100644
--- a/libavutil/detection_bbox.c
+++ b/libavutil/detection_bbox.c
@@ -21,10 +21,11 @@
 AVDetectionBBoxHeader *av_detection_bbox_alloc(uint32_t nb_bboxes, size_t 
*out_size)
 {
 size_t size;
-struct {
+struct BBoxContext {
 AVDetectionBBoxHeader header;
 AVDetectionBBox boxes[1];
 } *ret;
+const size_t bboxes_offset = offsetof(struct BBoxContext, boxes);
 
 size = sizeof(*ret);
 if (nb_bboxes - 1 > (SIZE_MAX - size) / sizeof(*ret->boxes))
@@ -37,7 +38,7 @@ AVDetectionBBoxHeader *av_detection_bbox_alloc(uint32_t 
nb_bboxes, size_t *out_s
 
 ret->header.nb_bboxes = nb_bboxes;
 ret->header.bbox_size = sizeof(*ret->boxes);
-ret->header.bboxes_offset = (char *)>boxes - (char *)>header;
+ret->header.bboxes_offset = bboxes_offset;
 
 if (out_size)
 *out_size = size;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] oavformat/avidec: Check offset in odml

2021-10-07 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Sep 19 21:51:28 2021 +0200| [255a7b423ed5e07536bdc72e993056daa4efe009] | 
committer: Michael Niedermayer

oavformat/avidec: Check offset in odml

Fixes: signed integer overflow: 9223372036854775807 + 8 cannot be represented 
in type 'long'
Fixes: 
38787/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-485984579980

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=255a7b423ed5e07536bdc72e993056daa4efe009
---

 libavformat/avidec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index b09a715d86..b10c3efa61 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -244,7 +244,7 @@ static int read_odml_index(AVFormatContext *s, int64_t 
frame_num)
 avio_rl32(pb);   /* size */
 duration = avio_rl32(pb);
 
-if (avio_feof(pb))
+if (avio_feof(pb) || offset > INT64_MAX - 8)
 return AVERROR_INVALIDDATA;
 
 pos = avio_tell(pb);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/apedec: Use 64bit to avoid overflow

2021-10-07 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Sep 29 20:53:53 2021 +0200| [f059b56195da9c0e2c11a5f7f357a3d6101e6bf0] | 
committer: Michael Niedermayer

avcodec/apedec: Use 64bit to avoid overflow

Fixes: runtime error: signed integer overflow: 727298502 * 3 cannot be 
represented in type 'int'
Fixes: 
39172/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-638602483033702

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f059b56195da9c0e2c11a5f7f357a3d6101e6bf0
---

 libavcodec/apedec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 014b5615ec..9c723f2997 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1337,7 +1337,7 @@ static void do_apply_filter(APEContext *ctx, int version, 
APEFilter *f,
 absres = FFABSU(res);
 if (absres)
 *f->adaptcoeffs = APESIGN(res) *
-  (8 << ((absres > f->avg * 3) + (absres > 
(f->avg + f->avg / 3;
+  (8 << ((absres > f->avg * 3LL) + (absres > 
(f->avg + f->avg / 3;
 /* equivalent to the following code
 if (absres <= f->avg * 4 / 3)
 *f->adaptcoeffs = APESIGN(res) * 8;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avformat/mpegts: use actually read packet size in mpegts_resync special case

2021-10-07 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
Sep 16 23:12:42 2021 +0200| [83b2e4c8f15a00f037040131e26e20de83f0d842] | 
committer: Michael Niedermayer

avformat/mpegts: use actually read packet size in mpegts_resync special case

Fixes: infinite loop
Fixes: 
37986/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5292311517462528
 -

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Marton Balint 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=83b2e4c8f15a00f037040131e26e20de83f0d842
---

 libavformat/mpegts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index da8eee2414..9b2930e4d1 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2875,8 +2875,8 @@ static int mpegts_resync(AVFormatContext *s, int 
seekback, const uint8_t *curren
 int64_t back = FFMIN(seekback, pos);
 
 //Special case for files like 01c56b0dc1.ts
-if (current_packet[0] == 0x80 && current_packet[12] == 0x47) {
-avio_seek(pb, 12 - back, SEEK_CUR);
+if (current_packet[0] == 0x80 && current_packet[12] == 0x47 && pos >= 
TS_PACKET_SIZE) {
+avio_seek(pb, 12 - TS_PACKET_SIZE, SEEK_CUR);
 return 0;
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()

2021-10-07 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue 
Sep 28 00:11:50 2021 +0200| [ad517ee6e44f093e28021ffd51c7eb2e1394b1a9] | 
committer: Michael Niedermayer

avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()

Fixes: signed integer overflow: -2145648640 - 3357696 cannot be represented in 
type 'int'
Fixes: 
38899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5358815017566208

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad517ee6e44f093e28021ffd51c7eb2e1394b1a9
---

 libavcodec/apedec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 27d0ff3565..014b5615ec 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -979,7 +979,7 @@ static void long_filter_ehigh_3830(int32_t *buffer, int 
length)
 for (j = 7; j > 0; j--)
 delay[j] = delay[j - 1];
 delay[0] = buffer[i];
-buffer[i] -= dotprod >> 9;
+buffer[i] -= (unsigned)(dotprod >> 9);
 }
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avformat/flacdec: Also set channels when setting channel_layout

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Sun Aug 29 11:01:16 2021 +0200| [fadefe356ac82cf5ceab12068b9fea6d1d9c70f0] | 
committer: Andreas Rheinhardt

avformat/flacdec: Also set channels when setting channel_layout

This brings the FLAC demuxer in line with all the other demuxers.
Furthermore, if it is not done and the FLAC decoder is disabled,
the FLAC parser will overwrite the channel layout with the standard
channel layout for that number of channels.

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fadefe356ac82cf5ceab12068b9fea6d1d9c70f0
---

 libavformat/flacdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index 04d3cadf1c..3401aebe8d 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/channel_layout.h"
 #include "libavcodec/flac.h"
 #include "avformat.h"
 #include "flac_picture.h"
@@ -191,6 +192,7 @@ static int flac_read_header(AVFormatContext *s)
"Invalid value of 
WAVEFORMATEXTENSIBLE_CHANNEL_MASK\n");
 } else {
 st->codecpar->channel_layout = mask;
+st->codecpar->channels   = 
av_get_channel_layout_nb_channels(mask);
 av_dict_set(>metadata, 
"WAVEFORMATEXTENSIBLE_CHANNEL_MASK", NULL, 0);
 }
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] fate/cover-art: Add test for muxing cover arts to FLAC

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Sun Aug 29 11:36:49 2021 +0200| [6e859d2bdbce2851ecbf27b3597e1622d2dda10a] | 
committer: Andreas Rheinhardt

fate/cover-art: Add test for muxing cover arts to FLAC

Also covers muxing and demuxing of nonstandard FLAC channel layouts
and the multi-dim-quant option of the FLAC encoder
(all of which was hitherto uncovered).

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e859d2bdbce2851ecbf27b3597e1622d2dda10a
---

 tests/fate/cover-art.mak|  11 
 tests/ref/fate/cover-art-flac-remux | 109 
 2 files changed, 120 insertions(+)

diff --git a/tests/fate/cover-art.mak b/tests/fate/cover-art.mak
index c42a4bc499..c2e3b1e7c1 100644
--- a/tests/fate/cover-art.mak
+++ b/tests/fate/cover-art.mak
@@ -46,6 +46,17 @@ FATE_COVER_ART_REMUX-$(call ALLYES, FILE_PROTOCOL 
MP3_DEMUXER MJPEG_DECODER \
+= fate-cover-art-mp3-id3v2-remux
 fate-cover-art-mp3-id3v2-remux: CMD = transcode mp3 
$(TARGET_SAMPLES)/exif/embedded_small.mp3 mp3 "-map 0 -map 0:v -map 0:v -c:a 
copy -filter:v:0 scale -filter:v:2 scale -c:v:0 bmp -c:v:1 copy -c:v:2 png 
-metadata:s:v:0 comment=Band/Orchestra" "-map 0 -c copy -t 0.1" "" 
"-show_entries 
stream_tags:stream_disposition=attached_pic:stream=index,codec_name"
 
+# Also covers muxing and demuxing of nonstandard channel layouts into FLAC
+# as well as the unorthodox multi_dim_quant option of the FLAC encoder.
+FATE_COVER_ART_REMUX-$(call ALLYES, FILE_PROTOCOL MOV_DEMUXER OGG_DEMUXER   \
+ALAC_DECODER MJPEG_DECODER SCALE_FILTER \
+CHANNELMAP_FILTER ARESAMPLE_FILTER  \
+FLAC_ENCODER BMP_ENCODER PNG_ENCODER\
+FLAC_MUXER FLAC_DEMUXER FLAC_DECODER\
+FRAMECRC_MUXER PIPE_PROTOCOL)   \
+   += fate-cover-art-flac-remux
+fate-cover-art-flac-remux: CMD = transcode mov 
$(TARGET_SAMPLES)/lossless-audio/inside.m4a flac "-map 0 -map 1:v -map 1:v -af 
channelmap=channel_layout=FL+FC,aresample -c:a flac -multi_dim_quant 1 -c:v:0 
copy -metadata:s:v:0 comment=Illustration -metadata:s:v:0 title=OpenMusic  
-filter:v:1 scale -c:v:1 png -metadata:s:v:1 title=landscape -c:v:2 copy 
-filter:v:3 scale -metadata:s:v:2 title=portrait -c:v:3 bmp  -metadata:s:v:3 
comment=Conductor -c:v:4 copy -t 0.4" "-map 0 -map 0:a -c:a:0 copy -c:v copy" 
"" "-show_entries 
format_tags:stream_tags:stream_disposition=attached_pic:stream=index,codec_name"
 "-f ogg -i $(TARGET_SAMPLES)/cover_art/ogg_vorbiscomment_cover.opus"
+
 FCA_TEMP-$(call ALLYES, RAWVIDEO_MUXER FILE_PROTOCOL) = $(FATE_COVER_ART-yes)
 FATE_COVER_ART = $(FCA_TEMP-yes)
 $(FATE_COVER_ART): CMP = oneline
diff --git a/tests/ref/fate/cover-art-flac-remux 
b/tests/ref/fate/cover-art-flac-remux
new file mode 100644
index 00..3f779828ae
--- /dev/null
+++ b/tests/ref/fate/cover-art-flac-remux
@@ -0,0 +1,109 @@
+6defc5081a59ab12c8a5f9e263b25068 *tests/data/fate/cover-art-flac-remux.flac
+1098537 tests/data/fate/cover-art-flac-remux.flac
+#extradata 0:   34, 0x8d830abd
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: flac
+#sample_rate 0: 44100
+#channel_layout 0: 5
+#channel_layout_name 0: 2 channels (FL+FC)
+#tb 1: 1/9
+#media_type 1: video
+#codec_id 1: png
+#dimensions 1: 200x200
+#sar 1: 2834/2834
+#tb 2: 1/9
+#media_type 2: video
+#codec_id 2: png
+#dimensions 2: 485x359
+#sar 2: 1/1
+#tb 3: 1/9
+#media_type 3: video
+#codec_id 3: mjpeg
+#dimensions 3: 199x300
+#sar 3: 72/72
+#tb 4: 1/9
+#media_type 4: video
+#codec_id 4: bmp
+#dimensions 4: 485x359
+#sar 4: 0/1
+#tb 5: 1/9
+#media_type 5: video
+#codec_id 5: mjpeg
+#dimensions 5: 199x300
+#sar 5: 72/72
+#tb 6: 1/44100
+#media_type 6: audio
+#codec_id 6: pcm_s16le
+#sample_rate 6: 44100
+#channel_layout 6: 5
+#channel_layout_name 6: 2 channels (FL+FC)
+0,  0,  0, 4608,   14, 0x242b036d
+1,  0,  0,0,66888, 0x1fd72743
+2,  0,  0,0,   438706, 0x8bcb753b
+3,  0,  0,0,21671, 0x7d1c6030
+4,  0,  0,0,   522758, 0x7a63572f
+5,  0,  0,0,21671, 0x7d1c6030
+6,  0,  0, 4608,18432, 0x
+0,   4608,   4608, 4608, 7636, 0xc3775d85
+6,   4608,   4608, 4608,18432, 0xaaab4d62
+0,   9216,   9216, 4608, 5700, 0x8b9a3cc7
+6,   9216,   9216, 4608,18432, 0x49410f52
+0,  13824,  13824, 3816, 4512, 0x0ded5f71
+6,  13824,  13824, 3816,15264, 0x155b5c95
+[STREAM]
+index=0
+codec_name=flac
+DISPOSITION:attached_pic=0
+[/STREAM]
+[STREAM]
+index=1
+codec_name=png
+DISPOSITION:attached_pic=1
+TAG:comment=Illustration
+TAG:title=OpenMusic
+[/STREAM]
+[STREAM]

[FFmpeg-cvslog] tests/fate-run: Allow multiple inputs for transcode()

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Sun Aug 29 07:38:32 2021 +0200| [0a0204c48ad11f92e7a7c306d3b7f24bb280e6d0] | 
committer: Andreas Rheinhardt

tests/fate-run: Allow multiple inputs for transcode()

This allows nicer tests by having a greater range of inputs available
(without requiring adding further samples to the fate-suite).

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a0204c48ad11f92e7a7c306d3b7f24bb280e6d0
---

 tests/fate-run.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index a16ce28a45..87b5539296 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -232,12 +232,13 @@ transcode(){
 enc_opt=$4
 final_decode=$5
 ffprobe_opts=$7
+additional_inputs=$8
 encfile="${outdir}/${test}.${enc_fmt}"
 test "$6" = -keep || cleanfiles="$cleanfiles $encfile"
 tsrcfile=$(target_path $srcfile)
 tencfile=$(target_path $encfile)
-ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \
--f $enc_fmt -y $tencfile || return
+ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $additional_inputs \
+   $ENC_OPTS $enc_opt $FLAGS -f $enc_fmt -y $tencfile || return
 do_md5sum $encfile
 echo $(wc -c $encfile)
 ffmpeg $DEC_OPTS -i $tencfile $ENC_OPTS $FLAGS $final_decode \

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/amr_parser: Treat 0 channels as 1

2021-10-07 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue 
Oct  5 21:17:54 2021 +0200| [cc721fc29240fadd0aec5b86cf15b5ffb49f303e] | 
committer: Michael Niedermayer

avcodec/amr_parser: Treat 0 channels as 1

Fixes: division by 0
Fixes: 
39562/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMRWB_fuzzer-5448834960982016
Fixes: 
39589/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMRWB_fuzzer-6119205334810624

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cc721fc29240fadd0aec5b86cf15b5ffb49f303e
---

 libavcodec/amr_parser.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/amr_parser.c b/libavcodec/amr_parser.c
index 79258d4d0c..c0b14700e2 100644
--- a/libavcodec/amr_parser.c
+++ b/libavcodec/amr_parser.c
@@ -25,6 +25,7 @@
  * Splits packets into individual blocks.
  */
 
+#include "libavutil/channel_layout.h"
 #include "libavutil/intreadwrite.h"
 #include "parser.h"
 
@@ -62,6 +63,11 @@ static int amr_parse(AVCodecParserContext *s1,
 *poutbuf_size = 0;
 *poutbuf = NULL;
 
+if (!avctx->channels) {
+avctx->channels   = 1;
+avctx->channel_layout = AV_CH_LAYOUT_MONO;
+}
+
 if (s1->flags & PARSER_FLAG_COMPLETE_FRAMES) {
 next = buf_size;
 } else {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/sharpen_npp: use FILTER_SINGLE_PIXFMT

2021-10-07 Thread Timo Rothenpieler
ffmpeg | branch: master | Timo Rothenpieler  | Thu Oct  
7 18:50:47 2021 +0200| [1831fa72785d46ed2ec5a0c4084866e0089574f4] | committer: 
Timo Rothenpieler

avfilter/sharpen_npp: use FILTER_SINGLE_PIXFMT

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1831fa72785d46ed2ec5a0c4084866e0089574f4
---

 libavfilter/vf_sharpen_npp.c | 11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/libavfilter/vf_sharpen_npp.c b/libavfilter/vf_sharpen_npp.c
index cfd75e51c5..0a2c5c458b 100644
--- a/libavfilter/vf_sharpen_npp.c
+++ b/libavfilter/vf_sharpen_npp.c
@@ -131,15 +131,6 @@ static void nppsharpen_uninit(AVFilterContext* ctx)
 av_frame_free(>tmp_frame);
 }
 
-static int nppsharpen_query_formats(AVFilterContext* ctx)
-{
-static const enum AVPixelFormat pixel_formats[] = {
-AV_PIX_FMT_CUDA,
-AV_PIX_FMT_NONE,
-};
-return ff_set_common_formats_from_list(ctx, pixel_formats);
-}
-
 static int nppsharpen_config_props(AVFilterLink* outlink)
 {
 AVFilterLink* inlink = outlink->src->inputs[0];
@@ -274,7 +265,7 @@ const AVFilter ff_vf_sharpen_npp = {
 
 FILTER_INPUTS(nppsharpen_inputs),
 FILTER_OUTPUTS(nppsharpen_outputs),
-FILTER_QUERY_FUNC(nppsharpen_query_formats),
+FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA),
 
 .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
 };

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/scale_npp: fix non-aligned output frame dimensions

2021-10-07 Thread Timo Rothenpieler
ffmpeg | branch: release/3.4 | Timo Rothenpieler  | Thu 
Oct  7 17:41:44 2021 +0200| [11388838ff8dd49d69039d1d667159280b10d652] | 
committer: Timo Rothenpieler

avfilter/scale_npp: fix non-aligned output frame dimensions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11388838ff8dd49d69039d1d667159280b10d652
---

 libavfilter/vf_scale_npp.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index 8a277ce8e1..86279f5b36 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -472,13 +472,16 @@ static int nppscale_scale(AVFilterContext *ctx, AVFrame 
*out, AVFrame *in)
 src= s->stages[i].frame;
 last_stage = i;
 }
-
 if (last_stage < 0)
 return AVERROR_BUG;
+
 ret = av_hwframe_get_buffer(src->hw_frames_ctx, s->tmp_frame, 0);
 if (ret < 0)
 return ret;
 
+s->tmp_frame->width  = src->width;
+s->tmp_frame->height = src->height;
+
 av_frame_move_ref(out, src);
 av_frame_move_ref(src, s->tmp_frame);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/scale_npp: fix non-aligned output frame dimensions

2021-10-07 Thread Timo Rothenpieler
ffmpeg | branch: release/4.1 | Timo Rothenpieler  | Thu 
Oct  7 17:41:44 2021 +0200| [0699b0836d00dd2b6d7e6161babaea9e2c1bd709] | 
committer: Timo Rothenpieler

avfilter/scale_npp: fix non-aligned output frame dimensions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0699b0836d00dd2b6d7e6161babaea9e2c1bd709
---

 libavfilter/vf_scale_npp.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index 8a277ce8e1..86279f5b36 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -472,13 +472,16 @@ static int nppscale_scale(AVFilterContext *ctx, AVFrame 
*out, AVFrame *in)
 src= s->stages[i].frame;
 last_stage = i;
 }
-
 if (last_stage < 0)
 return AVERROR_BUG;
+
 ret = av_hwframe_get_buffer(src->hw_frames_ctx, s->tmp_frame, 0);
 if (ret < 0)
 return ret;
 
+s->tmp_frame->width  = src->width;
+s->tmp_frame->height = src->height;
+
 av_frame_move_ref(out, src);
 av_frame_move_ref(src, s->tmp_frame);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/af_axcorrelate: fix typo

2021-10-07 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Thu Oct  7 18:35:23 
2021 +0200| [7529781ba83257c01032d7c27d9e140ac18804a3] | committer: Paul B Mahol

avfilter/af_axcorrelate: fix typo

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7529781ba83257c01032d7c27d9e140ac18804a3
---

 libavfilter/af_axcorrelate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_axcorrelate.c b/libavfilter/af_axcorrelate.c
index 8c5c429127..c27e42f2ed 100644
--- a/libavfilter/af_axcorrelate.c
+++ b/libavfilter/af_axcorrelate.c
@@ -324,7 +324,7 @@ static const AVFilterPad outputs[] = {
 
 static const AVOption axcorrelate_options[] = {
 { "size", "set segment size", OFFSET(size), AV_OPT_TYPE_INT,   {.i64=256}, 
2, 131072, AF },
-{ "algo", "set alghorithm",   OFFSET(algo), AV_OPT_TYPE_INT,   {.i64=0},   
0,  1, AF, "algo" },
+{ "algo", "set algorithm",OFFSET(algo), AV_OPT_TYPE_INT,   {.i64=0},   
0,  1, AF, "algo" },
 { "slow", "slow algorithm",   0,AV_OPT_TYPE_CONST, {.i64=0},   
0,  0, AF, "algo" },
 { "fast", "fast algorithm",   0,AV_OPT_TYPE_CONST, {.i64=1},   
0,  0, AF, "algo" },
 { NULL }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/scale_npp: fix non-aligned output frame dimensions

2021-10-07 Thread Timo Rothenpieler
ffmpeg | branch: release/4.2 | Timo Rothenpieler  | Thu 
Oct  7 17:41:44 2021 +0200| [2e68ac694cbded97d3e4a8b5b52fc4d45e7e1610] | 
committer: Timo Rothenpieler

avfilter/scale_npp: fix non-aligned output frame dimensions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e68ac694cbded97d3e4a8b5b52fc4d45e7e1610
---

 libavfilter/vf_scale_npp.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index a3e085764a..f363853432 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -475,13 +475,16 @@ static int nppscale_scale(AVFilterContext *ctx, AVFrame 
*out, AVFrame *in)
 src= s->stages[i].frame;
 last_stage = i;
 }
-
 if (last_stage < 0)
 return AVERROR_BUG;
+
 ret = av_hwframe_get_buffer(src->hw_frames_ctx, s->tmp_frame, 0);
 if (ret < 0)
 return ret;
 
+s->tmp_frame->width  = src->width;
+s->tmp_frame->height = src->height;
+
 av_frame_move_ref(out, src);
 av_frame_move_ref(src, s->tmp_frame);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/scale_npp: fix non-aligned output frame dimensions

2021-10-07 Thread Timo Rothenpieler
ffmpeg | branch: release/4.3 | Timo Rothenpieler  | Thu 
Oct  7 17:41:44 2021 +0200| [d9cb7c62b6937ec4c66f466e45b7dda70f30cae9] | 
committer: Timo Rothenpieler

avfilter/scale_npp: fix non-aligned output frame dimensions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d9cb7c62b6937ec4c66f466e45b7dda70f30cae9
---

 libavfilter/vf_scale_npp.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index 502ecfda94..34debc3135 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -481,13 +481,16 @@ static int nppscale_scale(AVFilterContext *ctx, AVFrame 
*out, AVFrame *in)
 src= s->stages[i].frame;
 last_stage = i;
 }
-
 if (last_stage < 0)
 return AVERROR_BUG;
+
 ret = av_hwframe_get_buffer(src->hw_frames_ctx, s->tmp_frame, 0);
 if (ret < 0)
 return ret;
 
+s->tmp_frame->width  = src->width;
+s->tmp_frame->height = src->height;
+
 av_frame_move_ref(out, src);
 av_frame_move_ref(src, s->tmp_frame);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/scale_npp: fix non-aligned output frame dimensions

2021-10-07 Thread Timo Rothenpieler
ffmpeg | branch: release/4.4 | Timo Rothenpieler  | Thu 
Oct  7 17:41:44 2021 +0200| [c989427c168b95997ef7366a6cef98f4b40acc66] | 
committer: Timo Rothenpieler

avfilter/scale_npp: fix non-aligned output frame dimensions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c989427c168b95997ef7366a6cef98f4b40acc66
---

 libavfilter/vf_scale_npp.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index 502ecfda94..34debc3135 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -481,13 +481,16 @@ static int nppscale_scale(AVFilterContext *ctx, AVFrame 
*out, AVFrame *in)
 src= s->stages[i].frame;
 last_stage = i;
 }
-
 if (last_stage < 0)
 return AVERROR_BUG;
+
 ret = av_hwframe_get_buffer(src->hw_frames_ctx, s->tmp_frame, 0);
 if (ret < 0)
 return ret;
 
+s->tmp_frame->width  = src->width;
+s->tmp_frame->height = src->height;
+
 av_frame_move_ref(out, src);
 av_frame_move_ref(src, s->tmp_frame);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/scale_npp: fix non-aligned output frame dimensions

2021-10-07 Thread Timo Rothenpieler
ffmpeg | branch: master | Timo Rothenpieler  | Thu Oct  
7 17:41:44 2021 +0200| [37745b49049d4dbb5aa4ea84bcc289ed511971f9] | committer: 
Timo Rothenpieler

avfilter/scale_npp: fix non-aligned output frame dimensions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37745b49049d4dbb5aa4ea84bcc289ed511971f9
---

 libavfilter/vf_scale_npp.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index 4d056d6afa..8da335154c 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -471,13 +471,16 @@ static int nppscale_scale(AVFilterContext *ctx, AVFrame 
*out, AVFrame *in)
 src= s->stages[i].frame;
 last_stage = i;
 }
-
 if (last_stage < 0)
 return AVERROR_BUG;
+
 ret = av_hwframe_get_buffer(src->hw_frames_ctx, s->tmp_frame, 0);
 if (ret < 0)
 return ret;
 
+s->tmp_frame->width  = src->width;
+s->tmp_frame->height = src->height;
+
 av_frame_move_ref(out, src);
 av_frame_move_ref(src, s->tmp_frame);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/sharpen_npp: add sharpening video filter with borders control

2021-10-07 Thread Roman Arzumanyan
ffmpeg | branch: master | Roman Arzumanyan  | Mon Sep  
6 14:26:27 2021 +0300| [ed084161baaa056545d8c5d9d27feac254081f93] | committer: 
Timo Rothenpieler

avfilter/sharpen_npp: add sharpening video filter with borders control

Signed-off-by: Timo Rothenpieler 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ed084161baaa056545d8c5d9d27feac254081f93
---

 configure|   5 +-
 doc/filters.texi |  17 +++
 libavfilter/Makefile |   1 +
 libavfilter/allfilters.c |   1 +
 libavfilter/vf_sharpen_npp.c | 280 +++
 5 files changed, 302 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 231d0398a8..5e630e6e5d 100755
--- a/configure
+++ b/configure
@@ -3094,6 +3094,7 @@ thumbnail_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
 transpose_npp_filter_deps="ffnvcodec libnpp"
 overlay_cuda_filter_deps="ffnvcodec"
 overlay_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
+sharpen_npp_filter_deps="ffnvcodec libnpp"
 
 amf_deps_any="libdl LoadLibrary"
 nvenc_deps="ffnvcodec"
@@ -6444,8 +6445,8 @@ enabled libmodplug&& require_pkg_config 
libmodplug libmodplug libmodplug
 enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h 
lame_set_VBR_quality -lmp3lame $libm_extralibs
 enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h 
mysofa_neighborhood_init_withstepdefine ||
require libmysofa mysofa.h 
mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; }
-enabled libnpp&& { check_lib libnpp npp.h nppGetLibVersion -lnppig 
-lnppicc -lnppc -lnppidei ||
-   check_lib libnpp npp.h nppGetLibVersion -lnppi 
-lnppc -lnppidei ||
+enabled libnpp&& { check_lib libnpp npp.h nppGetLibVersion -lnppig 
-lnppicc -lnppc -lnppidei -lnppif ||
+   check_lib libnpp npp.h nppGetLibVersion -lnppi 
-lnppif -lnppc -lnppidei ||
die "ERROR: libnpp not found"; }
 enabled libopencore_amrnb && require libopencore_amrnb 
opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
 enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h 
D_IF_init -lopencore-amrwb
diff --git a/doc/filters.texi b/doc/filters.texi
index 1994467f46..ca9203d02d 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -18925,6 +18925,23 @@ Keep the same colorspace property (default).
 @end table
 @end table
 
+@section sharpen_npp
+Use the NVIDIA Performance Primitives (libnpp) to perform image sharpening with
+border control.
+
+The following additional options are accepted:
+@table @option
+
+@item border_type
+Type of sampling to be used ad frame borders. One of the following:
+@table @option
+
+@item replicate
+Replicate pixel values.
+
+@end table
+@end table
+
 @section shear
 Apply shear transform to input video.
 
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index dbd8685791..fabe9c9af0 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -427,6 +427,7 @@ OBJS-$(CONFIG_SETPTS_FILTER) += setpts.o
 OBJS-$(CONFIG_SETRANGE_FILTER)   += vf_setparams.o
 OBJS-$(CONFIG_SETSAR_FILTER) += vf_aspect.o
 OBJS-$(CONFIG_SETTB_FILTER)  += settb.o
+OBJS-$(CONFIG_SHARPEN_NPP_FILTER)+= vf_sharpen_npp.o
 OBJS-$(CONFIG_SHARPNESS_VAAPI_FILTER)+= vf_misc_vaapi.o vaapi_vpp.o
 OBJS-$(CONFIG_SHEAR_FILTER)  += vf_shear.o
 OBJS-$(CONFIG_SHOWINFO_FILTER)   += vf_showinfo.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 761c261005..ad50a8bc5d 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -408,6 +408,7 @@ extern const AVFilter ff_vf_setpts;
 extern const AVFilter ff_vf_setrange;
 extern const AVFilter ff_vf_setsar;
 extern const AVFilter ff_vf_settb;
+extern const AVFilter ff_vf_sharpen_npp;
 extern const AVFilter ff_vf_sharpness_vaapi;
 extern const AVFilter ff_vf_shear;
 extern const AVFilter ff_vf_showinfo;
diff --git a/libavfilter/vf_sharpen_npp.c b/libavfilter/vf_sharpen_npp.c
new file mode 100644
index 00..cfd75e51c5
--- /dev/null
+++ b/libavfilter/vf_sharpen_npp.c
@@ -0,0 +1,280 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, 

[FFmpeg-cvslog] fate/subtitles: Add scc remux test

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Fri Oct  1 21:07:35 2021 +0200| [3e022d185cb1640b1bc9fb535118b3624eefe8f4] | 
committer: Andreas Rheinhardt

fate/subtitles: Add scc remux test

Provides coverage for the muxer.
(Thanks to tresh for modifying the whitespace commit hook
to allow to push this ref file with tabs.)

Reviewed-by: Paul B Mahol 
Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e022d185cb1640b1bc9fb535118b3624eefe8f4
---

 tests/fate/subtitles.mak |  3 ++
 tests/ref/fate/sub-scc-remux | 65 
 2 files changed, 68 insertions(+)

diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak
index 2f4c94f366..0c89adb0d1 100644
--- a/tests/fate/subtitles.mak
+++ b/tests/fate/subtitles.mak
@@ -110,6 +110,9 @@ fate-sub-charenc: CMD = fmtstdout ass -sub_charenc cp1251 
-i $(TARGET_SAMPLES)/s
 FATE_SUBTITLES-$(call DEMDEC, SCC, CCAPTION) += fate-sub-scc
 fate-sub-scc: CMD = fmtstdout ass -ss 57 -i $(TARGET_SAMPLES)/sub/witch.scc
 
+FATE_SUBTITLES-$(call DEMMUX, SCC, SCC) += fate-sub-scc-remux
+fate-sub-scc-remux: CMD = fmtstdout scc -i $(TARGET_SAMPLES)/sub/witch.scc -ss 
4:00 -map 0 -c copy
+
 FATE_SUBTITLES-$(call ALLYES, MPEGTS_DEMUXER DVBSUB_DECODER DVBSUB_ENCODER) += 
fate-sub-dvb
 fate-sub-dvb: CMD = framecrc -i $(TARGET_SAMPLES)/sub/dvbsubtest_filter.ts 
-map s:0 -c dvbsub
 
diff --git a/tests/ref/fate/sub-scc-remux b/tests/ref/fate/sub-scc-remux
new file mode 100644
index 00..e0a8247e4d
--- /dev/null
+++ b/tests/ref/fate/sub-scc-remux
@@ -0,0 +1,65 @@
+Scenarist_SCC V1.0
+
+00:00:01:049420 9420 94da 94da c2d5 52ce 20c8 4552 20a1 947a 947a 20c2 
d552 ce20 c845 5220 a180 942c 942c 942f 942f
+
+00:00:03:189420 9420 94f8 94f8 91ae 91ae 5b20 cd61 6e20 c7f2 756e f473 
205d 942c 942c 942f 942f
+
+00:00:05:009420 9420 94ce 94ce 5249 c7c8 5420 a180 946e 946e 5245 cd4f 
d645 2054 c845 20d3 d5d0 d04f 5254 d320 a180 942c 942c 942f 942f
+
+00:00:11:09942c 942c
+
+00:00:14:029420 9420 13d0 13d0 c120 5749 5443 c820 a180 947a 947a c120 
5749 5443 c820 a180 942c 942c 942f 942f
+
+00:00:16:059420 9420 94f2 94f2 4954 a7d3 20c1 2046 c149 5220 434f d0ae 
942c 942c 942f 942f
+
+00:00:17:019420 9420 1370 1370 ad20 c2d5 52ce 20c8 4552 20a1 94d0 94d0 
ad20 5b20 43f2 eff7 6420 43ef 6ef4 e96e 75e5 7320 d368 ef75 f4e9 6e67 205d 9470 
9470 2020 c2d5 52ce 20c8 4552 20a1 2020 c2d5 52ce 20c8 4552 20a1 942c 942c 942f 
942f
+
+00:00:22:09942c 942c
+
+00:00:25:269420 9420 1370 1370 57c8 4f20 c152 4520 d94f d52c 94d0 94d0 
57c8 4f20 c152 4520 d34f 2057 49d3 4580 9470 9470 49ce 2054 c845 2057 c1d9 d320 
4f46 20d3 4349 45ce 4345 20bf 942c 942c 942f 942f
+
+00:00:29:229420 9420 94d6 94d6 4920 c1cd 20c1 5254 c8d5 522c 9476 9476 
cb49 cec7 204f 4620 54c8 4520 c252 4954 4fce d3ae 942c 942c 942f 942f
+
+00:00:32:239420 9420 94f2 94f2 cdd9 204c 4945 c745 20a1 942c 942c 942f 942f
+
+00:00:33:299420 9420 13f4 13f4 c74f 4fc4 20d3 4952 20cb ce49 c7c8 542c 
9454 9454 5749 4c4c 20d9 4fd5 2043 4fcd 4520 5749 54c8 20cd 4580 94f4 94f4 544f 
2043 c1cd 454c 4f54 aeae ae80 942c 942c 942f 942f
+
+00:00:37:119420 9420 94d6 94d6 c1ce c420 4a4f 49ce 20d5 d380 9476 9476 
c154 2054 c845 2052 4fd5 cec4 2054 c1c2 4c45 20bf 942c 942c 942f 942f
+
+00:00:40:129420 9420 94d0 94d0 cdd9 204c 4945 c745 2c80 9470 9470 4920 
574f d54c c420 c245 20c8 4fce 4f52 45c4 20a1 942c 942c 942f 942f
+
+00:00:42:169420 9420 13d6 13d6 57c8 c154 2049 d320 d94f d552 20ce c1cd 
4520 bf80 9470 9470 c245 c445 d645 5245 2c20 cdd9 204c 4945 c745 ae80 942c 942c 
942f 942f
+
+00:00:45:219420 9420 94d6 94d6 2054 c845 ce20 4920 c4d5 c220 d94f d580 
9476 9476 91ae 91ae d349 5280 9120 9120 c245 c445 d645 5245 2c80 942c 942c 942f 
942f
+
+00:00:49:159420 9420 94d6 94d6 cbce 49c7 c854 9476 9476 4f46 2054 c845 
2052 4fd5 cec4 2054 c1c2 4c45 ae80 942c 942c 942f 942f
+
+00:00:51:269420 9420 94ce 94ce 5b20 ce61 f2f2 61f4 eff2 205d 946e 946e 
54c8 4520 5749 d345 20d3 4952 20c2 45c4 45d6 4552 45ae aeae 942c 942c 942f 942f
+
+00:00:53:239420 9420 94ce 94ce 57c1 d320 54c8 4520 4649 52d3 5420 544f 
204a 4f49 ce80 946e 946e cb49 cec7 20c1 5254 c8d5 52a7 d320 cbce 49c7 c854 d3ae 
942c 942c 942f 942f
+
+00:00:56:219420 9420 94ce 94ce c2d5 5420 4f54 c845 5220 494c 4cd5 d354 
5249 4fd5 d320 cec1 cd45 d380 946e 946e 5745 5245 20d3 4f4f ce20 544f 2046 4f4c 
4c4f 57ba 942c 942c 942f 942f
+
+00:01:00:089420 9420 946e 946e d349 5220 4cc1 d5ce 4345 4c4f 5420 54c8 
4520 c252 c1d6 453b 942c 942c 942f 942f
+
+00:01:03:019420 9420 946e 946e d349 5220 c7c1 4cc1 c8c1 c420 54c8 4520 
d0d5 5245 3b80 942c 942c 942f 942f
+
+00:01:04:299420 9420 136e 136e c1ce c420 d349 5220 524f c249 ce80 94ce 
94ce 54c8 4520 ce4f 54ad 51d5 4954 45ad d34f adc2 52c1 d645 ad80 946e 946e c1d3 
add3 4952 ad4c c1d5 ce43 454c 4f54 2c80 942c 942c 942f 942f
+
+00:01:08:089420 9420 94ce 94ce 57c8 4f20 c8c1 c420 ce45 c152 4cd9 2046 
4fd5 

[FFmpeg-cvslog] avfilter/vf_thumbnail_cuda: Reindent after the previous commit

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Tue Oct  5 22:36:24 2021 +0200| [37cb26bf790c5e20868c099647a1c6e49d58d08a] | 
committer: Andreas Rheinhardt

avfilter/vf_thumbnail_cuda: Reindent after the previous commit

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37cb26bf790c5e20868c099647a1c6e49d58d08a
---

 libavfilter/vf_thumbnail_cuda.c | 25 -
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c
index 7c86203227..c8dd905123 100644
--- a/libavfilter/vf_thumbnail_cuda.c
+++ b/libavfilter/vf_thumbnail_cuda.c
@@ -304,27 +304,26 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*frame)
 
 static av_cold void uninit(AVFilterContext *ctx)
 {
-int i;
 ThumbnailCudaContext *s = ctx->priv;
 
 if (s->hwctx) {
-CudaFunctions *cu = s->hwctx->internal->cuda_dl;
+CudaFunctions *cu = s->hwctx->internal->cuda_dl;
 
-if (s->data) {
-CHECK_CU(cu->cuMemFree(s->data));
-s->data = 0;
-}
+if (s->data) {
+CHECK_CU(cu->cuMemFree(s->data));
+s->data = 0;
+}
 
-if (s->cu_module) {
-CHECK_CU(cu->cuModuleUnload(s->cu_module));
-s->cu_module = NULL;
-}
+if (s->cu_module) {
+CHECK_CU(cu->cuModuleUnload(s->cu_module));
+s->cu_module = NULL;
+}
 }
 
 if (s->frames) {
-for (i = 0; i < s->n_frames && s->frames[i].buf; i++)
-av_frame_free(>frames[i].buf);
-av_freep(>frames);
+for (int i = 0; i < s->n_frames && s->frames[i].buf; i++)
+av_frame_free(>frames[i].buf);
+av_freep(>frames);
 }
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/vf_thumbnail_cuda: Fix segfaults on uninit

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Tue Oct  5 22:31:03 2021 +0200| [06045f4b1da1cbfa3446beef6797fb983a7dada5] | 
committer: Andreas Rheinhardt

avfilter/vf_thumbnail_cuda: Fix segfaults on uninit

Uninit crashed if an array containing frames could not be allocated
or config_props() has never been called.

Reviewed-by: Timo Rothenpieler 
Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=06045f4b1da1cbfa3446beef6797fb983a7dada5
---

 libavfilter/vf_thumbnail_cuda.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c
index 491542c60a..7c86203227 100644
--- a/libavfilter/vf_thumbnail_cuda.c
+++ b/libavfilter/vf_thumbnail_cuda.c
@@ -306,6 +306,8 @@ static av_cold void uninit(AVFilterContext *ctx)
 {
 int i;
 ThumbnailCudaContext *s = ctx->priv;
+
+if (s->hwctx) {
 CudaFunctions *cu = s->hwctx->internal->cuda_dl;
 
 if (s->data) {
@@ -317,10 +319,13 @@ static av_cold void uninit(AVFilterContext *ctx)
 CHECK_CU(cu->cuModuleUnload(s->cu_module));
 s->cu_module = NULL;
 }
+}
 
+if (s->frames) {
 for (i = 0; i < s->n_frames && s->frames[i].buf; i++)
 av_frame_free(>frames[i].buf);
 av_freep(>frames);
+}
 }
 
 static int request_frame(AVFilterLink *link)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] Revert "avformat/hlsenc: compute video_keyframe_size after write keyframe"

2021-10-07 Thread Steven Liu
ffmpeg | branch: release/4.4 | Steven Liu  | Sat May  1 
15:07:53 2021 +0800| [973899054244a7239f79453e5f4bcff235b8f6e4] | committer: 
Steven Liu

Revert "avformat/hlsenc: compute video_keyframe_size after write keyframe"

This reverts commit b5ca8f2c66954614d81579082025f580efc0cffc.

This commit will make new problem about tickets: 9193,9205
It flush data into file with init file context together,
and it can get keyframe size, maybe need more method to get keyframe
size.

Signed-off-by: Steven Liu 
(cherry picked from commit 59032494e81a1a65c0b960aaae7ec4c2cc9db35a)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=973899054244a7239f79453e5f4bcff235b8f6e4
---

 libavformat/hlsenc.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 7d97ce1789..e222b70ffa 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2672,14 +2672,13 @@ static int hls_write_packet(AVFormatContext *s, 
AVPacket *pkt)
 
 vs->packets_written++;
 if (oc->pb) {
-int64_t keyframe_pre_pos = avio_tell(oc->pb);
 ret = ff_write_chained(oc, stream_index, pkt, s, 0);
-if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) &&
-(pkt->flags & AV_PKT_FLAG_KEY) && !keyframe_pre_pos) {
-av_write_frame(oc, NULL); /* Flush any buffered data */
-vs->video_keyframe_size = avio_tell(oc->pb) - keyframe_pre_pos;
+vs->video_keyframe_size += pkt->size;
+if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) && (pkt->flags & 
AV_PKT_FLAG_KEY)) {
+vs->video_keyframe_size = avio_tell(oc->pb);
+} else {
+vs->video_keyframe_pos = avio_tell(vs->out);
 }
-vs->video_keyframe_pos = vs->start_pos;
 if (hls->ignore_io_errors)
 ret = 0;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avformat/format: Improve const-correctness

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Thu Oct  7 11:36:28 2021 +0200| [baf89ab9a75f2c5cc1b9e9835e092278b4b978c6] | 
committer: Andreas Rheinhardt

avformat/format: Improve const-correctness

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=baf89ab9a75f2c5cc1b9e9835e092278b4b978c6
---

 libavformat/format.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/format.c b/libavformat/format.c
index cc214741bd..387627009e 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -52,7 +52,7 @@ const AVOutputFormat *av_guess_format(const char *short_name, 
const char *filena
   const char *mime_type)
 {
 const AVOutputFormat *fmt = NULL;
-AVOutputFormat *fmt_found = NULL;
+const AVOutputFormat *fmt_found = NULL;
 void *i = 0;
 int score_max, score;
 
@@ -78,7 +78,7 @@ const AVOutputFormat *av_guess_format(const char *short_name, 
const char *filena
 }
 if (score > score_max) {
 score_max = score;
-fmt_found = (AVOutputFormat*)fmt;
+fmt_found = fmt;
 }
 }
 return fmt_found;
@@ -121,7 +121,7 @@ const AVInputFormat *av_find_input_format(const char 
*short_name)
 void *i = 0;
 while ((fmt = av_demuxer_iterate()))
 if (av_match_name(short_name, fmt->name))
-return (AVInputFormat*)fmt;
+return fmt;
 return NULL;
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/aeval: Fix leak of expressions upon reallocation error

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Wed Oct  6 16:05:39 2021 +0200| [05c1f78a72916ef2466cc5a4fc778810503225ee] | 
committer: Andreas Rheinhardt

avfilter/aeval: Fix leak of expressions upon reallocation error

Fix this by switching to av_dynarray_add_nofree() which is more
natural anyway because the entries of the array are pointers.

Reviewed-by: Paul B Mahol 
Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05c1f78a72916ef2466cc5a4fc778810503225ee
---

 libavfilter/aeval.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavfilter/aeval.c b/libavfilter/aeval.c
index 2dc8bace51..42cfa81325 100644
--- a/libavfilter/aeval.c
+++ b/libavfilter/aeval.c
@@ -124,11 +124,10 @@ static int parse_channel_expressions(AVFilterContext *ctx,
 }
 
 #define ADD_EXPRESSION(expr_) do {  \
-if (!av_dynarray2_add((void **)>expr, >nb_channels, \
-  sizeof(*eval->expr), NULL)) { \
-ret = AVERROR(ENOMEM);  \
+ret = av_dynarray_add_nofree(>expr,   \
+ >nb_channels, NULL); \
+if (ret < 0)\
 goto end;   \
-}   \
 eval->expr[eval->nb_channels-1] = NULL; \
 ret = av_expr_parse(>expr[eval->nb_channels - 1], expr_,  \
 var_names, func1_names, func1,  \

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/af_vibrato: Fix segfault upon allocation error

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Wed Oct  6 15:36:05 2021 +0200| [bae96fa9776cf35cdf32f285f2a980b31e63560a] | 
committer: Andreas Rheinhardt

avfilter/af_vibrato: Fix segfault upon allocation error

Reviewed-by: Paul B Mahol 
Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bae96fa9776cf35cdf32f285f2a980b31e63560a
---

 libavfilter/af_vibrato.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_vibrato.c b/libavfilter/af_vibrato.c
index c0cbcbf6f2..2cf1364273 100644
--- a/libavfilter/af_vibrato.c
+++ b/libavfilter/af_vibrato.c
@@ -127,11 +127,11 @@ static int config_input(AVFilterLink *inlink)
 int c;
 AVFilterContext *ctx = inlink->dst;
 VibratoContext *s = ctx->priv;
-s->channels = inlink->channels;
 
 s->buf = av_calloc(inlink->channels, sizeof(*s->buf));
 if (!s->buf)
 return AVERROR(ENOMEM);
+s->channels = inlink->channels;
 s->buf_size = lrint(inlink->sample_rate * 0.005 + 0.5);
 for (c = 0; c < s->channels; c++) {
 s->buf[c] = av_malloc_array(s->buf_size, sizeof(*s->buf[c]));

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/vf_w3fdif: Fix segfault on allocation error

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Wed Oct  6 15:20:30 2021 +0200| [cd1aaec760273bd7673b27609f114599e2d9b5a9] | 
committer: Andreas Rheinhardt

avfilter/vf_w3fdif: Fix segfault on allocation error

Reviewed-by: Paul B Mahol 
Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd1aaec760273bd7673b27609f114599e2d9b5a9
---

 libavfilter/vf_w3fdif.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index ea304164b6..c2ea76dfa3 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -275,7 +275,7 @@ static int config_input(AVFilterLink *inlink)
 AVFilterContext *ctx = inlink->dst;
 W3FDIFContext *s = ctx->priv;
 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
-int ret, i, depth;
+int ret, i, depth, nb_threads;
 
 if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, 
inlink->w)) < 0)
 return ret;
@@ -289,10 +289,11 @@ static int config_input(AVFilterLink *inlink)
 }
 
 s->nb_planes = av_pix_fmt_count_planes(inlink->format);
-s->nb_threads = ff_filter_get_nb_threads(ctx);
-s->work_line = av_calloc(s->nb_threads, sizeof(*s->work_line));
+nb_threads = ff_filter_get_nb_threads(ctx);
+s->work_line = av_calloc(nb_threads, sizeof(*s->work_line));
 if (!s->work_line)
 return AVERROR(ENOMEM);
+s->nb_threads = nb_threads;
 
 for (i = 0; i < s->nb_threads; i++) {
 s->work_line[i] = av_calloc(FFALIGN(s->linesize[0], 32), 
sizeof(*s->work_line[0]));

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avfilter/af_surround: Fix memleaks upon allocation error

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Wed Oct  6 15:29:32 2021 +0200| [0429d8eed85674ae19cccab81f7fbb13a4ccc705] | 
committer: Andreas Rheinhardt

avfilter/af_surround: Fix memleaks upon allocation error

Reviewed-by: Paul B Mahol 
Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0429d8eed85674ae19cccab81f7fbb13a4ccc705
---

 libavfilter/af_surround.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c
index e3601b9df0..efdf91a391 100644
--- a/libavfilter/af_surround.c
+++ b/libavfilter/af_surround.c
@@ -200,13 +200,13 @@ static int config_input(AVFilterLink *inlink)
 s->rdft = av_calloc(inlink->channels, sizeof(*s->rdft));
 if (!s->rdft)
 return AVERROR(ENOMEM);
+s->nb_in_channels = inlink->channels;
 
 for (ch = 0; ch < inlink->channels; ch++) {
 s->rdft[ch]  = av_rdft_init(ff_log2(s->buf_size), DFT_R2C);
 if (!s->rdft[ch])
 return AVERROR(ENOMEM);
 }
-s->nb_in_channels = inlink->channels;
 s->input_levels = av_malloc_array(s->nb_in_channels, 
sizeof(*s->input_levels));
 if (!s->input_levels)
 return AVERROR(ENOMEM);
@@ -263,13 +263,13 @@ static int config_output(AVFilterLink *outlink)
 s->irdft = av_calloc(outlink->channels, sizeof(*s->irdft));
 if (!s->irdft)
 return AVERROR(ENOMEM);
+s->nb_out_channels = outlink->channels;
 
 for (ch = 0; ch < outlink->channels; ch++) {
 s->irdft[ch] = av_rdft_init(ff_log2(s->buf_size), IDFT_C2R);
 if (!s->irdft[ch])
 return AVERROR(ENOMEM);
 }
-s->nb_out_channels = outlink->channels;
 s->output_levels = av_malloc_array(s->nb_out_channels, 
sizeof(*s->output_levels));
 if (!s->output_levels)
 return AVERROR(ENOMEM);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] examples/remuxing: Fix use of uninitialized value

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Tue Oct  5 21:02:07 2021 +0200| [b6aeee2d8bedcd8cfc6aa91cc124c904a78adb1e] | 
committer: Andreas Rheinhardt

examples/remuxing: Fix use of uninitialized value

Fixes Coverity ticket 1492326.
Regression since 53f374c08d5cc97158c17ea34b1c8ee0116c0578.

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6aeee2d8bedcd8cfc6aa91cc124c904a78adb1e
---

 doc/examples/remuxing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/examples/remuxing.c b/doc/examples/remuxing.c
index 9ded91..2657f9dc66 100644
--- a/doc/examples/remuxing.c
+++ b/doc/examples/remuxing.c
@@ -68,7 +68,7 @@ int main(int argc, char **argv)
 pkt = av_packet_alloc();
 if (!pkt) {
 fprintf(stderr, "Could not allocate AVPacket\n");
-goto end;
+return 1;
 }
 
 if ((ret = avformat_open_input(_ctx, in_filename, 0, 0)) < 0) {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/aliaspixenc: Remove redundant counter

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Wed Oct  6 13:57:42 2021 +0200| [5e1b5b52fe7fdfa6d9e1a78ac0576cf5931a82bb] | 
committer: Andreas Rheinhardt

avcodec/aliaspixenc: Remove redundant counter

Improves performance by 33.8% for BGR24 and by 26.4% for GRAY8.

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e1b5b52fe7fdfa6d9e1a78ac0576cf5931a82bb
---

 libavcodec/aliaspixenc.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/libavcodec/aliaspixenc.c b/libavcodec/aliaspixenc.c
index 01461c984b..fa273df9c2 100644
--- a/libavcodec/aliaspixenc.c
+++ b/libavcodec/aliaspixenc.c
@@ -31,8 +31,8 @@
 static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 const AVFrame *frame, int *got_packet)
 {
-int width, height, bits_pixel, i, j, length, ret;
-uint8_t *in_buf, *buf;
+int width, height, bits_pixel, length, ret;
+uint8_t *buf;
 
 width  = avctx->width;
 height = avctx->height;
@@ -66,15 +66,16 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 bytestream_put_be32(, 0); /* X, Y offset */
 bytestream_put_be16(, bits_pixel);
 
-for (j = 0; j < height; j++) {
-in_buf = frame->data[0] + frame->linesize[0] * j;
-for (i = 0; i < width; ) {
+for (int j = 0, bytes_pixel = bits_pixel >> 3; j < height; j++) {
+const uint8_t *in_buf = frame->data[0] + frame->linesize[0] * j;
+const uint8_t *const line_end = in_buf + bytes_pixel * width;
+while (in_buf < line_end) {
 int count = 0;
 int pixel;
 
 if (avctx->pix_fmt == AV_PIX_FMT_GRAY8) {
 pixel = *in_buf;
-while (count < 255 && count + i < width && pixel == *in_buf) {
+while (count < 255 && in_buf < line_end && pixel == *in_buf) {
 count++;
 in_buf++;
 }
@@ -82,7 +83,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 bytestream_put_byte(, pixel);
 } else { /* AV_PIX_FMT_BGR24 */
 pixel = AV_RB24(in_buf);
-while (count < 255 && count + i < width &&
+while (count < 255 && in_buf < line_end &&
pixel == AV_RB24(in_buf)) {
 count++;
 in_buf += 3;
@@ -90,7 +91,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 bytestream_put_byte(, count);
 bytestream_put_be24(, pixel);
 }
-i += count;
 }
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] fate/image: Modify aliaspix tests to also cover the encoder

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Wed Oct  6 12:34:49 2021 +0200| [66f468591056b92057a9ae4adc4806546cd19eeb] | 
committer: Andreas Rheinhardt

fate/image: Modify aliaspix tests to also cover the encoder

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=66f468591056b92057a9ae4adc4806546cd19eeb
---

 tests/fate/image.mak | 9 ++---
 tests/ref/fate/aliaspix-bgr  | 8 
 tests/ref/fate/aliaspix-gray | 8 
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/tests/fate/image.mak b/tests/fate/image.mak
index d1f9765eea..573d398915 100644
--- a/tests/fate/image.mak
+++ b/tests/fate/image.mak
@@ -1,10 +1,13 @@
 FATE_ALIASPIX += fate-aliaspix-bgr
-fate-aliaspix-bgr: CMD = framecrc -i $(TARGET_SAMPLES)/aliaspix/first.pix 
-pix_fmt bgr24
+fate-aliaspix-bgr: CMD = transcode alias_pix 
$(TARGET_SAMPLES)/aliaspix/first.pix image2 "-c alias_pix" "-map 0 -map 0 
-pix_fmt:0 bgr24 -c:v:1 copy"
 
 FATE_ALIASPIX += fate-aliaspix-gray
-fate-aliaspix-gray: CMD = framecrc -i $(TARGET_SAMPLES)/aliaspix/firstgray.pix 
-pix_fmt gray
+fate-aliaspix-gray: CMD = transcode alias_pix 
$(TARGET_SAMPLES)/aliaspix/firstgray.pix image2 "-c alias_pix" "-map 0 -map 0 
-pix_fmt:0 gray -c:v:1 copy"
 
-FATE_ALIASPIX-$(call DEMDEC, IMAGE2, ALIAS_PIX) += $(FATE_ALIASPIX)
+FATE_ALIASPIX-$(call ALLYES, FILE_PROTOCOL IMAGE2_ALIAS_PIX_DEMUXER \
+ ALIAS_PIX_DECODER ALIAS_PIX_ENCODER\
+ IMAGE2_MUXER RAWVIDEO_ENCODER  \
+ FRAMECRC_MUXER PIPE_PROTOCOL) += $(FATE_ALIASPIX)
 FATE_IMAGE += $(FATE_ALIASPIX-yes)
 fate-aliaspix: $(FATE_ALIASPIX-yes)
 
diff --git a/tests/ref/fate/aliaspix-bgr b/tests/ref/fate/aliaspix-bgr
index f5c6b7d475..4f55e0dcf6 100644
--- a/tests/ref/fate/aliaspix-bgr
+++ b/tests/ref/fate/aliaspix-bgr
@@ -1,6 +1,14 @@
+667513c8869eea09e1374a73eb21233c *tests/data/fate/aliaspix-bgr.image2
+63090 tests/data/fate/aliaspix-bgr.image2
 #tb 0: 1/25
 #media_type 0: video
 #codec_id 0: rawvideo
 #dimensions 0: 201x79
 #sar 0: 0/1
+#tb 1: 1/25
+#media_type 1: video
+#codec_id 1: alias_pix
+#dimensions 1: 201x79
+#sar 1: 0/1
 0,  0,  0,1,47637, 0xcb77368f
+1,  0,  0,1,63090, 0xe49bba3b
diff --git a/tests/ref/fate/aliaspix-gray b/tests/ref/fate/aliaspix-gray
index aa7b4649b2..4bf9c43e0e 100644
--- a/tests/ref/fate/aliaspix-gray
+++ b/tests/ref/fate/aliaspix-gray
@@ -1,6 +1,14 @@
+2d7ae310710798257ebcff8a41c646ee *tests/data/fate/aliaspix-gray.image2
+28868 tests/data/fate/aliaspix-gray.image2
 #tb 0: 1/25
 #media_type 0: video
 #codec_id 0: rawvideo
 #dimensions 0: 199x81
 #sar 0: 0/1
+#tb 1: 1/25
+#media_type 1: video
+#codec_id 1: alias_pix
+#dimensions 1: 199x81
+#sar 1: 0/1
 0,  0,  0,1,16119, 0x3d0785f5
+1,  0,  0,1,28868, 0x02523ce2

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avformat/lrcenc: Unify writing timestamps

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Fri Oct  1 22:41:49 2021 +0200| [14baf4cd92062994931044d919f635874cdd] | 
committer: Andreas Rheinhardt

avformat/lrcenc: Unify writing timestamps

Reviewed-by: Paul B Mahol 
Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=14baf4cd92062994931044d919f635874cdd
---

 libavformat/lrcenc.c | 21 -
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/libavformat/lrcenc.c b/libavformat/lrcenc.c
index 78d9c6d362..5703a95180 100644
--- a/libavformat/lrcenc.c
+++ b/libavformat/lrcenc.c
@@ -109,19 +109,14 @@ static int lrc_write_packet(AVFormatContext *s, AVPacket 
*pkt)
"Subtitle starts with '[', may cause problems with LRC 
format.\n");
 }
 
-if(pkt->pts >= 0) {
-avio_printf(s->pb, "[%02"PRId64":%02"PRId64".%02"PRId64"]",
-(pkt->pts / 6000),
-((pkt->pts / 100) % 60),
-(pkt->pts % 100));
-} else {
-/* Offset feature of LRC can easily make pts negative,
- * we just output it directly and let the player drop it. */
-avio_printf(s->pb, "[-%02"PRId64":%02"PRId64".%02"PRId64"]",
-(-pkt->pts) / 6000,
-((-pkt->pts) / 100) % 60,
-(-pkt->pts) % 100);
-}
+/* Offset feature of LRC can easily make pts negative,
+ * we just output it directly and let the player drop it. */
+avio_write(s->pb, "[-", 1 + (pkt->pts < 0));
+avio_printf(s->pb, "%02"PRIu64":%02"PRIu64".%02"PRIu64"]",
+(FFABS64U(pkt->pts) / 6000),
+((FFABS64U(pkt->pts) / 100) % 60),
+(FFABS64U(pkt->pts) % 100));
+
 avio_write(s->pb, line, size);
 avio_w8(s->pb, '\n');
 line = next_line;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avformat/lrcenc: Avoid allocations for writing packet data

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Fri Oct  1 22:11:17 2021 +0200| [e110076d8c1611a1b1c20edf1d0e8dea8be7ea15] | 
committer: Andreas Rheinhardt

avformat/lrcenc: Avoid allocations for writing packet data

Reviewed-by: Paul B Mahol 
Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e110076d8c1611a1b1c20edf1d0e8dea8be7ea15
---

 libavformat/lrcenc.c | 44 ++--
 1 file changed, 18 insertions(+), 26 deletions(-)

diff --git a/libavformat/lrcenc.c b/libavformat/lrcenc.c
index c9f98a9173..78d9c6d362 100644
--- a/libavformat/lrcenc.c
+++ b/libavformat/lrcenc.c
@@ -84,33 +84,25 @@ static int lrc_write_header(AVFormatContext *s)
 static int lrc_write_packet(AVFormatContext *s, AVPacket *pkt)
 {
 if(pkt->pts != AV_NOPTS_VALUE) {
-char *data = av_malloc(pkt->size + 1);
-char *line;
-char *delim;
+const uint8_t *line = pkt->data;
+const uint8_t *end  = pkt->data + pkt->size;
 
-if(!data) {
-return AVERROR(ENOMEM);
-}
-memcpy(data, pkt->data, pkt->size);
-data[pkt->size] = '\0';
-
-for(delim = data + pkt->size - 1;
-delim >= data && (delim[0] == '\n' || delim[0] == '\r'); delim--) {
-delim[0] = '\0'; // Strip last empty lines
-}
-line = data;
-while(line[0] == '\n' || line[0] == '\r') {
-line++; // Skip first empty lines
+while (end > line && (end[-1] == '\n' || end[-1] == '\r'))
+end--;
+if (line != end) {
+while (line[0] == '\n' || line[0] == '\r')
+line++; // Skip first empty lines
 }
 
 while(line) {
-delim = strchr(line, '\n');
-if(delim) {
-if(delim > line && delim[-1] == '\r') {
-delim[-1] = '\0';
-}
-delim[0] = '\0';
-delim++;
+const uint8_t *next_line = memchr(line, '\n', end - line);
+size_t size = end - line;
+
+if (next_line) {
+size = next_line - line;
+if (next_line > line && next_line[-1] == '\r')
+size--;
+next_line++;
 }
 if(line[0] == '[') {
 av_log(s, AV_LOG_WARNING,
@@ -130,10 +122,10 @@ static int lrc_write_packet(AVFormatContext *s, AVPacket 
*pkt)
 ((-pkt->pts) / 100) % 60,
 (-pkt->pts) % 100);
 }
-avio_printf(s->pb, "%s\n", line);
-line = delim;
+avio_write(s->pb, line, size);
+avio_w8(s->pb, '\n');
+line = next_line;
 }
-av_free(data);
 }
 return 0;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avformat/sccdec: Remove nonsense cast

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Fri Oct  1 10:33:38 2021 +0200| [07bf8f833261e06771f399f2b547b17bd1a351df] | 
committer: Andreas Rheinhardt

avformat/sccdec: Remove nonsense cast

In most contexts, arrays are automatically converted to a pointer
to their first element; taking the address of the array just yields
a pointer to an array of fixed-size arrays, which is not intended here.

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07bf8f833261e06771f399f2b547b17bd1a351df
---

 libavformat/sccdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index 5f90edbef6..720fd0434f 100644
--- a/libavformat/sccdec.c
+++ b/libavformat/sccdec.c
@@ -96,7 +96,7 @@ static int scc_read_header(AVFormatContext *s)
 if (sub)
 sub->duration = ts - sub->pts;
 
-lline = (char *)
+lline  = line;
 lline += 12;
 
 for (i = 0; i < 4095; i += 3) {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] fate/subtitles: Add remuxing test for lrc

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Fri Oct  1 20:38:57 2021 +0200| [1307089523e68fb0048f2d38c3789953b87595ca] | 
committer: Andreas Rheinhardt

fate/subtitles: Add remuxing test for lrc

It uses the test-lrc.lrc sample which was added years ago, but never
used until now.

Reviewed-by: Paul B Mahol 
Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1307089523e68fb0048f2d38c3789953b87595ca
---

 tests/fate/subtitles.mak |  3 +++
 tests/ref/fate/sub-lrc-remux | 49 
 2 files changed, 52 insertions(+)

diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak
index cd162786d4..2f4c94f366 100644
--- a/tests/fate/subtitles.mak
+++ b/tests/fate/subtitles.mak
@@ -26,6 +26,9 @@ FATE_SUBTITLES-$(call DEMMUX, JACOSUB, JACOSUB) += 
fate-sub-jacosub-remux
 fate-sub-jacosub-remux: CMD = transcode jacosub 
$(TARGET_SAMPLES)/sub/JACOsub_capability_tester.jss jacosub "-map 0 -c copy" 
"-map 0 -c copy"
 fate-sub-jacosub-remux: CMP = diff
 
+FATE_SUBTITLES-$(call DEMMUX, LRC, LRC) += fate-sub-lrc-remux
+fate-sub-lrc-remux: CMD = fmtstdout lrc -i $(TARGET_SAMPLES)/sub/test-lrc.lrc
+
 FATE_SUBTITLES_ASS-$(call DEMDEC, MICRODVD, MICRODVD) += fate-sub-microdvd
 fate-sub-microdvd: CMD = fmtstdout ass -i 
$(TARGET_SAMPLES)/sub/MicroDVD_capability_tester.sub
 
diff --git a/tests/ref/fate/sub-lrc-remux b/tests/ref/fate/sub-lrc-remux
new file mode 100644
index 00..92d6c30f64
--- /dev/null
+++ b/tests/ref/fate/sub-lrc-remux
@@ -0,0 +1,49 @@
+[ti:Swansong]
+[al:Breadcrumbs]
+[ar:Josh Woodward]
+[length:04:21]
+[by:StarBrilliant]
+
+[-00:01.02](This is a negative timestamp which should not make program crash)
+[00:35.62]I never thought I'd see the day
+[00:38.42]I thought that I had finally moved along
+[00:43.80]And I had let you go so long ago, so long
+[00:49.26]This is not, this is not where I belong
+[00:57.38]So I wait for this shallow itch to pass
+[01:05.98]And I wait, yeah I wait
+[01:12.14]Hey hey, I'm ok
+[01:15.18]I don't need this anyway, I'm fine
+[01:19.82]What's yours and mine
+[01:23.64]Oh oh, I don't know
+[01:26.44]What I was ever hoping I would find
+[01:31.66]But it's time for me to leave this all behind
+[01:35.74]
+[01:46.20]I don't regret a single thing
+[01:48.98]I couldn't say it didn't feel alright
+[01:54.10]But I don't want to stay and I don't want to fight
+[01:59.76]All alone, with my foolish appetite
+[02:07.94]So I wait for this shallow itch to pass
+[02:16.52]And I wait, yeah I wait
+[02:22.72]Hey hey, I'm ok
+[02:25.68]I don't need this anyway, I'm fine
+[02:30.38]What's yours and mine
+[02:34.12]Oh oh, I don't know
+[02:36.98]What I was ever hoping I would find
+[02:42.28]But it's time for me to leave this all behind
+[02:45.36]I don't have the heart to give away to you again
+[02:51.08]I don't have the stomach for it, no one ever wins
+[02:56.70]We had our fun but I have sung this song to you before
+[03:01.68]Here's my last refrain
+[03:08.05]Hey hey, I'm ok
+[03:10.81]I don't need this anyway, I'm fine
+[03:15.50]What's yours and mine
+[03:19.31]Oh oh, I don't know
+[03:22.11]What I was ever hoping I would find
+[03:27.34]But it's time for me to leave this all behind
+[03:30.81]Hey hey, I'm ok
+[03:32.98]I don't need this anyway, I'm fine
+[03:38.02]What's yours and mine
+[03:41.91]Oh oh, I don't know
+[03:44.54]What I was ever hoping I would find
+[03:50.04]But it's time for me to leave this all behind
+[03:54.82]

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] tests/fate-run: Set bitexact flag for output, too

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Fri Oct  1 20:33:33 2021 +0200| [2f4dfe861dbb82634388896e396411f93380093d] | 
committer: Andreas Rheinhardt

tests/fate-run: Set bitexact flag for output, too

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f4dfe861dbb82634388896e396411f93380093d
---

 tests/fate-run.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index bc1efa22d7..a16ce28a45 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -178,7 +178,7 @@ pcm(){
 fmtstdout(){
 fmt=$1
 shift 1
-ffmpeg -bitexact "$@" -f $fmt -
+ffmpeg -bitexact "$@" -bitexact -f $fmt -
 }
 
 enc_dec_pcm(){

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/rasc: Fix potential use of uninitialized value

2021-10-07 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Sun Oct  3 14:53:31 2021 +0200| [c9b44a79d1bc87251f36926b288f79adefec397f] | 
committer: Andreas Rheinhardt

avcodec/rasc: Fix potential use of uninitialized value

Fixes Coverity issue #1439566.

Signed-off-by: Andreas Rheinhardt 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9b44a79d1bc87251f36926b288f79adefec397f
---

 libavcodec/rasc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/rasc.c b/libavcodec/rasc.c
index 7fedf73878..b328e219bb 100644
--- a/libavcodec/rasc.c
+++ b/libavcodec/rasc.c
@@ -721,6 +721,7 @@ static int decode_frame(AVCodecContext *avctx,
 break;
 default:
 bytestream2_skip(gb, size);
+ret = 0;
 }
 
 if (ret < 0)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".