FFmpeg
Data Structures | Macros | Functions | Variables
hnm4video.c File Reference
#include <string.h>
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  Hnm4VideoContext
 

Macros

#define HNM4_CHUNK_ID_PL   19536
 
#define HNM4_CHUNK_ID_IZ   23113
 
#define HNM4_CHUNK_ID_IU   21833
 
#define HNM4_CHUNK_ID_SD   17491
 

Functions

static int getbit (GetByteContext *gb, uint32_t *bitbuf, int *bits)
 
static void unpack_intraframe (AVCodecContext *avctx, const uint8_t *src, uint32_t size)
 
static void postprocess_current_frame (AVCodecContext *avctx)
 
static void copy_processed_frame (AVCodecContext *avctx, AVFrame *frame)
 
static int decode_interframe_v4 (AVCodecContext *avctx, const uint8_t *src, uint32_t size)
 
static void decode_interframe_v4a (AVCodecContext *avctx, const uint8_t *src, uint32_t size)
 
static void hnm_update_palette (AVCodecContext *avctx, const uint8_t *src, uint32_t size)
 
static int hnm_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int hnm_decode_init (AVCodecContext *avctx)
 
static av_cold int hnm_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_hnm4_video_decoder
 

Macro Definition Documentation

◆ HNM4_CHUNK_ID_PL

#define HNM4_CHUNK_ID_PL   19536

Definition at line 34 of file hnm4video.c.

◆ HNM4_CHUNK_ID_IZ

#define HNM4_CHUNK_ID_IZ   23113

Definition at line 35 of file hnm4video.c.

◆ HNM4_CHUNK_ID_IU

#define HNM4_CHUNK_ID_IU   21833

Definition at line 36 of file hnm4video.c.

◆ HNM4_CHUNK_ID_SD

#define HNM4_CHUNK_ID_SD   17491

Definition at line 37 of file hnm4video.c.

Function Documentation

◆ getbit()

static int getbit ( GetByteContext gb,
uint32_t *  bitbuf,
int bits 
)
static

Definition at line 51 of file hnm4video.c.

Referenced by unpack_intraframe().

◆ unpack_intraframe()

static void unpack_intraframe ( AVCodecContext avctx,
const uint8_t *  src,
uint32_t  size 
)
static

Definition at line 67 of file hnm4video.c.

Referenced by hnm_decode_frame().

◆ postprocess_current_frame()

static void postprocess_current_frame ( AVCodecContext avctx)
static

Definition at line 118 of file hnm4video.c.

Referenced by hnm_decode_frame().

◆ copy_processed_frame()

static void copy_processed_frame ( AVCodecContext avctx,
AVFrame frame 
)
static

Definition at line 136 of file hnm4video.c.

Referenced by hnm_decode_frame().

◆ decode_interframe_v4()

static int decode_interframe_v4 ( AVCodecContext avctx,
const uint8_t *  src,
uint32_t  size 
)
static

Definition at line 150 of file hnm4video.c.

Referenced by hnm_decode_frame().

◆ decode_interframe_v4a()

static void decode_interframe_v4a ( AVCodecContext avctx,
const uint8_t *  src,
uint32_t  size 
)
static

Definition at line 279 of file hnm4video.c.

Referenced by hnm_decode_frame().

◆ hnm_update_palette()

static void hnm_update_palette ( AVCodecContext avctx,
const uint8_t *  src,
uint32_t  size 
)
static

Definition at line 358 of file hnm4video.c.

Referenced by hnm_decode_frame().

◆ hnm_decode_frame()

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

Definition at line 391 of file hnm4video.c.

◆ hnm_decode_init()

static av_cold int hnm_decode_init ( AVCodecContext avctx)
static

Definition at line 453 of file hnm4video.c.

◆ hnm_decode_end()

static av_cold int hnm_decode_end ( AVCodecContext avctx)
static

Definition at line 489 of file hnm4video.c.

Variable Documentation

◆ ff_hnm4_video_decoder

const FFCodec ff_hnm4_video_decoder
Initial value:
= {
.p.name = "hnm4video",
CODEC_LONG_NAME("HNM 4 video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(Hnm4VideoContext),
.close = hnm_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 500 of file hnm4video.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
hnm_decode_end
static av_cold int hnm_decode_end(AVCodecContext *avctx)
Definition: hnm4video.c:489
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
Hnm4VideoContext
Definition: hnm4video.c:39
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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_HNM4_VIDEO
@ AV_CODEC_ID_HNM4_VIDEO
Definition: codec_id.h:225
hnm_decode_frame
static int hnm_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: hnm4video.c:391
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
hnm_decode_init
static av_cold int hnm_decode_init(AVCodecContext *avctx)
Definition: hnm4video.c:453