aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/videotoolboxenc.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc/videotoolboxenc: remove unnecessary loggingRick Kern2016-06-161-6/+0
| | | | Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: set extradata when opening codecRick Kern2016-06-111-85/+241
| | | | | | | | VideoToolbox doesn't supply parameter sets until the first frame is done encoding. This spins up a temporary encoder and encodes a single frame to get this data. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: fix allocated buffer sizeRick Kern2016-06-111-129/+94
| | | | | | | Allocates a buffer with padding, and with enough room for start codes when length codes are smaller. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Set colorimetry valuesRick Kern2016-05-041-0/+209
| | | | Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Support pixel aspect ratioRick Kern2016-05-041-0/+63
| | | | Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Support for forced I-framesRick Kern2016-05-041-1/+25
| | | | | | Setting AVFrame.pic_type to AV_PICTURE_TYPE_I will force an I-frame. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: add concatentation propertiesRick Kern2016-05-041-0/+31
| | | | | | | | Add frames_before and frames_after as hints that there will be frames before or after the frames produced in this session. This may help with concatenation issues like bit rate spikes. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Add realtime encoding propertyRick Kern2016-05-041-0/+14
| | | | | | | Hint to the encoder that encoding should be done in real-time, even at the expense of quality. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Handle out-of-memory and fix memory leakRick Kern2016-05-041-0/+5
| | | | Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Fix DTSRick Kern2016-05-041-0/+9
| | | | | | | Some devices output an invalid DTS when B-frames aren't used. Using PTS for the DTS in this case. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Fix AVCodecContext.has_b_frames usage.Rick Kern2016-05-041-1/+14
| | | | | | Now set by the encoder, not used as an input parameter. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Add entropy settingRick Kern2016-05-041-0/+33
| | | | | | Add an entropy setting to choose between CAVLC and CABAC. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Require hardware encodingRick Kern2016-05-041-21/+17
| | | | | | Software encoding can be allowed by setting allow_sw to 1. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Handle hwaccel format as inputRick Kern2016-05-041-5/+21
| | | | | | | | Handle AV_PIX_FMT_VIDEOTOOLBOX. This results in better energy usage and faster encoding, especially on iOS. When the buffer comes from the media server, no memcpy's are needed. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Use shared pixel buffer poolRick Kern2016-05-041-44/+160
| | | | | | This reduces the chance of a memcpy in the media server. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/videotoolboxenc: Workaround encoder errorRick Kern2016-04-021-11/+32
| | | | | | | | CMVideoFormatDescriptionGetH264ParameterSetAtIndex() fails on some hardware/OS versions when retrieving the parameter set count alone. Signed-off-by: Rick Kern <kernrj@gmail.com> Signed-off-by: wm4 <nfxjfg@googlemail.com>
* lavc/videotoolboxenc: Fix crash when closing codec after errorRick Kern2016-04-021-1/+0
| | | | | | | | | | Fixes crash in #5352. VTCompressionSessionInvalidate() crashes if the internal encoder hasn't completed, but hasn't experienced an error. The function call isn't needed since the encoder is invalidated when the reference count reaches 0 anyway. Signed-off-by: Rick Kern <kernrj@gmail.com> Signed-off-by: wm4 <nfxjfg@googlemail.com>
* lavc/videotoolboxenc: remove *_NULLABLE annotations; fixes pre-10.11 buildRodger Combs2016-03-021-7/+7
| | | | | | | These macros were added in OS X 10.11, and the file compiles without warnings on both 10.10 and 10.11 with them removed. Thanks to mark4o on IRC for pointing out the failure and testing the patch.
* lavc: add VideoToolbox H.264 EncoderRick Kern2016-03-021-0/+1339
Autodetected by default. Encode using -codec:v h264_videotoolbox. Signed-off-by: Rick Kern <kernrj@gmail.com> Signed-off-by: wm4 <nfxjfg@googlemail.com>