1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-05 15:58:07 +02:00
Commit Graph

286 Commits

Author SHA1 Message Date
Andreas Rheinhardt
a247ac640d avcodec: Constify AVCodecs
Given that the AVCodec.next pointer has now been removed, most of the
AVCodecs are not modified at all any more and can therefore be made
const (as this patch does); the only exceptions are the very few codecs
for external libraries that have a init_static_data callback.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:15 -03:00
Michael Niedermayer
f8556b632f avcodec/rv10: Execute whole size check earlier for rv20
Fixes: Timeout
Fixes: 31380/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV20_fuzzer-5230899257016320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-04-20 16:58:20 +02:00
Andreas Rheinhardt
8ffd3ef9d9 avcodec/rv10: Don't presume context to be initialized
In case of resolution changes rv20_decode_picture_header() closes and
reopens its MpegEncContext; it checks the latter for errors, yet when
an error happens, it might happen that no new attempt at
reinitialization is performed when decoding the next frame; this leads
to crashes lateron.

This commit fixes this by making sure that initialization will always
be attempted if the context is currently not initialized.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-08 01:16:25 +02:00
Andreas Rheinhardt
d4b9e117ce Revert "avcodec: add FF_CODEC_CAP_INIT_CLEANUP for all codecs which use ff_mpv_common_init()"
This mostly reverts commit 4b2863ff01.
Said commit removed the freeing code from ff_mpv_common_init(),
ff_mpv_common_frame_size_change() and ff_mpeg_framesize_alloc() and
instead added the FF_CODEC_CAP_INIT_CLEANUP to several codecs that use
ff_mpv_common_init(). This introduced several bugs:

a) Several decoders using ff_mpv_common_init() in their init function were
forgotten: This affected FLV, Intel H.263, RealVideo 3.0 and V4.0 as well as
VC-1/WMV3.
b) ff_mpv_common_init() is not only called from the init function of
codecs, it is also called from AVCodec.decode functions. If an error
happens after an allocation has succeeded, it can lead to memleaks;
furthermore, it is now possible for the MpegEncContext to be marked as
initialized even when ff_mpv_common_init() returns an error and this can
lead to segfaults because decoders that call ff_mpv_common_init() when
decoding a frame can mistakenly think that the MpegEncContext has been
properly initialized. This can e.g. happen with H.261 or MPEG-4.
c) Removing code for freeing from ff_mpeg_framesize_alloc() (which can't
be called from any init function) can lead to segfaults because the
check for whether it needs to allocate consists of checking whether the
first of the buffers allocated there has been allocated. This part has
already been fixed in 76cea1d2ce.
d) ff_mpv_common_frame_size_change() can also not be reached from any
AVCodec.init function; yet the changes can e.g. lead to segfaults with
decoders using ff_h263_decode_frame() upon allocation failure, because
the MpegEncContext will upon return be flagged as both initialized and
not in need of reinitialization (granted, the fact that
ff_h263_decode_frame() clears context_reinit before the context has been
reinited is a bug in itself). With the earlier version, the context
would be cleaned upon failure and it would be attempted to initialize
the context again in the next call to ff_h263_decode_frame().

While a) could be fixed by adding the missing FF_CODEC_CAP_INIT_CLEANUP,
keeping the current approach would entail adding cleanup code to several
other places because of b). Therefore ff_mpv_common_init() is again made
to clean up after itself; the changes to the wmv2 decoder and the SVQ1
encoder have not been reverted: The former fixed a memleak, the latter
allowed to remove cleanup code.

Fixes: double free
Fixes: ff_free_picture_tables.mp4
Fixes: ff_mpeg_update_thread_context.mp4
Fixes: decode_colskip.mp4
Fixes: memset.mp4

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-04-08 01:07:50 +02:00
Andreas Rheinhardt
8af82be946 avcodec/mpegvideo: Merge ff_mpv_decode_defaults into ff_mpv_decode_init
These two are always called directly after each other (with the
exception of the calls in mpeg_decode_init() where some irrelevant
modifications of the avctx (which could just as well be done before
ff_mpv_decode_defaults(), because it doesn't have a pointer to the
AVCodecContext at all and therefore can't see these modifications at
all) are performed in between), so merge ff_mpv_decode_defaults() in
ff_mpv_decode_init().

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 12:00:15 +01:00
Andreas Rheinhardt
e804eb0ef6 avcodec/rv10: Simplify handling of skip VLC entries
The VLC tables to be used for parsing RealVideo 1.0 DC coefficients are
weird: The luma table contains a block of 2^11 codes beginning with the
same prefix and length that all have the same symbol (i.e. value only
depends upon the prefix); the same goes for the chroma block (except
it's only 2^9 codes). Up until now, these entries (which generally could
be parsed like ordinary entries with subtables) have been treated
specially: They have been treated like open ends of the tree, so that
get_vlc2() returned a value < 0 upon encountering them; afterwards it
was checked whether the right prefix was used and if so, the appropriate
number of bytes was skipped.

