Commit Graph

19482 Commits

Author SHA1 Message Date
Olivier Langlois 6fdf35fe35 lavc: Use av_gettime_relative
Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-24 09:53:42 +03:00
Anton Khirnov 530c1441fd lavc: make lmax/lmin into private options of mpegvideo encoders 2014-10-18 05:29:14 +02:00
Anton Khirnov 15ec053c4c lavc: make border_masking into private options of mpegvideo encoders 2014-10-18 05:28:40 +02:00
Anton Khirnov c4f7bee087 lavc: deprecate unused mb_threshold field 2014-10-18 05:28:29 +02:00
Anton Khirnov 685be3d1ae libvpxenc: add static-thresh private option
Currently, this option is accessed through AVCodecContext.mb_threshold,
which originally controlled reusing MB data when transcoding mpeg to
mpeg. Since the libvpx meaning is completely different from the original
mpegvideo meaning, it is better to use a separate private option for
this.
2014-10-18 05:28:03 +02:00
Anton Khirnov 59b55c494e lavc: deprecate unused me_threshold field 2014-10-18 05:26:56 +02:00
Anton Khirnov 66a68ddd1a lavc: make rc_buffer_aggressivity/rc_initial_cplx into private options of mpegvideo encoders 2014-10-18 05:26:29 +02:00
Anton Khirnov a75c2eb25a lavc: make rc_eq into private options of mpegvideo encoders 2014-10-18 05:23:51 +02:00
Anton Khirnov 946f95354b lavc: make rc_qmod_* into private options of mpegvideo encoders 2014-10-18 05:23:05 +02:00
Anton Khirnov a6e4ce9fd5 lavc: make rc_qsquish a private option of mpegvideo encoders 2014-10-18 05:21:50 +02:00
Vittorio Giovara bae557edce dump: display codec tags when available
For both audio and video.
2014-10-17 14:45:07 +01:00
Omer Osman 66e9f83953 libfdk-aacdec: Enable Dynamic Range Control Metadata Support
For streams which contain DRC metadata, the FDK decoder is able to
control rendering of the decoded output. The rendering parameters
are detailed in fdk_aac_dec_options [].

The default behavior is left up to the decoder.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-17 15:48:31 +03:00
Omer Osman b01a2204b5 libfdk-aacdec: Enable Decoder Downmix including Downmix Metadata Support
The FDK decoder is capable of producing mono and stereo downmix from
multichannel streams. These streams may contain metadata that control
the downmix process. The decoder requires an Ancillary Buffer in order to
correctly apply downmix in streams containing downmix Metadata. The
decoder does not have an API interface to inform of the presence of
Metadata in the stream, and therefore the Ancillary Buffer is always
allocated whenever a downmix is requested.

When downmixing multichannel streams, the decoder requires the output
buffer in aacDecoder_DecodeFrame call to be of fixed size in order to
hold the actual number of channels contained in the stream. For example,
for a 5.1ch to stereo downmix, the decoder requires that the output buffer
is allocated for 6 channels, regardless of the fact that the output is in
fact two channels.

Due to this requirement, the output buffer is allocated for the maximum
output buffer size in case a downmix is requested (and also during
decoder init). When a downmix is requested, the buffer used for output
during init will also be used for the entire duration the decoder is open.
Otherwise, the initial decoder output buffer is freed and the decoder
decodes straight into the output AVFrame.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-17 15:48:30 +03:00
Vittorio Giovara 1ac5a29b2e imc: fix order of operations in coefficients read
Reported-by: Ruoyu <liangry@ucweb.com>
2014-10-15 14:48:07 +01:00
Anton Khirnov 7ea1b3472a lavc: deprecate the use of AVCodecContext.time_base for decoding
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.

Add a new field, called 'framerate', to replace the use of time_base for
decoding.
2014-10-15 06:37:43 +00:00
Rémi Denis-Courmont d565fef1b8 vdpau: add AV_HWACCEL_FLAG_IGNORE_LEVEL to skip the codec level check
Decoding acceleration may work even if the codec level is higher than
the stated limit of the VDPAU driver. Or the problem may be considered
acceptable by the user. This flag allows skipping the codec level
capability checks and proceed with decoding.

Applications should obviously not set this flag by default, but only if
the user explicitly requested this behavior (and presumably knows how
to turn it back off if it fails).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-15 06:21:56 +00:00
Rémi Denis-Courmont c1724623ce vdpau: have av_vdpau_bind_context() fail on unsupported flag
Currently, no flags are supported.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-15 06:21:47 +00:00
Anton Khirnov 2df0c32ea1 lavc: use a separate field for exporting audio encoder padding
Currently, the amount of padding inserted at the beginning by some audio
encoders, is exported through AVCodecContext.delay. However
- the term 'delay' is heavily overloaded and can have multiple different
  meanings even in the case of audio encoding.
- this field has entirely different meanings, depending on whether the
  codec context is used for encoding or decoding (and has yet another
  different meaning for video), preventing generic handling of the codec
  context.

