FFmpeg
Loading...
Searching...
No Matches
vbnenc.c File Reference

Vizrt Binary Image encoder. More...

#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)
 
#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)
Value:
offsetof(VBNContext, x)

Definition at line 136 of file vbnenc.c.

◆ FLAGS

Definition at line 137 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 129 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, .unit = "format" },
{ "raw", "RAW texture", 0, AV_OPT_TYPE_CONST, { .i64 = VBN_FORMAT_RAW }, 0, 0, FLAGS, .unit = "format" },
{ "dxt1", "DXT1 texture", 0, AV_OPT_TYPE_CONST, { .i64 = VBN_FORMAT_DXT1 }, 0, 0, FLAGS, .unit = "format" },
{ "dxt5", "DXT5 texture", 0, AV_OPT_TYPE_CONST, { .i64 = VBN_FORMAT_DXT5 }, 0, 0, FLAGS, .unit = "format" },
{ NULL },
}
static const char *const format[]
Definition af_aiir.c:444
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
#define VBN_FORMAT_RAW
Definition vbn.h:35
#define VBN_FORMAT_DXT1
Definition vbn.h:37
#define VBN_FORMAT_DXT5
Definition vbn.h:38

Definition at line 138 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,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85

Definition at line 146 of file vbnenc.c.

◆ ff_vbn_encoder

const FFCodec ff_vbn_encoder
Initial value:
= {
.p.name = "vbn",
CODEC_LONG_NAME("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),
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}
#define CODEC_PIXFMTS(...)
#define FF_CODEC_ENCODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition codec.h:147
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition codec.h:102
@ AV_CODEC_ID_VBN
Definition codec_id.h:307
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition pixfmt.h:75
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition pixfmt.h:100
static av_cold int vbn_init(AVCodecContext *avctx)
Definition vbndec.c:40
static const AVClass vbnenc_class
Definition vbnenc.c:146
static int vbn_encode(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition vbnenc.c:44

Definition at line 153 of file vbnenc.c.