But there is actually an easy albeit slightly hacky way to support them
directly without pointless subtables: Just modify the VLC table so that
all the entries sharing the right prefix have a length that equals the
length of the whole entry.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:45 +01:00
Andreas Rheinhardt
1320d336ef avcodec/rv10: Make VLC tables smaller
These tables were huge (14 bits) because one needed 14 bits in order to
find out whether a code is valid and in the VLC table or a valid code that
required hacky workarounds due to RealVideo 1.0 using multiple codes
for the same symbol and the code predating the introduction of symbols
tables for VLCs.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:45 +01:00
Andreas Rheinhardt
daf8b10eeb avcodec/rv10: Use symbol table more effectively
The RealVideo 1.0 decoder uses VLCs to parse DC coefficients. But the
values returned from get_vlc2() are not directly used; instead
-(val - 128) (which is in the range -127..128) is. This transformation
is unnecessary as it can effectively be done when initializing the VLC
by modifying the symbols table used. There is just one minor
complication: The chroma table is incomplete and in order to distinguish
an error from get_vlc2() (due to an invalid code) the ordinary return
range is modified to 0..255. This is possible because the only caller of
this function is (on success) only interested in the return value modulo
256.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:45 +01:00
Andreas Rheinhardt
df3269f5f7 avcodec/rv10: Reduce number of exceptions when reading VLC value
RealVideo 1.0 uses an insane way to encode DC coefficients: There are
several symbols that (for no good reason whatsoever) have multiple
encodings, leading to longer codes than necessary.

More specifically, the tree for the 256 luma symbols contains 255 codes
belonging to 255 different symbols on the left; going further right,
the tree consists of two blocks of 128 codes each of length 14 encoding
consecutive numbers (including two encodings for the symbol missing among
the 255 codes on the left); this is followed by two blocks of codes of
length 16 each containing 256 elements with consecutive symbols (i.e.
each of the blocks allows to encode all symbols). The rest of the tree
consists of 2^11 codes that all encode the same symbol.

The tree for the 256 chroma symbols is similar, but is missing the
blocks of length 256 and there are only 2^9 consecutive codes that
encode the same symbol; furthermore, the chroma tree is incomplete:
The right-most node has no right child.

All of this caused problems when parsing these codes; the reason is that
the code for this predates commit b613bacca9
which added support for explicit symbol tables and thereby removed the
requirement that different codes have different symbols. In order to
address this, the trees used for parsing were incomplete: They contained
the 255 codes on the left and one code for the remaining symbol. Whenever
a code not in these trees was encountered, it was dealt with in
special cases (one for each of the blocks mentioned above).

This commit reduces the number of special cases: Using a symbols table
allows to treat the blocks of consecutive symbols like ordinary codes;
only the blocks encoding a single symbol are still treated specially
(in order not to waste memory on tables for them).

In order to not increment the size of the tables used to initialize the
VLCs both the symbols as well as the lengths are now run-length encoded.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:45 +01:00
Andreas Rheinhardt
e730b15583 avcodec/rv10: Reduce the size of the tables used to initialize VLCs
This can be achieved by switching to ff_init_vlc_from_lengths() which
allows to replace two uint16_t tables for codes with uint8_t tables for
the symbols by permuting the tables so that the codes are ordered from
left to right in the tree in which case they can be easily computed from
the lengths at runtime.

And after doing so, it became apparent that the tables for the symbols
are actually the same for luma and chroma, so that one can even omit one
of them.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:45 +01:00
Andreas Rheinhardt
e9d06fef62 avcodec/rv10: Make initializing static RV10 VLCs thread-safe
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-11-24 11:35:03 +01:00
Limin Wang
4b2863ff01 avcodec: add FF_CODEC_CAP_INIT_CLEANUP for all codecs which use ff_mpv_common_init()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-13 06:59:18 +08:00
Michael Niedermayer
47a017aaaa avcodec/rv10: Check input for minimal frame size
Fixes: Timeout (18sec -> 4sec)
Fixes: 18012/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV20_fuzzer-5767486145822720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 20:15:31 +01:00
Michael Niedermayer
14fcf42958 avcodec/rv10: Fix integer overflow in aspect ratio compare
Fixes: signed integer overflow: 2040 * 1187872 cannot be represented in type 'int'
Fixes: 15368/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV20_fuzzer-5681657136283648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-07-08 09:54:55 +02:00
Michael Niedermayer
d57f6606eb avcodec/rv10: Avoid calculating undefined value that is unused
Fixes: shift exponent 64 is too large for 32-bit type 'int'
Fixes: 15253/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV10_fuzzer-5671114300194816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-26 21:25:50 +02:00
Michael Niedermayer
f670c13f13 avcodec: Rename ff_mpv_decode_mb() to ff_mpv_reconstruct_mb
The new name more accuratly describes what the function does

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-19 17:54:40 +02:00
Clément Bœsch
8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Vittorio Giovara
41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
  lavc: AV-prefix all codec capabilities

