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 "decode.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:

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:42
libjxl_decode_init
static av_cold int libjxl_decode_init(AVCodecContext *avctx)
Definition: libjxldec.c:75
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
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:298
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
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:363
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:264
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
AV_CODEC_ID_JPEGXL
@ AV_CODEC_ID_JPEGXL
Definition: codec_id.h:316
FF_CODEC_CAP_ICC_PROFILES
#define FF_CODEC_CAP_ICC_PROFILES
Codec supports embedded ICC profiles (AV_FRAME_DATA_ICC_PROFILE).
Definition: codec_internal.h:82
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:73
libjxl_decode_close
static av_cold int libjxl_decode_close(AVCodecContext *avctx)
Definition: libjxldec.c:433
LibJxlDecodeContext
Definition: libjxldec.c:45