Commit Graph

20352 Commits

Author SHA1 Message Date
Vittorio Giovara 4c160fa239 dcadec: Always initialize return variable
Silence an uninitialized warning from clang.
2015-10-04 13:06:27 +02:00
Anton Khirnov bb198c4997 d3d11va: make av_d3d11va_alloc_context() available at all times
The public API should not depend on the build configuration.
2015-10-03 14:09:23 +02:00
Anton Khirnov f320287159 d3d11va: check for malloc failure 2015-10-03 14:08:13 +02:00
Christophe Gisquet e54d7e4e8e dnxhddata: Deduplicate cid 1256 chroma table
CID 1256 is specified as using the same table for luma and chroma,
which is the same as CID 1235 luma table. This is consistent with
the format supposedly being RGB, although most sequences seem to
actually be YCbCr-encoded.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-02 13:12:19 +02:00
Jeremy James 1fb63d6f43 dnxhddata: Deduplicate dnx100 tables
Tables 1258 and 1259 were not zigzagged when added, so it was not
possible to notice the equivalence.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-02 13:12:12 +02:00
Jeremy James cc320296ab dnxhddata: Fix cid 1260 luma and chroma tables
These table was not zigzagged when added.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-02 13:12:04 +02:00
Joseph Artsimovich bfe1cd80eb dnxhddata: Fix 10-bit DNxHD quant matrices
Convert them to zigzag order, as the rest of them are.

When I was adding support for 10-bit DNxHD, I just copy-pasted the
missing quant matrices from the spec. Now it turns out the existing
matrices in dnxhddata.c were in zigzag order. This resulted in wrong
quantization for 10-bit DNxHD. The attached patch fixes the problem by
converting 10-bit quant matrices to zigzag order.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-10-02 13:11:57 +02:00
Derek Buitenhuis 380146924e x264: Add option to force IDR frames
When forwarding the frame type information, by default x264 can
decide which kind of keyframe output, add an option to force it
to output IDR frames in to support use-cases such as preparing
the content for segmented streams formats.
2015-10-01 14:27:45 +02:00
Yu Xiaolei eb02387add x264: Expose the NV21 input support
x264 build 147 adds the native support for NV21.

Useful to avoid additional pixel format conversion when encoding
from a wide range of capture devices, Android among those.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-01 14:00:28 +02:00
Alexandra Khirnova d0a3e89d41 dcadec: make a number of samples per subband per subsubframe a named constant
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-01 12:29:06 +02:00
Vittorio Giovara 9a3202a98b Screenpresso SPV1 decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-30 16:45:11 +02:00
Vittorio Giovara 1aa24df74c lavu: Deprecate AVFrame.error[]
These field are difficult to interpret, and are provided by a single
encoder (mpegvideoenc). In general they do not belong to a structure
containing raw data only, so remove them from AVFrame.

Mpegvideoenc now uses a private field in Picture for its internal
computations.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-30 16:44:33 +02:00
Vittorio Giovara e94e651c76 dnxhddec: Enable frame threading
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:01 +02:00
Christophe Gisquet c49cbecbae dnxhddec: Decode and use interlace mb flag
This bit is 1 in some samples, and seems to coincide with interlaced
mbs and CID1260. 2008 specs do not know about it, and maintain qscale
is 11 bits. This looks oversized, but may help larger bitdepths.

Currently, it leads to an obviously incorrect qscale value, meaning
its syntax is shifted by 1. However, reading 11 bits also leads to
obviously incorrect decoding: qscale seems to be 10 bits.

However, as most profiles still have 11bits qscale, the feature is
restricted to the CID1260 profile (this flag is dependent on
a higher-level flag located in the header).

