summaryrefslogtreecommitdiffstats
path: root/libavcodec/videotoolbox.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/h264, videotoolbox: do not return invalid frames on failurewm42015-11-201-0/+2
| | | | | | | | | | | | If videotoolbox_common_end_frame failed, then the AVFrame was returned to the API user with the dummy buffer (in AVFrame.buf[0]) still set, and the decode call indicating success. These "half-set" AVFrames with dummy buffer are a videotoolbox specific hack, because the decoder requires an allocated AVFrame for its internal logic. Videotoolbox on the other hand allocates its frame itself internally, and outputs it only on end_frame. At this point, the dummy buffer is replaced with the real frame (unless decoding fails).
* avcodec/videotoolbox: fix decoding of some h264 bitstreamswm42015-10-021-18/+30
| | | | | | | | | | | | | | | This affects Annex B streams (such as demuxed from .ts and others). It also handles the format change in reinit-large_420_8-to-small_420_8.h264 correctly. Instead of passing through the extradata, create it on the fly it from the currently active SPS and PPS. Since reconstructing the PPS and SPS NALs would be very complicated and verbose, we use the NALs as they originally appeared in the bitstream. The code for writing the extradata is somewhat derived from libavformat/avc.c, but it's small and different enough that sharing it is not really worth it.
* videotoolbox: require hardware accelerationStefano Pigozzi2015-09-291-3/+3
| | | | | | | | | VideoToolbox also implements a software decoder for h264, and will fallback to using it if the file cannot be decoded on the GPU. In these cases though, we want the hwaccel to fail so that we can use the libavcodec software decoder instead of the Apple one. Signed-off-by: wm4 <nfxjfg@googlemail.com>
* avcodec/videotoolbox: fix -Wunused-but-set-variableGanesh Ajjanagadde2015-09-291-3/+0
| | | | | | | | | | | | pix_fmt was declared presumably to shorten the argument passed to the function. However, it is currently not being used for such a purpose. This patch simply removes it instead. This fixes -Wunused-but-set-variable reported at e.g: http://fate.ffmpeg.org/log.cgi?time=20150919194249&log=compile&slot=x86_64-darwin-gcc-4.9. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/videotoolbox: Add missing AV_ prefix to CODEC_ID in commentMichael Niedermayer2015-08-031-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/videotoolbox: Fix bistream typoMichael Niedermayer2015-08-031-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: add new Videotoolbox hwaccel.Sebastien Zwickert2015-08-031-0/+690
OpenPOWER on IntegriCloud