Re: [FFmpeg-devel] [PATCH] AVS3: add support for AVS3 High profile - same syntax as AVS3 Main profile

2022-02-25 Thread Paul Higgs


> -Original Message-
> From: ffmpeg-devel  On Behalf Of
> lance.lmw...@gmail.com
> Sent: 26 February 2022 07:18
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] AVS3: add support for AVS3 High profile
> - same syntax as AVS3 Main profile
> 
> On Sat, Feb 26, 2022 at 05:50:39AM +, Paul Higgs wrote:
> > This patch adds high level syntax support for parsing AVS3 High profile
> bitstreams.
> > Latest AVS3 specification including High profile is available at
> > http://www.avs.org.cn/AVS3_download/en_index.asp
> >
> > Signed-off-by: Paul Higgs 
> > ---
> >  libavcodec/avs3.h| 2 ++
> >  libavcodec/avs3_parser.c | 8 
> >  libavformat/avs3dec.c| 2 +-
> >  3 files changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/libavcodec/avs3.h b/libavcodec/avs3.h index
> > 4189d9b583..c8caa58b0a 100644
> > --- a/libavcodec/avs3.h
> > +++ b/libavcodec/avs3.h
> > @@ -35,6 +35,8 @@
> >  #define AVS3_FIRST_SLICE_START_CODE  0x00
> >  #define AVS3_PROFILE_BASELINE_MAIN   0x20
> >  #define AVS3_PROFILE_BASELINE_MAIN10 0x22
> > +#define AVS3_PROFILE_BASELINE_HIGH   0x30
> > +#define AVS3_PROFILE_BASELINE_HIGH10 0x32
> >
> >  #define AVS3_ISPIC(x) ((x) == AVS3_INTRA_PIC_START_CODE || (x) ==
> > AVS3_INTER_PIC_START_CODE)  #define AVS3_ISUNIT(x) ((x) ==
> > AVS3_SEQ_START_CODE || AVS3_ISPIC(x)) diff --git
> > a/libavcodec/avs3_parser.c b/libavcodec/avs3_parser.c index
> > d04d96a03a..483b38fe76 100644
> > --- a/libavcodec/avs3_parser.c
> > +++ b/libavcodec/avs3_parser.c
> > @@ -91,11 +91,11 @@ static void
> parse_avs3_nal_units(AVCodecParserContext *s, const uint8_t *buf,
> >  //sampe_precision(3)
> >  skip_bits(&gb, 47);
> >
> > -if (profile == AVS3_PROFILE_BASELINE_MAIN10) {
> > -int sample_precision = get_bits(&gb, 3);
> > -if (sample_precision == 1) {
> > +if (profile == AVS3_PROFILE_BASELINE_MAIN10 || profile ==
> AVS3_PROFILE_BASELINE_HIGH10) {
> > +int encoding_precision = get_bits(&gb, 3);
> > +if (encoding_precision == 1) {
> 
> Please keep sample_precision name, it's unrelated cosmetic change in this
> patch.
> 
Changed this because the three bits read in get_bits(&gb,3) are for the 
encoding precision. sample_precision syntax element was 
Skipped previously
> >  avctx->pix_fmt = AV_PIX_FMT_YUV420P;
> > -} else if (sample_precision == 2) {
> > +} else if (encoding_precision == 2) {
> >  avctx->pix_fmt = AV_PIX_FMT_YUV420P10LE;
> >  } else {
> >  avctx->pix_fmt = AV_PIX_FMT_NONE; diff --git
> > a/libavformat/avs3dec.c b/libavformat/avs3dec.c index
> > 2395df171b..335b5409f5 100644
> > --- a/libavformat/avs3dec.c
> > +++ b/libavformat/avs3dec.c
> > @@ -47,7 +47,7 @@ static int avs3video_probe(const AVProbeData *p)
> >  }
> >  if (state == AVS3_SEQ_START_CODE) {
> >  seq++;
> > -if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr !=
> AVS3_PROFILE_BASELINE_MAIN10)
> > +if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr !=
> > + AVS3_PROFILE_BASELINE_MAIN10 && *ptr !=
> AVS3_PROFILE_BASELINE_HIGH
> > + && *ptr != AVS3_PROFILE_BASELINE_HIGH10)
> 
> The line is too long.
Ok, will wrap before 80 characters
> 
> >  return 0;
> >  } else if (AVS3_ISPIC(state)) {
> >  pic++;
> > --
> > 2.30.0.windows.2
> >
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
> 
> --
> Thanks,
> Limin Wang
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org
> with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH] AVS3: add support for AVS3 High profile - same syntax as AVS3 Main profile

2022-02-25 Thread lance . lmwang
On Sat, Feb 26, 2022 at 05:50:39AM +, Paul Higgs wrote:
> This patch adds high level syntax support for parsing AVS3 High profile 
> bitstreams. 
> Latest AVS3 specification including High profile is available at 
> http://www.avs.org.cn/AVS3_download/en_index.asp
> 
> Signed-off-by: Paul Higgs 
> ---
>  libavcodec/avs3.h| 2 ++
>  libavcodec/avs3_parser.c | 8 
>  libavformat/avs3dec.c| 2 +-
>  3 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/libavcodec/avs3.h b/libavcodec/avs3.h
> index 4189d9b583..c8caa58b0a 100644
> --- a/libavcodec/avs3.h
> +++ b/libavcodec/avs3.h
> @@ -35,6 +35,8 @@
>  #define AVS3_FIRST_SLICE_START_CODE  0x00
>  #define AVS3_PROFILE_BASELINE_MAIN   0x20
>  #define AVS3_PROFILE_BASELINE_MAIN10 0x22
> +#define AVS3_PROFILE_BASELINE_HIGH   0x30
> +#define AVS3_PROFILE_BASELINE_HIGH10 0x32
>  
>  #define AVS3_ISPIC(x) ((x) == AVS3_INTRA_PIC_START_CODE || (x) == 
> AVS3_INTER_PIC_START_CODE)
>  #define AVS3_ISUNIT(x) ((x) == AVS3_SEQ_START_CODE || AVS3_ISPIC(x))
> diff --git a/libavcodec/avs3_parser.c b/libavcodec/avs3_parser.c
> index d04d96a03a..483b38fe76 100644
> --- a/libavcodec/avs3_parser.c
> +++ b/libavcodec/avs3_parser.c
> @@ -91,11 +91,11 @@ static void parse_avs3_nal_units(AVCodecParserContext *s, 
> const uint8_t *buf,
>  //sampe_precision(3)
>  skip_bits(&gb, 47);
>  
> -if (profile == AVS3_PROFILE_BASELINE_MAIN10) {
> -int sample_precision = get_bits(&gb, 3);
> -if (sample_precision == 1) {
> +if (profile == AVS3_PROFILE_BASELINE_MAIN10 || profile == 
> AVS3_PROFILE_BASELINE_HIGH10) {
> +int encoding_precision = get_bits(&gb, 3);
> +if (encoding_precision == 1) {

Please keep sample_precision name, it's unrelated cosmetic change in this 
patch. 

>  avctx->pix_fmt = AV_PIX_FMT_YUV420P;
> -} else if (sample_precision == 2) {
> +} else if (encoding_precision == 2) {
>  avctx->pix_fmt = AV_PIX_FMT_YUV420P10LE;
>  } else {
>  avctx->pix_fmt = AV_PIX_FMT_NONE;
> diff --git a/libavformat/avs3dec.c b/libavformat/avs3dec.c
> index 2395df171b..335b5409f5 100644
> --- a/libavformat/avs3dec.c
> +++ b/libavformat/avs3dec.c
> @@ -47,7 +47,7 @@ static int avs3video_probe(const AVProbeData *p)
>  }
>  if (state == AVS3_SEQ_START_CODE) {
>  seq++;
> -if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != 
> AVS3_PROFILE_BASELINE_MAIN10)
> +if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != 
> AVS3_PROFILE_BASELINE_MAIN10 && *ptr != AVS3_PROFILE_BASELINE_HIGH && *ptr != 
> AVS3_PROFILE_BASELINE_HIGH10)

The line is too long. 

>  return 0;
>  } else if (AVS3_ISPIC(state)) {
>  pic++;
> -- 
> 2.30.0.windows.2
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

-- 
Thanks,
Limin Wang
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 1/4] avutil: add support for CUVA HDR Vivid metadata

2022-02-25 Thread lance . lmwang
On Tue, Feb 15, 2022 at 08:08:51AM +0100, Andreas Rheinhardt wrote:
> lance.lmw...@gmail.com:
> > From: Limin Wang 
> > 
> > Signed-off-by: Limin Wang 
> > ---
> >  libavutil/Makefile |   2 +
> >  libavutil/frame.c  |   1 +
> >  libavutil/frame.h  |   7 +
> >  libavutil/hdr_dynamic_vivid_metadata.c |  47 ++
> >  libavutil/hdr_dynamic_vivid_metadata.h | 285 
> > +
> >  libavutil/version.h|   2 +-
> >  6 files changed, 343 insertions(+), 1 deletion(-)
> >  create mode 100644 libavutil/hdr_dynamic_vivid_metadata.c
> >  create mode 100644 libavutil/hdr_dynamic_vivid_metadata.h
> > 
> > diff --git a/libavutil/Makefile b/libavutil/Makefile
> > index d17876d..a8d7587 100644
> > --- a/libavutil/Makefile
> > +++ b/libavutil/Makefile
> > @@ -34,6 +34,7 @@ HEADERS = adler32.h   
> >   \
> >frame.h   \
> >hash.h\
> >hdr_dynamic_metadata.h\
> > +  hdr_dynamic_vivid_metadata.h  \
> >hmac.h\
> >hwcontext.h   \
> >hwcontext_cuda.h  \
> > @@ -130,6 +131,7 @@ OBJS = adler32.o
> > \
> > frame.o  \
> > hash.o   \
> > hdr_dynamic_metadata.o   \
> > +   hdr_dynamic_vivid_metadata.o \
> > hmac.o   \
> > hwcontext.o  \
> > imgutils.o   \
> > diff --git a/libavutil/frame.c b/libavutil/frame.c
> > index 8997c85..b035e28 100644
> > --- a/libavutil/frame.c
> > +++ b/libavutil/frame.c
> > @@ -723,6 +723,7 @@ const char *av_frame_side_data_name(enum 
> > AVFrameSideDataType type)
> >  case AV_FRAME_DATA_SPHERICAL:   return "Spherical 
> > Mapping";
> >  case AV_FRAME_DATA_ICC_PROFILE: return "ICC profile";
> >  case AV_FRAME_DATA_DYNAMIC_HDR_PLUS: return "HDR Dynamic Metadata 
> > SMPTE2094-40 (HDR10+)";
> > +case AV_FRAME_DATA_DYNAMIC_HDR_VIVID: return "HDR Dynamic Metadata 
> > CUVA 005.1 2021 (Vivid)";
> >  case AV_FRAME_DATA_REGIONS_OF_INTEREST: return "Regions Of Interest";
> >  case AV_FRAME_DATA_VIDEO_ENC_PARAMS:return "Video encoding 
> > parameters";
> >  case AV_FRAME_DATA_SEI_UNREGISTERED:return "H.26[45] User 
> > Data Unregistered SEI message";
> > diff --git a/libavutil/frame.h b/libavutil/frame.h
> > index 18e239f..32cde3c 100644
> > --- a/libavutil/frame.h
> > +++ b/libavutil/frame.h
> > @@ -158,6 +158,13 @@ enum AVFrameSideDataType {
> >  AV_FRAME_DATA_DYNAMIC_HDR_PLUS,
> >  
> >  /**
> > + * HDR Vivid dynamic metadata associated with a video frame. The 
> > payload is
> > + * an AVDynamicHDRVivid type and contains information for color
> > + * volume transform - CUVA 005.1-2021.
> > + */
> > +AV_FRAME_DATA_DYNAMIC_HDR_VIVID,
> > +
> 
> Always add at the end. You are breaking ABI otherwise.

plan to push the patchset(including of moving the type at the end) in the next 
two day if no other more comments 

> 
> > +/**
> >   * Regions Of Interest, the data is an array of AVRegionOfInterest 
> > type, the number of
> >   * array element is implied by AVFrameSideData.size / 
> > AVRegionOfInterest.self_size.
> >   */
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

-- 
Thanks,
Limin Wang
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


[FFmpeg-devel] [PATCH] AVS3: add support for AVS3 High profile - same syntax as AVS3 Main profile

2022-02-25 Thread Paul Higgs
This patch adds high level syntax support for parsing AVS3 High profile 
bitstreams. 
Latest AVS3 specification including High profile is available at 
http://www.avs.org.cn/AVS3_download/en_index.asp

Signed-off-by: Paul Higgs 
---
 libavcodec/avs3.h| 2 ++
 libavcodec/avs3_parser.c | 8 
 libavformat/avs3dec.c| 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/libavcodec/avs3.h b/libavcodec/avs3.h
index 4189d9b583..c8caa58b0a 100644
--- a/libavcodec/avs3.h
+++ b/libavcodec/avs3.h
@@ -35,6 +35,8 @@
 #define AVS3_FIRST_SLICE_START_CODE  0x00
 #define AVS3_PROFILE_BASELINE_MAIN   0x20
 #define AVS3_PROFILE_BASELINE_MAIN10 0x22
+#define AVS3_PROFILE_BASELINE_HIGH   0x30
+#define AVS3_PROFILE_BASELINE_HIGH10 0x32
 
 #define AVS3_ISPIC(x) ((x) == AVS3_INTRA_PIC_START_CODE || (x) == 
AVS3_INTER_PIC_START_CODE)
 #define AVS3_ISUNIT(x) ((x) == AVS3_SEQ_START_CODE || AVS3_ISPIC(x))
diff --git a/libavcodec/avs3_parser.c b/libavcodec/avs3_parser.c
index d04d96a03a..483b38fe76 100644
--- a/libavcodec/avs3_parser.c
+++ b/libavcodec/avs3_parser.c
@@ -91,11 +91,11 @@ static void parse_avs3_nal_units(AVCodecParserContext *s, 
const uint8_t *buf,
 //sampe_precision(3)
 skip_bits(&gb, 47);
 
-if (profile == AVS3_PROFILE_BASELINE_MAIN10) {
-int sample_precision = get_bits(&gb, 3);
-if (sample_precision == 1) {
+if (profile == AVS3_PROFILE_BASELINE_MAIN10 || profile == 
AVS3_PROFILE_BASELINE_HIGH10) {
+int encoding_precision = get_bits(&gb, 3);
+if (encoding_precision == 1) {
 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
-} else if (sample_precision == 2) {
+} else if (encoding_precision == 2) {
 avctx->pix_fmt = AV_PIX_FMT_YUV420P10LE;
 } else {
 avctx->pix_fmt = AV_PIX_FMT_NONE;
diff --git a/libavformat/avs3dec.c b/libavformat/avs3dec.c
index 2395df171b..335b5409f5 100644
--- a/libavformat/avs3dec.c
+++ b/libavformat/avs3dec.c
@@ -47,7 +47,7 @@ static int avs3video_probe(const AVProbeData *p)
 }
 if (state == AVS3_SEQ_START_CODE) {
 seq++;
-if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != 
AVS3_PROFILE_BASELINE_MAIN10)
+if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != 
AVS3_PROFILE_BASELINE_MAIN10 && *ptr != AVS3_PROFILE_BASELINE_HIGH && *ptr != 
AVS3_PROFILE_BASELINE_HIGH10)
 return 0;
 } else if (AVS3_ISPIC(state)) {
 pic++;
-- 
2.30.0.windows.2

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

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


[FFmpeg-devel] [PATCH] add support for AVS3 High profile - same syntax as AVS3 Main profile

2022-02-25 Thread Paul Higgs
This patch adds high level syntax support for parsing AVS3 High profile 
bitstreams. 
Latest AVS3 specification including High profile is available at 
http://www.avs.org.cn/AVS3_download/en_index.asp

Signed-off-by: Paul Higgs 
---
 libavcodec/avs3.h| 2 ++
 libavcodec/avs3_parser.c | 8 
 libavformat/avs3dec.c| 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/libavcodec/avs3.h b/libavcodec/avs3.h
index 4189d9b583..c8caa58b0a 100644
--- a/libavcodec/avs3.h
+++ b/libavcodec/avs3.h
@@ -35,6 +35,8 @@
 #define AVS3_FIRST_SLICE_START_CODE  0x00
 #define AVS3_PROFILE_BASELINE_MAIN   0x20
 #define AVS3_PROFILE_BASELINE_MAIN10 0x22
+#define AVS3_PROFILE_BASELINE_HIGH   0x30
+#define AVS3_PROFILE_BASELINE_HIGH10 0x32
 
 #define AVS3_ISPIC(x) ((x) == AVS3_INTRA_PIC_START_CODE || (x) == 
AVS3_INTER_PIC_START_CODE)
 #define AVS3_ISUNIT(x) ((x) == AVS3_SEQ_START_CODE || AVS3_ISPIC(x))
diff --git a/libavcodec/avs3_parser.c b/libavcodec/avs3_parser.c
index d04d96a03a..483b38fe76 100644
--- a/libavcodec/avs3_parser.c
+++ b/libavcodec/avs3_parser.c
@@ -91,11 +91,11 @@ static void parse_avs3_nal_units(AVCodecParserContext *s, 
const uint8_t *buf,
 //sampe_precision(3)
 skip_bits(&gb, 47);
 
-if (profile == AVS3_PROFILE_BASELINE_MAIN10) {
-int sample_precision = get_bits(&gb, 3);
-if (sample_precision == 1) {
+if (profile == AVS3_PROFILE_BASELINE_MAIN10 || profile == 
AVS3_PROFILE_BASELINE_HIGH10) {
+int encoding_precision = get_bits(&gb, 3);
+if (encoding_precision == 1) {
 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
-} else if (sample_precision == 2) {
+} else if (encoding_precision == 2) {
 avctx->pix_fmt = AV_PIX_FMT_YUV420P10LE;
 } else {
 avctx->pix_fmt = AV_PIX_FMT_NONE;
diff --git a/libavformat/avs3dec.c b/libavformat/avs3dec.c
index 2395df171b..335b5409f5 100644
--- a/libavformat/avs3dec.c
+++ b/libavformat/avs3dec.c
@@ -47,7 +47,7 @@ static int avs3video_probe(const AVProbeData *p)
 }
 if (state == AVS3_SEQ_START_CODE) {
 seq++;
-if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != 
AVS3_PROFILE_BASELINE_MAIN10)
+if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != 
AVS3_PROFILE_BASELINE_MAIN10 && *ptr != AVS3_PROFILE_BASELINE_HIGH && *ptr != 
AVS3_PROFILE_BASELINE_HIGH10)
 return 0;
 } else if (AVS3_ISPIC(state)) {
 pic++;
-- 
2.30.0.windows.2

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

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


Re: [FFmpeg-devel] [PATCH v2 1/2] libavcodec: Added DFPWM1a codec

2022-02-25 Thread Jack Bruienne
Sorry, I forgot to run make fate on the split patches, and I used the 
wrong capabilities for the decoder. I have attached a modified patch 
that removes AV_CODEC_CAP_VARIABLE_FRAME_SIZE from the decoder 
capabilities. Let me know if you'd like a full v3 patch email instead.


On 2/25/22 18:43, Jack Bruienne wrote:


From the wiki page (https://wiki.vexatos.com/dfpwm):

DFPWM (Dynamic Filter Pulse Width Modulation) is an audio codec
created by Ben “GreaseMonkey” Russell in 2012, originally to be used
as a voice codec for asiekierka's pixmess, a C remake of 64pixels.
It is a 1-bit-per-sample codec which uses a dynamic-strength one-pole
low-pass filter as a predictor. Due to the fact that a raw DPFWM 
decoding
creates a high-pitched whine, it is often followed by some 
post-processing

filters to make the stream more listenable.


It has recently gained popularity through the ComputerCraft mod for
Minecraft, which added support for audio through this codec, as well as
the Computronics expansion which preceeded the official support. These
both implement the slightly adjusted 1a version of the codec, which is
the version I have chosen for this patch.

This patch adds a new codec (with encoding and decoding) for DFPWM1a.

The codec sources are pretty simple: they use the reference codec with
a basic wrapper to connect it to the FFmpeg AVCodec system.

This patch will be highly useful to ComputerCraft developers who are
working with audio, as it is the standard format for audio, and there
are few user-friendly encoders out there. It will streamline the process
for importing audio, replacing the need to write code or use tools that
require very specific input formats.

You may use the CraftOS-PC program (https://www.craftos-pc.cc) to test
out DFPWM playback. To use it, run the program and type this command:
"attach left speaker" Then run "speaker play " for each file.
The app runs in a sandbox, so files have to be transferred in first;
the easiest way to do this is to simply drag the file on the window.
(Or copy files to the folder at https://www.craftos-pc.cc/docs/saves.)

Sample DFPWM files can be generated with an online tool at
https://music.madefor.cc. This is the current best way to encode DFPWM
files. Simply drag an audio file onto the page, and it will encode it,
giving a download link on the page.

I've made sure to update all of the docs as per Developer§7, and I've
tested it as per section 8. Test files encoded to DFPWM play correctly
in ComputerCraft, and other files that work in CC are correctly decoded.
I have also verified that corrupt files do not crash the decoder - this
should theoretically not be an issue as the result size is constant with
respect to the input size.

Signed-off-by: Jack Bruienne 
---
 Changelog |   1 +
 MAINTAINERS   |   1 +
 doc/general_contents.texi |   1 +
 libavcodec/Makefile   |   2 +
 libavcodec/allcodecs.c    |   2 +
 libavcodec/codec_desc.c   |   7 +++
 libavcodec/codec_id.h |   1 +
 libavcodec/dfpwmdec.c | 129 ++
 libavcodec/dfpwmenc.c | 123 
 libavcodec/utils.c    |   2 +
 libavcodec/version.h  |   2 +-
 11 files changed, 270 insertions(+), 1 deletion(-)
 create mode 100644 libavcodec/dfpwmdec.c
 create mode 100644 libavcodec/dfpwmenc.c
diff --git a/Changelog b/Changelog
index 5ad2cef..5170a6a 100644
--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
 version 5.1:
 - dialogue enhance audio filter
 - dropped obsolete XvMC hwaccel
+- DFPWM audio encoder/decoder
 
 
 version 5.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index f33ccbd..57b6f33 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -161,6 +161,7 @@ Codecs:
   cscd.cReimar Doeffinger
   cuviddec.cTimo Rothenpieler
   dca*  foo86
+  dfpwm*Jack Bruienne
   dirac*Rostislav Pehlivanov
   dnxhd*Baptiste Coudurier
   dolby_e*  foo86
diff --git a/doc/general_contents.texi b/doc/general_contents.texi
index df1692c..14aeaed 100644
--- a/doc/general_contents.texi
+++ b/doc/general_contents.texi
@@ -1194,6 +1194,7 @@ following image formats are supported:
 @item CRI HCA@tab @tab X
 @item Delphine Software International CIN audio  @tab @tab  X
 @tab Codec used in Delphine Software International games.
+@item DFPWM  @tab  X  @tab  X
 @item Digital Speech Standard - Standard Play mode (DSS SP) @tab @tab  X
 @item Discworld II BMV Audio @tab @tab  X
 @item COOK   @tab @tab  X
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 6076b4a..7474220 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -289,6 +289,8 @@ OBJS-$(CONFIG_DERF_DPCM_DECODER)   += dpcm.o
 OBJS-$(

[FFmpeg-devel] GSoC 2022 ideas page

2022-02-25 Thread Michael Niedermayer
Hi all

CCing other admins and mentors on the page

Our ideas page is this year in exceptionally poor condition
I am not sure why this happened. I did actually intend to be just
backup admin for it this year. and that kind of worked last one.
But now today I get a warning from google about the page
And ive already started to clean it up a bit but if you have time
a 2nd pair of eyes surely is a good idea. Also if you are mentor this
year please check your entry.
And if you arent mentor, please ask yourself if maybe you want to
mentor, because we have relativly few ideas on the page compared to
previous years.
And we still need backup mentors!

The mail is below:

Hello GSoC 2022 Org Admin Applicants,

We are busy reviewing all the GSoC 2022 Org Apps and are finding a large
number of organizations that are missing information from their Ideas list.
Rather than individually emailing each org separately with issues I am
sending an email to all orgs that applied to ask you all to please look at
your ideas list and be sure you have done the following things:

1. Be sure to include whether the project is a 175 hour (medium sized) or
350 hour (large project). If it can be either please state that - per idea.
This is missing from about 25% of the org apps right now. Please use the
175 hour and 350 hour designations instead of full time, half time, large,
medium, or any other term.

2. Your Ideas Page URL should be accessible to all and not require login.
This is the same URL contributors will be using if your org is
selected. Test using Chrome Incognito or Firefox Private Browsing modes.

3. As we state in the Defining a Project Idea List

section of the Mentor guide, please provide the following information for
each idea:

a) a project title/description

b) more detailed description of the project (2-5+ sentences)

c) expected outcomes

d) skills required/preferred

e) possible mentors

f) expected size of project (175 or 350 hour)

g) an easy, medium or hard difficulty rating of each project.

4. Some of you are still working on your ideas.  Adding and refining ideas
is fine, but we are reviewing them between now and Monday. We can only make
decisions based on what we see when we review your application. For
example, if you only have 2 ideas when we review your org app, your org
will be rejected.

If you want to be selected this year I strongly suggest you make sure your
Project Ideas list meets the above requirements ASAP.




-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


[FFmpeg-devel] [PATCH v2 2/2] libavformat: Add DFPWM raw format

2022-02-25 Thread Jack Bruienne


This patch builds on my previous DFPWM codec patch, adding a raw
audio format to be able to read/write the raw files that are most commonly
used (as no other container format supports it yet).

The muxers are mostly copied from the PCM demuxer and the raw muxers, as
DFPWM is typically stored as raw data.

Please see the previous patch for more information on DFPWM.

Signed-off-by: Jack Bruienne 
---
 Changelog |   2 +-
 MAINTAINERS   |   1 +
 doc/general_contents.texi |   1 +
 libavformat/Makefile  |   2 +
 libavformat/allformats.c  |   2 +
 libavformat/dfpwmdec.c| 107 ++
 libavformat/rawenc.c  |  13 +
 libavformat/version.h |   4 +-
 8 files changed, 129 insertions(+), 3 deletions(-)
 create mode 100644 libavformat/dfpwmdec.c

diff --git a/Changelog b/Changelog
index 5170a6a..ec688da 100644
--- a/Changelog
+++ b/Changelog
@@ -4,7 +4,7 @@ releases are sorted from youngest to oldest.
 version 5.1:
 - dialogue enhance audio filter
 - dropped obsolete XvMC hwaccel
-- DFPWM audio encoder/decoder
+- DFPWM audio encoder/decoder and raw muxer/demuxer
 
 
 version 5.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index 57b6f33..931cf4b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -416,6 +416,7 @@ Muxers/Demuxers:
   dashdec.c Steven Liu
   dashenc.c Karthick Jeyapal
   daud.cReimar Doeffinger
+  dfpwmdec.cJack Bruienne
   dss.c Oleksij Rempel
   dtsdec.c  foo86
   dtshddec.cPaul B Mahol
diff --git a/doc/general_contents.texi b/doc/general_contents.texi
index 14aeaed..fcd9da1 100644
--- a/doc/general_contents.texi
+++ b/doc/general_contents.texi
@@ -578,6 +578,7 @@ library:
 @item raw aptX  @tab X @tab X
 @item raw aptX HD   @tab X @tab X
 @item raw Chinese AVS video @tab X @tab X
+@item raw DFPWM @tab X @tab X
 @item raw Dirac @tab X @tab X
 @item raw DNxHD @tab X @tab X
 @item raw DTS   @tab X @tab X
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 6566e40..b89073a 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -165,6 +165,8 @@ OBJS-$(CONFIG_DAUD_MUXER)+= daudenc.o
 OBJS-$(CONFIG_DCSTR_DEMUXER) += dcstr.o
 OBJS-$(CONFIG_DERF_DEMUXER)  += derf.o pcm.o
 OBJS-$(CONFIG_DFA_DEMUXER)   += dfa.o
+OBJS-$(CONFIG_DFPWM_DEMUXER) += dfpwmdec.o pcm.o
+OBJS-$(CONFIG_DFPWM_MUXER)   += rawenc.o
 OBJS-$(CONFIG_DHAV_DEMUXER)  += dhav.o
 OBJS-$(CONFIG_DIRAC_DEMUXER) += diracdec.o rawdec.o
 OBJS-$(CONFIG_DIRAC_MUXER)   += rawenc.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index d066a77..587ad59 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -124,6 +124,8 @@ extern const AVOutputFormat ff_daud_muxer;
 extern const AVInputFormat  ff_dcstr_demuxer;
 extern const AVInputFormat  ff_derf_demuxer;
 extern const AVInputFormat  ff_dfa_demuxer;
+extern const AVInputFormat  ff_dfpwm_demuxer;
+extern const AVOutputFormat ff_dfpwm_muxer;
 extern const AVInputFormat  ff_dhav_demuxer;
 extern const AVInputFormat  ff_dirac_demuxer;
 extern const AVOutputFormat ff_dirac_muxer;
diff --git a/libavformat/dfpwmdec.c b/libavformat/dfpwmdec.c
new file mode 100644
index 000..ad5bfa5
--- /dev/null
+++ b/libavformat/dfpwmdec.c
@@ -0,0 +1,107 @@
+/*
+ * RAW PCM demuxers
+ * Copyright (c) 2002 Fabrice Bellard
+ * Copyright (c) 2022 Jack Bruienne
+ *
+ * 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, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/avstring.h"
+#include "avformat.h"
+#include "internal.h"
+#include "pcm.h"
+#include "libavutil/log.h"
+#include "libavutil/opt.h"
+#include "libavutil/avassert.h"
+
+typedef struct DFPWMAudioDemuxerContext {
+AVClass *class;
+int sample_rate;
+} DFPWMAudioDemuxerContext;
+
+static int dfpwm_read_header(AVFormatContext *s)
+{
+DFPWMAudioDemuxerContext *s1 = s->priv_data;
+AVCodecParameters *par;
+AVStream *st;
+uint8_t *mime_type = NULL;
+
+ 

[FFmpeg-devel] [PATCH v2 1/2] libavcodec: Added DFPWM1a codec

2022-02-25 Thread Jack Bruienne


From the wiki page (https://wiki.vexatos.com/dfpwm):

DFPWM (Dynamic Filter Pulse Width Modulation) is an audio codec
created by Ben “GreaseMonkey” Russell in 2012, originally to be used
as a voice codec for asiekierka's pixmess, a C remake of 64pixels.
It is a 1-bit-per-sample codec which uses a dynamic-strength one-pole
low-pass filter as a predictor. Due to the fact that a raw DPFWM decoding
creates a high-pitched whine, it is often followed by some post-processing
filters to make the stream more listenable.


It has recently gained popularity through the ComputerCraft mod for
Minecraft, which added support for audio through this codec, as well as
the Computronics expansion which preceeded the official support. These
both implement the slightly adjusted 1a version of the codec, which is
the version I have chosen for this patch.

This patch adds a new codec (with encoding and decoding) for DFPWM1a.

The codec sources are pretty simple: they use the reference codec with
a basic wrapper to connect it to the FFmpeg AVCodec system.

This patch will be highly useful to ComputerCraft developers who are
working with audio, as it is the standard format for audio, and there
are few user-friendly encoders out there. It will streamline the process
for importing audio, replacing the need to write code or use tools that
require very specific input formats.

You may use the CraftOS-PC program (https://www.craftos-pc.cc) to test
out DFPWM playback. To use it, run the program and type this command:
"attach left speaker" Then run "speaker play " for each file.
The app runs in a sandbox, so files have to be transferred in first;
the easiest way to do this is to simply drag the file on the window.
(Or copy files to the folder at https://www.craftos-pc.cc/docs/saves.)

Sample DFPWM files can be generated with an online tool at
https://music.madefor.cc. This is the current best way to encode DFPWM
files. Simply drag an audio file onto the page, and it will encode it,
giving a download link on the page.

I've made sure to update all of the docs as per Developer§7, and I've
tested it as per section 8. Test files encoded to DFPWM play correctly
in ComputerCraft, and other files that work in CC are correctly decoded.
I have also verified that corrupt files do not crash the decoder - this
should theoretically not be an issue as the result size is constant with
respect to the input size.

Signed-off-by: Jack Bruienne 
---
 Changelog |   1 +
 MAINTAINERS   |   1 +
 doc/general_contents.texi |   1 +
 libavcodec/Makefile   |   2 +
 libavcodec/allcodecs.c|   2 +
 libavcodec/codec_desc.c   |   7 +++
 libavcodec/codec_id.h |   1 +
 libavcodec/dfpwmdec.c | 129 ++
 libavcodec/dfpwmenc.c | 123 
 libavcodec/utils.c|   2 +
 libavcodec/version.h  |   2 +-
 11 files changed, 270 insertions(+), 1 deletion(-)
 create mode 100644 libavcodec/dfpwmdec.c
 create mode 100644 libavcodec/dfpwmenc.c

diff --git a/Changelog b/Changelog
index 5ad2cef..5170a6a 100644
--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
 version 5.1:
 - dialogue enhance audio filter
 - dropped obsolete XvMC hwaccel
+- DFPWM audio encoder/decoder
 
 
 version 5.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index f33ccbd..57b6f33 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -161,6 +161,7 @@ Codecs:
   cscd.cReimar Doeffinger
   cuviddec.cTimo Rothenpieler
   dca*  foo86
+  dfpwm*Jack Bruienne
   dirac*Rostislav Pehlivanov
   dnxhd*Baptiste Coudurier
   dolby_e*  foo86
diff --git a/doc/general_contents.texi b/doc/general_contents.texi
index df1692c..14aeaed 100644
--- a/doc/general_contents.texi
+++ b/doc/general_contents.texi
@@ -1194,6 +1194,7 @@ following image formats are supported:
 @item CRI HCA@tab @tab X
 @item Delphine Software International CIN audio  @tab @tab  X
 @tab Codec used in Delphine Software International games.
+@item DFPWM  @tab  X  @tab  X
 @item Digital Speech Standard - Standard Play mode (DSS SP) @tab @tab  X
 @item Discworld II BMV Audio @tab @tab  X
 @item COOK   @tab @tab  X
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 6076b4a..7474220 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -289,6 +289,8 @@ OBJS-$(CONFIG_DERF_DPCM_DECODER)   += dpcm.o
 OBJS-$(CONFIG_DIRAC_DECODER)   += diracdec.o dirac.o diracdsp.o diractab.o \
   dirac_arith.o dirac_dwt.o dirac_vlc.o
 OBJS-$(CONFIG_DFA_DECODER) += dfa.o
+OBJS-$(CONFIG_DFPWM_DECODER)   += dfpwmdec.o
+OBJS-$(CONFIG_DFPWM_ENCODER)   += dfpwmenc.o
 OB

Re: [FFmpeg-devel] [PATCH] libavcodec, libavformat: Added DFPWM1a codec and raw format

2022-02-25 Thread Jack Bruienne
Thanks for looking over the patch. I used git format-patch to make the 
email and then sent it with Thunderbird; it appears that the command on 
the website doesn't put the patch in an attachment. I'll be adding 
--attach for future patches to fix this.


I will be sending split updated patches fixing the issues you mentioned 
promptly.


On 2/25/22 03:15, Paul B Mahol wrote:


On Fri, Feb 25, 2022 at 02:54:35AM -0500, Jack Bruienne wrote:

 From the wiki page (https://wiki.vexatos.com/dfpwm):

DFPWM (Dynamic Filter Pulse Width Modulation) is an audio codec
created by Ben “GreaseMonkey” Russell in 2012, originally to be used
as a voice codec for asiekierka's pixmess, a C remake of 64pixels.
It is a 1-bit-per-sample codec which uses a dynamic-strength one-pole
low-pass filter as a predictor. Due to the fact that a raw DPFWM decoding
creates a high-pitched whine, it is often followed by some post-processing
filters to make the stream more listenable.

It has recently gained popularity through the ComputerCraft mod for
Minecraft, which added support for audio through this codec, as well as
the Computronics expansion which preceeded the official support. These
both implement the slightly adjusted 1a version of the codec, which is
the version I have chosen for this patch.

This patch adds both a new codec (with encoding and decoding), as well as
a raw audio format to be able to read/write the raw files that are most
commonly used (as no other container format supports it yet).

The codec sources are pretty simple: they use the reference codec with
a basic wrapper to connect it to the FFmpeg AVCodec system. There's a
bit of extra code to convert from unsigned to signed 8-bit audio, as the
codec implementation operates on signed data, which FFmpeg doesn't support.

The muxers are mostly copied from the PCM demuxer and the raw muxers, as
DFPWM is typically stored as raw data.

This patch will be highly useful to ComputerCraft developers who are
working with audio, as it is the standard format for audio, and there
are few user-friendly encoders out there. It will streamline the process
for importing audio, replacing the need to write code or use tools that
require very specific input formats.

You may use the CraftOS-PC program (https://www.craftos-pc.cc) to test
out DFPWM playback. To use it, run the program and type this command:
"attach left speaker" Then run "speaker play " for each file.
The app runs in a sandbox, so files have to be transferred in first;
the easiest way to do this is to simply drag the file on the window.
(Or copy files to the folder at https://www.craftos-pc.cc/docs/saves.)

Sample DFPWM files can be generated with an online tool at
https://music.madefor.cc. This is the current best way to encode DFPWM
files. Simply drag an audio file onto the page, and it will encode it,
giving a download link on the page.

I've made sure to update all of the docs as per Developer§7, and I've
tested it as per section 8. Test files encoded to DFPWM play correctly
in ComputerCraft, and other files that work in CC are correctly decoded.
I have also verified that corrupt files do not crash the decoder - this
should theoretically not be an issue as the result size is constant with
respect to the input size.

One thing I noticed is that this sample file fails to decode to raw:
https://samples.ffmpeg.org/ogg/virginradio-three-consecutive-chains.ogg
It reports "Application provided invalid, non monotonically increasing
dts to muxer in stream 0", which appears to be because the initial
timestamp is not 0:00. This affects all raw muxers, including PCM.

Signed-off-by: Jack Bruienne 
---
  Changelog |   1 +
  MAINTAINERS   |   2 +
  doc/general_contents.texi |   2 +
  libavcodec/Makefile   |   2 +
  libavcodec/allcodecs.c|   2 +
  libavcodec/codec_desc.c   |   7 ++
  libavcodec/codec_id.h |   1 +
  libavcodec/dfpwmdec.c | 138 +
  libavcodec/dfpwmenc.c | 140 ++
  libavcodec/utils.c|   2 +
  libavcodec/version.h  |   2 +-
  libavformat/Makefile  |   2 +
  libavformat/allformats.c  |   2 +
  libavformat/dfpwmdec.c| 107 +
  libavformat/rawenc.c  |  13 
  libavformat/version.h |   4 +-
  16 files changed, 424 insertions(+), 3 deletions(-)
  create mode 100644 libavcodec/dfpwmdec.c
  create mode 100644 libavcodec/dfpwmenc.c
  create mode 100644 libavformat/dfpwmdec.c

diff --git a/Changelog b/Changelog
index 5ad2cef..ec688da 100644
--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
  version 5.1:
  - dialogue enhance audio filter
  - dropped obsolete XvMC hwaccel
+- DFPWM audio encoder/decoder and raw muxer/demuxer


Keep empty line here above and everywhere else you had removed them.
Is patch corrupted somehow? Just attach file.
And split demuxer and muxer addition from decoder and encoder.


version 

[FFmpeg-devel] [PATCH v2] tools/target_bsf_fuzzer: simplify the loop feeding packets to the filter

2022-02-25 Thread James Almer
And use a single AVPacket for the entire process.
This more closely follows the suggested API usage in the doxy.

Signed-off-by: James Almer 
---
 tools/target_bsf_fuzzer.c | 41 +++
 1 file changed, 16 insertions(+), 25 deletions(-)

diff --git a/tools/target_bsf_fuzzer.c b/tools/target_bsf_fuzzer.c
index d6aaee3bd9..8ef9932690 100644
--- a/tools/target_bsf_fuzzer.c
+++ b/tools/target_bsf_fuzzer.c
@@ -43,7 +43,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
 const uint8_t *last = data;
 const uint8_t *end = data + size;
 AVBSFContext *bsf = NULL;
-AVPacket *in, *out;
+AVPacket *pkt;
 uint64_t keyframes = 0;
 uint64_t flushpattern = -1;
 int res;
@@ -118,9 +118,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t 
size) {
 return 0; // Failure of av_bsf_init() does not imply that a issue was 
found
 }
 
-in = av_packet_alloc();
-out = av_packet_alloc();
-if (!in || !out)
+pkt = av_packet_alloc();
+if (!pkt)
 error("Failed memory allocation");
 
 while (data < end) {
@@ -133,11 +132,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t 
size) {
 if (data + sizeof(fuzz_tag) > end)
 data = end;
 
-res = av_new_packet(in, data - last);
+res = av_new_packet(pkt, data - last);
 if (res < 0)
 error("Failed memory allocation");
-memcpy(in->data, last, data - last);
-in->flags = (keyframes & 1) * AV_PKT_FLAG_DISCARD + (!!(keyframes & 
2)) * AV_PKT_FLAG_KEY;
+memcpy(pkt->data, last, data - last);
+pkt->flags = (keyframes & 1) * AV_PKT_FLAG_DISCARD + (!!(keyframes & 
2)) * AV_PKT_FLAG_KEY;
 keyframes = (keyframes >> 2) + (keyframes<<62);
 data += sizeof(fuzz_tag);
 last = data;
@@ -146,28 +145,20 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t 
size) {
 av_bsf_flush(bsf);
 flushpattern = (flushpattern >> 3) + (flushpattern << 61);
 
-while (in->size) {
-res = av_bsf_send_packet(bsf, in);
-if (res < 0 && res != AVERROR(EAGAIN))
-break;
-res = av_bsf_receive_packet(bsf, out);
-if (res < 0)
-break;
-av_packet_unref(out);
+res = av_bsf_send_packet(bsf, pkt);
+if (res < 0) {
+av_packet_unref(pkt);
+continue;
 }
-av_packet_unref(in);
+while (av_bsf_receive_packet(bsf, pkt) >= 0)
+av_packet_unref(pkt);
 }
 
-res = av_bsf_send_packet(bsf, NULL);
-while (!res) {
-res = av_bsf_receive_packet(bsf, out);
-if (res < 0)
-break;
-av_packet_unref(out);
-}
+av_bsf_send_packet(bsf, NULL);
+while (av_bsf_receive_packet(bsf, pkt) >= 0)
+av_packet_unref(pkt);
 
-av_packet_free(&in);
-av_packet_free(&out);
+av_packet_free(&pkt);
 av_bsf_free(&bsf);
 return 0;
 }
-- 
2.35.1

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

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


Re: [FFmpeg-devel] [PATCH 4/4] avformat/argo_cvg:: Fix order of operations in error check in argo_cvg_write_trailer()

2022-02-25 Thread Michael Niedermayer
On Mon, Feb 14, 2022 at 08:39:34PM +0100, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/argo_cvg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 3/4] avformat/argo_asf: Fix order of operations in error check in argo_asf_write_trailer()

2022-02-25 Thread Michael Niedermayer
On Mon, Feb 14, 2022 at 08:39:33PM +0100, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/argo_asf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"I am not trying to be anyone's saviour, I'm trying to think about the
 future and not be sad" - Elon Musk



signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 2/4] avcodec/movtextdec: add () to CMP() macro to avoid unexpected behavior

2022-02-25 Thread Michael Niedermayer
On Mon, Feb 14, 2022 at 08:52:52PM +0100, Andreas Rheinhardt wrote:
> Michael Niedermayer:
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavcodec/movtextdec.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
> > index 825632ca9b..dc30fdc698 100644
> > --- a/libavcodec/movtextdec.c
> > +++ b/libavcodec/movtextdec.c
> > @@ -263,7 +263,7 @@ static int decode_hclr(const uint8_t *tsmb, 
> > MovTextContext *m, uint64_t size)
> >  
> >  static int styles_equivalent(const StyleBox *a, const StyleBox *b)
> >  {
> > -#define CMP(field) a->field == b->field
> > +#define CMP(field) ((a)->field == (b)->field)
> >  return CMP(bold)  && CMP(italic)   && CMP(underline) && CMP(color) &&
> > CMP(alpha) && CMP(fontsize) && CMP(font_id);
> >  #undef CMP
> 
> LGTM.

will apply

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 1/4] avformat/matroskadec: Check duration

2022-02-25 Thread Michael Niedermayer
On Mon, Feb 14, 2022 at 08:56:51PM +0100, Andreas Rheinhardt wrote:
> Michael Niedermayer:
> > Fixes: -nan is outside the range of representable values of type 'long'
> > Fixes: 
> > 44614/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6216204841254912
> > 
> > Found-by: continuous fuzzing process 
> > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavformat/matroskadec.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > index 91f3567692..8f0c53a6bc 100644
> > --- a/libavformat/matroskadec.c
> > +++ b/libavformat/matroskadec.c
> > @@ -3065,6 +3065,8 @@ static int matroska_read_header(AVFormatContext *s)
> >  
> >  if (!matroska->time_scale)
> >  matroska->time_scale = 100;
> > +if (isnan(matroska->duration))
> > +matroska->duration = 0;
> >  if (matroska->duration)
> >  matroska->ctx->duration = matroska->duration * 
> > matroska->time_scale *
> >1000 / AV_TIME_BASE;
> 
> LGTM.

will apply

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 1/3] tools/target_dem_fuzzer: Check fmt before dereferencing

2022-02-25 Thread Michael Niedermayer
On Thu, Feb 24, 2022 at 12:50:55AM +0100, Michael Niedermayer wrote:
> Fixes: NULL pointer dereference
> Fixes: 
> 44884/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4656748688965632
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  tools/target_dem_fuzzer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/vf_tpad: if there is no frame to clone return early

2022-02-25 Thread Thierry Foucu
On Thu, Feb 24, 2022 at 11:50 PM Paul B Mahol  wrote:

> On Thu, Feb 24, 2022 at 11:21 PM Thierry Foucu  wrote:
>
> > On Thu, Feb 24, 2022 at 2:19 PM Thierry Foucu  wrote:
> >
> > >
> > >
> > > On Thu, Feb 24, 2022 at 1:50 PM Paul B Mahol  wrote:
> > >
> > >> On Thu, Feb 24, 2022 at 10:36 PM Thierry Foucu 
> > wrote:
> > >>
> > >> > On Thu, Feb 24, 2022 at 1:28 PM Paul B Mahol 
> > wrote:
> > >> >
> > >> > > On Thu, Feb 24, 2022 at 10:12 PM Thierry Foucu 
> > >> wrote:
> > >> > >
> > >> > > > On Thu, Feb 24, 2022 at 12:30 PM Paul B Mahol  >
> > >> > wrote:
> > >> > > >
> > >> > > > > ffmpeg | branch: master | Paul B Mahol  |
> Thu
> > >> Feb
> > >> > 24
> > >> > > > > 20:32:41 2022 +0100|
> [3715f2f8643695940582ce040b7a052cccfb9db2]
> > |
> > >> > > > > committer: Paul B Mahol
> > >> > > > >
> > >> > > > > avfilter/vf_tpad: if there is no frame to clone return early
> > >> > > > >
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3715f2f8643695940582ce040b7a052cccfb9db2
> > >> > > > > ---
> > >> > > > >
> > >> > > > >  libavfilter/vf_tpad.c | 5 +
> > >> > > > >  1 file changed, 5 insertions(+)
> > >> > > > >
> > >> > > > > diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c
> > >> > > > > index e5acece1e4..120dbcb4d3 100644
> > >> > > > > --- a/libavfilter/vf_tpad.c
> > >> > > > > +++ b/libavfilter/vf_tpad.c
> > >> > > > > @@ -148,6 +148,11 @@ static int activate(AVFilterContext *ctx)
> > >> > > > >frame->data, frame->linesize,
> > >> > > > >0, 0, frame->width,
> > frame->height);
> > >> > > > >  } else if (s->stop_mode == 1) {
> > >> > > > > +if (!s->cache_stop) {
> > >> > > > > +s->pad_stop = 0;
> > >> > > > > +ff_outlink_set_status(outlink, AVERROR_EOF,
> > >> s->pts);
> > >> > > > > +return 0;
> > >> > > > > +}
> > >> > > > >  frame = av_frame_clone(s->cache_stop);
> > >> > > > >  if (!frame)
> > >> > > > >  return AVERROR(ENOMEM);
> > >> > > > >
> > >> > > > >
> > >> > > > The problem with this solution is that the tpad will then not do
> > >> what
> > >> > we
> > >> > > > are expecting, which is padding video track, and the output file
> > >> will
> > >> > not
> > >> > > > have the desired duration.
> > >> > > > Will it not be better to just output black frame (aka stop_mode
> ==
> > >> 0) ,
> > >> > > > something like that?
> > >> > > >
> > >> > >
> > >> > > I doubt that, clone is clone, there is no point in padding stream
> > that
> > >> > have
> > >> > > no frames at all.
> > >> > >
> > >> > >
> > >> > >
> > >> > The sample I forwarded to JB has video frames. The problem was that
> > >> there
> > >> > was a re-init of the filter chain after a resolution change and
> after
> > >> the
> > >> > re-init, there were no frames but got frames before the re-init.
> > >> > I will understand for a media file which has NEVER received a video
> > >> frame
> > >> > and in this case, this is the correct solution.
> > >> >
> > >>
> > >> Hmm, so you encode output with resolution change, why not use scale
> > filter
> > >> as first filter and then no resolution ever change for rest of graph?
> > >> Adding support for resolution changes to all filters is very time
> > >> consuming
> > >> task and I see no real benefit in doing that now.
> > >>
> > >
> > > We do have the scale filter in front of the tpad filter. Here is the
> > > filter chain we are using
> > >
> > >
> >
> idet=1.04:1.5,yadif=0:-1:1,scale=+528:+864:flags=bicubic,setsar=1,fps=fps=16.601,tpad=stop_mode=clone:stop_duration=2808ms
> > >
> >
>
> Is this just increasing size instead of setting constant one?
>

Nope. It will just scale the video to 528x864


>
>
> > > And it does crash.
> > >
> > > Even just fps=fps=16.601,tpad=stop_mode=clone:stop_duration=2808ms
> > > reproduce the problem.
> > >
> >
> > Maybe an option to the tpad filter to decide what should be the output
> when
> > the stop_mode == 1 and cache_stop is NULL?
> > So, in some cases, people may want a color frame, and some other will
> just
> > want to exit right away?
> >
>
> That is too much for a special option.
>

I understand.
I'm just worried that due to some re-init of the filter chain and the fact
there are filters which may or may not output a frame after the re-init,
the tpad filter will then have no cache frame to clone. And in this case,
the file does not have the length expected.

I guess if it is documented or av_log, people will be aware of the
potential issue.

Anyway, thanks a lot for the quick fix.


> >
> >
> > >
> > >
> > >>
> > >>
> > >> >
> > >> >
> > >> > > >
> > >> > > > iff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c
> > >> > > > index e5acece1e4..5e4062e9f2 100644
> > >> > > > --- a/libavfilter/vf_tpad.c
> > >> > > > +++ b/libavfilter/vf_tpad.c
> > >> > > > @@ -140,7 +140,7 @@ 

Re: [FFmpeg-devel] [PATCH] avcodec/h263dec: Check input size before GEOV/GEOX special case handling

2022-02-25 Thread Michael Niedermayer
On Fri, Feb 25, 2022 at 09:22:14PM +0100, Andreas Rheinhardt wrote:
> Michael Niedermayer:
> > Fixes: Timeout
> > Fixes: 
> > 44921/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6546588791603200
> > 
> > Found-by: continuous fuzzing process 
> > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavcodec/h263dec.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
> > index e940b7f7c7..56a41f6d05 100644
> > --- a/libavcodec/h263dec.c
> > +++ b/libavcodec/h263dec.c
> > @@ -702,6 +702,7 @@ frame_end:
> >  
> >  if (s->last_picture_ptr || s->low_delay) {
> >  if (   pict->format == AV_PIX_FMT_YUV420P
> > +&& buf_size*16LL > s->mb_num
> >  && (s->codec_tag == AV_RL32("GEOV") || s->codec_tag == 
> > AV_RL32("GEOX"))) {
> >  int x, y, p;
> >  av_frame_make_writable(pict);
> 
> Does https://ffmpeg.org/pipermail/ffmpeg-devel/2022-February/293358.html
> not fix the timeout?

that should work too and is better, consider my patch withdrawn

thx
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are best at talking, realize last or never when they are wrong.


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 05/13] libavcodec: Split version.h

2022-02-25 Thread Martin Storsjö

On Fri, 25 Feb 2022, Andreas Rheinhardt wrote:


Martin Storsjö:

On Fri, 25 Feb 2022, Michael Niedermayer wrote:


On Wed, Feb 23, 2022 at 04:29:43PM +0200, Martin Storsjö wrote:

This avoids including version.h in all source files, avoiding
unnecessary rebuilds when the version number is bumped. Only
version_major.h is included by the main header, which defines
availability of e.g. FF_API_* macros, and which is bumped much
less often.
---
 fftools/cmdutils.c |  1 +
 fftools/ffmpeg.c   |  1 +
 fftools/ffprobe.c  |  1 +
 libavcodec/Makefile    |  1 +
 libavcodec/aacenc.c    |  1 +
 libavcodec/avcodec.c   |  1 +
 libavcodec/avcodec.h   |  2 +-
 libavcodec/codec.h |  2 +-
 libavcodec/dpxenc.c    |  1 +
 libavcodec/j2kenc.c    |  1 +
 libavcodec/libvorbisenc.c  |  1 +
 libavcodec/mjpegenc_common.c   |  1 +
 libavcodec/mpeg4videoenc.c |  1 +
 libavcodec/options_table.h |  2 +-
 libavcodec/packet.h    |  2 +-
 libavcodec/pthread_frame.c |  2 +-
 libavcodec/tiffenc.c   |  1 +
 libavcodec/vaapi_encode_h264.c |  1 +
 libavcodec/version.h   | 28 ++---
 libavcodec/version_major.h | 55 ++
 libavformat/movenc.c   |  1 +
 21 files changed, 76 insertions(+), 31 deletions(-)
 create mode 100644 libavcodec/version_major.h


not sure i missed some patch but this seems not to build

CC    libavcodec/vc2enc.o
libavcodec/vc2enc.c: In function ‘vc2_encode_frame’:
libavcodec/vc2enc.c:957:48: error: ‘LIBAVCODEC_IDENT’ undeclared
(first use in this function); did you mean ‘LIBAVUTIL_IDENT’?
    const char *aux_data = bitexact ? "Lavc" : LIBAVCODEC_IDENT;
   ^~~~
   LIBAVUTIL_IDENT
libavcodec/vc2enc.c:957:48: note: each undeclared identifier is
reported only once for each function it appears in
ffbuild/common.mak:78: recipe for target 'libavcodec/vc2enc.o' failed
make: *** [libavcodec/vc2enc.o] Error 1
make: Target 'all' not remade because of errors.


This patch requires adjustments after
155cd6baa49797d57f5b42276eeed3f5408ef3f7 was pushed (it should apply and
build fine on a version slightly older than that), readding an include
of "version.h", I didn't want to spam the list with a full new round of
patches just because of that, but if you want to, I can send my latest
local revision of the patchset.



Sorry for this. My aim was actually to not just remove headers if it
compiles fine without them, but to only include headers that provide
nothing that is used. But apparently I messed it up with
155cd6baa49797d57f5b42276eeed3f5408ef3f7.


No worries, I guess I should have spotted it myself while reviewing that 
patch...


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

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


Re: [FFmpeg-devel] [PATCH 05/13] libavcodec: Split version.h

2022-02-25 Thread Andreas Rheinhardt
Martin Storsjö:
> On Fri, 25 Feb 2022, Michael Niedermayer wrote:
> 
>> On Wed, Feb 23, 2022 at 04:29:43PM +0200, Martin Storsjö wrote:
>>> This avoids including version.h in all source files, avoiding
>>> unnecessary rebuilds when the version number is bumped. Only
>>> version_major.h is included by the main header, which defines
>>> availability of e.g. FF_API_* macros, and which is bumped much
>>> less often.
>>> ---
>>>  fftools/cmdutils.c |  1 +
>>>  fftools/ffmpeg.c   |  1 +
>>>  fftools/ffprobe.c  |  1 +
>>>  libavcodec/Makefile    |  1 +
>>>  libavcodec/aacenc.c    |  1 +
>>>  libavcodec/avcodec.c   |  1 +
>>>  libavcodec/avcodec.h   |  2 +-
>>>  libavcodec/codec.h |  2 +-
>>>  libavcodec/dpxenc.c    |  1 +
>>>  libavcodec/j2kenc.c    |  1 +
>>>  libavcodec/libvorbisenc.c  |  1 +
>>>  libavcodec/mjpegenc_common.c   |  1 +
>>>  libavcodec/mpeg4videoenc.c |  1 +
>>>  libavcodec/options_table.h |  2 +-
>>>  libavcodec/packet.h    |  2 +-
>>>  libavcodec/pthread_frame.c |  2 +-
>>>  libavcodec/tiffenc.c   |  1 +
>>>  libavcodec/vaapi_encode_h264.c |  1 +
>>>  libavcodec/version.h   | 28 ++---
>>>  libavcodec/version_major.h | 55 ++
>>>  libavformat/movenc.c   |  1 +
>>>  21 files changed, 76 insertions(+), 31 deletions(-)
>>>  create mode 100644 libavcodec/version_major.h
>>
>> not sure i missed some patch but this seems not to build
>>
>> CC    libavcodec/vc2enc.o
>> libavcodec/vc2enc.c: In function ‘vc2_encode_frame’:
>> libavcodec/vc2enc.c:957:48: error: ‘LIBAVCODEC_IDENT’ undeclared
>> (first use in this function); did you mean ‘LIBAVUTIL_IDENT’?
>>     const char *aux_data = bitexact ? "Lavc" : LIBAVCODEC_IDENT;
>>    ^~~~
>>    LIBAVUTIL_IDENT
>> libavcodec/vc2enc.c:957:48: note: each undeclared identifier is
>> reported only once for each function it appears in
>> ffbuild/common.mak:78: recipe for target 'libavcodec/vc2enc.o' failed
>> make: *** [libavcodec/vc2enc.o] Error 1
>> make: Target 'all' not remade because of errors.
> 
> This patch requires adjustments after
> 155cd6baa49797d57f5b42276eeed3f5408ef3f7 was pushed (it should apply and
> build fine on a version slightly older than that), readding an include
> of "version.h", I didn't want to spam the list with a full new round of
> patches just because of that, but if you want to, I can send my latest
> local revision of the patchset.
> 

Sorry for this. My aim was actually to not just remove headers if it
compiles fine without them, but to only include headers that provide
nothing that is used. But apparently I messed it up with
155cd6baa49797d57f5b42276eeed3f5408ef3f7.

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

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


Re: [FFmpeg-devel] [PATCH] avcodec/h263dec: Check input size before GEOV/GEOX special case handling

2022-02-25 Thread Andreas Rheinhardt
Michael Niedermayer:
> Fixes: Timeout
> Fixes: 
> 44921/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6546588791603200
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/h263dec.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
> index e940b7f7c7..56a41f6d05 100644
> --- a/libavcodec/h263dec.c
> +++ b/libavcodec/h263dec.c
> @@ -702,6 +702,7 @@ frame_end:
>  
>  if (s->last_picture_ptr || s->low_delay) {
>  if (   pict->format == AV_PIX_FMT_YUV420P
> +&& buf_size*16LL > s->mb_num
>  && (s->codec_tag == AV_RL32("GEOV") || s->codec_tag == 
> AV_RL32("GEOX"))) {
>  int x, y, p;
>  av_frame_make_writable(pict);

Does https://ffmpeg.org/pipermail/ffmpeg-devel/2022-February/293358.html
not fix the timeout?

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

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


[FFmpeg-devel] [PATCH] avcodec/h263dec: Check input size before GEOV/GEOX special case handling

2022-02-25 Thread Michael Niedermayer
Fixes: Timeout
Fixes: 
44921/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6546588791603200

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/h263dec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index e940b7f7c7..56a41f6d05 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -702,6 +702,7 @@ frame_end:
 
 if (s->last_picture_ptr || s->low_delay) {
 if (   pict->format == AV_PIX_FMT_YUV420P
+&& buf_size*16LL > s->mb_num
 && (s->codec_tag == AV_RL32("GEOV") || s->codec_tag == 
AV_RL32("GEOX"))) {
 int x, y, p;
 av_frame_make_writable(pict);
-- 
2.17.1

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

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


Re: [FFmpeg-devel] [PATCH 05/13] libavcodec: Split version.h

2022-02-25 Thread Martin Storsjö

On Fri, 25 Feb 2022, Michael Niedermayer wrote:


On Wed, Feb 23, 2022 at 04:29:43PM +0200, Martin Storsjö wrote:

This avoids including version.h in all source files, avoiding
unnecessary rebuilds when the version number is bumped. Only
version_major.h is included by the main header, which defines
availability of e.g. FF_API_* macros, and which is bumped much
less often.
---
 fftools/cmdutils.c |  1 +
 fftools/ffmpeg.c   |  1 +
 fftools/ffprobe.c  |  1 +
 libavcodec/Makefile|  1 +
 libavcodec/aacenc.c|  1 +
 libavcodec/avcodec.c   |  1 +
 libavcodec/avcodec.h   |  2 +-
 libavcodec/codec.h |  2 +-
 libavcodec/dpxenc.c|  1 +
 libavcodec/j2kenc.c|  1 +
 libavcodec/libvorbisenc.c  |  1 +
 libavcodec/mjpegenc_common.c   |  1 +
 libavcodec/mpeg4videoenc.c |  1 +
 libavcodec/options_table.h |  2 +-
 libavcodec/packet.h|  2 +-
 libavcodec/pthread_frame.c |  2 +-
 libavcodec/tiffenc.c   |  1 +
 libavcodec/vaapi_encode_h264.c |  1 +
 libavcodec/version.h   | 28 ++---
 libavcodec/version_major.h | 55 ++
 libavformat/movenc.c   |  1 +
 21 files changed, 76 insertions(+), 31 deletions(-)
 create mode 100644 libavcodec/version_major.h


not sure i missed some patch but this seems not to build

CC  libavcodec/vc2enc.o
libavcodec/vc2enc.c: In function ‘vc2_encode_frame’:
libavcodec/vc2enc.c:957:48: error: ‘LIBAVCODEC_IDENT’ undeclared (first use in 
this function); did you mean ‘LIBAVUTIL_IDENT’?
const char *aux_data = bitexact ? "Lavc" : LIBAVCODEC_IDENT;
   ^~~~
   LIBAVUTIL_IDENT
libavcodec/vc2enc.c:957:48: note: each undeclared identifier is reported only 
once for each function it appears in
ffbuild/common.mak:78: recipe for target 'libavcodec/vc2enc.o' failed
make: *** [libavcodec/vc2enc.o] Error 1
make: Target 'all' not remade because of errors.


This patch requires adjustments after 
155cd6baa49797d57f5b42276eeed3f5408ef3f7 was pushed (it should apply and 
build fine on a version slightly older than that), readding an include of 
"version.h", I didn't want to spam the list with a full new round of 
patches just because of that, but if you want to, I can send my latest 
local revision of the patchset.



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

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


Re: [FFmpeg-devel] [PATCH 05/13] libavcodec: Split version.h

2022-02-25 Thread Michael Niedermayer
On Wed, Feb 23, 2022 at 04:29:43PM +0200, Martin Storsjö wrote:
> This avoids including version.h in all source files, avoiding
> unnecessary rebuilds when the version number is bumped. Only
> version_major.h is included by the main header, which defines
> availability of e.g. FF_API_* macros, and which is bumped much
> less often.
> ---
>  fftools/cmdutils.c |  1 +
>  fftools/ffmpeg.c   |  1 +
>  fftools/ffprobe.c  |  1 +
>  libavcodec/Makefile|  1 +
>  libavcodec/aacenc.c|  1 +
>  libavcodec/avcodec.c   |  1 +
>  libavcodec/avcodec.h   |  2 +-
>  libavcodec/codec.h |  2 +-
>  libavcodec/dpxenc.c|  1 +
>  libavcodec/j2kenc.c|  1 +
>  libavcodec/libvorbisenc.c  |  1 +
>  libavcodec/mjpegenc_common.c   |  1 +
>  libavcodec/mpeg4videoenc.c |  1 +
>  libavcodec/options_table.h |  2 +-
>  libavcodec/packet.h|  2 +-
>  libavcodec/pthread_frame.c |  2 +-
>  libavcodec/tiffenc.c   |  1 +
>  libavcodec/vaapi_encode_h264.c |  1 +
>  libavcodec/version.h   | 28 ++---
>  libavcodec/version_major.h | 55 ++
>  libavformat/movenc.c   |  1 +
>  21 files changed, 76 insertions(+), 31 deletions(-)
>  create mode 100644 libavcodec/version_major.h

not sure i missed some patch but this seems not to build

CC  libavcodec/vc2enc.o
libavcodec/vc2enc.c: In function ‘vc2_encode_frame’:
libavcodec/vc2enc.c:957:48: error: ‘LIBAVCODEC_IDENT’ undeclared (first use in 
this function); did you mean ‘LIBAVUTIL_IDENT’?
 const char *aux_data = bitexact ? "Lavc" : LIBAVCODEC_IDENT;
^~~~
LIBAVUTIL_IDENT
libavcodec/vc2enc.c:957:48: note: each undeclared identifier is reported only 
once for each function it appears in
ffbuild/common.mak:78: recipe for target 'libavcodec/vc2enc.o' failed
make: *** [libavcodec/vc2enc.o] Error 1
make: Target 'all' not remade because of errors.

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


[FFmpeg-devel] [PATCH] avfilter/vf_blend_vulkan: add addition blend mode

2022-02-25 Thread Wu, Jianhua
[PATCH 01/10] avfilter/vf_blend_vulkan: add addition blend mode [PATCH 02/10] 
avfilter/vf_blend_vulkan: add average blend mode [PATCH 03/10] 
avfilter/vf_blend_vulkan: add subtract blend mode [PATCH 04/10] 
avfilter/vf_blend_vulkan: add negation blend mode [PATCH 05/10] 
avfilter/vf_blend_vulkan: add extremity blend mode [PATCH 06/10] 
avfilter/vf_blend_vulkan: add difference blend mode [PATCH 07/10] 
avfilter/vf_blend_vulkan: add darken blend mode [PATCH 08/10] 
avfilter/vf_blend_vulkan: add lighten blend mode [PATCH 09/10] 
avfilter/vf_blend_vulkan: add exclusion blend mode [PATCH 10/10] 
avfilter/vf_blend_vulkan: add phoenix blend mode

Patches attached.




0003-avfilter-vf_blend_vulkan-add-subtract-blend-mode.patch
Description: 0003-avfilter-vf_blend_vulkan-add-subtract-blend-mode.patch


0004-avfilter-vf_blend_vulkan-add-negation-blend-mode.patch
Description: 0004-avfilter-vf_blend_vulkan-add-negation-blend-mode.patch


0005-avfilter-vf_blend_vulkan-add-extremity-blend-mode.patch
Description: 0005-avfilter-vf_blend_vulkan-add-extremity-blend-mode.patch


0006-avfilter-vf_blend_vulkan-add-difference-blend-mode.patch
Description: 0006-avfilter-vf_blend_vulkan-add-difference-blend-mode.patch


0007-avfilter-vf_blend_vulkan-add-darken-blend-mode.patch
Description: 0007-avfilter-vf_blend_vulkan-add-darken-blend-mode.patch


0008-avfilter-vf_blend_vulkan-add-lighten-blend-mode.patch
Description: 0008-avfilter-vf_blend_vulkan-add-lighten-blend-mode.patch


0009-avfilter-vf_blend_vulkan-add-exclusion-blend-mode.patch
Description: 0009-avfilter-vf_blend_vulkan-add-exclusion-blend-mode.patch


0010-avfilter-vf_blend_vulkan-add-phoenix-blend-mode.patch
Description: 0010-avfilter-vf_blend_vulkan-add-phoenix-blend-mode.patch


0001-avfilter-vf_blend_vulkan-add-addition-blend-mode.patch
Description: 0001-avfilter-vf_blend_vulkan-add-addition-blend-mode.patch


0002-avfilter-vf_blend_vulkan-add-average-blend-mode.patch
Description: 0002-avfilter-vf_blend_vulkan-add-average-blend-mode.patch
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 229/281] libopus: convert to new channel layout API

2022-02-25 Thread Anton Khirnov
Quoting James Almer (2022-01-13 03:05:08)
> From: Anton Khirnov 
> 
> Signed-off-by: James Almer 
> ---
>  libavcodec/libopusdec.c  | 39 +---
>  libavcodec/libopusenc.c  | 65 ++--
>  libavcodec/vorbis.h  |  3 ++
>  libavcodec/vorbis_data.c | 18 +++
>  4 files changed, 79 insertions(+), 46 deletions(-)
> 
> diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c
> index 86ef715205..abffd5f463 100644
> --- a/libavcodec/libopusdec.c
> +++ b/libavcodec/libopusdec.c
> @@ -50,55 +50,60 @@ struct libopus_context {
>  static av_cold int libopus_decode_init(AVCodecContext *avc)
>  {
>  struct libopus_context *opus = avc->priv_data;
> -int ret, channel_map = 0, gain_db = 0, nb_streams, nb_coupled;
> +int ret, channel_map = 0, gain_db = 0, nb_streams, nb_coupled, channels;
>  uint8_t mapping_arr[8] = { 0, 1 }, *mapping;
>  
> -avc->channels = avc->extradata_size >= 10 ? avc->extradata[9] : 
> (avc->channels == 1) ? 1 : 2;
> -if (avc->channels <= 0) {
> +channels = avc->extradata_size >= 10 ? avc->extradata[9] : (channels == 
> 1) ? 1 : 2;
   
uninitialized read
this is meant to use the user-provided value

> diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
> index 45b23fcbb5..401a2c17c8 100644
> --- a/libavcodec/libopusenc.c
> +++ b/libavcodec/libopusenc.c
> @@ -91,7 +91,7 @@ static void libopus_write_header(AVCodecContext *avctx, int 
> stream_count,
>   const uint8_t *channel_mapping)
>  {
>  uint8_t *p   = avctx->extradata;
> -int channels = avctx->channels;
> +int channels = avctx->ch_layout.nb_channels;
>  
>  bytestream_put_buffer(&p, "OpusHead", 8);
>  bytestream_put_byte(&p, 1); /* Version */
> @@ -180,9 +180,9 @@ static int libopus_configure_encoder(AVCodecContext 
> *avctx, OpusMSEncoder *enc,
>  
>  static int libopus_check_max_channels(AVCodecContext *avctx,
>int max_channels) {
> -if (avctx->channels > max_channels) {
> +if (avctx->ch_layout.nb_channels > max_channels) {
>  av_log(avctx, AV_LOG_ERROR, "Opus mapping family undefined for %d 
> channels.\n",
> -   avctx->channels);
> +   avctx->ch_layout.nb_channels);
>  return AVERROR(EINVAL);
>  }
>  
> @@ -190,21 +190,26 @@ static int libopus_check_max_channels(AVCodecContext 
> *avctx,
>  }
>  
>  static int libopus_check_vorbis_layout(AVCodecContext *avctx, int 
> mapping_family) {
> -av_assert2(avctx->channels < FF_ARRAY_ELEMS(ff_vorbis_channel_layouts));
> +av_assert2(avctx->ch_layout.nb_channels < 
> FF_ARRAY_ELEMS(ff_vorbis_ch_layouts));
>  
> -if (!avctx->channel_layout) {
> +if (avctx->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) {
>  av_log(avctx, AV_LOG_WARNING,
> "No channel layout specified. Opus encoder will use Vorbis "
> -   "channel layout for %d channels.\n", avctx->channels);
> -} else if (avctx->channel_layout != 
> ff_vorbis_channel_layouts[avctx->channels - 1]) {
> -char name[32];
> -av_get_channel_layout_string(name, sizeof(name), avctx->channels,
> - avctx->channel_layout);
> -av_log(avctx, AV_LOG_ERROR,
> -   "Invalid channel layout %s for specified mapping family 
> %d.\n",
> -   name, mapping_family);
> +   "channel layout for %d channels.\n", 
> avctx->ch_layout.nb_channels);
> +} else {
> +AVChannelLayout chl;
> +av_channel_layout_copy(&chl, 
> &ff_vorbis_ch_layouts[avctx->ch_layout.nb_channels - 1]);

chl is garbage, while av_channel_layout_copy() uninits it

is the copy even necessary? Why not pass ff_vorbis_ch_layouts to compare
directly?

-- 
Anton Khirnov
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 226/281] libgsm: convert to new channel layout API

2022-02-25 Thread Anton Khirnov
Quoting James Almer (2022-01-13 03:05:05)
> From: Anton Khirnov 
> 
> Signed-off-by: Vittorio Giovara 
> Signed-off-by: Anton Khirnov 
> Signed-off-by: James Almer 
> ---
>  libavcodec/libgsmdec.c | 4 ++--
>  libavcodec/libgsmenc.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/libgsmdec.c b/libavcodec/libgsmdec.c
> index ae4a952d99..aa028bc262 100644
> --- a/libavcodec/libgsmdec.c
> +++ b/libavcodec/libgsmdec.c
> @@ -48,8 +48,8 @@ typedef struct LibGSMDecodeContext {
>  static av_cold int libgsm_decode_init(AVCodecContext *avctx) {
>  LibGSMDecodeContext *s = avctx->priv_data;
>  
> -avctx->channels   = 1;
> -avctx->channel_layout = AV_CH_LAYOUT_MONO;
> +av_channel_layout_uninit(&avctx->ch_layout);
> +avctx->ch_layout  = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
>  if (!avctx->sample_rate)
>  avctx->sample_rate = 8000;
>  avctx->sample_fmt = AV_SAMPLE_FMT_S16;
> diff --git a/libavcodec/libgsmenc.c b/libavcodec/libgsmenc.c
> index a2f6c1c62e..f73f254d50 100644
> --- a/libavcodec/libgsmenc.c
> +++ b/libavcodec/libgsmenc.c
> @@ -49,9 +49,9 @@ static av_cold int libgsm_encode_close(AVCodecContext 
> *avctx) {
>  }
>  
>  static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
> -if (avctx->channels > 1) {
> +if (avctx->ch_layout.nb_channels > 1) {
>  av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d 
> channels\n",
> -   avctx->channels);
> +   avctx->ch_layout.nb_channels);
>  return -1;

This could be dropped completely, since the codec sets ch_layouts.

-- 
Anton Khirnov
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 224/281] libfdk-aac: convert to new channel layout API

2022-02-25 Thread Anton Khirnov
Quoting James Almer (2022-01-13 03:05:03)
> diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
> index 7ee2f13ac7..d43f45d9ee 100644
> --- a/libavcodec/libfdk-aacenc.c
> +++ b/libavcodec/libfdk-aacenc.c
> @@ -128,7 +128,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
>  int aot = FF_PROFILE_AAC_LOW + 1;
>  int sce = 0, cpe = 0;
>  
> -if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) {
> +if ((err = aacEncOpen(&s->handle, 0, avctx->ch_layout.nb_channels)) != 
> AACENC_OK) {
>  av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n",
> aac_get_error(err));
>  goto error;
> @@ -159,7 +159,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
>  goto error;
>  }
>  
> -switch (avctx->channels) {
> +switch (avctx->ch_layout.nb_channels) {
>  case 1: mode = MODE_1;   sce = 1; cpe = 0; break;
>  case 2:
>  #if FDKENC_VER_AT_LEAST(4, 0) // 4.0.0
> @@ -193,7 +193,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
>  case 8:
>  sce = 2;
>  cpe = 3;
> -if (avctx->channel_layout == AV_CH_LAYOUT_7POINT1) {
> +if (avctx->ch_layout.u.mask == AV_CH_LAYOUT_7POINT1) {

Either check for order == NATIVE or use channel_layout_compare.

-- 
Anton Khirnov
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH] Remove mentions of a nonexistent avversion.h

2022-02-25 Thread Martin Storsjö

On Wed, 23 Feb 2022, Martin Storsjö wrote:


Signed-off-by: Martin Storsjö 
---
.gitignore | 1 -
Makefile   | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)


Pushed, as it's pretty much trivial.

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

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


Re: [FFmpeg-devel] [PATCH v2] swscale: Take the destination range into account for yuv->rgb->yuv conversions

2022-02-25 Thread Martin Storsjö

On Thu, 24 Feb 2022, Michael Niedermayer wrote:


On Wed, Feb 23, 2022 at 09:45:53PM +0200, Martin Storsjö wrote:

The range parameters need to be set up before calling
sws_init_context (which selects which fastpaths can be used;
this gets called by sws_getContext); solely passing them via
sws_setColorspaceDetails isn't enough.

This fixes producing full range YUV range output when doing
YUV->YUV conversions between different YUV color spaces.

Signed-off-by: Martin Storsjö 
---
 libswscale/utils.c| 11 ---
 tests/fate/libswscale.mak | 16 
 tests/ref/fate/sws-yuv-colorspace |  6 ++
 tests/ref/fate/sws-yuv-range  |  6 ++
 4 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 tests/ref/fate/sws-yuv-colorspace
 create mode 100644 tests/ref/fate/sws-yuv-range


LGTM

tested on mingw32/64 + wine / linux x86 32/64bit, arm/mips qemu


Thanks, pushed!

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

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


Re: [FFmpeg-devel] [PATCH] libavcodec, libavformat: Added DFPWM1a codec and raw format

2022-02-25 Thread Paul B Mahol
On Fri, Feb 25, 2022 at 02:54:35AM -0500, Jack Bruienne wrote:
> From the wiki page (https://wiki.vexatos.com/dfpwm):
> > DFPWM (Dynamic Filter Pulse Width Modulation) is an audio codec
> > created by Ben “GreaseMonkey” Russell in 2012, originally to be used
> > as a voice codec for asiekierka's pixmess, a C remake of 64pixels.
> > It is a 1-bit-per-sample codec which uses a dynamic-strength one-pole
> > low-pass filter as a predictor. Due to the fact that a raw DPFWM decoding
> > creates a high-pitched whine, it is often followed by some post-processing
> > filters to make the stream more listenable.
> 
> It has recently gained popularity through the ComputerCraft mod for
> Minecraft, which added support for audio through this codec, as well as
> the Computronics expansion which preceeded the official support. These
> both implement the slightly adjusted 1a version of the codec, which is
> the version I have chosen for this patch.
> 
> This patch adds both a new codec (with encoding and decoding), as well as
> a raw audio format to be able to read/write the raw files that are most
> commonly used (as no other container format supports it yet).
> 
> The codec sources are pretty simple: they use the reference codec with
> a basic wrapper to connect it to the FFmpeg AVCodec system. There's a
> bit of extra code to convert from unsigned to signed 8-bit audio, as the
> codec implementation operates on signed data, which FFmpeg doesn't support.
> 
> The muxers are mostly copied from the PCM demuxer and the raw muxers, as
> DFPWM is typically stored as raw data.
> 
> This patch will be highly useful to ComputerCraft developers who are
> working with audio, as it is the standard format for audio, and there
> are few user-friendly encoders out there. It will streamline the process
> for importing audio, replacing the need to write code or use tools that
> require very specific input formats.
> 
> You may use the CraftOS-PC program (https://www.craftos-pc.cc) to test
> out DFPWM playback. To use it, run the program and type this command:
> "attach left speaker" Then run "speaker play " for each file.
> The app runs in a sandbox, so files have to be transferred in first;
> the easiest way to do this is to simply drag the file on the window.
> (Or copy files to the folder at https://www.craftos-pc.cc/docs/saves.)
> 
> Sample DFPWM files can be generated with an online tool at
> https://music.madefor.cc. This is the current best way to encode DFPWM
> files. Simply drag an audio file onto the page, and it will encode it,
> giving a download link on the page.
> 
> I've made sure to update all of the docs as per Developer§7, and I've
> tested it as per section 8. Test files encoded to DFPWM play correctly
> in ComputerCraft, and other files that work in CC are correctly decoded.
> I have also verified that corrupt files do not crash the decoder - this
> should theoretically not be an issue as the result size is constant with
> respect to the input size.
> 
> One thing I noticed is that this sample file fails to decode to raw:
> https://samples.ffmpeg.org/ogg/virginradio-three-consecutive-chains.ogg
> It reports "Application provided invalid, non monotonically increasing
> dts to muxer in stream 0", which appears to be because the initial
> timestamp is not 0:00. This affects all raw muxers, including PCM.
> 
> Signed-off-by: Jack Bruienne 
> ---
>  Changelog |   1 +
>  MAINTAINERS   |   2 +
>  doc/general_contents.texi |   2 +
>  libavcodec/Makefile   |   2 +
>  libavcodec/allcodecs.c|   2 +
>  libavcodec/codec_desc.c   |   7 ++
>  libavcodec/codec_id.h |   1 +
>  libavcodec/dfpwmdec.c | 138 +
>  libavcodec/dfpwmenc.c | 140 ++
>  libavcodec/utils.c|   2 +
>  libavcodec/version.h  |   2 +-
>  libavformat/Makefile  |   2 +
>  libavformat/allformats.c  |   2 +
>  libavformat/dfpwmdec.c| 107 +
>  libavformat/rawenc.c  |  13 
>  libavformat/version.h |   4 +-
>  16 files changed, 424 insertions(+), 3 deletions(-)
>  create mode 100644 libavcodec/dfpwmdec.c
>  create mode 100644 libavcodec/dfpwmenc.c
>  create mode 100644 libavformat/dfpwmdec.c
> 
> diff --git a/Changelog b/Changelog
> index 5ad2cef..ec688da 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
>  version 5.1:
>  - dialogue enhance audio filter
>  - dropped obsolete XvMC hwaccel
> +- DFPWM audio encoder/decoder and raw muxer/demuxer


Keep empty line here above and everywhere else you had removed them.
Is patch corrupted somehow? Just attach file.
And split demuxer and muxer addition from decoder and encoder.

>version 5.0:
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f33ccbd..931cf4b 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -161,6 +161,7 @@ Codecs:
>cscd.cReimar Doeffinger
>