FFmpeg
Data Structures | Functions | Variables
libjxldec.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/buffer.h"
#include "libavutil/common.h"
#include "libavutil/csp.h"
#include "libavutil/error.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
#include "libavutil/frame.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include <jxl/decode.h>
#include <jxl/thread_parallel_runner.h>
#include "libjxl.h"

Go to the source code of this file.

Data Structures

struct  LibJxlDecodeContext
 

Functions

static int libjxl_init_jxl_decoder (AVCodecContext *avctx)
 
static av_cold int libjxl_decode_init (AVCodecContext *avctx)
 
static enum AVPixelFormat libjxl_get_pix_fmt (void *avctx, const JxlBasicInfo *basic_info, JxlPixelFormat *format)
 
static enum AVColorPrimaries libjxl_get_primaries (void *avctx, const JxlColorEncoding *jxl_color)
 
static enum AVColorTransferCharacteristic libjxl_get_trc (void *avctx, const JxlColorEncoding *jxl_color)
 
static int libjxl_get_icc (AVCodecContext *avctx)
 
static int libjxl_color_encoding_event (AVCodecContext *avctx, AVFrame *frame)
 
static int libjxl_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int libjxl_decode_close (AVCodecContext *avctx)
 

Variables

const FFCodec ff_libjxl_decoder
 

Detailed Description

JPEG XL decoder using libjxl

Definition in file libjxldec.c.

Function Documentation

◆ libjxl_init_jxl_decoder()

static int libjxl_init_jxl_decoder ( AVCodecContext avctx)
static

Definition at line 54 of file libjxldec.c.

Referenced by libjxl_decode_frame(), and libjxl_decode_init().

◆ libjxl_decode_init()

static av_cold int libjxl_decode_init ( AVCodecContext avctx)
static

Definition at line 75 of file libjxldec.c.

◆ libjxl_get_pix_fmt()

static enum AVPixelFormat libjxl_get_pix_fmt ( void *  avctx,
const JxlBasicInfo *  basic_info,
JxlPixelFormat *  format 
)
static

Definition at line 96 of file libjxldec.c.

Referenced by libjxl_decode_frame().

◆ libjxl_get_primaries()

static enum AVColorPrimaries libjxl_get_primaries ( void *  avctx,
const JxlColorEncoding *  jxl_color 
)
static

Definition at line 133 of file libjxldec.c.

Referenced by libjxl_color_encoding_event().

◆ libjxl_get_trc()

static enum AVColorTransferCharacteristic libjxl_get_trc ( void *  avctx,
const JxlColorEncoding *  jxl_color 
)
static

Definition at line 160 of file libjxldec.c.

Referenced by libjxl_color_encoding_event().

◆ libjxl_get_icc()

static int libjxl_get_icc ( AVCodecContext avctx)
static

Definition at line 184 of file libjxldec.c.

Referenced by libjxl_color_encoding_event().

◆ libjxl_color_encoding_event()

static int libjxl_color_encoding_event ( AVCodecContext avctx,
AVFrame frame 
)
static

Definition at line 225 of file libjxldec.c.

Referenced by libjxl_decode_frame().

◆ libjxl_decode_frame()

static int libjxl_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 321 of file libjxldec.c.

◆ libjxl_decode_close()

static av_cold int libjxl_decode_close ( AVCodecContext avctx)
static

Definition at line 433 of file libjxldec.c.

Variable Documentation

◆ ff_libjxl_decoder

const FFCodec ff_libjxl_decoder
Initial value:
= {
.p.name = "libjxl",
.p.long_name = NULL_IF_CONFIG_SMALL("libjxl JPEG XL"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(LibJxlDecodeContext),
.p.wrapper_name = "libjxl",
}

Definition at line 448 of file libjxldec.c.

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
libjxl_decode_init
static av_cold int libjxl_decode_init(AVCodecContext *avctx)
Definition: libjxldec.c:75
init
static int init
Definition: av_tx.c:47
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:254
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:127
libjxl_decode_frame
static int libjxl_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: libjxldec.c:321
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
AV_CODEC_ID_JPEGXL
@ AV_CODEC_ID_JPEGXL
Definition: codec_id.h:312
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FF_CODEC_CAP_AUTO_THREADS
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
Definition: codec_internal.h:70
libjxl_decode_close
static av_cold int libjxl_decode_close(AVCodecContext *avctx)
Definition: libjxldec.c:433
LibJxlDecodeContext
Definition: libjxldec.c:45