FFmpeg
Data Structures | Macros | Functions | Variables
vbnenc.c File Reference
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.h"
#include "texturedsp.h"
#include "vbn.h"
#include "libavutil/imgutils.h"
#include "libavutil/frame.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  VBNContext
 

Macros

#define OFFSET(x)   offsetof(VBNContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int vbn_encode (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
 
static av_cold int vbn_init (AVCodecContext *avctx)
 

Variables

static const AVOption options []
 
static const AVClass vbnenc_class
 
const FFCodec ff_vbn_encoder
 

Detailed Description

Vizrt Binary Image encoder

Definition in file vbnenc.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 134 of file vbnenc.c.

◆ FLAGS

Definition at line 135 of file vbnenc.c.

Function Documentation

◆ vbn_encode()

static int vbn_encode ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame frame,
int got_packet 
)
static

Definition at line 44 of file vbnenc.c.

◆ vbn_init()

static av_cold int vbn_init ( AVCodecContext avctx)
static

Definition at line 127 of file vbnenc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "format", "Texture format", OFFSET(format), AV_OPT_TYPE_INT, { .i64 = VBN_FORMAT_DXT5 }, VBN_FORMAT_RAW, VBN_FORMAT_DXT5, FLAGS, "format" },
{ "raw", "RAW texture", 0, AV_OPT_TYPE_CONST, { .i64 = VBN_FORMAT_RAW }, 0, 0, FLAGS, "format" },
{ "dxt1", "DXT1 texture", 0, AV_OPT_TYPE_CONST, { .i64 = VBN_FORMAT_DXT1 }, 0, 0, FLAGS, "format" },
{ "dxt5", "DXT5 texture", 0, AV_OPT_TYPE_CONST, { .i64 = VBN_FORMAT_DXT5 }, 0, 0, FLAGS, "format" },
{ NULL },
}

Definition at line 136 of file vbnenc.c.

◆ vbnenc_class

const AVClass vbnenc_class
static
Initial value:
= {
.class_name = "VBN encoder",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 144 of file vbnenc.c.

◆ ff_vbn_encoder

const FFCodec ff_vbn_encoder
Initial value:
= {
.p.name = "vbn",
.p.long_name = NULL_IF_CONFIG_SMALL("Vizrt Binary Image"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_VBN,
.p.priv_class = &vbnenc_class,
.init = vbn_init,
.priv_data_size = sizeof(VBNContext),
.p.pix_fmts = (const enum AVPixelFormat[]) {
},
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
}

Definition at line 151 of file vbnenc.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
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:39
OFFSET
#define OFFSET(x)
Definition: vbnenc.c:134
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:263
vbn_encode
static int vbn_encode(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: vbnenc.c:44
format
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate. The lists are not just lists
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:93
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_PIX_FMT_RGB24
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:68
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
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
VBNContext
Definition: vbndec.c:34
VBN_FORMAT_RAW
#define VBN_FORMAT_RAW
Definition: vbn.h:35
AV_CODEC_CAP_SLICE_THREADS
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: codec.h:117
FLAGS
#define FLAGS
Definition: vbnenc.c:135
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: codec_internal.h:31
VBN_FORMAT_DXT5
#define VBN_FORMAT_DXT5
Definition: vbn.h:38
options
static const AVOption options[]
Definition: vbnenc.c:136
AV_CODEC_ID_VBN
@ AV_CODEC_ID_VBN
Definition: codec_id.h:311
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
vbn_init
static av_cold int vbn_init(AVCodecContext *avctx)
Definition: vbnenc.c:127
VBN_FORMAT_DXT1
#define VBN_FORMAT_DXT1
Definition: vbn.h:37
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:234
vbnenc_class
static const AVClass vbnenc_class
Definition: vbnenc.c:144