FFmpeg
Data Structures | Macros | Functions | Variables
libsvtjpegxsenc.c File Reference
#include <SvtJpegxsEnc.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/imgutils.h"
#include "libavutil/rational.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"
#include "profiles.h"

Go to the source code of this file.

Data Structures

struct  SvtJpegXsEncodeContext
 

Macros

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

Functions

static int svt_jpegxs_enc_encode (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
 
static av_cold int svt_jpegxs_enc_free (AVCodecContext *avctx)
 
static void set_pix_fmt (AVCodecContext *avctx, svt_jpeg_xs_encoder_api_t *encoder)
 
static av_cold int svt_jpegxs_enc_init (AVCodecContext *avctx)
 

Variables

static enum AVPixelFormat pix_fmts []
 
static const FFCodecDefault svt_jpegxs_defaults []
 
static const AVOption svtjpegxs_enc_options []
 
static const AVClass svtjpegxs_enc_class
 
const FFCodec ff_libsvtjpegxs_encoder
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 260 of file libsvtjpegxsenc.c.

◆ VE

Definition at line 261 of file libsvtjpegxsenc.c.

Function Documentation

◆ svt_jpegxs_enc_encode()

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

Definition at line 53 of file libsvtjpegxsenc.c.

◆ svt_jpegxs_enc_free()

static av_cold int svt_jpegxs_enc_free ( AVCodecContext avctx)
static

Definition at line 107 of file libsvtjpegxsenc.c.

◆ set_pix_fmt()

static void set_pix_fmt ( AVCodecContext avctx,
svt_jpeg_xs_encoder_api_t *  encoder 
)
static

Definition at line 115 of file libsvtjpegxsenc.c.

Referenced by svt_jpegxs_enc_init().

◆ svt_jpegxs_enc_init()

static av_cold int svt_jpegxs_enc_init ( AVCodecContext avctx)
static

Definition at line 172 of file libsvtjpegxsenc.c.

Variable Documentation

◆ pix_fmts

enum AVPixelFormat pix_fmts[]
static

◆ svt_jpegxs_defaults

const FFCodecDefault svt_jpegxs_defaults[]
static
Initial value:
= {
{ "b", "0" },
{ NULL },
}

Definition at line 255 of file libsvtjpegxsenc.c.

◆ svtjpegxs_enc_options

const AVOption svtjpegxs_enc_options[]
static
Initial value:
= {
{ "decomp_v", "vertical decomposition level", OFFSET(decomp_v), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 2, VE },
{ "decomp_h", "horizontal decomposition level", OFFSET(decomp_h), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 5, VE },
{ "quantization", "Quantization algorithm", OFFSET(quant), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 1, VE, .unit = "quantization" },
{ "deadzone", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0}, INT_MIN, INT_MAX, VE, .unit = "quantization" },
{ "uniform", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1}, INT_MIN, INT_MAX, VE, .unit = "quantization" },
{ "coding-signs", "Enable Signs handling strategy", OFFSET(coding_signs_handling), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 2, VE, .unit = "coding-signs" },
{ "disable", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0}, INT_MIN, INT_MAX, VE, .unit = "coding-signs" },
{ "fast", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1}, INT_MIN, INT_MAX, VE, .unit = "coding-signs" },
{ "full", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 2}, INT_MIN, INT_MAX, VE, .unit = "coding-signs" },
{ "coding-sigf", "Enable Significance coding", OFFSET(coding_significance), AV_OPT_TYPE_BOOL, {.i64 = -1 }, -1, 1, VE },
{ "coding-vpred", "Enable Vertical Prediction coding", OFFSET(coding_vpred), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 2, VE, .unit = "coding-vpred" },
{ "disable", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0}, INT_MIN, INT_MAX, VE, .unit = "coding-vpred" },
{ "no_residuals", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1}, INT_MIN, INT_MAX, VE, .unit = "coding-vpred" },
{ "no_coeffs", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 2}, INT_MIN, INT_MAX, VE, .unit = "coding-vpred" },
{ NULL },
}

Definition at line 262 of file libsvtjpegxsenc.c.

◆ svtjpegxs_enc_class

const AVClass svtjpegxs_enc_class
static
Initial value:
= {
.class_name = "libsvtjpegxs",
.item_name = av_default_item_name,
}

Definition at line 280 of file libsvtjpegxsenc.c.

◆ ff_libsvtjpegxs_encoder

const FFCodec ff_libsvtjpegxs_encoder
Initial value:
= {
.p.name = "libsvtjpegxs",
CODEC_LONG_NAME("SVT JPEG XS(Scalable Video Technology for JPEG XS) encoder"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(SvtJpegXsEncodeContext),
.p.wrapper_name = "libsvtjpegxs",
.p.priv_class = &svtjpegxs_enc_class,
}

Definition at line 287 of file libsvtjpegxsenc.c.

svtjpegxs_enc_class
static const AVClass svtjpegxs_enc_class
Definition: libsvtjpegxsenc.c:280
svt_jpegxs_defaults
static const FFCodecDefault svt_jpegxs_defaults[]
Definition: libsvtjpegxsenc.c:255
defaults
static const FFCodecDefault defaults[]
Definition: amfenc_av1.c:717
AV_PIX_FMT_YUV422P14LE
@ AV_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:274
svt_jpegxs_enc_free
static av_cold int svt_jpegxs_enc_free(AVCodecContext *avctx)
Definition: libsvtjpegxsenc.c:107
FF_CODEC_CAP_NOT_INIT_THREADSAFE
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE
The codec is not known to be init-threadsafe (i.e.
Definition: codec_internal.h:34
svt_jpegxs_enc_encode
static int svt_jpegxs_enc_encode(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: libsvtjpegxsenc.c:53
close
static av_cold void close(AVCodecParserContext *s)
Definition: apv_parser.c:197
VE
#define VE
Definition: libsvtjpegxsenc.c:261
AV_PIX_FMT_YUV420P12LE
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:268
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:359
AV_PIX_FMT_YUV420P10LE
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:156
SvtJpegXsEncodeContext
Definition: libsvtjpegxsenc.c:39
AV_PIX_FMT_YUV444P12LE
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:276
AV_PIX_FMT_YUV444P14LE
@ AV_PIX_FMT_YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:278
quant
static const uint8_t quant[64]
Definition: vmixdec.c:71
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:109
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:73
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:332
AV_PIX_FMT_YUV444P10LE
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:162
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
CODEC_PIXFMTS_ARRAY
#define CODEC_PIXFMTS_ARRAY(array)
Definition: codec_internal.h:393
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:242
svtjpegxs_enc_options
static const AVOption svtjpegxs_enc_options[]
Definition: libsvtjpegxsenc.c:262
AV_PIX_FMT_YUV420P14LE
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:270
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:550
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
svt_jpegxs_enc_init
static av_cold int svt_jpegxs_enc_init(AVCodecContext *avctx)
Definition: libsvtjpegxsenc.c:172
AV_PIX_FMT_YUV422P10LE
@ AV_PIX_FMT_YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:158
AV_CODEC_ID_JPEGXS
@ AV_CODEC_ID_JPEGXS
Definition: codec_id.h:334
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libsvtjpegxsenc.c:239
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
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:78
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:200
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:77
FF_CODEC_CAP_AUTO_THREADS
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
Definition: codec_internal.h:72
OFFSET
#define OFFSET(x)
Definition: libsvtjpegxsenc.c:260
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition: opt.h:327
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299
AV_PIX_FMT_YUV422P12LE
@ AV_PIX_FMT_YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:272