#include "config.h"
#include "videotoolbox.h"
#include "libavutil/hwcontext_videotoolbox.h"
#include "vt_internal.h"
#include "libavutil/avutil.h"
#include "libavutil/hwcontext.h"
#include "libavutil/pixdesc.h"
#include "bytestream.h"
#include "decode.h"
#include "h264dec.h"
#include "hevcdec.h"
#include "mpegvideo.h"
#include <TargetConditionals.h>
Go to the source code of this file.
|
static void | videotoolbox_buffer_release (void *opaque, uint8_t *data) |
|
static int | videotoolbox_buffer_copy (VTContext *vtctx, const uint8_t *buffer, uint32_t size) |
|
static int | videotoolbox_postproc_frame (void *avctx, AVFrame *frame) |
|
int | ff_videotoolbox_alloc_frame (AVCodecContext *avctx, AVFrame *frame) |
|
CFDataRef | ff_videotoolbox_avcc_extradata_create (AVCodecContext *avctx) |
|
CFDataRef | ff_videotoolbox_hvcc_extradata_create (AVCodecContext *avctx) |
|
int | ff_videotoolbox_h264_start_frame (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) |
|
static int | videotoolbox_h264_decode_params (AVCodecContext *avctx, int type, const uint8_t *buffer, uint32_t size) |
|
static int | videotoolbox_common_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) |
|
int | ff_videotoolbox_h264_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) |
|
int | ff_videotoolbox_uninit (AVCodecContext *avctx) |
|
◆ kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder
#define kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder CFSTR("RequireHardwareAcceleratedVideoDecoder") |
◆ kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder
#define kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder CFSTR("EnableHardwareAcceleratedVideoDecoder") |
◆ VIDEOTOOLBOX_ESDS_EXTRADATA_PADDING
#define VIDEOTOOLBOX_ESDS_EXTRADATA_PADDING 12 |
◆ AV_W8
#define AV_W8 |
( |
|
p, |
|
|
|
v |
|
) |
| *(p) = (v) |
◆ COUNT_SIZE_PS
#define COUNT_SIZE_PS |
( |
|
T, |
|
|
|
t |
|
) |
| |
Value: for (
i = 0;
i < HEVC_MAX_##
T##PS_COUNT;
i++) { \
if (
h->ps.t##ps_list[
i]) { \
const HEVC##
T##PS *lps = (
const HEVC##
T##PS *)
h->ps.t##ps_list[
i]->data; \
vt_extradata_size += 2 + lps->data_size; \
num_##t##ps++; \
} \
}
◆ APPEND_PS
#define APPEND_PS |
( |
|
T, |
|
|
|
t |
|
) |
| |
Value:
\
AV_W8(p, 1 << 7 | \
HEVC_NAL_##
T##PS & 0x3f); \
\
AV_WB16(p + 1, num_##t##ps); \
p += 3; \
for (
i = 0;
i < HEVC_MAX_##
T##PS_COUNT;
i++) { \
if (
h->ps.t##ps_list[
i]) { \
const HEVC##
T##PS *lps = (
const HEVC##
T##PS *)
h->ps.t##ps_list[
i]->data; \
\
\
memcpy(p + 2, lps->data, lps->data_size); \
p += 2 + lps->data_size; \
} \
}
◆ anonymous enum
◆ videotoolbox_buffer_release()
static void videotoolbox_buffer_release |
( |
void * |
opaque, |
|
|
uint8_t * |
data |
|
) |
| |
|
static |
◆ videotoolbox_buffer_copy()
static int videotoolbox_buffer_copy |
( |
VTContext * |
vtctx, |
|
|
const uint8_t * |
buffer, |
|
|
uint32_t |
size |
|
) |
| |
|
static |
◆ videotoolbox_postproc_frame()
static int videotoolbox_postproc_frame |
( |
void * |
avctx, |
|
|
AVFrame * |
frame |
|
) |
| |
|
static |
◆ ff_videotoolbox_alloc_frame()
◆ ff_videotoolbox_avcc_extradata_create()
CFDataRef ff_videotoolbox_avcc_extradata_create |
( |
AVCodecContext * |
avctx | ) |
|
◆ ff_videotoolbox_hvcc_extradata_create()
CFDataRef ff_videotoolbox_hvcc_extradata_create |
( |
AVCodecContext * |
avctx | ) |
|
◆ ff_videotoolbox_h264_start_frame()
◆ videotoolbox_h264_decode_params()
◆ videotoolbox_common_decode_slice()
◆ ff_videotoolbox_h264_decode_slice()
◆ ff_videotoolbox_uninit()