summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAgeFilesLines
* lavc: AV-prefix a few left out capabilitiesVittorio Giovara2015-10-156-6/+6
|
* h264: Run VLC init under pthread_onceDerek Buitenhuis2015-10-142-1/+9
| | | | | | | This makes the h.264 decoder threadsafe to initialize. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dxva: Include last the internal headerLuca Barbato2015-10-144-4/+20
| | | | | It redefines _WIN32_WINNT, possibly causing problems with the w32pthreads.h header.
* mimic: drop AVPicture usagewm42015-10-141-17/+14
| | | | | | | Work on the AVFrame references directly. Instead of setting up a flipped/swapped "view" on the pictures, flip/swap them when returning decoded frames to the API user.
* libschroedinger: Properly use AVFrame APIVittorio Giovara2015-10-143-25/+28
| | | | | | | | Rather than copying data buffers around, allocate a proper frame, and use the standard AVFrame functions. This effectively makes the decoder capable of direct rendering. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* qtrle: Properly use AVFrame APIVittorio Giovara2015-10-141-8/+13
| | | | | | | Rather than copying data buffers around, just add a reference to the current frame. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avcodec: Do not lock during init if there is no init functionDerek Buitenhuis2015-10-131-2/+2
| | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* wrapped_avframe: Initial implementationLuca Barbato2015-10-106-1/+85
|
* libopenh264enc: Added max_nal_size optionMario Gasparoni2015-10-091-0/+28
| | | | | | Also added dynamic slice_mode option, needed for the max_nal_size. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* cabac: Make CABAC states hardcodedAnton Khirnov2015-10-085-111/+129
| | | | | | | There is not much reason to generate such a small table at runtime. Signed-off-by: Derek Buitenhuis <derekb@vimeo.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dcadec: reorganise context dataAlexandra Khirnova2015-10-072-159/+187
| | | | | | | | | place primary audio coding header data into DCAAudioHeader structure to make DCAContext clearer and move channel related data to DCAChan structure to make them easier to use by extensions Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* g2m: Relax resolution change constraintsVittorio Giovara2015-10-071-2/+1
| | | | | | | Do not fail when original resolution is smaller than current one, as the frame buffer is resized automatically. Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
* mmaldec: be more tolerant against MMAL not returning decoded outputwm42015-10-041-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | In some situations, MMAL won't return a decoded frame for certain input frames. This can happen if a frame fails to decode, or if a packet does not actually contain a complete frame. In these situations, we would deadlock (or actually timeout) waiting for an expected output frame, which is not ideal. On the other hand, there are situations where we definitely have to block to avoid deadlocks. (This mess is a consequence of trying to map MMAL's asynchronous and flexible dataflow to libavcodec, which is more static and rigid.) Solve this by doing a blocking wait only if the amount of buffered data is too big. The whole purpose of the blocking wait is to avoid excessive buffering of input data, so we can skip it if it appears to be low. The consequence is that libavcodec can gracefully return no frame to the API user. We want to track the number of full packets to make our heuristic work. But MMAL buffers are fixed-size, requiring splitting large packets. This is why the previous commit is needed. We use the ..._FRAME_END flag to remember packet boundaries, but MMAL does not preserve these buffer flags when returning buffers to the user. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mmaldec: refactor to have more context per MMAL input bufferwm42015-10-041-9/+10
| | | | | | | | | | | | | | The next commit needs 1 bit of additional information per MMAL buffer sent to the MMAL input port. This information will be needed when the buffer is recycled (i.e. returned by the input port's callback). Normally, we could use MMAL_BUFFER_HEADER_FLAG_USER0, but that is unexpectedly not preserved. Do this by storing a pointer to FFBufferEntry in the MMAL buffer's user data, instead of an AVBufferRef. This also changes the lifetime of FFBufferEntry. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avcodec: Do not lock during open for codecs marked as having threadsafe initDerek Buitenhuis2015-10-041-17/+21
| | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rangecoder: Use AV_RB16 instead of bytestream_get_be16Vittorio Giovara2015-10-041-2/+4
| | | | | | | | Silence an incompatible-pointer-types-discards-qualifiers warning from clang. rangecoder.c:58:34: warning: passing 'uint8_t **' (aka 'unsigned char **') to parameter of type 'const uint8_t **' (aka 'const unsigned char **') discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
* hevc: Simplify logical checkVittorio Giovara2015-10-041-1/+1
| | | | | | The intended meaning is "if this block is the first block in a slice then its left boundary is a slice boundary". Silence a logical-not-parentheses warning from gcc.
* h264: Use the correct argument context in debug logVittorio Giovara2015-10-041-1/+1
|
* h263: Drop uninitialized variable use from log messageVittorio Giovara2015-10-041-2/+2
|
* dvbsubdec: Fix function return typeVittorio Giovara2015-10-041-1/+2
|
* dv: Mark internal frame reference as constVittorio Giovara2015-10-042-7/+8
| | | | | | Silence a warning due to frame assignment in dvenc. All uses of the reference in dvdec are read only, except the ones in the main decoding function, so use the frame pointer directly there.
* dcadec: Always initialize return variableVittorio Giovara2015-10-041-1/+1
| | | | Silence an uninitialized warning from clang.
* d3d11va: make av_d3d11va_alloc_context() available at all timesAnton Khirnov2015-10-032-1/+12
| | | | The public API should not depend on the build configuration.
* d3d11va: check for malloc failureAnton Khirnov2015-10-031-0/+5
|
* dnxhddata: Deduplicate cid 1256 chroma tableChristophe Gisquet2015-10-021-12/+2
| | | | | | | | | | 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>
* dnxhddata: Deduplicate dnx100 tablesJeremy James2015-10-021-48/+7
| | | | | | | 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>
* dnxhddata: Fix cid 1260 luma and chroma tablesJeremy James2015-10-021-16/+16
| | | | | | These table was not zigzagged when added. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* dnxhddata: Fix 10-bit DNxHD quant matricesJoseph Artsimovich2015-10-021-32/+34
| | | | | | | | | | | | 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>
* x264: Add option to force IDR framesDerek Buitenhuis2015-10-011-5/+18
| | | | | | | 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.
* x264: Expose the NV21 input supportYu Xiaolei2015-10-011-0/+6
| | | | | | | | | 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>
* dcadec: make a number of samples per subband per subsubframe a named constantAlexandra Khirnova2015-10-011-19/+21
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Screenpresso SPV1 decoderVittorio Giovara2015-09-306-1/+197
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavu: Deprecate AVFrame.error[]Vittorio Giovara2015-09-303-9/+20
| | | | | | | | | | | 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>
* dnxhddec: Enable frame threadingVittorio Giovara2015-09-291-8/+11
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* dnxhddec: Decode and use interlace mb flagChristophe Gisquet2015-09-291-4/+19
| | | | | | | | | | | | | | | | | | | | 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>
* lavc: Simplify checking quant bias optionVittorio Giovara2015-09-292-6/+3
|
* motion_est_template: Fix undefined left shift of negative numberGanesh Ajjanagadde2015-09-291-1/+2
| | | | | | This fixes a -Wshift-negative-value warning reported with clang 3.7+. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* mlpdec: Fix a undefined left shift of negative numberGanesh Ajjanagadde2015-09-291-1/+1
| | | | | | This fixes a -Wshift-negative-value warning reported with clang 3.7+. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavc: Make AVPacket.duration int64, and deprecate convergence_durationwm42015-09-296-33/+33
| | | | | | | | | 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>
* libopenh264enc: Use av_log() to log messagesGregory J. Wolfe2015-09-291-0/+38
| | | | | | | | | | | | | | 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>
* qsvdec: make ff_qsv_decode_init() staticAnton Khirnov2015-09-282-4/+2
| | | | It is not used outside of qsvdec.c anymore.
* qsvdec: close the MFX decoder on uninitAnton Khirnov2015-09-281-0/+3
|
* qsv: document AVQSVContext membersAnton Khirnov2015-09-281-0/+19
|
* qsvenc: mark the encoders as INIT_CLEANUPAnton Khirnov2015-09-283-0/+3
| | | | Should fix some leaks on init failure.
* qsvenc: do not try to close the encoder if the session is NULLAnton Khirnov2015-09-281-1/+2
|
* qsvdec: list supported pixel formatsAnton Khirnov2015-09-282-0/+9
| | | | This is useful for detecting QSV-enabled decoders.
* vdpau: fix constrained baseline fallbackwm42015-09-281-2/+1
| | | | | | | | 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>
* lavc: reimplement avcodec_get_type() using codec descriptorswm42015-09-282-14/+6
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* vdpau: deprecate av_vdpau_get_profile()Rémi Denis-Courmont2015-09-282-0/+8
| | | | | | | | 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>
* dxv: Improve error messageVittorio Giovara2015-09-241-1/+2
|