1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

1113 Commits

Author SHA1 Message Date
Michael Niedermayer
4cf4da9dc5 Merge commit '5b4797a21db900b7d509660b7a4d49829089b004'
* commit '5b4797a21db900b7d509660b7a4d49829089b004':
  avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 22:12:41 +01:00
Tim Walker
5b4797a21d avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.
Includes a libavcodec utility function to update a frame's side data.
2014-01-05 16:41:56 +01:00
Nicolas George
38004051b5 lavc/utils: check av_frame_alloc() failure. 2013-12-30 10:58:01 +01:00
Michael Niedermayer
8b285f03f7 avcodec/utils: fix memleak on avcodec_open2() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 01:54:13 +01:00
Michael Niedermayer
102b794e09 configure: support raising major version in soname
this allows seperate installation of shared libs that should not conflict with
whatever is already installed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 20:21:18 +01:00
Michael Niedermayer
c90f31146e avcodec/utils: drop 2 dependancies on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 17:26:10 +01:00
Michael Niedermayer
5abdda214d avcodec/utils: implement avcodec_alloc_frame() through av_alloc_frame()
This ensures that theres just one AVFrame allocation function and libs dont
produce multiple AVFrame variants after a minor lib update

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 14:03:38 +01:00
Michael Niedermayer
6aed7bfd84 avcodec: use av_frame_unref() to set frame defaults
This ensures that the code isnt duplicated and cant become out of sync

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 14:02:29 +01:00
Michael Niedermayer
ec464c9683 avcodec/utils: av_register_codec & hwaccel() that work in O(1) time
Its possible to implement this with a few lines less code but it then
would flip the order of the list and require registration of external
codecs to be done first, also it could break user applications due to
this. Thus to maintain ABI this slighty more complex solution is
used.

Reviewed-by: Stefano Sabatini
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 01:06:34 +01:00
Michael Niedermayer
44967ab60a Merge commit 'd7b3ee9a3a03ab88d61a5895fbdbc6689f4dd671'
* commit 'd7b3ee9a3a03ab88d61a5895fbdbc6689f4dd671':
  lavc: deprecate avcodec_get_frame_defaults().

Conflicts:
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 00:32:15 +01:00
Michael Niedermayer
27e7977982 Merge commit '95a8a5aca60ce37d3abdf121a0285c2e317cf521'
* commit '95a8a5aca60ce37d3abdf121a0285c2e317cf521':
  lavc: call av_frame_unref() instead of avcodec_get_frame_defaults().

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 23:41:27 +01:00
Michael Niedermayer
409a143e4b Merge commit '943135621830ac3857d3cf766cfc280a95bb3c13'
* commit '943135621830ac3857d3cf766cfc280a95bb3c13':
  lavc: deprecate avcodec_free_frame()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 23:24:48 +01:00
Anton Khirnov
d7b3ee9a3a lavc: deprecate avcodec_get_frame_defaults().
Also bump libavcodec micro and add an APIchanges entry saying that
av_frame_* should now be used instead of the lavc AVFrame functions.
2013-12-11 20:39:55 +01:00
Anton Khirnov
95a8a5aca6 lavc: call av_frame_unref() instead of avcodec_get_frame_defaults().
avcodec_get_frame_defaults() will be deprecated.
2013-12-11 20:39:55 +01:00
Anton Khirnov
9431356218 lavc: deprecate avcodec_free_frame()
av_frame_free() should be used instead.
2013-12-11 20:39:54 +01:00
Michael Niedermayer
b6eee405ff avcodec/utils: Print warning if avcodec_set_dimensions() failed
Fixes CID1135744
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 15:28:27 +01:00
Michael Niedermayer
985c5f226a avcodec/utils: check that extended data has been set correctly instead of forcing it in avcodec_decode_video2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10 01:11:32 +01:00
Michael Niedermayer
999ee28124 avcodec/utils: dont depend on the channel layout in unrefcount_frame()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10 01:11:32 +01:00
Michael Niedermayer
7a901eb33a Merge commit '37a749012aaacc801fe860428417a6d7b81c103f'
* commit '37a749012aaacc801fe860428417a6d7b81c103f':
  lavc: rework handling of refcounted_frames=0

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 19:37:53 +01:00
Michael Niedermayer
f3acdd44bf Merge commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8'
* commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8':
  lavc/decode_video(): always unref the frame if there is no output in decode_video

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 17:48:24 +01:00
Michael Niedermayer
04dac5d1e0 Merge commit '85f947aefb3dae81f65f518acdffa8e31c679654'
* commit '85f947aefb3dae81f65f518acdffa8e31c679654':
  lavc: remove a pointless check in decode_audio4()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 16:13:42 +01:00
