Andreas Rheinhardt
3de3d2f5e2
avcodec/mpeg12enc: Reindentation
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
bf5bfcdbd3
avcodec/mpeg12enc: Use ff_thread_once() for static initializations
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
ef3c1670d4
avcodec/mpeg12enc: Always initialize MPEG-2 intra VLC table lengths
...
The MPEG-1/2 encoders initialize several tables once during the first
time one of the encoders is initialized; the table for MPEG-2 intra VLC
lengths is only initialized if it is used for this encoder instance.
This implies that if the first MPEG-1/2 encoder to be initialized does
not use it, it will never be initialized even if a later encoder
instance makes use of them. Fix this by initializing this table
unconditionally.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Anton Khirnov
717503f716
put_bits: make avpriv_align_put_bits() inline
...
This function is so extremely simple that it is preferable to make it
inline rather than deal with all the complications arising from it being
an exported symbol.
Keep avpriv_align_put_bits() around until the next major bump to
preserve ABI compatibility.
4 years ago
Limin Wang
ad49dd7694
avcodec/mpeg12enc: support mpeg2 encoder const level
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years ago
Limin Wang
dd76226842
avcodec/mpeg12enc: support mpeg2 encoder const profile
...
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
5 years ago
Limin Wang
0032ca45ff
avcodec/mpeg12enc: return more specific error codes for encode_init()
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
5 years ago
Limin Wang
1726eefec6
avcodec/mpeg12enc: Use FF_PROFILE_MPEG2_xxx macros
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
5 years ago
Paul B Mahol
d64cbd4fda
remove CHAR_MIN/CHAR_MAX usage
...
It is not needed at all.
5 years ago
Michael Niedermayer
39ff027fd8
avcodec/mpeg12enc: Add FF_CODEC_CAP_INIT_CLEANUP
...
Fixes: Multiple memleaks
Fixes: ffmpeg-memory-leak
Found-by: Francis Provencher <francis@protekresearchlab.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Mathieu Duponchelle
6cfa173303
mpeg12enc: Use Closed Captions if available
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Marton Balint
ce6ce595cf
avcodec/mpeg12enc: add support for specifying video_format in the sequence_display_extension
...
In a recent commit the default was changed from 0 (component) to 5
(unspecified), however some standards require using 0. With this option, the
user will be able to do so.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
7 years ago
Mark Thompson
4c0588b456
mpeg2enc: Don't mark all streams as component video
...
Since there is no information about the source format, "unspecified"
is the correct value to write here.
All tests using the MPEG-2 encoder are updated, as this changes the
header on all outputs.
7 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Marton Balint
5e555f9300
mpeg12enc: always write closed gops for intra only outputs
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
9 years ago
Vittorio Giovara
d749615333
lavc: Move timecode_frame_start to codec private options
...
This option is only used by mpeg2.
It is a very codec-specific option, so deprecate the global variant.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
a53fbda9dc
avcodec/mpeg12enc: Move high resolution thread check to before initializing threads
...
Cleaner solution is welcome!
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
5b4da8a38a
avcodec/motion_est: Fix mv_penalty table size
...
Fixes out of array read
Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
fb99ef0bd3
avcodec: use AV_OPT_TYPE_BOOL in a bunch of places
9 years ago
Michael Niedermayer
58fe57d5a0
avcodec/mpeg12enc: Basic support for encoding non even QPs for -non_linear_quant 1
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
bf2474c74f
avcodec/mpeg12enc: extend QP range to 28 for non linear quantizers
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Anton Khirnov
6f57375d70
rl: Rename ff_*_rl() to ff_rl_*()
10 years ago
Vittorio Giovara
848e86f74d
mpegvideo: Drop flags and flags2
...
They are just duplicates of AVCodecContext members so use those instead.
10 years ago
James Almer
ba625dd8a1
avcodec: use av_mod_uintp2() where useful
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Michael Niedermayer
fe27aeaeab
mpeg12enc: increase declared size of block function argument
...
CC: libav-stable@libav.org
Bug-Id: CID 1047236
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
37b3361e75
mpeg12enc: factor out check in encode_dc
...
Makes coverity less confused and the code more readable.
CC: libav-stable@libav.org
Bug-Id: CID 751744
10 years ago
James Darnley
8c1b942ad7
Replace incorrect use of "multiply" with "multiple"
...
Also replace the plural form "multiplies" with "multiples".
10 years ago
Diego Biurrun
8fc6a70c21
mpeg12enc: Add missing #include for PICT_FRAME
10 years ago
Diego Biurrun
835f798c7d
mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes
10 years ago
Marton Balint
9236f7b5a2
mpeg12enc: add seq_disp_ext option for deciding when to write a sequence_display_extension
...
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Marton Balint
66f4891e64
mpeg12enc: add support for PANSCAN side data in sequence_display_extension
...
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
3b42a8e439
avcodec/mpeg12enc: store sequence display extension only if we have something to store in it
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Marc-Antoine Arnaud
8a06794112
mpeg2: add sequence display extension information
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Michael Niedermayer
7ebf90ff47
avcodec/mpeg12enc: avoid floats in the aspect ratio info setup code
...
This fixes potential rounding issues with floats, and also
fixes a division by 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Frederic Turmel
b217e1b057
avcodec/mpeg12enc: Favor storing DAR instead of SAR
...
fixes Ticket 2689
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2cf514354b
avcodec/mpeg12enc: increase declared size of block function argument
...
Fixes CID1047236
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
wm4
f6774f905f
mpegvideo: operate with pointers to AVFrames instead of whole structs
...
The most interesting parts are initialization in ff_MPV_common_init() and
uninitialization in ff_MPV_common_end().
ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL
checks for Picture.f, because these functions can be called on
uninitialized or partially initialized Pictures.
NULL pointer checks are added to ff_thread_release_buffer() stub function.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago
Marton Balint
a0cf87780d
mpeg12enc: always set closed gop flag on the first gop
...
Improves compatibility with XDCAM HD formats. It has been set for a long time
in ffmbc.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
11 years ago
Marton Balint
51c61e64cb
mpeg12enc: always write closed gops for intra only outputs
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
11 years ago
Vittorio Giovara
3d1d175367
mpeg12enc: set frame packing information when relevant metadata is found
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Vittorio Giovara
7f93a861aa
mpeg12enc: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Vittorio Giovara
66f091053f
mpeg12enc: drop forward declarations
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Diego Biurrun
6fee1b90ce
avcodec: Add av_cold attributes to init functions missing them
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
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
0c6b0409af
mpeg1enc: Disable threads for resolutions too large for multi-threading
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago