On 11.11.2020 06:50, Brian D. Pemberton wrote:
Hi,
I am thinking about writing an app that bundles or includes FFmpeg to do
some video processing. Is this allowed? If so, where can I read about the
constraints or requirements of doing this? Also, is there anything I should
know upfront to prepar
On Thu, 5 Nov 2020, Martin Storsjö wrote:
The previous threshold, 4 KB, maybe was reasonable when it was set
(in 2010), but in today's settings and with typical network speeds
and data sizes, it's pretty small. 32 KB probably is a more reasonable
default now, regardless of input.
This changes t
Hi,
I am thinking about writing an app that bundles or includes FFmpeg to do
some video processing. Is this allowed? If so, where can I read about the
constraints or requirements of doing this? Also, is there anything I should
know upfront to prepare my app licensing standpoint ahead of time?
Sor
On 31/10/2020 14:40, James Almer wrote:
Signed-off-by: James Almer
---
libavcodec/cbs_av1_syntax_template.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libavcodec/cbs_av1_syntax_template.c
b/libavcodec/cbs_av1_syntax_template.c
index f351b1de24..dc3d8d1048
On 27/10/2020 21:25, James Almer wrote:
Section 6.10.1 of the AV1 spec states:
It is a requirement of bitstream conformance that the value of tg_start is
equal to the value of TileNum at the point that tile_group_obu is invoked.
It is a requirement of bitstream conformance that the value of tg_e
Am Fr., 6. Nov. 2020 um 09:04 Uhr schrieb Alan Kelly
:
>
> The function was re-written in asm, this code is heavily derived from the
> original code, the algorithm remains unchanged, the implementation is
> optimized. Would you agree to adding the copyright from swscale.c:
> * Copyright (C) 2001-20
Andriy Gelman:
> On Mon, 09. Nov 00:04, Andreas Rheinhardt wrote:
>> Andriy Gelman:
>>> From: Andriy Gelman
>>>
>>> Currently, header_count is used to store both the elision header count
>>> and the header repetition count (number of times headers have been written
>>> to output). Fix this by usin
On Tue, Nov 10, 2020 at 5:35 PM Michael Niedermayer
wrote:
> On Tue, Nov 10, 2020 at 01:37:26PM +0100, Paul B Mahol wrote:
> > Big disagree, please keep this log intact.
>
> i agree, for people writing alot of codecs like paul is doing this av_log
> is helpful
>
> It can be made less verbose, e.g
On Tue, Nov 10, 2020 at 09:43:47AM +0100, Alan Kelly wrote:
> ---
> yuv2yuvX.asm: Ports yuv2yuvX to asm, unrolls main loop and adds
> other small optimizations for ~20% speed-up. Copyright updated to
> include the original from swscale.c
> swscale.c: Removes yuv2yuvX_sse3 and calls new function
On Tue, Nov 10, 2020 at 01:37:26PM +0100, Paul B Mahol wrote:
> Big disagree, please keep this log intact.
i agree, for people writing alot of codecs like paul is doing this av_log
is helpful
Thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once
On Tue, Nov 10, 2020 at 01:46:10AM +0100, Andreas Rheinhardt wrote:
> Michael Niedermayer:
> > Fixes: Timeout (>20sec -> 56ms)
> > Fixes:
> > 26995/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5107217080254464
> >
> > Found-by: continuous fuzzing process
> > https://github.com/go
On Fri, Nov 06, 2020 at 03:10:17PM -0800, Thierry Foucu wrote:
> ---
> libavformat/avidec.c | 17 +
> 1 file changed, 17 insertions(+)
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Avoid a single point of failure, be that a per
On 10.11.2020 15:19, James Almer wrote:
On 11/10/2020 10:42 AM, Timo Rothenpieler wrote:
Signed-off-by: Timo Rothenpieler
Co-authored-by: James Almer
---
libavcodec/av1dec.c | 80 +
libavcodec/av1dec.h | 3 ++
2 files changed, 83 insertions(+)
On 11/10/2020 10:42 AM, Timo Rothenpieler wrote:
Signed-off-by: Timo Rothenpieler
Co-authored-by: James Almer
---
libavcodec/av1dec.c | 80 +
libavcodec/av1dec.h | 3 ++
2 files changed, 83 insertions(+)
diff --git a/libavcodec/av1dec.c b/libavc
On 10/27/2020 6:25 PM, James Almer wrote:
Section 6.10.1 of the AV1 spec states:
It is a requirement of bitstream conformance that the value of tg_start is
equal to the value of TileNum at the point that tile_group_obu is invoked.
It is a requirement of bitstream conformance that the value of tg
Signed-off-by: Timo Rothenpieler
Co-authored-by: James Almer
---
libavcodec/av1dec.c | 33 +
libavcodec/av1dec.h | 2 ++
2 files changed, 35 insertions(+)
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 1afed66499..87fd6bb2e3 100644
--- a/libavcodec
Signed-off-by: Timo Rothenpieler
Co-authored-by: James Almer
---
libavcodec/av1dec.c | 80 +
libavcodec/av1dec.h | 3 ++
2 files changed, 83 insertions(+)
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 56712279aa..1afed66499 100644
---
On 10/31/2020 11:40 AM, James Almer wrote:
Signed-off-by: James Almer
---
libavcodec/cbs_av1_syntax_template.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libavcodec/cbs_av1_syntax_template.c
b/libavcodec/cbs_av1_syntax_template.c
index f351b1de24..dc3d8d10
Andreas Rheinhardt:
> Paul B Mahol:
>> Than how one is supposed to guess correct size to put when this log is gone?
>>
> The developer who wants to make VLCs static just has to use a huge array
> (in order not to run into the abort) and get the value of the final
> offset parameter (either via av_l
Big disagree, please keep this log intact.
Thanks.
On Tue, Nov 10, 2020 at 1:31 PM Andreas Rheinhardt <
andreas.rheinha...@gmail.com> wrote:
> Paul B Mahol:
> > Than how one is supposed to guess correct size to put when this log is
> gone?
> >
> The developer who wants to make VLCs static just ha
Paul B Mahol:
> Than how one is supposed to guess correct size to put when this log is gone?
>
The developer who wants to make VLCs static just has to use a huge array
(in order not to run into the abort) and get the value of the final
offset parameter (either via av_log or via a debugger); or you
Than how one is supposed to guess correct size to put when this log is gone?
On Tue, Nov 10, 2020 at 1:15 PM Andreas Rheinhardt <
andreas.rheinha...@gmail.com> wrote:
> Paul B Mahol:
> > On Tue, Nov 10, 2020 at 12:31 PM Andreas Rheinhardt <
> > andreas.rheinha...@gmail.com> wrote:
> >
> >> Paul B
Paul B Mahol:
> On Tue, Nov 10, 2020 at 12:31 PM Andreas Rheinhardt <
> andreas.rheinha...@gmail.com> wrote:
>
>> Paul B Mahol:
>>> Because it is a bad idea.
>>
>> And I still like to hear a reason for this.
>>
>>
> Code is there so correct intended size is always allocated.
>
No. There are two
On Tue, Nov 10, 2020 at 12:31 PM Andreas Rheinhardt <
andreas.rheinha...@gmail.com> wrote:
> Paul B Mahol:
> > Because it is a bad idea.
>
> And I still like to hear a reason for this.
>
>
Code is there so correct intended size is always allocated.
> > No need to change code that worked for ages
Michael Niedermayer (12020-11-10):
> Fixes: signed integer overflow: -9223372036854775808 + -5279949906739200
> cannot be represented in type 'long'
> Fixes:
> 26908/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6329610851319808
>
> Found-by: continuous fuzzing process
> https://github.c
Paul B Mahol:
> Because it is a bad idea.
And I still like to hear a reason for this.
> No need to change code that worked for ages.
>
It allows to remove useless tables and it simplifies making more VLCs
that should be static static.
> On Tue, Nov 10, 2020 at 12:26 PM Andreas Rheinhardt <
> a
Because it is a bad idea.
No need to change code that worked for ages.
On Tue, Nov 10, 2020 at 12:26 PM Andreas Rheinhardt <
andreas.rheinha...@gmail.com> wrote:
> Paul B Mahol:
> > I do not think this is a good direction.
> >
>
> Why?
>
> > On Tue, Nov 10, 2020 at 11:50 AM Andreas Rheinhardt <
>
Paul B Mahol:
> I do not think this is a good direction.
>
Why?
> On Tue, Nov 10, 2020 at 11:50 AM Andreas Rheinhardt <
> andreas.rheinha...@gmail.com> wrote:
>
>> Right now the allocated size of the VLC table of a static VLC has to
>> exactly match the size actually used for the VLC: If it is
I do not think this is a good direction.
On Tue, Nov 10, 2020 at 11:50 AM Andreas Rheinhardt <
andreas.rheinha...@gmail.com> wrote:
> Right now the allocated size of the VLC table of a static VLC has to
> exactly match the size actually used for the VLC: If it is not enough,
> abort is called; if
Signed-off-by: Andreas Rheinhardt
---
libavcodec/qdmc.c | 60 ---
1 file changed, 26 insertions(+), 34 deletions(-)
diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c
index 2c870fcc1b..5aa13d8e8e 100644
--- a/libavcodec/qdmc.c
+++ b/libavcodec/qdmc.c
@
This is possible by switching to ff_init_vlc_from_lengths() which allows
to replace tables of codes of size uint16_t or uint32_t by tables of
symbols of size uint8_t; in case there already were symbols tables the
savings are even bigger.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/qdmc.c |
Signed-off-by: Andreas Rheinhardt
---
libavcodec/qdmc.c | 56 ++-
1 file changed, 17 insertions(+), 39 deletions(-)
diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c
index 8b50fbf30a..2c870fcc1b 100644
--- a/libavcodec/qdmc.c
+++ b/libavcodec/qdmc.c
@
Signed-off-by: Andreas Rheinhardt
---
libavcodec/qdmc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c
index ff1cc86c6b..f4e507fa60 100644
--- a/libavcodec/qdmc.c
+++ b/libavcodec/qdmc.c
@@ -370,8 +370,6 @@ static int qdmc_get_vlc(GetBitContext *gb, VLC
MagicYUV transmits its Huffman trees by providing the length of the code
corresponding to each symbol; then the decoder has to assemble the table
in such a way that (i) longer codes are to the left of the tree and (ii)
for codes of the same length the symbols are ascending from left to right.
Up u
Signed-off-by: Andreas Rheinhardt
---
libavcodec/hqx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c
index 44c6c1883c..aa4ff22a8f 100644
--- a/libavcodec/hqx.c
+++ b/libavcodec/hqx.c
@@ -122,8 +122,6 @@ static int decode_block(GetBitContext *gb, VLC *vlc
The Huffman trees used by Ut Video have two important characteristics:
(i) Longer codes are on the left of the tree and (ii) for codes of the
same length, the symbol is descending from left to right in the tree.
Therefore all the information that needs to be transmitted is how long
the code corresp
Signed-off-by: Andreas Rheinhardt
---
libavcodec/intrax8.c | 24 ++--
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index bd00a3e027..71a50cc063 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -50,18
Signed-off-by: Andreas Rheinhardt
---
libavcodec/hqx.c| 4 ++--
libavcodec/hqx.h| 1 +
libavcodec/hqxvlc.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c
index e2b895ac40..44c6c1883c 100644
--- a/libavcodec/hqx.c
+++ b/libavcodec
Expressions like array[get_vlc2()] can be optimized by using a symbols
table if the array is always the same for a given VLC. This requirement
is fulfilled for several VLCs used by ATRAC3, therefore this commit
implements this. This comes without any additional costs when using
ff_init_vlc_from_len
Signed-off-by: Andreas Rheinhardt
---
libavcodec/intrax8.c | 46
1 file changed, 21 insertions(+), 25 deletions(-)
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 71a50cc063..9b7958e5f2 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec
By switching to ff_init_vlc_from_lengths() one can apply both positive
as well as negative offsets for free; in this case it even saves space
because one replaces codes tables that don't fit into an uint8_t by
symbols tables that fit into an uint8_t or can even be completely
avoided as they are tri
Signed-off-by: Andreas Rheinhardt
---
libavcodec/intrax8.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index f385423dc1..bd00a3e027 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -115,11 +115,7 @@ static av_
Signed-off-by: Andreas Rheinhardt
---
libavcodec/atrac9tab.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/atrac9tab.h b/libavcodec/atrac9tab.h
index 1882bf9f43..b169035aad 100644
--- a/libavcodec/atrac9tab.h
+++ b/libavcodec/atrac9tab.h
@@ -104,7 +104,7 @@ static
Expressions like array[get_vlc2()] can be optimized by using a symbols
table if the array is always the same for a given VLC. This requirement
is fulfilled for the VLC used for VP3 motion vectors. The reason it
hasn't been done before is probably that the array in this case
contained entries in the
Also remove code duplication and use a named constant for the number of
VLC bits while just at it.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/atrac9dec.c | 69 +-
1 file changed, 34 insertions(+), 35 deletions(-)
diff --git a/libavcodec/atrac9dec.c
Signed-off-by: Andreas Rheinhardt
---
libavcodec/atrac9dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index d2dbffe92a..585c68f33a 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -831,7 +831,7 @@ static
theora_init_huffman_tables() does essentially the same as
ff_init_vlcs_from_lengths().
Signed-off-by: Andreas Rheinhardt
---
libavcodec/vp3.c | 20 +---
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index f288a53fe1..743d00390c
Using separate tables has the downside that one needs a big number of
pointers to the separate tables (currently 77); unifying them avoids
this.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/atrac9dec.c | 19 ++-
libavcodec/atrac9tab.h | 310 ++---
2 files
The ATRAC9 decoder creates VLCs with parameters contained in
HuffmanCodebooks; some of these HuffmanCodebooks are empty and yet
VLCs (that were completely unused*) were created from them. Said VLC
contained a single table with 512 VLC_TYPE[2] entries, each of which
indicated that this is an invalid
Signed-off-by: Andreas Rheinhardt
---
libavcodec/atrac9dec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index a1af3c22ef..ecf95f1777 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -272,7 +272,7 @@
Signed-off-by: Andreas Rheinhardt
---
libavcodec/rv34.c | 66 +--
1 file changed, 29 insertions(+), 37 deletions(-)
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 09fa962b2f..00fbcef8ec 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@
Using more bits for a VLC than the longest code has has no advantage.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/atrac9dec.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index ecf95f1777..0477b304d2 100
The whole point of VLCs with their tables is to read more than one bit
at a time; therefore max_depth, the number of times one has to
(maximally) read further bits is given by ceil(max_code_length / table_bits)
which in the case of ATRAC9's coefficient VLCs gives an upper bound of
two. Instead the
This has been achieved by switching those VLCs that still used
ff_init_vlc_sparse() to ff_init_vlc_lengths() even though the codes
tables used uint8_t in these cases. But it allows to use one auxiliary
function to initialize the VLCs and by using tables that interleave
symbols and lengths said func
By switching to ff_init_vlc_from_lengths() from ff_init_vlc_sparse() one
can replace codes of type uint16_t by symbols of type uint8_t, saving
space.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/vc1.c | 27 +--
libavcodec/vc1data.c | 488 ---
liba
Signed-off-by: Andreas Rheinhardt
---
libavcodec/vc1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 9eb02f88b3..305cc8c075 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -614,7 +614,7 @@ static void rotate_luts(VC1Context *
Expressions like array[get_vlc2()] can be optimized by using a symbols
table if the array is always the same for a given VLC. This requirement
is fulfilled for the VLCs used to parse the macroblock mode (MBMODE)
element for frame P and B pictures. MBMODE consists of four pieces of
information which
The VC1 decoder currently follows the spec very closely when decoding
MV differentials: The spec uses tables with contiguous indexes and
derives four values from it using a pseudo-code procedure: Two flags
and two values with a range of 0..5 each; the latter are obtained as the
result resp. the rem
The VC1 decoder currently follows the spec very closely when decoding
AC coefficients: The spec uses tables with contiguous indexes. The last
of each of these is an escape code; the other codes encode three other
variables via tables: run, length and whether this is the last
coefficient.
This comm
This makes it clearer which variables are really just temporary variables
of the macro and which are actually used externally.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/vc1_block.c | 18 --
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/libavcodec/vc1_block
The VC1 decoder currently follows the spec very closely when decoding
interlaced MV vector variable-length codes: The spec uses tables with
contiguous indexes. The last of these is an escape code, for every other
two values are encoded via (index + 1) / 9 and (index + 1) % 9. The
decoder did exactl
Signed-off-by: Andreas Rheinhardt
---
libavcodec/vc1_block.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index 714b3cdea0..3c9d1d4b8d 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@
Expressions like array[get_vlc2()] can be optimized by using a symbols
table if the array is always the same for a given VLC. This requirement
is fulfilled for the VLC for the Block-level Transform Type and
therefore this commit implements this; switching from
ff_init_vlc_sparse() to ff_init_vlc_fr
Signed-off-by: Andreas Rheinhardt
---
libavcodec/msmpeg4dec.c | 5 -
libavcodec/vc1_block.c | 12
2 files changed, 17 deletions(-)
diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c
index 49df06a9d7..b3964457d6 100644
--- a/libavcodec/msmpeg4dec.c
+++ b/libavcodec/
This allows to remove lots of pointers (130) to small symbol tables;
it has the downside that some of the default tables must now be coded
explicitly, but this costs only 6 + 4 + 8 + 16 + 8 bytes and is therefore
dwarfed by the gains.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/atrac3plus.c
Offseting by +1 is possible without adding dummy elements to the
beginning of the codes and lengths tables by switching to
ff_init_vlc_from_lengths() as this allows one to set the symbols
arbitrarily without incurring any penalty.
Signed-off-by: Andreas Rheinhardt
---
I wonder whether the tables
ATRAC3+ uses VLCs whose code lengths are ascending from left to right in
the tree; ergo it is possible (and done) to run-length encode the
lengths into so-called codebooks. These codebooks were variable-sized:
The first byte contained the minimum length of a code, the second the
maximum length; thi
This is very beneficial for the scale factor tables where 4*64+4*15
bytes of length information can be replaced by eight codebooks of 12
bytes each; furthermore the number of codes as well as the maximum
length of a code can be easily derived from said codebooks, making
tables containing said infor
The ATRAC3+ decoder currently uses ff_init_vlc_sparse() to initialize
several VLCs; sometimes a symbols table is used, sometimes not; some of
the codes tables are uint16_t, some are uint8_t. Because of these two
latter facts it makes sense to switch to ff_init_vlc_from_lengths()
because it allows t
The earlier code used several different offset parameters that were
initialized to magic values. This is unnecessary.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/atrac3plus.c | 25 ++---
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/libavcodec/atrac3plu
ff_init_vlc_from_lengths() can be used to offload the computation
of the codes; it also allows to omit the check whether the codes
are already properly ordered (they are). In this case, this also allows
to avoid the allocation of the buffer for the codes.
This improves performance: The amount of d
Signed-off-by: Andreas Rheinhardt
---
libavcodec/mpeg4video.h| 4 --
libavcodec/mpeg4videodec.c | 87 --
2 files changed, 36 insertions(+), 55 deletions(-)
diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h
index 3de598465f..e919db87a5 100644
Switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths()
allows to replace codes which are so long that they need to be stored
in an uint16_t by symbols which fit into an uint8_t; and even these can
be avoided in case of the sprite trajectory VLC.
Signed-off-by: Andreas Rheinhardt
---
l
Use ff_init_vlc_from_lengths() to offload the computation of the codes.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/atrac3plus.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c
index 6b046a887e..8ae5d6b8f9 100644
It is an init function even when called from decode_frame().
Signed-off-by: Andreas Rheinhardt
---
libavcodec/sheervideo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c
index 976c21c445..3e60ef26a5 100644
--- a/libavcodec/sh
The longest AC codes of the standard JPEG tables are 16 bits long; for
the DC tables, the maximum is 11, so using max_depth of two is
sufficient.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/g2meet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/g2meet.c
Switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths()
allows to replace codes which are so long that they need to be stored
in an uint16_t by symbols which fit into an uint8_t; furthermore, it is
also easily possible to already incorporate the offset (the real range
of Indeo 2 symbols s
ff_init_vlc_from_lengths() can be used to offload the computation
of the codes; it also allows to omit the check whether the codes
are already properly ordered (they are).
Signed-off-by: Andreas Rheinhardt
---
libavcodec/mjpegdec.c | 15 +--
1 file changed, 5 insertions(+), 10 deleti
ff_init_vlc_from_lengths() can be used to offload the computation
of the codes; it also needn't check whether the codes are already
properly ordered (they are).
Signed-off-by: Andreas Rheinhardt
---
libavcodec/sheervideo.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff
Signed-off-by: Andreas Rheinhardt
---
libavcodec/mss4.c | 73 +++
1 file changed, 29 insertions(+), 44 deletions(-)
diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c
index 9c257dc873..9b343c9b2b 100644
--- a/libavcodec/mss4.c
+++ b/libavcodec/mss4.c
@
Signed-off-by: Andreas Rheinhardt
---
configure | 2 +-
libavcodec/mss4.c | 58 +--
2 files changed, 7 insertions(+), 53 deletions(-)
diff --git a/configure b/configure
index 8a9e9b3cd7..4b47832cd7 100755
--- a/configure
+++ b/configure
@@ -28
The lengths of the codes used by the mss4 decoder are ascending from
left to right and therefore the lengths can be run-length encoded and
the codes can be easily derived from them. And this is how it is indeed
done. Yet some things can nevertheless be improved:
a) The number of entries of the cur
Besides removing code duplication the method for determining the offset
of each VLC table in the VLC_TYPE buffer also has the advantage of not
wasting space for skipped AIC mode 1 VLCs.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/rv40.c | 52 +++---
libavcodec/rv40vlc2.h | 383
After permuting the codes, symbols and lengths tables used to initialize
the VLC so that the codes are ordered from left to right in the Huffman
tree, the codes become redundant as they can be easily computed from the
lengths at runtime; in this case one has to use explicit symbol tables,
but all t
RealVideo 4.0 has a VLC that encodes two intra types per code; each
intra type is in the range 0..8 (inclusive) and up until now the VLC
used symbols in the range 0..80; one type was encoded as the remainder
when dividing the symbol by 9 whereas the other type was encoded as
symbol / 9. This is sub
Signed-off-by: Andreas Rheinhardt
---
libavcodec/rv40.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c
index 81e08af5f1..7ed599cd69 100644
--- a/libavcodec/rv40.c
+++ b/libavcodec/rv40.c
@@ -41,11 +41,6 @@ static VLC aic_top_
Signed-off-by: Andreas Rheinhardt
---
libavcodec/rv40vlc2.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/rv40vlc2.h b/libavcodec/rv40vlc2.h
index 15119a145b..4cdc7a4193 100644
--- a/libavcodec/rv40vlc2.h
+++ b/libavcodec/rv40vlc2.h
@@ -33,7 +33,7 @@
* codes use
Signed-off-by: Andreas Rheinhardt
---
libavcodec/qdm2_tablegen.h | 40 ++
1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h
index b60989e343..e492f7bb60 100644
--- a/libavcodec/qdm2_tablegen.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/mobiclip.c | 106 --
1 file changed, 51 insertions(+), 55 deletions(-)
diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c
index cb17832898..e4a2594954 100644
--- a/libavcodec/mobiclip.c
+++ b/libavco
Signed-off-by: Andreas Rheinhardt
---
libavcodec/qdm2.c | 2 +-
libavcodec/qdm2_tablegen.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 657b2da64d..bdfe710840 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -
Signed-off-by: Andreas Rheinhardt
---
libavcodec/qdm2_tablegen.h | 12 +++-
libavcodec/qdm2data.h | 28 ++--
2 files changed, 17 insertions(+), 23 deletions(-)
diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h
index aaa7356caf..b60989e343 1
If both codes, lengths and symbols tables are ordered so that the codes
are sorted from left to right in the tree, the codes can be easily
derived from the lengths and therefore become redundant. This is
exploited in this commit to remove the codes tables for the mobiclip
decoder; notice that table
Up until now, VLCs that were part of an array of VLCs were often not
initialized in a loop, but separately. The probable reason for this
was that these VLCs differed slightly in the parameters to be used for
them (i.e. the number of codes or the number of bits to be used
differs), so that one would
Several of the quantisation VLCs come in pairs and up until now the
number of bits used for each VLC was set to the same value for both VLCs
in such a pair even when one of the two required only a lower number.
This is a waste given that the get_vlc2() call is compatible with these
two VLCs using a
Signed-off-by: Andreas Rheinhardt
---
libavcodec/qdm2_tablegen.h | 159 +++--
1 file changed, 27 insertions(+), 132 deletions(-)
diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h
index 309bb4b53c..0e57902fc9 100644
--- a/libavcodec/qdm2_tablegen
Signed-off-by: Andreas Rheinhardt
---
libavcodec/mobiclip.c | 132 +-
1 file changed, 66 insertions(+), 66 deletions(-)
diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c
index e4a2594954..2d3225f464 100644
--- a/libavcodec/mobiclip.c
+++ b/libavco
After permuting the codes, symbols and lengths tables used to initialize
the VLCs so that the codes are ordered from left to right in the Huffman
tree, the codes become redundant as they can be easily computed from the
lengths at runtime (or at compile time with --enable-hardcoded-tables);
in this
After permuting both length, code as well as symbol tables so that
the codes are ordered from left to right in the tree, it became apparent
that the length of the codes decreases from left to right. Therefore one
can run-length encode the lengths to save space. This commit implements
this.
Signed-
By switching to ff_init_vlc_from_lengths() one can make a table of
codes of type uint8_t superfluous, saving space.
Other VLCs (for which there was no dedicated symbols table and where the
codes where already of type uint8_t) have been made to use
ff_init_vlc_from_lengths(), too, because it reduce
Signed-off-by: Andreas Rheinhardt
---
libavcodec/mpc8.c | 21 +
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 339ee515b8..31b7ad14ac 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -39,9 +39,6 @@
static VL
1 - 100 of 142 matches
Mail list logo