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 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 },
}

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,
}

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),
.p.pix_fmts = (const enum AVPixelFormat[]) {
},
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 153 of file vbnenc.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
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
OFFSET
#define OFFSET(x)
Definition: vbnenc.c:136
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:320
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_CODEC_CAP_ENCODER_REORDERED_OPAQUE
#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:159
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:100
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:75
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
VBNContext
Definition: vbndec.c:35
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:114
FLAGS
#define FLAGS
Definition: vbnenc.c:137
VBN_FORMAT_DXT5
#define VBN_FORMAT_DXT5
Definition: vbn.h:38
options
static const AVOption options[]
Definition: vbnenc.c:138
AV_CODEC_ID_VBN
@ AV_CODEC_ID_VBN
Definition: codec_id.h:312
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
vbn_init
static av_cold int vbn_init(AVCodecContext *avctx)
Definition: vbnenc.c:129
VBN_FORMAT_DXT1
#define VBN_FORMAT_DXT1
Definition: vbn.h:37
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299
vbnenc_class
static const AVClass vbnenc_class
Definition: vbnenc.c:146