FFmpeg
Macros | Functions | Variables
amfenc_av1.c File Reference
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "amfenc.h"
#include "codec_internal.h"

Go to the source code of this file.

Macros

#define AMF_VIDEO_ENCODER_AV1_CAP_WIDTH_ALIGNMENT_FACTOR_LOCAL   L"Av1WidthAlignmentFactor"
 
#define AMF_VIDEO_ENCODER_AV1_CAP_HEIGHT_ALIGNMENT_FACTOR_LOCAL   L"Av1HeightAlignmentFactor"
 
#define OFFSET(x)   offsetof(AmfContext, x)
 
#define VE   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static av_cold int amf_encode_init_av1 (AVCodecContext *avctx)
 

Variables

static const AVOption options []
 
static const FFCodecDefault defaults []
 
static const AVClass av1_amf_class
 
const FFCodec ff_av1_amf_encoder
 

Macro Definition Documentation

◆ AMF_VIDEO_ENCODER_AV1_CAP_WIDTH_ALIGNMENT_FACTOR_LOCAL

#define AMF_VIDEO_ENCODER_AV1_CAP_WIDTH_ALIGNMENT_FACTOR_LOCAL   L"Av1WidthAlignmentFactor"

Definition at line 26 of file amfenc_av1.c.

◆ AMF_VIDEO_ENCODER_AV1_CAP_HEIGHT_ALIGNMENT_FACTOR_LOCAL

#define AMF_VIDEO_ENCODER_AV1_CAP_HEIGHT_ALIGNMENT_FACTOR_LOCAL   L"Av1HeightAlignmentFactor"

Definition at line 27 of file amfenc_av1.c.

◆ OFFSET

#define OFFSET (   x)    offsetof(AmfContext, x)

Definition at line 29 of file amfenc_av1.c.

◆ VE

Definition at line 30 of file amfenc_av1.c.

Function Documentation

◆ amf_encode_init_av1()

static av_cold int amf_encode_init_av1 ( AVCodecContext avctx)
static

Color profile

Color Depth

Color Transfer Characteristics (AMF matches ISO/IEC)

Color Primaries (AMF matches ISO/IEC)

Definition at line 186 of file amfenc_av1.c.

Variable Documentation

◆ options

const AVOption options[]
static

Definition at line 31 of file amfenc_av1.c.

◆ defaults

const FFCodecDefault defaults[]
static
Initial value:
= {
{ "refs", "-1" },
{ "aspect", "0" },
{ "b", "0" },
{ "g", "-1" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ NULL },
}

Definition at line 671 of file amfenc_av1.c.

◆ av1_amf_class

const AVClass av1_amf_class
static
Initial value:
= {
.class_name = "av1_amf",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 681 of file amfenc_av1.c.

◆ ff_av1_amf_encoder

const FFCodec ff_av1_amf_encoder
Initial value:
= {
.p.name = "av1_amf",
CODEC_LONG_NAME("AMD AMF AV1 encoder"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_AV1,
.priv_data_size = sizeof(AmfContext),
.p.priv_class = &av1_amf_class,
.defaults = defaults,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.pix_fmts = ff_amf_pix_fmts,
.color_ranges = AVCOL_RANGE_MPEG,
.p.wrapper_name = "amf",
.hw_configs = ff_amfenc_hw_configs,
}

Definition at line 688 of file amfenc_av1.c.

FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:43
defaults
static const FFCodecDefault defaults[]
Definition: amfenc_av1.c:671
AV_CODEC_CAP_HARDWARE
#define AV_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
Definition: codec.h:145
ff_amf_encode_close
int av_cold ff_amf_encode_close(AVCodecContext *avctx)
Common encoder termination function.
Definition: amfenc.c:433
options
static const AVOption options[]
Definition: amfenc_av1.c:31
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
amf_encode_init_av1
static av_cold int amf_encode_init_av1(AVCodecContext *avctx)
Definition: amfenc_av1.c:186
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
AV_CODEC_ID_AV1
@ AV_CODEC_ID_AV1
Definition: codec_id.h:284
FF_CODEC_RECEIVE_PACKET_CB
#define FF_CODEC_RECEIVE_PACKET_CB(func)
Definition: codec_internal.h:326
ff_amf_receive_packet
int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
Ecoding one frame - common function for all AMF encoders.
Definition: amfenc.c:643
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
ff_amf_pix_fmts
enum AVPixelFormat ff_amf_pix_fmts[]
Supported formats.
Definition: amfenc.c:105
ff_amfenc_hw_configs
const AVCodecHWConfigInternal *const ff_amfenc_hw_configs[]
Definition: amfenc.c:969
AVCOL_RANGE_MPEG
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
Definition: pixfmt.h:700
av1_amf_class
static const AVClass av1_amf_class
Definition: amfenc_av1.c:681
AV_CODEC_CAP_DELAY
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: codec.h:76
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AmfContext
AMF encoder context.
Definition: amfenc.h:50