On 5/21/2021 3:00 PM, Anton Khirnov wrote:
This will allow to stop including avcodec.h in future commits.
---
libavcodec/av1_parser.c | 3 ++-
libavcodec/av1dec.c | 5 ++---
libavcodec/cbs.c| 10 --
libavcodec/cbs.h| 11 ---
4 files changed, 12 insertio
On Mon, 17 May 2021, Martin Storsjö wrote:
This is marginally slower, but correct for all input values.
The previous implementation failed with certain input seeds, e.g.
"checkasm --test=hevc_idct 98".
---
libavcodec/aarch64/hevcdsp_idct_neon.S | 11 +--
1 file changed, 5 insertions(+), 6
On Fri, May 21, 2021 at 11:28 AM Tom Boshoven wrote:
> +outlink->time_base = av_mul_q(outlink->time_base, (AVRational){2, 1});
>
This should be {1, 2} .
I'll fix this after I get some feedback.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
On Fri, May 21, 2021 at 2:19 AM Andreas Rheinhardt
wrote:
>
> Signed-off-by: Andreas Rheinhardt
> ---
> libavcodec/libvpxenc.c | 64 --
> 1 file changed, 31 insertions(+), 33 deletions(-)
>
lgtm.
___
ffmpeg-deve
On Fri, May 21, 2021 at 2:18 AM Andreas Rheinhardt
wrote:
>
> Here the packet size is known before allocating the packet because
> the encoder provides said information (and works with internal buffers
> itself), so one can use this information to avoid the implicit use of
> another intermediate b
This fixes an issue where the yadif filter could cause the timebase denominator
to overflow.
Signed-off-by: Tom Boshoven
---
libavfilter/vf_yadif.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index a6942a2aa2..adeec81c04
On Fri, May 21, 2021 at 2:19 AM Andreas Rheinhardt
wrote:
>
> Here the packet size is known before allocating the packet because
> the encoder provides said information (and works with internal buffers
> itself), so one can use this information to avoid the implicit use of
> another intermediate b
Quoting Andreas Rheinhardt (2021-05-21 20:17:10)
> Anton Khirnov:
> > ---
> > libavformat/matroska.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavformat/matroska.h b/libavformat/matroska.h
> > index 30cbe18a8b..2d04a6838b 100644
> > --- a/libavformat/matrosk
Anton Khirnov:
> ---
> libavformat/matroska.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/matroska.h b/libavformat/matroska.h
> index 30cbe18a8b..2d04a6838b 100644
> --- a/libavformat/matroska.h
> +++ b/libavformat/matroska.h
> @@ -22,7 +22,7 @@
> #ifndef
Quoting Anton Khirnov (2021-05-21 20:00:32)
> This will allow to avoid #including the entire avcodec.h in some places.
> ---
> doc/APIchanges | 10 +++
> libavcodec/Makefile | 1 +
> libavcodec/avcodec.h | 139 +--
> libavcodec/defs.h| 170
This file uses definitions from it, but relies on an indirect include
through get_bits.h
---
libavcodec/dolby_e_parser.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/dolby_e_parser.c b/libavcodec/dolby_e_parser.c
index 8e187523f3..ab8f1b6ef1 100644
--- a/libavcodec/dolby_e_parser
---
libavcodec/cbs_bsf.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/cbs_bsf.h b/libavcodec/cbs_bsf.h
index 6be95abc3f..a370be1b5f 100644
--- a/libavcodec/cbs_bsf.h
+++ b/libavcodec/cbs_bsf.h
@@ -19,7 +19,13 @@
#ifndef AVCODEC_CBS_BSF_H
#define AVCODEC_CBS_BSF_H
+#incl
Include all required headers explicitly, avoid avcodec.h dependency.
---
libavcodec/cbs_internal.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavcodec/cbs_internal.h b/libavcodec/cbs_internal.h
index a392880036..f853086fa3 100644
--- a/libavcodec/cbs_internal.h
+++
---
libavformat/mov_chan.c | 2 +-
libavformat/mov_chan.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index 324dd5f913..4ec16f15c2 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -26,7 +26,7 @@
#include
---
libavformat/hevc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavformat/hevc.c b/libavformat/hevc.c
index 94eb3a9cb1..df141aec26 100644
--- a/libavformat/hevc.c
+++ b/libavformat/hevc.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
---
libavformat/latmenc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
index 87a6b81798..21bb614f67 100644
--- a/libavformat/latmenc.c
+++ b/libavformat/latmenc.c
@@ -21,7 +21,9 @@
#include "libavcodec/get_bits.h"
#include
---
libavformat/mp3dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index b12cd31148..b9e8d1074e 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -32,7 +32,7 @@
#include "id3v1.h"
#include "replaygain.h"
-#incl
---
libavformat/id3v1.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavformat/id3v1.c b/libavformat/id3v1.c
index eb66098f51..3189a48b8c 100644
--- a/libavformat/id3v1.c
+++ b/libavformat/id3v1.c
@@ -20,7 +20,6 @@
*/
#include "id3v1.h"
-#include "libavcodec/avcodec.h"
#include "liba
---
libavformat/adtsenc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c
index 96caf9950e..ba15c0a724 100644
--- a/libavformat/adtsenc.c
+++ b/libavformat/adtsenc.c
@@ -22,7 +22,9 @@
#include "libavcodec/get_bits.h"
#include
---
libavformat/matroska.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/matroska.h b/libavformat/matroska.h
index 30cbe18a8b..2d04a6838b 100644
--- a/libavformat/matroska.h
+++ b/libavformat/matroska.h
@@ -22,7 +22,7 @@
#ifndef AVFORMAT_MATROSKA_H
#define AVFOR
---
libavfilter/lavfutils.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c
index 2bc06257c6..9aa781ef7b 100644
--- a/libavfilter/lavfutils.c
+++ b/libavfilter/lavfutils.c
@@ -18,8 +18,17 @@
* Foundation, Inc., 51 Franklin Street, Fi
---
libavformat/a64.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/a64.c b/libavformat/a64.c
index e6018f06d3..6e19162fe2 100644
--- a/libavformat/a64.c
+++ b/libavformat/a64.c
@@ -19,7 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
---
libavformat/framecrcenc.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index c300702d55..56f7ea1b5a 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -22,7 +22,11 @@
#include
#include
---
libavcodec/mlp_parse.h | 4
1 file changed, 4 insertions(+)
diff --git a/libavcodec/mlp_parse.h b/libavcodec/mlp_parse.h
index a0790ae8c7..f0d7b41c11 100644
--- a/libavcodec/mlp_parse.h
+++ b/libavcodec/mlp_parse.h
@@ -21,6 +21,10 @@
#ifndef AVCODEC_MLP_PARSE_H
#define AVCODEC_MLP_PARS
Since AVStream.codec is gone, avformat.h does not require anything from
avcodec.h.
---
libavformat/avformat.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index a28ac372da..92807e9657 100644
--- a/libavformat/avformat.h
+
Include only defs.h, needed for AV_INPUT_BUFFER_PADDING_SIZE.
---
libavcodec/get_bits.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 66fb877599..d4e9276da1 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@
Do not depend on avformat.h to provide it.
---
libavformat/internal.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/internal.h b/libavformat/internal.h
index d57e63c1c2..f9abec9e44 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -24,6 +24,9 @@
#include
This will allow to stop including avcodec.h in future commits.
---
libavcodec/av1_parser.c | 3 ++-
libavcodec/av1dec.c | 5 ++---
libavcodec/cbs.c| 10 --
libavcodec/cbs.h| 11 ---
4 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/libavcodec/av
---
libavformat/icoenc.c | 4
1 file changed, 4 insertions(+)
diff --git a/libavformat/icoenc.c b/libavformat/icoenc.c
index 39e92a41b7..a1ca15155f 100644
--- a/libavformat/icoenc.c
+++ b/libavformat/icoenc.c
@@ -26,6 +26,10 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/pixd
Include only the headers that are actually needed.
---
libavcodec/cbs.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/cbs.h b/libavcodec/cbs.h
index 8b432393b8..509f76b9c6 100644
--- a/libavcodec/cbs.h
+++ b/libavcodec/cbs.h
@@ -24,7 +24,9 @@
#include "libavu
This will allow to avoid #including the entire avcodec.h in some places.
---
doc/APIchanges | 10 +++
libavcodec/Makefile | 1 +
libavcodec/avcodec.h | 139 +--
libavcodec/defs.h| 170 +++
4 files changed, 182 in
---
doc/APIchanges | 3 +++
libavcodec/avcodec.h | 9 -
libavcodec/codec.h | 9 +
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 540a0c8b4d..e21970812b 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -14,6 +14,9 @@
---
doc/APIchanges| 4
libavcodec/avcodec.h | 18 --
libavcodec/codec_id.h | 18 ++
3 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 30203d8ad5..f8d01caa84 100644
--- a/doc/APIchanges
+++ b/doc/API
---
doc/APIchanges| 4 ++--
libavcodec/avcodec.h | 13 -
libavcodec/codec_id.h | 13 +
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index f8d01caa84..731d55f10d 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@
---
doc/APIchanges | 3 +++
libavcodec/avcodec.h | 6 --
libavcodec/codec_par.h | 5 +
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 731d55f10d..540a0c8b4d 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -14,6 +14,9 @@ li
On Sun, May 02, 2021 at 23:02:02 +0200, Oneric wrote:
> ASS subtitles can have encoded fonts embedded into the subtitle file
> itself. Allow libass to load those, to render subs as intended.
> ---
> libavfilter/vf_subtitles.c | 1 +
> 1 file changed, 1 insertion(+)
pinging again
_
James Almer:
> On 5/21/2021 6:17 AM, Andreas Rheinhardt wrote:
>> When the packet size is known in advance like here, one can avoid
>> an intermediate buffer for the packet data; also, there is no reason
>> to add AV_INPUT_BUFFER_MIN_SIZE to the packet size any more, as the
>> actually needed packe
On 5/21/2021 6:17 AM, Andreas Rheinhardt wrote:
Its documentation described the way user-supplied buffers worked
before 93016f5d1d280f9cb7856883af287fa66affc04c.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/internal.h | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-
On 5/21/2021 6:17 AM, Andreas Rheinhardt wrote:
When the packet size is known in advance like here, one can avoid
an intermediate buffer for the packet data; this also makes it easy
to allow user-supplied buffers. Only one thing needed to be changed:
The earlier code relied on the buffer having b
On 5/21/2021 6:17 AM, Andreas Rheinhardt wrote:
The libmp3lame encoder already uses an internal buffer, so that the
packet size is already known before allocating the packet; therefore
one can avoid another (implicit) intermediate buffer by switching
to ff_get_encode_buffer(), thereby also suppor
On 5/21/2021 6:17 AM, Andreas Rheinhardt wrote:
When the packet size is known in advance like here, one can avoid
an intermediate buffer for the packet data; also, there is no reason
to add AV_INPUT_BUFFER_MIN_SIZE to the packet size any more, as the
actually needed packet size can be easily calc
With audio/video HLS playlists, audio chunklists are treated as
alternative renditions for video chunklists. This is wrong for
audio-only HLS playlists.
fixes: 9252
Please correct indentation of introduced if statement's body, before
applying.
---
libavformat/dashenc.c | 39 +
> -Original Message-
> From: Guo, Yejun
> Sent: Monday, May 17, 2021 1:54 PM
> To: ffmpeg-devel@ffmpeg.org
> Cc: Guo, Yejun
> Subject: [PATCH 2/2] lavfi/dnn: refine code to separate processing and
> detection in backends
>
> ---
> libavfilter/dnn/dnn_backend_native.c | 2 +-
> lib
Here the packet size is known before allocating the packet,
so that supporting user-supplied buffers is trivial.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libxavs2.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavcodec/libxavs2.c b/libavcodec/libxavs2.
Instead return the dictionary in the state it is at the time the error
occurred. This is more in line with the description of this parameter
and allows to notify the user of unrecognized options if an error
happens lateron (which might very well be due to e.g. misspelled
options).
Signed-off-by: A
The user should not rely on all options always being recognized
(in particular not on error).
Signed-off-by: Andreas Rheinhardt
---
doc/examples/extract_mvs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c
index 42e1
Besides being unnecessary it is also safer: If the error for an
unrecognized option were triggered (which seems to be impossible right
now), it might be that the stream whose codecpar is accessed is NULL.
Signed-off-by: Andreas Rheinhardt
---
fftools/ffprobe.c | 3 +--
1 file changed, 1 insertio
Signed-off-by: Andreas Rheinhardt
---
doc/examples/demuxing_decoding.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/doc/examples/demuxing_decoding.c b/doc/examples/demuxing_decoding.c
index 55fdb2555c..ef1fd2bd53 100644
--- a/doc/examples/demuxing_decoding.c
+++ b/doc/exa
In case the underlying AVCodec has no private class, the private data
of both the main as well as each worker AVCodecContext is just zeroed
(the codec's init function has not been called on any of them and
without a private class there is no way to legitimately set anything
before the aforementione
It is no longer necessary now that ff_frame_thread_encoder_init()
no longer receives an options dictionary.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/avcodec.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
i
av_dict_copy() returned void when this code was written.
Signed-off-by: Andreas Rheinhardt
---
Should one add AV_DICT_MULTIKEY to the flags to also copy dictionaries
with multiple entries?
libavutil/opt.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavutil/opt.c
avcodec_open2() allows to provide options via an AVDictionary;
but it is also allowed to set options by simply setting the value
of the AVCodecContext or via the AVOptions API if the codec has
a private class. Any options provided via an AVDictionary have already
been applied before ff_frame_thread
Up until now, ff_alloc_packet2() has a min_size parameter:
It is supposed to be a lower bound on the final size of the packet
to allocate. If it is not too far from the upper bound (namely,
if it is at least half the upper bound), then ff_alloc_packet2()
already allocates the final, already refcoun
Its documentation described the way user-supplied buffers worked
before 93016f5d1d280f9cb7856883af287fa66affc04c.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/internal.h | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/libavcodec/internal.h b/libavcodec/i
Also combine two if blocks that check for the same condition
and don't check had_partial if we already have a complete packet.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/omx.c | 33 -
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/libavcodec
Signed-off-by: Andreas Rheinhardt
---
libavcodec/omx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/omx.c b/libavcodec/omx.c
index ddb3ba4f66..9597c60057 100644
--- a/libavcodec/omx.c
+++ b/libavcodec/omx.c
@@ -871,6 +871,7 @@ static int omx_encode_frame(AVCodecContext *avctx, A
There are no preallocated buffer packets any more; this feature only
worked with the old encode API and only until said API was turned into
a wrapper for the new API in 93016f5d1d280f9cb7856883af287fa66affc04c.
So remove its remnants.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/omx.c | 15 -
The APNG encoder already uses internal buffers, so that the packet size
is already known before allocating the packet; therefore one can avoid
another (implicit) intermediate buffer by switching to
ff_get_encode_buffer(), thereby also supporting user-supplied buffers.
Signed-off-by: Andreas Rheinh
When the packet size is known in advance like here, one can avoid
an intermediate buffer for the packet data; this also makes it easy
to allow user-supplied buffers. Only one thing needed to be changed:
The earlier code relied on the buffer having been initially zeroed
by av_fast_padded_malloc(), s
When the packet size is known in advance like here, one can avoid
an intermediate buffer for the packet data by using
ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/sbcenc.c | 5 +++--
1 file changed, 3 insertions(+), 2 del
The FLAC encoder calculates the size in advance, so one can avoid
an intermediate buffer for the packet data by using
ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time.
Signed-off-by: Andreas Rheinhardt
---
The size was actually exact in all my tests; it seems the only way for
Signed-off-by: Andreas Rheinhardt
---
libavcodec/pngenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index a398155100..5a376765cf 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -847,7 +847,7 @@ static int encode_apn
When the packet size is known in advance like here, one can avoid
an intermediate buffer for the packet data by using
ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/pamenc.c | 26 ++
1 file changed,
For all p*m encoders a very sharp upper bound for the size of the
output packets is available before the packet is allocated. This can
be used to avoid an intermediate buffer when encoding by using
ff_get_encode_buffer() instead of ff_alloc_packet2() (without min_size);
this also adds support for u
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libxavs.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index ea53c49d38..88f674de40 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -112,7 +112,7 @@ static i
When the packet size is known in advance like here, one can avoid
an intermediate buffer for the packet data; also, there is no reason
to add AV_INPUT_BUFFER_MIN_SIZE to the packet size any more, as the
actually needed packet size can be easily calculated: It is three bytes
more than the raw nal si
Here the packet size is known before allocating the packet,
so that supporting user-supplied buffers is trivial.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libx265.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
inde
Here the packet size is known before allocating the packet because
the encoder provides said information (and works with internal buffers
itself), so one can use this information to avoid the implicit use of
another intermediate buffer for the packet data; and by switching to
ff_get_encode_buffer()
Here the packet size is known before allocating the packet,
so that supporting user-supplied buffers is trivial.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libwebpenc_animencoder.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/libwebpenc_animencoder.c
Here the packet size is known before allocating the packet,
so that supporting user-supplied buffers is trivial.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libwebpenc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libvpxenc.c | 64 --
1 file changed, 31 insertions(+), 33 deletions(-)
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 2d9e56837b..66bad444d0 100644
--- a/libavcodec/libvpxenc.c
+++ b/liba
Here the packet size is known before allocating the packet,
so that supporting user-supplied buffers is trivial.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libopenh264enc.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/
Here the packet size is known before allocating the packet because
the encoder provides said information (and works with internal buffers
itself), so one can use this information to avoid the implicit use of
another intermediate buffer for the packet data; and by switching to
ff_get_encode_buffer()
Here the packet size is known before allocating the packet because
the encoder provides said information (and works with internal buffers
itself), so one can use this information to avoid the implicit use of
another intermediate buffer for the packet data; and by switching to
ff_get_encode_buffer()
Here the packet size is known before allocating the packet because
the encoder provides said information (and works with internal buffers
itself), so one can use this information to avoid the implicit use of
another intermediate buffer for the packet data; and by switching to
ff_get_encode_buffer()
The libshine encoder already uses an internal buffer, so that the
packet size is already known before allocating the packet; therefore
one can avoid another (implicit) intermediate buffer by switching
to ff_get_encode_buffer(), thereby also supporting user-supplied
buffers.
Signed-off-by: Andreas
Here the packet size is known before allocating the packet,
so that supporting user-supplied buffers is trivial.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libkvazaar.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar
The libmp3lame encoder already uses an internal buffer, so that the
packet size is already known before allocating the packet; therefore
one can avoid another (implicit) intermediate buffer by switching
to ff_get_encode_buffer(), thereby also supporting user-supplied
buffers..
Signed-off-by: Andre
When the packet size is known in advance like here, one can avoid
an intermediate buffer for the packet data by using
ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libgsmenc.c | 5 -
1 file changed, 4 insertions(+), 1
When the packet size is known in advance like here, one can avoid
an intermediate buffer for the packet data by using
ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/libcodec2.c | 5 +++--
1 file changed, 3 insertions(+), 2
Here the packet size is known before allocating the packet because
the encoder provides said information (and works with internal buffers
itself), so one can use this information to avoid the implicit use of
another intermediate buffer for the packet data; and by switching to
ff_get_encode_buffer()
It has been added in 2016 when this flag made no sense for encoders at
all; now that it makes sense, audiotoolboxenc doesn't support it,
despite claiming to do so.
Signed-off-by: Andreas Rheinhardt
---
Will backport this to 4.4 as AV_CODEC_CAP_DR1 was already well-defined
for this release.
liba
82 matches
Mail list logo