The encoder writes 12 bits of syntax, last and first bits always 0,
which is now somewhat inconsistent with the decoder, but ends up with
the same effect (progressive + reserved bit).

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:01 +02:00
Vittorio Giovara cf7d2f2d21 lavc: Simplify checking quant bias option 2015-09-29 14:33:01 +02:00
Ganesh Ajjanagadde 4885bde318 motion_est_template: Fix undefined left shift of negative number
This fixes a -Wshift-negative-value warning reported with clang 3.7+.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-09-29 14:33:00 +02:00
Ganesh Ajjanagadde 977f41e274 mlpdec: Fix a undefined left shift of negative number
This fixes a -Wshift-negative-value warning reported with clang 3.7+.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-09-29 14:33:00 +02:00
wm4 948f3c19a8 lavc: Make AVPacket.duration int64, and deprecate convergence_duration
Note that convergence_duration had another meaning, one which was in
practice never used. The only real use for it was a 64 bit replacement
for the duration field. It's better just to make duration 64 bits, and
to get rid of it.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:00 +02:00
Gregory J. Wolfe 1a4c5fe560 libopenh264enc: Use av_log() to log messages
File libopenh264enc.c has been modified so that the encoder uses av_log()
to log messages (error, warning, info, etc.) instead of logging them
directly to stderr.  At the time the encoder is created, the current
libav log level is mapped to an equivalent libopenh264 log level.  This
log level, and a message logging function that invokes av_log() to
actually log messages, are then set on the encoder.

This contains further changes and simplifications by Michael Niedermayer
and Martin Storsjö.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-29 11:37:36 +03:00
Anton Khirnov 8aecec8402 qsvdec: make ff_qsv_decode_init() static
It is not used outside of qsvdec.c anymore.
2015-09-28 15:46:58 +02:00
Anton Khirnov 2c32eace5e qsvdec: close the MFX decoder on uninit 2015-09-28 15:45:17 +02:00
Anton Khirnov d0c8c380ec qsv: document AVQSVContext members 2015-09-28 15:44:47 +02:00
Anton Khirnov 5d2daebf3c qsvenc: mark the encoders as INIT_CLEANUP
Should fix some leaks on init failure.
2015-09-28 15:43:04 +02:00
Anton Khirnov 83847cc8fa qsvenc: do not try to close the encoder if the session is NULL 2015-09-28 15:42:56 +02:00
Anton Khirnov 741b352b16 qsvdec: list supported pixel formats
This is useful for detecting QSV-enabled decoders.
2015-09-28 15:42:46 +02:00
wm4 a41e5e192e vdpau: fix constrained baseline fallback
It appears vdpau drivers can return constrained baseline as unsupported,
even if libvdpau knows about the symbol, and the main profile is
supported.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 11:05:27 +02:00
wm4 a5d58fea68 lavc: reimplement avcodec_get_type() using codec descriptors
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 10:50:38 +02:00
Rémi Denis-Courmont b10b6ac7a9 vdpau: deprecate av_vdpau_get_profile()
This function can intrinsically not deal with codec profile fallback
(for H.264 Constrained Baseline especially), and was made redundant
by av_vdpau_bind_context().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 09:45:58 +02:00
Vittorio Giovara b2417ee6d1 dxv: Improve error message 2015-09-24 10:57:30 +02:00
Vittorio Giovara 1bcd4a476b dxv: Support RAW intermediate compression
Sample-Id: boombox64.mov
Reported-by: Aarni Koskela
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-24 10:57:25 +02:00
Vittorio Giovara bbf71d46db dxv: Print texture information after header parsing 2015-09-24 10:57:25 +02:00
Vittorio Giovara fb2889691c dxv: Support the original first version
DXV 1.0 provided DXT1 with LZF only.

