FFmpeg
Loading...
Searching...
No Matches
jpeglsdec.c File Reference

JPEG-LS decoder. More...

#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "get_bits.h"
#include "golomb.h"
#include "mathops.h"
#include "mjpegdec.h"
#include "jpegls.h"
#include "jpeglsdec.h"

Go to the source code of this file.

Functions

int ff_jpegls_decode_lse (MJpegDecodeContext *s)
 Decode LSE block with initialization parameters.
 
static int ls_get_code_regular (GetBitContext *gb, JLSState *state, int Q)
 Get context-dependent Golomb code, decode it and update context.
 
static int ls_get_code_runterm (GetBitContext *gb, JLSState *state, int RItype, int limit_add)
 Get Golomb code, decode it and update state for run termination.
 
static int ls_decode_line (JLSState *state, MJpegDecodeContext *s, void *last, void *dst, int last2, int w, int stride, int comp, int bits)
 Decode one line of image.
 
int ff_jpegls_decode_picture (MJpegDecodeContext *s)
 

Variables

const FFCodec ff_jpegls_decoder
 

Detailed Description

JPEG-LS decoder.

Definition in file jpeglsdec.c.

Function Documentation

◆ ff_jpegls_decode_lse()

int ff_jpegls_decode_lse ( MJpegDecodeContext * s)

Decode LSE block with initialization parameters.

Definition at line 52 of file jpeglsdec.c.

Referenced by ff_mjpeg_decode_frame_from_buf().

◆ ls_get_code_regular()

static int ls_get_code_regular ( GetBitContext * gb,
JLSState * state,
int Q )
inlinestatic

Get context-dependent Golomb code, decode it and update context.

Definition at line 155 of file jpeglsdec.c.

Referenced by ls_decode_line().

◆ ls_get_code_runterm()

static int ls_get_code_runterm ( GetBitContext * gb,
JLSState * state,
int RItype,
int limit_add )
inlinestatic

Get Golomb code, decode it and update state for run termination.

Definition at line 186 of file jpeglsdec.c.

Referenced by ls_decode_line().

◆ ls_decode_line()

static int ls_decode_line ( JLSState * state,
MJpegDecodeContext * s,
void * last,
void * dst,
int last2,
int w,
int stride,
int comp,
int bits )
inlinestatic

Decode one line of image.

Definition at line 234 of file jpeglsdec.c.

Referenced by ff_jpegls_decode_picture().

◆ ff_jpegls_decode_picture()

int ff_jpegls_decode_picture ( MJpegDecodeContext * s)

Definition at line 357 of file jpeglsdec.c.

Referenced by ff_mjpeg_decode_sos().

Variable Documentation

◆ ff_jpegls_decoder

const FFCodec ff_jpegls_decoder
Initial value:
= {
.p.name = "jpegls",
CODEC_LONG_NAME("JPEG-LS"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(MJpegDecodeContext),
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#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_JPEGLS
Definition codec_id.h:61
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
Definition mjpegdec.c:124
av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx)
Definition mjpegdec.c:2900
int ff_mjpeg_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition mjpegdec.c:2890

Definition at line 584 of file jpeglsdec.c.