Michael Niedermayer
f4332e9591 Merge commit 'd4f0f2d1e80b76260eb6b9cdde472ac069dfda56'
* commit 'd4f0f2d1e80b76260eb6b9cdde472ac069dfda56':
  lavc: use buf[0] instead of data[0] as the indicator of an allocated frame

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 16:07:17 +01:00
Michael Niedermayer
cefabaad3e Merge commit 'e5419709f50593769037ab77d7102f82d9260784'
* commit 'e5419709f50593769037ab77d7102f82d9260784':
  lavc: remove the extended_data workarounds.

Conflicts:
	libavcodec/utils.c

One hunk is not merged as not all codecs are updated yet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 14:32:19 +01:00
Anton Khirnov
37a749012a lavc: rework handling of refcounted_frames=0
Use only proper AVFrame API (no assigning of whole frames, since that
hardcodes sizeof(AVFrame) into lavc).

Make a copy of the side data, so the caller can use av_frame_unref/free
on non-refcounted frames, eliminating the need for
avcodec_get_frame_defaults()/avcodec_free_frame().
2013-12-09 08:54:29 +01:00
Anton Khirnov
a1ee164869 lavc/decode_video(): always unref the frame if there is no output in decode_video
Not just on failure. This is the same thing that is done in the audio
path and should prevent leaks in decoders that allocate a frame, but
then end up not writing into it.
2013-12-09 08:44:34 +01:00
Anton Khirnov
85f947aefb lavc: remove a pointless check in decode_audio4()
av_frame_unref() works fine on unallocated frames.
2013-12-09 08:44:24 +01:00
Anton Khirnov
d4f0f2d1e8 lavc: use buf[0] instead of data[0] as the indicator of an allocated frame
data[0] may be NULL for valid frames with hwaccel pixel formats.
2013-12-09 08:44:11 +01:00
Anton Khirnov
e5419709f5 lavc: remove the extended_data workarounds.
All decoders should now handle it properly.
2013-12-09 08:42:52 +01:00
Michael Niedermayer
133fbfc781 do O(1) instead of O(n) atomic operations in register functions
about 1ms faster startup time

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 15:27:36 +01:00
Michael Niedermayer
fdc0b3f8c1 avcodec/utils: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-21 14:17:00 +01:00
Michael Niedermayer
01923bab98 avcodec: move end zeroing code from av_packet_split_side_data() to avcodec_decode_subtitle2()
This code changes the input packet, which is read only and can in
rare circumstances lead to decoder errors. (i run into one of these in
the audio decoder, which corrupted the packet during av_find_stream_info()
so that actual decoding that single packet failed later)
Until a better fix is implemented, this commit limits the problem.
A better fix might be to make the subtitle decoders not depend on
data[size] = 0 or to copy their input when this is not the case.
2013-11-21 03:13:26 +01:00
Ben Boeckel
34b7c82dd3 avcodec/utils: use the unpack_dictionary function
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-20 18:23:24 +01:00
Michael Niedermayer
29c83d23e8 Merge commit 'b9fb59d2ab05fdfe89d3fb0d7ecbbd91e560f57d'
* commit 'b9fb59d2ab05fdfe89d3fb0d7ecbbd91e560f57d':
  lavc: deprecate avcodec_alloc_frame().

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-17 00:01:23 +01:00
Michael Niedermayer
0ee905e243 Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'
* commit '5b9c3b4505206143d85398c1410949319fa1180f':
  Replace all instances of avcodec_alloc_frame() with av_frame_alloc().

Conflicts:
	doc/examples/decoding_encoding.c
	doc/examples/muxing.c
	ffmpeg.c
	libavcodec/alacenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/libvpxenc.c
	libavcodec/pcm.c
	libavcodec/xbmenc.c
	libavcodec/xwdenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-16 23:54:10 +01:00