Sample-Id: Orange-Strings-07_640_DXV.mov
Reported-by: Carl Eugen Hoyos
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-24 10:57:20 +02:00
Vittorio Giovara 588a5619da dxv: Parse ancillary encoder information
Header does not contain the number of channels, but rather the encoder
version, so rename the variable, and read the additional byte.
2015-09-24 10:56:44 +02:00
wm4 a9b8c638cf mmal: Fix AVBufferRef usage
AVBufferRef.data and AVPacket.data don't need to have the same value.
AVPacket could point anywhere into the buffer. Likewise, the sizes
don't need to be the same.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-24 10:34:46 +02:00
wm4 49623f5319 mmal: Remove setting extradata on input format
This works only for extradata sizes up to 128 bytes. Additionally, I
could never actually see it doing anything. The new code using
MMAL_BUFFER_HEADER_FLAG_CONFIG now takes care of this.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-24 10:34:38 +02:00
wm4 f290e48d86 mmal: drop the h264 BSF
We can send mp4-style data directly. But for some reason, this requires
sending the extradata as buffer with MMAL_BUFFER_HEADER_FLAG_CONFIG
set. Reuse the infrastructure for sending AVPackets to do this.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-24 10:34:28 +02:00
Steve Lhomme e3d4784eb3 d3d11va: WindowsPhone requires a mutex around ID3D11VideoContext 2015-09-17 10:33:21 +02:00
Kevin Wheatley 4a66422450 pixfmt: Add new SMPTE color primaries and transfer characteristic values
Appeared in ITU-T Rec H.265 10/2014.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-17 10:31:43 +02:00
Alexandra Hájková 7778859835 dcadec: set channel layout in a separate function
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-16 20:21:07 +02:00
Alexandra Hájková 971177f751 dcadec: scan for extensions in a separate function
to make dca_decode_frame more readable

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-16 20:21:07 +02:00
Luca Barbato 570fcaf332 jpeg2000: Factor out prec init
Makes debugging a little simpler.
2015-09-14 14:50:19 +02:00
Luca Barbato 95a41311ac jpeg2000: Factor out band stepsize initialization 2015-09-14 14:48:59 +02:00
Luca Barbato 7fb93eae43 jpeg2000: Factor out band initialization 2015-09-14 14:36:18 +02:00
Luca Barbato 1b709f23fb jpeg2000: Refactor decode_packets
Move the packet-specific parsers in separate functions.
2015-09-14 14:31:25 +02:00
Luca Barbato 29b00f880f jpeg2000: Templatize the frame writer 2015-09-14 14:28:03 +02:00
Luca Barbato 41bcc3d152 jpeg2000: Split codeblock decoding from the main tile decoding
That loop is completely stand-alone.
2015-09-14 14:26:54 +02:00
Vittorio Giovara e60a6e7545 mpegvideo: Drop mpegvideo.h where not needed
Add necessary headers in .c files.
2015-09-13 17:34:46 +02:00
Vittorio Giovara 5d14cf1999 mpegvideo: Make sure mpegutils.h is included where needed 2015-09-13 17:34:45 +02:00
Vittorio Giovara 525f58977c mpegvideo: Move macros to more appropriate headers
MAX_MB_BYTES -> mpegutils.h
FRAME_SKIPPED -> mpegutils.h
INPLACE_OFFSET -> mpegutils.h
ME_MAP_SIZE -> motion_est.h
2015-09-13 17:34:45 +02:00
Vittorio Giovara 5b142a4d33 lavc: Keep idct integer option
"int" is useful in testing because provides accurate results across
different plaftforms, so remove it from the scheduled FF_API_UNUSED_MEMBERS
deprecation.
2015-09-13 17:34:45 +02:00
Hendrik Schreiber 1b2412f501 lavc: Fix compilation with --disable-everything --enable-parser=mpeg4video 2015-09-12 13:47:14 +02:00
Vittorio Giovara f00f6d538d lavc: Sanitize header inclusion guards
Fix typos, add missing comments, and remove stray lines.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-12 13:39:37 +02:00
Vittorio Giovara 6064f697a3 lavc: Enable side data only packets by default
Deprecate the now unused option, but temporarily retain the capability
to disable the now default behaviour.

Mention this change in the AVPacket documentation.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-12 13:38:31 +02:00
wm4 9940459720 mmaldec: fix pkt_dts determination
This also drops setting the frame->pts field. This is usually not set by
decoders, so this would be an inconsistency that's at worst a danger to
the API user.

It appears the buffer->dts field is normally not set by the MMAL
decoder, so don't use it. If it's ever going to be set by MMAL, we
don't know whether the value will be what we want.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:27:34 +02:00
wm4 87a051f976 lavc: allow asynchronous decoders to return correct pkt_dts values
The generic code in utils.c sets the AVFrame.pkt_dts field from the
packet it was supposedly decoded. This does not have to be true for a
fully asynchronous decoder like mmaldec. It could be overwritten with an
incorrect value. Even if the decoder doesn't determine the DTS (but sets
it to AV_NOPTS_VALUE), it's impossible to determine a correct value in
utils.c.

