Anton Khirnov
eb891b3114
Replace all uses of avcodec_free_frame with av_frame_free().
2013-12-11 20:39:54 +01:00
Guillaume Martres
17a10d51b8
hevc: set time_base when possible
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-11 20:39:54 +01:00
Gildas Cocherel
33452aede6
hevc: store the VPS list as an AVBufferRef, just like the others *PS
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-11 20:39:54 +01:00
Michael Niedermayer
b769cf4b44
hevc: do not dereference pointer before NULL check in verify_md5()
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-11 20:39:54 +01:00
Reinhard Tartler
2a0fb7286d
alsdec: check block length
...
Fix writing over the end
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Addresses: CVE-2013-0845
2013-12-10 07:21:40 -05:00
Vittorio Giovara
acb77dff6a
hevc: parse frame packing arrangement SEI messages and save relevant stereo3d information
2013-12-09 16:02:43 +01:00
Vittorio Giovara
3d1d175367
mpeg12enc: set frame packing information when relevant metadata is found
2013-12-09 16:02:43 +01:00
Vittorio Giovara
bacc2869f3
mpeg12dec: parse frame packing arrangement user_data and save relevant stereo3d information
2013-12-09 16:02:43 +01:00
Vittorio Giovara
09cb75cdeb
libx264: set frame packing information when relevant information is found
2013-12-09 16:02:43 +01:00
Vittorio Giovara
5b10ef729f
h264: parse frame packing arrangement SEI messages and save relevant stereo3d information
2013-12-09 16:02:43 +01:00
Diego Biurrun
d64341e498
configure: Prefix libc-related variables with "libc_"
...
Simplifies host/target libc detection splitting.
2013-12-09 11:47:43 +01:00
Alexandra Khirnova
9b8d11a76a
avcodec: Use av_reallocp where suitable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-09 12:27:51 +02:00
Anton Khirnov
d4f1188d1a
dv: use AVFrame API properly
2013-12-09 09:10:14 +01:00
John Stebbins
c9ca220ef2
ac3dec: make drc_scale exponentially
...
The a52 spec suggests that "partial compression" should scale the
drc value in this manner.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-09 08:54:42 +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
Anton Khirnov
d351ef47d0
pthread_frame: use the AVFrame API properly.
...
Remove the extended_data workaround, all decoders should now handle this
properly.
2013-12-09 08:42:25 +01:00
Anton Khirnov
b605b123ef
mxpegdec: use the AVFrame API properly.
2013-12-09 08:41:57 +01:00
Anton Khirnov
afa21a12bf
p*menc: use the AVFrame API properly.
2013-12-09 08:41:20 +01:00
Anton Khirnov
e2274aa555
mjpegdec: use the AVFrame API properly.
2013-12-09 08:40:29 +01:00
Diego Biurrun
4958f35a2e
dsputil: Move apply_window_int16 to ac3dsp
...
The (optimized) functions are used nowhere else.
2013-12-08 17:57:15 +01:00
Guillaume Martres
9aa053cede
libvpx: do not mark VP9 as experimental when using libvpx >= 1.3.0
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-12-08 00:28:27 +01:00
Michael Niedermayer
b6a9719941
dcadec: Decode LFE to avoid adding random data when downmixing with LFE
...
Signed-off-by: Tim Walker <tdskywalker@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-12-06 23:37:05 +01:00
Justin Ruggles
d085f80fa1
webp: add a special case for a huffman table with only 1 symbol
...
The vlc reader cannot handle 0-bit huffman codes. For most
situations WebP uses the "simple" huffman coding for this case,
but that will only handle symbols up to 255. For the LZ77 distance
codes, larger symbol values are needed, so it can happen in rare
cases that a normal huffman table is used that only has a single
symbol.
2013-12-05 20:37:06 -05:00
Justin Ruggles
f51e3a1971
webp: do not call av_frame_free() on the user-provided frame
...
Fixes double-free on error.
2013-12-05 20:36:54 -05:00
Anton Khirnov
b73a8922d8
ljpegenc: split yuv encoding into a separate function
2013-12-05 13:38:07 +01:00
Anton Khirnov
fa4476815d
ljpegenc: split bgr encoding into a separate function
2013-12-05 13:37:56 +01:00
Anton Khirnov
daffed3b17
ljpegenc: accept bgr24 instead of bgra
...
The alpha plane is not encoded.
2013-12-05 13:37:41 +01:00
Anton Khirnov
0cdbc4d393
ljpegenc: rename the encoding function.
...
The new name is more consistent with the rest of Libav.
2013-12-05 13:37:32 +01:00
Anton Khirnov
72c0b8f724
ljpeg: remove a commented-out line
2013-12-05 13:37:09 +01:00
Anton Khirnov
24abd806ea
ljpegenc: deMpegEncContextize
...
The encoder uses almost none of the mpegvideo infrastructure, only some
fields from MpegEncContext.
The FATE results change because now an all-zero quant matrix is written
into the file. Since it is not used for anything for ljpeg, this should
not be a problem.
2013-12-05 13:35:55 +01:00
Anton Khirnov
86eb2eaac6
mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_dc()
...
This will allow deMpegEncContextizing the LJPEG encoder.
2013-12-05 13:35:30 +01:00
Anton Khirnov
3360ad9955
mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_trailer()
...
This will allow deMpegEncContextizing the LJPEG encoder.
2013-12-05 13:35:15 +01:00
Anton Khirnov
058d5f2feb
mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_header()
...
This will allow deMpegEncContextizing the LJPEG encoder.
2013-12-05 13:34:26 +01:00
Anton Khirnov
6d70639c7d
mjpegenc: do not pass MpegEncContext to jpeg_table_header()
...
Pass the three needed fields from it directly.
This will allow to deMpegEncContextize the LJPEG encoder.
2013-12-05 13:34:13 +01:00
Anton Khirnov
e1eaaec765
mjpegenc: remove commented out never-to-be-finished WIP cruft
2013-12-05 13:34:01 +01:00
Anton Khirnov
ff506c75b7
mjpegenc: do not pass MpegEncContext to put_huffman_table()
...
It only needs PutBitContext from it, so pass that directly.
2013-12-05 13:33:40 +01:00
Anton Khirnov
a1ba1f20b3
mjpegenc: cosmetics, reformat jpeg_put_comments()
2013-12-05 13:33:29 +01:00
Anton Khirnov
0812f5a40a
mjpegenc: write the JFIF header if the sample aspect ratio is set
...
MpegEncContext.aspect_ratio_info is never set for mjpeg, so this was
never written before.
2013-12-05 13:28:32 +01:00
Anton Khirnov
66499f34b5
mpegvideo: do not set current_picture_ptr in decoders
...
This code was originally added in
5f1948111a
to h263 to set decoded frame
pts to some random numbers (removed in
a1c5cc429d
) and then cargo culted to other
decoders.
The code is left in h263dec for now, since some part of the decoder
(apparently OBMC) relies on the specific previous frame to be reused.
2013-12-05 13:28:05 +01:00
Anton Khirnov
ac1fc92ea4
vc1dec: move setting repeat_pict after frame_start() has been called.
...
This will allow removing the hacks where each decoder sets
current_picture_ptr on its own.
2013-12-05 13:27:24 +01:00
Anton Khirnov
282c6a1a0e
mpegvideo: make ff_release_unused_pictures() static
...
It is only called from one place in mpegvideo.c now. Also remove the
remove_current parameter, which is always 1.
2013-12-05 13:26:50 +01:00
Anton Khirnov
c99307caee
mpegvideo: make frame_size_alloc() static.
...
It is not called from outside of mpegvideo.c anymore.
2013-12-05 13:25:46 +01:00
Anton Khirnov
0b0a7a751d
mpegvideo: move encode-only parts of common_end() to encode_end()
2013-12-05 13:25:26 +01:00
Anton Khirnov
d0d111d059
mpegvideo: remove commented out cruft from ff_MPV_frame_end()
2013-12-05 13:25:15 +01:00
Anton Khirnov
381a722562
mpegvideo: split the encoding-only parts of ff_MPV_frame_end() into a separate function
2013-12-05 13:23:55 +01:00
Anton Khirnov
b7254288d2
mpegvideo: do not update last_non_b_pict_type in update_thread_context()
...
It is used for encoding only.
2013-12-05 13:23:33 +01:00
Anton Khirnov
1f8eb69079
mpegvideo: move encoding-only initialization from common_init() to encode_init()
2013-12-05 13:23:03 +01:00
Anton Khirnov
bedf952bb8
mpegvideo: move setting encoding-only vars from common_defaults() to encode_defaults()
2013-12-05 13:22:55 +01:00
Anton Khirnov
2cab011f0f
mpegvideo: don't copy input_picture_number in update_thread_context()
...
It is encoding-only, frame threading is not used for encoding.
2013-12-05 13:22:46 +01:00
Anton Khirnov
ff7ffe4809
mpeg4videodec: move showed_packed_warning from MpegEncContext to Mpeg4DecContext
2013-12-05 13:22:37 +01:00
Anton Khirnov
f7d228676c
mpeg4videodec: move intra_dc_threshold from MpegEncContext to Mpeg4DecContext
2013-12-05 13:22:18 +01:00
Anton Khirnov
a097f0049b
mpeg12dec: move first_slice from MpegEncContext to Mpeg1Context
2013-12-05 13:22:03 +01:00
Anton Khirnov
ff300e435e
mpegvideo: remove an unused variable
2013-12-05 13:21:57 +01:00
Anton Khirnov
e41ff4210a
mpeg4videodec: move use_intra_dc_vlc from MpegEncContext to Mpeg4DecContext
2013-12-05 13:19:22 +01:00
Diego Biurrun
3d7c84747d
x86: Initialize mmxext after amd3dnow optimizations
...
The mmxext optimizations should be at least equally fast if available and
amd3dnow optimizations are being deprecated. Thus the former should
override the latter, not the other way around.
2013-12-04 18:52:48 +01:00
Diego Biurrun
97d19c2fec
dv: Split off DV video encoder into its own file
2013-12-02 13:13:09 +01:00
Diego Biurrun
21710ea821
dv: Move DV VLC data tables out of header file
2013-12-02 13:13:09 +01:00
Diego Biurrun
7ffaa19570
dsputil: x86: Move ff_inv_zigzag_direct16 table init to mpegvideo
...
The table is MMX-specific and used nowhere else.
2013-12-02 04:05:18 +01:00
Tim Walker
7dc827b709
dcadec: Add some logging before returning on error
...
Based on a patch by Michael Niedermayer.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-11-30 13:01:35 +01:00
Kostya Shishkov
01f6df01b6
go2meeting: disallow tile dimensions that are not multiple of 16
...
Original decoder seems to always use 176x128 tiles anyway and this helps
avoiding lots of issues with odd tile sizes in fuzzed files.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-29 17:37:59 +01:00
Anton Khirnov
e026ee0446
mpeg4videodec: move sprite_{shift,traj} from MpegEncContext to Mpeg4DecContext
2013-11-29 17:37:16 +01:00
Anton Khirnov
513d849bb6
mpeg4videodec: move num_sprite_warping_points from MpegEncContext to Mpeg4DecContext
2013-11-29 17:36:57 +01:00
Anton Khirnov
9ba3fc3e3d
mpeg4videodec: move sprite_brightness_change from MpegEncContext to Mpeg4DecContext
2013-11-29 17:36:43 +01:00
Anton Khirnov
58c120a929
mpeg4videodec: move scalability from MpegEncContext to Mpeg4DecContext
2013-11-29 17:36:28 +01:00
Anton Khirnov
6e81597d5a
mpeg4videodec: move enhancement_type from MpegEncContext to Mpeg4DecContext
2013-11-29 17:36:05 +01:00
Anton Khirnov
2992afda83
mpeg4videodec: remove a write-only variable from MpegEncContext
2013-11-29 17:35:57 +01:00
Anton Khirnov
3b1c0f686d
mpeg4videodec: move new_pred from MpegEncContext to Mpeg4DecContext
2013-11-29 17:35:13 +01:00
Anton Khirnov
e89247debd
mpeg4videodec: replace MpegEncContext.reduced_res_vop with a local variable
2013-11-29 17:34:34 +01:00
Anton Khirnov
8cebc9eaac
mpeg4videodec: remove a write-only variable from MpegEncContext
2013-11-29 14:19:48 +01:00
Anton Khirnov
b1aacd5668
mpeg4videodec: move t_frame from MpegEncContext to Mpeg4DecContext
2013-11-29 14:19:48 +01:00
Anton Khirnov
0388907400
mpeg4videodec: move cplx_estimation_* fields from MpegEncContext to Mpeg4DecContext
2013-11-29 14:19:48 +01:00
Anton Khirnov
43af264de8
mpeg4videodec: move mpeg4-specific bug workaround variables from MpegEncContext to Mpeg4DecContext
2013-11-29 14:19:48 +01:00
Anton Khirnov
e2ceb17642
mpeg4videodec: move mpeg4-specific post-frame-decode code from h264dec to mpeg4videodec
2013-11-29 14:19:47 +01:00
Anton Khirnov
b452d5ae86
mpeg4videodec: move mpeg4-specific bug detection from h263 generic code to mpeg4
2013-11-29 14:19:47 +01:00
Anton Khirnov
48e1394095
mpeg4videodec: move MpegEncContext.resync_marker into Mpeg4DecContext.
2013-11-29 14:19:47 +01:00
Anton Khirnov
c2f7417eeb
vc1: move MpegEncContext.resync_marker into VC1Context.
...
The field still remains in MpegEncContext because it is used by the
mpeg4 decoder.
2013-11-29 14:19:47 +01:00
Anton Khirnov
a5a71992ca
mpeg4videoenc: don't set MpegEncContext.resync_marker
...
It is only used in one place immediately after it is set.
2013-11-29 14:19:47 +01:00
Anton Khirnov
ad09f52586
h263dec: remove commented out cruft
2013-11-29 14:19:47 +01:00
Anton Khirnov
bc5abfb19e
mpeg4videodec: move MpegEncContext.rvlc to Mpeg4DecContext
2013-11-29 14:19:47 +01:00
Anton Khirnov
9f0617d213
mpeg4videodec: remove write-only sprite variables from MpegEncContext
2013-11-29 14:19:47 +01:00
Anton Khirnov
1a89025793
mpeg4videodec: move MpegEncContext.vol_sprite_usage to Mpeg4DecContext
2013-11-29 14:19:47 +01:00
Anton Khirnov
75bd07f732
mpeg4videoenc: write 0 instead of vol_sprite_usage
...
That field is never set for encoding.
2013-11-29 14:19:47 +01:00
Anton Khirnov
e62a43f6b1
mpeg4videodec: move MpegEncContext.time_increment_bits to Mpeg4DecContext
...
The field remains in MpegEncContext for use in the encoder.
2013-11-29 14:19:47 +01:00
Anton Khirnov
ee8af2dd99
mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContext
2013-11-29 14:19:47 +01:00
Anton Khirnov
35e0833d41
mpeg4videodec: add a mpeg4-specific private context.
2013-11-29 14:19:47 +01:00
Tim Walker
3c8507a845
dcadec: add disable_xch private option.
...
This supplements the deprecated request_channels-based control of XCh decoding.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
220494ad0b
dcadec: treat all 2-channel modes as Stereo in dca_downmix.
...
The check for (prim_channels > 2) before calling dca_downmix made these
cases unreachable, but now 2.1 layouts will go through the downmix code.
Having dual mono, Lt/Rt and sum-difference layouts print errors when
regular Stereo doesn't seems pointless.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
aaa44d0299
dca: support mixing LFE in dca_downmix.
...
Embedded downmix coefficients can use this.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
149438cfe5
dca: improve default stereo downmix coefficients.
...
Previous coefficients were producing a non-normalized, incorrect Lt/Rt downmix.
The new coefficients produce a standard Lo/Ro downmix with 3dB attenuation.
This should match the typical default coefficients used by DTS encoders.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
44b17d794a
dca: extract core substream's embedded downmix coeffcient codes, if present.
...
As per ETSI TS 102 114 V1.4.1 specification.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
27245b4e1b
dca: remove embedded downmix coefficient extraction.
...
It was based on an old, seemingly incorrect specification, so default
coefficients were always used anyway.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:50 +01:00
Tim Walker
b6d5e6aa10
dca: convert dca_default_coeffs to float.
...
Easier to read, modify, and avoids relying on an outdated table.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 21:38:22 +01:00
Tim Walker
25609b63d2
dcadec: store the stereo downmix coefficients as float in the DCAContext.
...
The 7-bit codes previously used are absent from the ETSI 102 114 V1.4.1 spec.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 21:35:22 +01:00
Tim Walker
89de5157b1
dcadec: implement request_channel_layout.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 21:10:29 +01:00
Diego Biurrun
cf7860db60
x86: dsputil: Suppress deprecation warnings for XvMC bits
...
These parts are scheduled for removal on the next version bump.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-11-28 16:04:30 +01:00
Michael Niedermayer
d1916d13e2
dsputil/pngdsp: fix signed/unsigned type in end comparison
...
Fixes out of array accesses and integer overflows.
2013-11-28 15:37:55 +01:00