Conflicts:
	cmdutils.c
	ffmpeg.c
	ffplay.c
	libavcodec/8svx.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/adpcm.c
	libavcodec/alac.c
	libavcodec/atrac3plusdec.c
	libavcodec/bink.c
	libavcodec/dnxhddec.c
	libavcodec/dvdec.c
	libavcodec/dvenc.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/fic.c
	libavcodec/flacdec.c
	libavcodec/flacenc.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/hevc.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libvo-aacenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec_float.c
	libavcodec/msmpeg4dec.c
	libavcodec/mxpegdec.c
	libavcodec/nvenc_h264.c
	libavcodec/nvenc_hevc.c
	libavcodec/pngdec.c
	libavcodec/qpeg.c
	libavcodec/ra288.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tiff.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/vp9.c
	libavcodec/wavpack.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Michael Niedermayer
b5c71fba59 Merge commit 'e7af52a68dde9144b273a9598b60bf0f56e1323b'
* commit 'e7af52a68dde9144b273a9598b60bf0f56e1323b':
  mpegvideo: rv10: Move function declaration to a separate header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 21:05:57 +02:00
Michael Niedermayer
218f58a16a Merge commit 'e3d0f49abb20a551bf6d885f75c354d6d0bbeb9d'
* commit 'e3d0f49abb20a551bf6d885f75c354d6d0bbeb9d':
  mpegvideo: h263: Move all tables to a single file

Conflicts:
	libavcodec/h263.h
	libavcodec/h263data.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 20:57:37 +02:00
Vittorio Giovara
e7af52a68d mpegvideo: rv10: Move function declaration to a separate header 2015-06-12 12:26:54 +01:00
Vittorio Giovara
e3d0f49abb mpegvideo: h263: Move all tables to a single file 2015-06-12 12:26:04 +01:00
Michael Niedermayer
83e3516e64 Merge commit '925b80d64029d41962e5998d7d901226c3a9baea'
* commit '925b80d64029d41962e5998d7d901226c3a9baea':
  mpegvideo: Move OutFormat enum to mpegutils.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 22:05:25 +02:00
Vittorio Giovara
925b80d640 mpegvideo: Move OutFormat enum to mpegutils.h
It is necessary to avoid circular header dependencies.
2015-06-08 12:39:42 +01:00
Michael Niedermayer
fd116b8dfa Merge commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61'
* commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61':
  mpegvideo: Move tables to a separate file

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:26:36 +02:00
Vittorio Giovara
378a00087f mpegvideo: Move tables to a separate file 2015-05-31 13:06:19 +02:00
Michael Niedermayer
d9b264bc73 Merge commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42'
* commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42':
  mpegvideo: Drop flags and flags2

Conflicts:
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/ratecontrol.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:24:41 +02:00
Michael Niedermayer
7104301638 avcodec/rv10: Use ff_tlog() for block level tracing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-26 16:29:23 +02:00
Michael Niedermayer
8f7b022c8c Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'
* commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25':
  lavc: Replace av_dlog and tprintf with internal macros

Conflicts:
	libavcodec/aacdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/bitstream.c
	libavcodec/dcadec.c
	libavcodec/dnxhddec.c
	libavcodec/dvbsubdec.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/get_bits.h
	libavcodec/gifdec.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c
	libavcodec/imc.c
	libavcodec/interplayvideo.c
	libavcodec/jpeglsdec.c
	libavcodec/libopencore-amr.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_parser.c
	libavcodec/pngdec.c
	libavcodec/ratecontrol.c
	libavcodec/rv10.c
	libavcodec/svq1dec.c
	libavcodec/vqavideo.c
	libavcodec/wmadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:10:10 +02:00
Vittorio Giovara
6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
Michael Niedermayer
4dee4a4470 avcodec/mpegvideo: Factor ff_mpv_decode_init() out
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-05 20:48:06 +02:00
Michael Niedermayer
60dbed6067 Merge commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867'
* commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867':
  cosmetics: Write NULL pointer inequality checks more compactly