Decoders can now be marked with FF_CODEC_CAP_SETS_PKT_DTS, in which case
utils.c won't overwrite the field. The decoders are expected to set this
field (even if they only set it to AV_NOPTS_VALUE).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:27:19 +02:00
wm4 b7ab6e18ee mmaldec: disable timestamp interpolation
This MMAL feature fills in missing timestamps from the framerate set on
the input port. This is generally unwanted, since libavcodec decoders
merely pass through timestamps without ever "fixing" them. The framerate
is also unknown, and even the timebase doesn't have to be set.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:25:49 +02:00
wm4 6b652c0273 mmaldec: fix problems with flush logic
Don't try to do a blocking wait for MMAL output if we haven't even sent
a single real packet, but only flush packets. Obviously we can't expect
to get anything back.

Additionally, don't send a flush packet to MMAL in the same case. It
appears the MMAL decoder will sometimes hang in mmal_vc_port_disable()
(called from ffmmal_close_decoder()), waiting for a reply from the GPU
which never arrives. Either MMAL disallows sending flush packets without
preceding real data, or it's a MMAL bug.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:25:39 +02:00
wm4 b84675d63a mmaldec: hack against buffering problems on broken input
I can't come up with a nice way to handle this. It's hard to keep the
lock-stepped input/output in this case. You can't predict whether the
MMAL decoder will output a picture (because it's asynchronous), so
you have to assume in general that any packet could produce 0 or 1
frames. You can't continue to write input packets to the decoder,
because then you might get too many output frames, which you can't
get rid of because the lavc decoding API does not allow the decoder
to return an output frame without consuming an input frame (except
when flushing).

The ideal fix is a M:N decoding API (preferably asynchronous), which
would make this code potentially much cleaner. For now, this hack
will do.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:25:23 +02:00
Luca Barbato 5788623d29 jpeg2000: Split codeblock decoding from the main tile decoding
That loop is completely stand-alone.
2015-09-11 18:19:39 +02:00
Luca Barbato db53a2306f jpeg2000: Do not warn about known and skippable markers
Matches the openjpeg behaviour.
2015-09-11 18:19:01 +02:00
Luca Barbato 9b5a4a9cce mmvideo: Make sure the rle does not write over the frame boundaries
Bug-Id: 887
CC: libav-stable@libav.org
2015-09-11 18:19:00 +02:00
Vittorio Giovara 3b8e895237 codec_desc: Add missing DXV entry 2015-09-09 03:11:09 +02:00
Vittorio Giovara 2268db2cd0 lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields
The new fields can be accessed directly and are more intelligible.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-07 12:37:47 +02:00
Luca Barbato d0f7e4a57f dxtory: Unify and rework the decoding routines
Do not make many assumption on the dimension of the slices and just
try to decode additional lines if there is enough data left.

Decodes all the samples kindly provided by ultramage.
2015-09-06 14:16:38 +02:00
Henrik Gramner 3cdda78deb checkasm: add unit tests for v210enc
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-06 10:36:24 +02:00
Luca Barbato a7e6fbd90e dxtory: Factorize the buffer loading
And the checks nearby it.
2015-09-04 01:42:55 +02:00
Luca Barbato 6a6bc43f5f dxtory: Factorize slice size checks
They are always the same.
2015-09-04 01:42:55 +02:00
Michael Niedermayer db9fd1e9af fraps: increase vlc nb_bits
Sample-Id: fraps_bug_huff.avi
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-03 13:55:38 +02:00
Michael Niedermayer 741d353ab9 huffman: allow specifying nb_bits to ff_huff_build_tree()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-03 13:55:38 +02:00
Michael Niedermayer 26960aa1cd huffman: increase bits constant
Bug-ID: ffmpeg ticket 2593

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-03 13:55:38 +02:00
Michael Niedermayer 5a19bce2ff huffman: use a named identifer for the bits constant
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-03 13:55:38 +02:00
Luca Barbato 5a1a9da8a7 mpegvideo: Drop a stray error message
The condition is not a failure.
2015-09-03 13:39:34 +02:00
Vittorio Giovara c45fcf30cf DXV decoder
Support all DXDI and DXD3 normal quality videos.
2015-09-02 22:22:02 +02:00
Luca Barbato 0c7707610f lavc: Add a lzf decompressor
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-02 21:56:22 +02:00
Luca Barbato 4dc9f00365 build: Skip libvpx.h if libvpx is not enabled 2015-08-31 21:37:18 +02:00
Michael Niedermayer 87a11db220 dnxhddata: Double frame_size for cid 1260
Despite '417792' being reported in the binary decoder, the buffer at
encoding time needs to be bigger to avoid running out of space due to
interlace handling.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-08-31 17:14:08 +02:00
Vittorio Giovara b0d94324d2 libfdk-aacdec: Remove unused variable 2015-08-31 15:24:30 +02:00
Vittorio Giovara e88103a7f9 Bump major versions of all libraries
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-08-28 16:04:28 +02:00
Vittorio Giovara 4e649debcf Postpone API-incompatible changes until the next bump 2015-08-28 16:04:28 +02:00
Vittorio Giovara 8f12ef9860 lavu: Drop deprecated duplicated AVFrame/AVCodecContext parameters
Deprecated in 10/2012.
2015-08-28 16:04:27 +02:00
Vittorio Giovara cad40a3833 lavc: Drop deprecated deinterlace module
Deprecated in 03/2013.
2015-08-28 16:04:19 +02:00
Vittorio Giovara 069713aa4b lavc: Drop deprecated thread opaque and codec pkt
These fields were never part of the public API.
2015-08-28 16:01:17 +02:00
Vittorio Giovara 9f90b24877 lavc: Drop deprecated get_buffer related functions
Deprecated in 11/2012.
2015-08-28 16:01:16 +02:00
Vittorio Giovara 01bcc2d5c2 lavc: Drop deprecated destruct_packet related functions
Deprecated in 10/2012.
2015-08-28 16:01:16 +02:00
Vittorio Giovara dc70c19476 lavc: Drop deprecated request_channels related functions
Deprecated in 04/2011.
2015-08-28 16:01:16 +02:00
Luca Barbato 413d4e54a9 nvenc: Properly free the fifos
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-25 19:47:43 +02:00
Vittorio Giovara d68705c975 dnxhddata: Add tables for missing DNx100 profiles
1440x1080@8 progressive (1259) and interlaced (1260).

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-08-24 13:20:10 +02:00
Vittorio Giovara a4615572b5 dnxhddata: Merge a few duplicated RUN tables 2015-08-24 13:20:04 +02:00
Vittorio Giovara efbfb1ad11 dnxhddata: Group together RUN-related tables
This helps in finding duplicates.
2015-08-24 13:19:58 +02:00
Vittorio Giovara 403ea4ac72 dnxhddata: Merge a few duplicated DC tables 2015-08-24 13:19:43 +02:00
Vittorio Giovara 5e129ed655 dnxhddata: Group together DC-related tables
This helps in finding duplicates.
2015-08-24 13:19:36 +02:00
Vittorio Giovara d3ae4c6594 dnxhddata: List the reused tables in a comment 2015-08-24 13:19:28 +02:00
Vittorio Giovara fdd021884d dnxhddata: Keep a single CID in the table names
Use a comment to list the reused tables, since it's more flexible than a
table name to keep information like this. The list will expand in later
commits.
2015-08-24 13:19:06 +02:00
Luca Barbato d5eab59a53 aac: Make sure to set err on the failure path
Bug-Id: CID 1308153
2015-08-23 21:44:38 +02:00
Luca Barbato 167ea1fbf1 xavs: Do not try to set the bitrate tolerance without a bitrate
Avoid a division by zero.

Bug-Id: CID 1257655
2015-08-23 21:44:38 +02:00
Luca Barbato 61d8fa2a1a h264: Fix faulty call to avpriv_request_sample
Broken in f9ab4fe1f7
2015-08-22 01:42:19 +02:00
John Högberg f9ab4fe1f7 h264: Discard currently unsupported registered sei
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-21 12:03:36 +02:00
Luca Barbato 47b447aaff imgutils: Fix a typo in avcodec_get_pix_fmt_loss
If the candidate does not have alpha and the source does have alpha
report the loss of alpha.

CC: libav-stable@libav.org
2015-08-21 12:03:36 +02:00
Anton Khirnov d8ebb6157d hevcdsp: fix a function name
put_weighted_pred_avg should be put_unweighted_pred_avg, there is no
weighting there.
2015-08-21 08:46:05 +02:00
Anton Khirnov a1926a29fb hevc: avoid invalid shifts of negative values 2015-08-21 08:45:37 +02:00