Therefore, add a new field -- AVCodecContext.initial_padding. It could
conceivably be used for decoding as well at a later point.
2014-10-13 19:09:01 +00:00
Rémi Denis-Courmont c80a816142 h263dec: call get_format() on resolution changes
Fail safe if the pixel format changes.
2014-10-13 16:05:04 +02:00
Rémi Denis-Courmont 1f29e5d7a2 h263dec: call get_format after setting resolution and profile
Bug-Id: 541
2014-10-13 16:04:53 +02:00
Vittorio Giovara 1a02e78653 vc1: initialize color properties 2014-10-08 18:17:50 +01:00
Vittorio Giovara eddf95283f vp9: initialize color space and range properties 2014-10-08 18:17:50 +01:00
Vittorio Giovara 65875a8b3b vp8: initialize color space and range properties 2014-10-08 18:17:50 +01:00
Vittorio Giovara 586ea0379c avcodec: fix colorspace option description 2014-10-08 18:17:50 +01:00
Marc-Antoine Arnaud 91eef40203 avcodec: add enum values on chroma sample location 2014-10-08 18:17:50 +01:00
Marc-Antoine Arnaud 9d5fed6dc4 avcodec: fix descriptions on color transfer options
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-10-08 18:17:49 +01:00
Vittorio Giovara 9f3a70c442 dump: print the original coded dimensions when available 2014-10-08 18:17:49 +01:00
Vittorio Giovara 41e86146e7 dump: print detailed color space information 2014-10-08 18:17:49 +01:00
Vittorio Giovara 20a5956b8d dump: split audio and video probing on multiple lines
Also always report pixel format.
2014-10-08 18:17:49 +01:00
Vittorio Giovara 147f2e91ee avcodec: make sure color_range is properly initialized 2014-10-08 18:17:49 +01:00
Luca Barbato 04d14c9b68 vc1: Split the decoder in components
Speed up the overall compilation time.
2014-10-08 18:34:48 +02:00
Henrik Gramner 2d91abade2 x86: h264_intrapred: Don't treat 32-bit integers as 64-bit
The upper halves are not guaranteed to be zero in x86-64.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-08 08:15:52 +00:00
James Almer 82f8eb5f77 jpeg2000: split off inverse MCT as Jpeg2000DSP
This makes the addition of arch optimized functions easier.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-08 08:02:55 +00:00
Josh Allmann 9a03c23235 h263dec: Force padding bug workaround for H.263.
Fixes decoding of http://samples.mplayerhq.hu/V-codecs/h263/h263-raw/messenger.h263

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-07 07:30:32 +00:00
Anton Khirnov d208d1eba3 hevc_mvs: make sure to always initialize the temporal MV fully
The spec requires this.

Fixes uninitialized reads on some samples.

Remove now unnecessary initialization of the whole merge candidate list.
2014-10-07 07:13:01 +00:00
Anton Khirnov 79a60c8e77 hevc_mvs: initialize the temporal MV in case of missing ref
The caller expects the MV to always be initialized.
2014-10-07 07:12:55 +00:00
Rémi Denis-Courmont 153fadc390 ff_get_format: fix infinite loop
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-06 18:39:45 +00:00
Manfred Georg 577899a645 lavc: specify the behavior of av_lockmgr_register on failure.
The register function now specifies that the user callback should
leave things in the same state that it found them on failure but
that failure to destroy is ignored by the library.  The register
function is now explicit about its behavior on failure
(it unregisters the previous callback and destroys all mutex).

Signed-off-by: Manfred Georg <mgeorg@google.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-06 18:20:17 +00:00
Rémi Denis-Courmont bef067f88c vdpau: check video surface and decoder capabilities
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-06 06:20:40 +00:00
Rémi Denis-Courmont e3e158e81f vdpau: add av_vdpau_bind_context()
This function provides an explicit VDPAU device and VDPAU driver to
libavcodec, so that the application is relieved from codec specifics
and VdpDevice life cycle management.

A stub flags parameter is added for future extension. For instance, it
could be used to ignore codec level capabilities (if someone feels
dangerous).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-06 06:20:40 +00:00
Rémi Denis-Courmont 502cde409c vdpau: force reinitialization when output resolution changes
This is necessary to recreate the decoder with the correct parameters,
as not all codecs invoke get_format() in this case.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-06 06:18:56 +00:00
Rémi Denis-Courmont 89ac99ba5f vdpau: pass codec-specific parameters from hwaccel
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-05 10:41:31 +00:00
Rémi Denis-Courmont ce083282f0 vdpau: common support for managing the VdpDecoder in avcodec
Using the not so new init and uninit callbacks, avcodec can now take
care of creating and destroying the VDPAU decoder instance.

The application is still responsible for creating the VDPAU device
and allocating video surfaces - this is necessary to keep video
surfaces on the GPU all the way to the output. But the application
will no longer needs to care about any codec-specific aspects.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-05 10:17:02 +00:00
Rémi Denis-Courmont fcc1022611 vdpau: factor out common end-of-frame handling
Also add error handling.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-05 10:13:44 +00:00
Rémi Denis-Courmont 319424d25c vdpau: add helper for VDPAU to libav error codes conversion
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-05 10:08:53 +00:00
Luca Barbato 68211c70af vc1: Do not assume seek happens after decoding
If a seek is requested before the decoding start there is no
current picture.

CC: libav-stable@libav.org
2014-10-04 23:46:46 +02:00
Michael Niedermayer d10d1b8655 libx265: enable psnr reporting when requested by the user
This is similar to what is done in libx264.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-10-01 14:31:48 +01:00
Michael Niedermayer 2cd7c99498 h264: reset ret to avoid propagating minor failures
Unbreak 772d150a6e.

CC: libav-stable@libav.org
Bug-Id: 750 / 905753
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-09-29 12:33:55 +01:00
Luca Barbato e3a00acde0 hevc: Initialize mergecand_list to 0
Unbreak cf6090dc62.

CC: libav-stable@libav.org
Sample-Id: hevc-conformance-LTRPSPS_A_Qualcomm_1
2014-09-29 12:33:46 +01:00
Rémi Denis-Courmont 4e03b2097c mpeg12: Always invoke the get_format() callback
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-09-26 21:28:37 +02:00