FFmpeg
Data Structures | Macros | Functions | Variables
libkvazaar.c File Reference
#include <kvazaar.h>
#include <stdint.h>
#include <string.h>
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/dict.h"
#include "libavutil/error.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#include "packet_internal.h"

Go to the source code of this file.

Data Structures

struct  LibkvazaarContext
 

Macros

#define OFFSET(x)   offsetof(LibkvazaarContext, x)
 
#define VE   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static av_cold int libkvazaar_init (AVCodecContext *avctx)
 
static av_cold int libkvazaar_close (AVCodecContext *avctx)
 
static int libkvazaar_encode (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 

Variables

static enum AVPixelFormat pix_fmts []
 
static const AVOption options []
 
class {
      class_name = "libkvazaar"
 
      item_name = av_default_item_name
 
      option = options
 
      version = LIBAVUTIL_VERSION_INT
 
}; 
 
static const AVCodecDefault defaults []
 
AVCodec ff_libkvazaar_encoder
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 314 of file libkvazaar.c.

◆ VE

Definition at line 315 of file libkvazaar.c.

Function Documentation

◆ libkvazaar_init()

static av_cold int libkvazaar_init ( AVCodecContext avctx)
static

Definition at line 52 of file libkvazaar.c.

◆ libkvazaar_close()

static av_cold int libkvazaar_close ( AVCodecContext avctx)
static

Definition at line 150 of file libkvazaar.c.

◆ libkvazaar_encode()

static int libkvazaar_encode ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int got_packet_ptr 
)
static

Definition at line 165 of file libkvazaar.c.

Variable Documentation

◆ pix_fmts

enum AVPixelFormat pix_fmts[]
static

◆ options

const AVOption options[]
static
Initial value:
= {
{ "kvazaar-params", "Set kvazaar parameters as a comma-separated list of key=value pairs.",
OFFSET(kvz_params), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, VE },
{ NULL },
}

Definition at line 316 of file libkvazaar.c.

◆ class_name

class_name = "libkvazaar"
private

Definition at line 323 of file libkvazaar.c.

Referenced by av_opt_show2().

◆ item_name

item_name = av_default_item_name
private

Definition at line 324 of file libkvazaar.c.

◆ option

option = options
private

◆ version

version = LIBAVUTIL_VERSION_INT
private

Definition at line 326 of file libkvazaar.c.

Referenced by adpcm_compress_trellis(), aiff_read_header(), amf_parse_object(), ape_probe(), atrac3_decode_init(), atrac9_decode_init(), cbs_h2645_split_fragment(), celt_header(), check_file_header(), cine_read_header(), codec2_read_header(), decklink_create_iterator(), decode_frame(), decode_frame_header(), decode_header(), decode_init(), dfa_decode_frame(), dfa_read_header(), do_apply_filter(), drm_device_create(), dss_read_header(), dvbsub_parse_clut_segment(), dvbsub_parse_page_segment(), dvbsub_parse_region_segment(), dwa_uncompress(), ff_dnn_load_model_native(), ff_hls_write_playlist_header(), ff_hls_write_playlist_version(), ff_mss12_decode_init(), ff_opus_parse_extradata(), ff_rac_terminate(), ff_vk_init_shader(), ff_wma_get_frame_len_bits(), ff_wma_run_level_decode(), fsb_read_header(), fwse_read_header(), get_aiff_header(), get_packet_header(), hca_read_header(), id3v2_parse(), iff_read_header(), ilog2(), init(), libcelt_dec_init(), magy_decode_frame(), main(), mkv_write_header(), mov_cenc_write_saio_tag(), mov_parse_stsd_audio(), mov_read_chpl(), mov_read_coll(), mov_read_elst(), mov_read_mdhd(), mov_read_mvhd(), mov_read_pssh(), mov_read_saio(), mov_read_sbgp(), mov_read_sidx(), mov_read_smdm(), mov_read_sv3d(), mov_read_tenc(), mov_read_tfdt(), mov_read_tkhd(), mov_read_vpcc(), mov_write_audio_tag(), mov_write_edts_tag(), mov_write_mdhd_tag(), mov_write_mvhd_tag(), mov_write_tkhd_tag(), mp3_parse_info_tag(), mpegts_write_section1(), musx_probe(), musx_read_header(), mv_read_header(), mxf_write_identification(), ogg_read_page(), opengl_read_limits(), parse_decoder_init(), parse_psfile(), pixlet_decode_frame(), process_line(), rac_check_termination(), read_header(), read_tfra(), rm_read_audio_stream_info(), rsd_read_header(), shn_probe(), slicecontext_init(), smjpeg_read_header(), spdif_header_mpeg(), swf_write_header(), txd_decode_frame(), update_av_program_info(), vble_decode_frame(), voc_probe(), voc_write_header(), vp9_encode_set_roi(), wsd_read_header(), and xwd_decode_frame().

◆ @79

const { ... }

◆ defaults

const AVCodecDefault defaults[]
static
Initial value:
= {
{ "b", "0" },
{ NULL },
}

Definition at line 329 of file libkvazaar.c.

◆ ff_libkvazaar_encoder

AVCodec ff_libkvazaar_encoder
Initial value:
= {
.name = "libkvazaar",
.long_name = NULL_IF_CONFIG_SMALL("libkvazaar H.265 / HEVC"),
.pix_fmts = pix_fmts,
.priv_class = &class,
.priv_data_size = sizeof(LibkvazaarContext),
.encode2 = libkvazaar_encode,
.close = libkvazaar_close,
.wrapper_name = "libkvazaar",
}

Definition at line 334 of file libkvazaar.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:41
LibkvazaarContext
Definition: libkvazaar.c:42
OFFSET
#define OFFSET(x)
Definition: libkvazaar.c:314
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
libkvazaar_init
static av_cold int libkvazaar_init(AVCodecContext *avctx)
Definition: libkvazaar.c:52
AV_CODEC_CAP_OTHER_THREADS
#define AV_CODEC_CAP_OTHER_THREADS
Codec supports multithreading through a method other than slice- or frame-level multithreading.
Definition: codec.h:122
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:309
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
NULL
#define NULL
Definition: coverity.c:32
FF_CODEC_CAP_AUTO_THREADS
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
Definition: internal.h:80
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
VE
#define VE
Definition: libkvazaar.c:315
defaults
static const AVCodecDefault defaults[]
Definition: libkvazaar.c:329
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: internal.h:49
AV_CODEC_ID_HEVC
@ AV_CODEC_ID_HEVC
Definition: codec_id.h:223
libkvazaar_close
static av_cold int libkvazaar_close(AVCodecContext *avctx)
Definition: libkvazaar.c:150
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
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:77
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:229
libkvazaar_encode
static int libkvazaar_encode(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: libkvazaar.c:165