Anton Khirnov
b9fb59d2ab lavc: deprecate avcodec_alloc_frame(). 2013-11-16 12:44:50 +01:00
Anton Khirnov
5b9c3b4505 Replace all instances of avcodec_alloc_frame() with av_frame_alloc(). 2013-11-16 12:44:20 +01:00
Michael Niedermayer
7c888ae746 Merge commit 'cce3e0a49f0dd030262c28d9c53de0bd2fd909c4'
* commit 'cce3e0a49f0dd030262c28d9c53de0bd2fd909c4':
  Move av_fast_{m,re}alloc from lavc to lavu.

Conflicts:
	libavcodec/avcodec.h
	libavcodec/utils.c
	libavutil/mem.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-14 15:04:04 +01:00
Anton Khirnov
cce3e0a49f Move av_fast_{m,re}alloc from lavc to lavu. 2013-11-14 09:42:22 +01:00
Michael Niedermayer
78e150c5e9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  hwaccel: Simplify ff_find_hwaccel

Conflicts:
	libavcodec/mpeg12dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-10 17:37:51 +01:00
Luca Barbato
08303d7741 hwaccel: Simplify ff_find_hwaccel
It is always called by passing fields from an AVCodecContext.
2013-11-10 13:59:48 +01:00
Michael Niedermayer
ab71be0912 Merge commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9'
* commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9':
  lavc: move AVCodecContext.pkt to AVCodecInternal

Conflicts:
	libavcodec/internal.h
	libavcodec/rawdec.c
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 11:41:55 +01:00
Michael Niedermayer
3fc26d8073 Merge commit '38ecc3702dabbea09230f6d6333f59e74f5d1c12'
* commit '38ecc3702dabbea09230f6d6333f59e74f5d1c12':
  pthread: store thread contexts in AVCodecInternal instead of AVCodecContext

Conflicts:
	libavcodec/internal.h
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 11:14:38 +01:00
Anton Khirnov
da6506c607 lavc: move AVCodecContext.pkt to AVCodecInternal
It's a private field, not meant to be accessed from outside lavc.
2013-11-04 08:51:26 +01:00
Anton Khirnov
38ecc3702d pthread: store thread contexts in AVCodecInternal instead of AVCodecContext
It's a private field, it should not be visible to callers.

Deprecate AVCodecContext.thread_opaque
2013-11-04 08:51:26 +01:00
Stefano Sabatini
a689560428 lavc: remove dead FF_API_AVCODEC_OPEN API 2013-11-03 17:58:44 +01:00
Michael Niedermayer
5eb1704d5f Merge commit '064698d381e1e7790f21b0199a8930ea04e2e942'
* commit '064698d381e1e7790f21b0199a8930ea04e2e942':
  Add HEVC decoder

Conflicts:
	Changelog
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/hevc.c
	libavcodec/hevc.h
	libavcodec/hevc_cabac.c
	libavcodec/hevc_filter.c
	libavcodec/hevc_mvs.c
	libavcodec/hevc_parser.c
	libavcodec/hevc_ps.c
	libavcodec/hevc_refs.c
	libavcodec/hevc_sei.c
	libavcodec/hevcdsp.c
	libavcodec/hevcdsp_template.c
	libavcodec/hevcpred.c
	libavcodec/hevcpred_template.c
	libavcodec/version.h

cosmetics from hevc.h & hevc_ps.c mostly merged, other files left as they where in ffmpeg.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 17:13:00 +01:00
Michael Niedermayer
66f436adf5 Merge commit '0f6c1d6d64c9f6255ea579dace27d0dd695f0213'
* commit '0f6c1d6d64c9f6255ea579dace27d0dd695f0213':
  lavc/utils: stop using deprecated avcodec_set_dimensions

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 13:21:14 +01:00
Michael Niedermayer
7b91e9cf5d Merge commit '7644f5a80787c9b608b82873604805d7e38a6a18'
* commit '7644f5a80787c9b608b82873604805d7e38a6a18':
  lavc: replace avcodec_set_dimensions with ff_set_dimensions

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 13:07:15 +01:00
Anton Khirnov
0f6c1d6d64 lavc/utils: stop using deprecated avcodec_set_dimensions 2013-10-31 20:14:14 +01:00
Anton Khirnov
7644f5a807 lavc: replace avcodec_set_dimensions with ff_set_dimensions
avcodec_set_dimensions() is supposed to be an internal utility function,
there is no reason whatsoever for it to be public. Therefore deprecate
it.
2013-10-31 20:14:14 +01:00