Anton Khirnov
7203bb6a59
lavc/dv.h: move encoder/decoder-specific code to a new header
...
dv.h is also used by libavformat, so avoid exposing encoder/decoder code
to it.
2 years ago
Anton Khirnov
91c51dac6d
lavc/dv: do not pass DVVideoContext to ff_dv_init_dynamic_tables()
...
It only needs work_chunks from it, so pass that directly.
This is done in preparation to splitting DVVideoContext.
2 years ago
Anton Khirnov
d1ba5d883e
lavc/dv: remove ff_dvvideo_init()
...
The function contains only two assignments, setting DVVideoContext.avctx
and AVCodecContext.chroma_sample_location. However, the decoder does not
use the former, and the encoder should not be setting the latter.
Therefore move the first assignment to dvenc and the second to dvdec.
Make the encoder warn if the user-signalled chroma sample location does
not match the supported one, and return an error on higher compliance
levels.
2 years ago
Andreas Rheinhardt
27f22f3383
all: Remove unnecessary libavcodec/internal.h inclusions
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
6d484671ec
avcodec/dv: Don't initialize RL VLC for encoder
...
Said RL VLC is only used by the decoder, ergo don't initialize it for
the encoder and move the whole code and the RL VLC table itself to
dvdec.c.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
fbb9e0dbc8
avcodec/dv: Don't pretend VLC allocation can't fail
...
It can and therefore we switch from a heap allocated VLC table to
a VLC initialized via the mechanism for static VLCs, but without
an actual static VLC.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Diego Biurrun
b7f98659f2
Remove unnecessary get_bits.h #includes
9 years ago
Martin Vignali
7fb186784a
avcodec/dv: remove unused var dvquantareas
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Vignali
5f9d30ae8f
avcodec/dv: remove unused var dv100qstep
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
4fa772acbb
dv: increase VLC reading bits to 10
...
This also requires a bump in the table size of bit patterns to 1664.
From 356 to 348 cycles.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
05da586fef
dv: move inverse weight tables to decoder
...
The encoder has its own tables and does not access the idct_factor
member of the DVVideoContext structure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
80b29c2d0c
dv: use smaller type for weight tables
...
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
eacf2e8eb3
dv: better split weight tables assignment
...
This is a mostly cosmetical patch in preparation for the following.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gabriel Dume
ee0ebd3c14
dv: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Anton Khirnov
f6ee61fb05
lavc: export DV profile API used by muxer/demuxer as public
11 years ago
Diego Biurrun
e63b818dbe
dv: Properly split decoder and encoder initialization
11 years ago
Diego Biurrun
593d2326ef
dv: Replace a magic number by sizeof()
11 years ago
Anton Khirnov
d349afb07b
dv: cosmetics, reindent
11 years ago
Anton Khirnov
650dee63c8
dv: get rid of global non-const tables
...
Instead, store them in the context and compute on each parameter change.
11 years ago
Diego Biurrun
5f92204370
dsputil: Move DV-specific ff_zigzag248_direct table to dvdata
11 years ago
Anton Khirnov
d4f1188d1a
dv: use AVFrame API properly
11 years ago
Diego Biurrun
97d19c2fec
dv: Split off DV video encoder into its own file
11 years ago
Diego Biurrun
21710ea821
dv: Move DV VLC data tables out of header file
11 years ago
Diego Biurrun
3cbe112653
dv: Split DV data table declarations into their own header
...
This is necessary to avoid target config settings bleeding into the host
compilation process with hardcoded tables and the DV VLC tables no longer
present as static tables in a header file.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
e458fd6cf9
libavcodec/dv.c: Fix duplicate words
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
afe03092dd
lavc: move put_bits_left in put_bits.h
12 years ago
Anton Khirnov
3b199d29cd
lavc decoders: properly initialize AVFrame.
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Diego Biurrun
218aefce44
dsputil: Move LOCAL_ALIGNED macros to libavutil
12 years ago
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago
Michael Niedermayer
5da885b84d
dv: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2b1a2466c7
dv: change assert(a2 < 4) to av_assert()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Tomas Härdin
8cbb8f5357
dv: Set FS flag from AVFrame.top_field_first
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
5e689b65ce
dv: zero dsp before init, this fixes use of uninitialized dct_bits
...
Fixes CID732292
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Carl Eugen Hoyos
6b87f0707d
Do not try to encode DVCPRO HD, it produces broken files.
13 years ago
Mans Rullgard
c75eca9d37
dvenc: do not call dsputil functions with stride not a multiple of 16
...
Allowing dsputil functions to assume the stride is a multiple of 16
even for smaller block sizes can simplify their implementation.
This appears to be the only place this guarantee is not met.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Michael Niedermayer
70d54392f5
lowres2 support.
...
The new lowres support is limited to decoders where lowres decoding
is possible in high quality.
I was not able to measure any speed difference, but if one is found
the 2-3 lines that might affect speed can be made compile time conditional
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
2bcbd98459
Remove lowres video decoding
...
This feature is complex, of questionable utility, and slows down
normal decoding.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Diego Biurrun
2b98377935
dv: Initialize encoder tables during encoder init.
13 years ago
Diego Biurrun
a3dbd459ff
dv: Merge dvquant.h into dvdata.c where all other DV tables reside.
13 years ago
Diego Biurrun
05afc5f57d
dv: Move static tables only used in one place to where they are used.
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
a839dbb94e
dvenc: print allowed profiles if the video doesn't conform to any of them.
13 years ago
Diego Biurrun
d724fe665b
dv: Split off DV video decoder into its own file.
13 years ago
Paul B Mahol
ae2c33b0c2
cosmetics: remove superfluous curly brackets
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
8f80e5fbea
dvenc: switch to ff_alloc_packet2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
6a047213ac
dvenc: switch to encode2().
13 years ago