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 "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 (AVCodecContext *avctx, LibJxlDecodeContext *ctx)
 
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_receive_frame (AVCodecContext *avctx, AVFrame *frame)
 
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 64 of file libjxldec.c.

Referenced by libjxl_decode_init(), and libjxl_receive_frame().

◆ libjxl_decode_init()

static av_cold int libjxl_decode_init ( AVCodecContext avctx)
static

Definition at line 87 of file libjxldec.c.

◆ libjxl_get_pix_fmt()

static enum AVPixelFormat libjxl_get_pix_fmt ( AVCodecContext avctx,
LibJxlDecodeContext ctx 
)
static

Definition at line 113 of file libjxldec.c.

Referenced by libjxl_receive_frame().

◆ libjxl_get_primaries()

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

Definition at line 158 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 185 of file libjxldec.c.

Referenced by libjxl_color_encoding_event().

◆ libjxl_get_icc()

static int libjxl_get_icc ( AVCodecContext avctx)
static

Definition at line 209 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 258 of file libjxldec.c.

Referenced by libjxl_receive_frame().

◆ libjxl_receive_frame()

static int libjxl_receive_frame ( AVCodecContext avctx,
AVFrame frame 
)
static

Definition at line 363 of file libjxldec.c.

◆ libjxl_decode_close()

static av_cold int libjxl_decode_close ( AVCodecContext avctx)
static

Definition at line 521 of file libjxldec.c.

Variable Documentation

◆ ff_libjxl_decoder

const FFCodec ff_libjxl_decoder
Initial value:

Definition at line 537 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:43
libjxl_decode_init
static av_cold int libjxl_decode_init(AVCodecContext *avctx)
Definition: libjxldec.c:87
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:35
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:124
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
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:317
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
libjxl_receive_frame
static int libjxl_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Definition: libjxldec.c:363
FF_CODEC_RECEIVE_FRAME_CB
#define FF_CODEC_RECEIVE_FRAME_CB(func)
Definition: codec_internal.h:317
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:521
LibJxlDecodeContext
Definition: libjxldec.c:46