Conflicts:
	libavcodec/dvdsubdec.c
	libavcodec/h263dec.c
	libavcodec/libxvid.c
	libavcodec/rv10.c
	libavcodec/utils.c
	libavformat/format.c
	libavformat/matroskadec.c
	libavformat/segment.c
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 21:26:12 +02:00
Michael Niedermayer
fb33bff990 Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'
* commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39':
  cosmetics: Write NULL pointer equality checks more compactly

Conflicts:
	cmdutils.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/dvbsub.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/dxa.c
	libavcodec/libxvid_rc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/rv10.c
	libavcodec/tiffenc.c
	libavcodec/utils.c
	libavcodec/vc1dec.c
	libavcodec/zmbv.c
	libavdevice/v4l2.c
	libavformat/matroskadec.c
	libavformat/movenc.c
	libavformat/sdp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 21:00:50 +02:00
Michael Niedermayer
c1df467d73 Merge commit '835f798c7d20bca89eb4f3593846251ad0d84e4b'
* commit '835f798c7d20bca89eb4f3593846251ad0d84e4b':
  mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes

Conflicts:
	libavcodec/h261dec.c
	libavcodec/intrax8.c
	libavcodec/mjpegenc.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videoenc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/rv10.c
	libavcodec/x86/mpegvideoenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 20:11:56 +02:00
Gabriel Dume
4b1f5e5090 cosmetics: Write NULL pointer inequality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 05:34:13 -07:00
Gabriel Dume
f929ab0569 cosmetics: Write NULL pointer equality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 03:18:18 -07:00
Diego Biurrun
835f798c7d mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes 2014-08-15 01:26:33 -07:00
Michael Niedermayer
2fd87a3d78 Merge commit '998c9f15d1ca8c7489775ebcca51623b915988f1'
* commit '998c9f15d1ca8c7489775ebcca51623b915988f1':
  idct: remove call to ff_idctdsp_init from ff_MPV_common_init

Conflicts:
	libavcodec/dnxhdenc.c
	libavcodec/h263dec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 02:25:14 +02:00
John Stebbins
998c9f15d1 idct: remove call to ff_idctdsp_init from ff_MPV_common_init
One step in untangling the mpegvideo code and fixing some problems in
the order that initialization is being done in h263dec and h261dec.
2014-08-14 07:58:49 -07:00
Michael Niedermayer
02e3e3ea51 Merge commit '9f99a5f1d078721a30a76aec27c58805b7b87e58'
* commit '9f99a5f1d078721a30a76aec27c58805b7b87e58':
  mpegencconetxt: Move rv10-specific orig_width/orig_height where they belong

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-20 20:32:24 +02:00
Nidhi Makhijani
9f99a5f1d0 mpegencconetxt: Move rv10-specific orig_width/orig_height where they belong
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-07-20 05:13:01 -07:00
Michael Niedermayer
56afbe8dbc Merge commit '7b9ef8d701c319c26f7d0664fe977e176764c74e'
* commit '7b9ef8d701c319c26f7d0664fe977e176764c74e':
  mpeg: Split error resilience bits off into a separate file

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 03:48:30 +02:00
Diego Biurrun
7b9ef8d701 mpeg: Split error resilience bits off into a separate file 2014-06-22 17:36:37 -07:00
Michael Niedermayer
59a53842d3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: operate with pointers to AVFrames instead of whole structs

Conflicts:
	libavcodec/h261dec.c
	libavcodec/h263dec.c
	libavcodec/intrax8.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/mpegvideo_xvmc.c
	libavcodec/msmpeg4.c
	libavcodec/ratecontrol.c
	libavcodec/vaapi.c
	libavcodec/vc1dec.c
	libavcodec/vdpau_vc1.c

See: fc567ac49e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 15:18:46 +02:00
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>
2014-04-09 02:12:19 +02:00
Michael Niedermayer
6ee2911996 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: drop ff_pixfmt_list_420

Conflicts:
	libavcodec/flvdec.c
	libavcodec/msmpeg4dec.c
	libavcodec/rv10.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 03:56:43 +01:00
Vittorio Giovara
6f6c029464 lavc: drop ff_pixfmt_list_420 2014-03-23 01:56:58 +01:00
Michael Niedermayer
8d024c5107 Merge commit 'cc8163e1a3601a56f722a4720516e860bf1c6198'
* commit 'cc8163e1a3601a56f722a4720516e860bf1c6198':
  avcodec: more correct printf specifiers

Conflicts:
	libavcodec/4xm.c
	libavcodec/alsdec.c
	libavcodec/dfa.c
	libavcodec/h264_ps.c
	libavcodec/jpeg2000dec.c
	libavcodec/lagarith.c
	libavcodec/mpeg12dec.c
	libavcodec/rv10.c
	libavcodec/svq3.c
	libavcodec/wmaprodec.c
	libavcodec/xwddec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 18:43:40 +01:00