FFmpeg
Loading...
Searching...
No Matches
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)
 
#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)
Value:

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
Initial value:
= {
}
@ AV_PIX_FMT_NONE
Definition pixfmt.h:72
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition pixfmt.h:270
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition pixfmt.h:73
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition pixfmt.h:77
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition pixfmt.h:156
@ AV_PIX_FMT_YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition pixfmt.h:278
@ AV_PIX_FMT_YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition pixfmt.h:272
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition pixfmt.h:78
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition pixfmt.h:268
@ 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_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition pixfmt.h:274
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition pixfmt.h:162
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition pixfmt.h:276

Definition at line 239 of file libsvtjpegxsenc.c.

◆ svt_jpegxs_defaults

const FFCodecDefault svt_jpegxs_defaults[]
static
Initial value:
= {
{ "b", "0" },
{ NULL },
}
#define NULL
Definition coverity.c:32

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 },
}
#define VE
Definition amfenc_av1.c:30
#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
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition opt.h:326
static const uint8_t quant[64]
Definition vmixdec.c:71

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

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,
}
static const FFCodecDefault defaults[]
Definition amfenc_av1.c:723
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
#define CODEC_PIXFMTS_ARRAY(array)
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE
The codec is not known to be init-threadsafe (i.e.
#define FF_CODEC_ENCODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AV_CODEC_CAP_OTHER_THREADS
Codec supports multithreading through a method other than slice- or frame-level multithreading.
Definition codec.h:112
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_JPEGXS
Definition codec_id.h:325
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
static enum AVPixelFormat pix_fmts[]
Definition libkvazaar.c:296
static const FFCodecDefault svt_jpegxs_defaults[]
static av_cold int svt_jpegxs_enc_init(AVCodecContext *avctx)
static av_cold int svt_jpegxs_enc_free(AVCodecContext *avctx)
static const AVClass svtjpegxs_enc_class
static int svt_jpegxs_enc_encode(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)

Definition at line 287 of file libsvtjpegxsenc.c.