FFmpeg
Functions | Variables
hapdec.c File Reference
#include <stdint.h>
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "hap.h"
#include "snappy.h"
#include "texturedsp.h"
#include "thread.h"

Go to the source code of this file.

Functions

static int hap_parse_decode_instructions (HapContext *ctx, int size)
 
static int hap_can_use_tex_in_place (HapContext *ctx)
 
static int hap_parse_frame_header (AVCodecContext *avctx)
 
static int decompress_chunks_thread (AVCodecContext *avctx, void *arg, int chunk_nb, int thread_nb)
 
static int hap_decode (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int hap_init (AVCodecContext *avctx)
 
static av_cold int hap_close (AVCodecContext *avctx)
 

Variables

const FFCodec ff_hap_decoder
 

Detailed Description

Hap decoder

Fourcc: Hap1, Hap5, HapY, HapA, HapM

https://github.com/Vidvox/hap/blob/master/documentation/HapVideoDRAFT.md

Definition in file hapdec.c.

Function Documentation

◆ hap_parse_decode_instructions()

static int hap_parse_decode_instructions ( HapContext ctx,
int  size 
)
static

Definition at line 46 of file hapdec.c.

Referenced by hap_parse_frame_header().

◆ hap_can_use_tex_in_place()

static int hap_can_use_tex_in_place ( HapContext ctx)
static

Definition at line 117 of file hapdec.c.

Referenced by hap_decode().

◆ hap_parse_frame_header()

static int hap_parse_frame_header ( AVCodecContext avctx)
static

Definition at line 130 of file hapdec.c.

Referenced by hap_decode().

◆ decompress_chunks_thread()

static int decompress_chunks_thread ( AVCodecContext avctx,
void *  arg,
int  chunk_nb,
int  thread_nb 
)
static

Definition at line 222 of file hapdec.c.

Referenced by hap_decode().

◆ hap_decode()

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

Definition at line 250 of file hapdec.c.

◆ hap_init()

static av_cold int hap_init ( AVCodecContext avctx)
static

Definition at line 337 of file hapdec.c.

◆ hap_close()

static av_cold int hap_close ( AVCodecContext avctx)
static

Definition at line 406 of file hapdec.c.

Variable Documentation

◆ ff_hap_decoder

const FFCodec ff_hap_decoder
Initial value:
= {
.p.name = "hap",
CODEC_LONG_NAME("Vidvox Hap"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_HAP,
.init = hap_init,
.close = hap_close,
.priv_data_size = sizeof(HapContext),
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.codec_tags = (const uint32_t []){
MKTAG('H','a','p','1'),
MKTAG('H','a','p','5'),
MKTAG('H','a','p','Y'),
MKTAG('H','a','p','A'),
MKTAG('H','a','p','M'),
},
}

Definition at line 415 of file hapdec.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
HapContext
Definition: hap.h:61
hap_decode
static int hap_decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: hapdec.c:250
FF_CODEC_TAGS_END
#define FF_CODEC_TAGS_END
FFCodec.codec_tags termination value.
Definition: codec_internal.h:95
hap_close
static av_cold int hap_close(AVCodecContext *avctx)
Definition: hapdec.c:406
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
hap_init
static av_cold int hap_init(AVCodecContext *avctx)
Definition: hapdec.c:337
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:110
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_CAP_SLICE_THREADS
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: codec.h:114
AV_CODEC_ID_HAP
@ AV_CODEC_ID_HAP
Definition: codec_id.h:241
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55