FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
hapdec.c File Reference

Hap decoder. More...

#include <stdint.h>
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "hap.h"
#include "internal.h"
#include "snappy.h"
#include "texturedsp.h"
#include "thread.h"

Go to the source code of this file.

Functions

static int parse_section_header (GetByteContext *gbc, int *section_size, enum HapSectionType *section_type)
 
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 decompress_texture_thread_internal (AVCodecContext *avctx, void *arg, int slice, int thread_nb, int texture_num)
 
static int decompress_texture_thread (AVCodecContext *avctx, void *arg, int slice, int thread_nb)
 
static int decompress_texture2_thread (AVCodecContext *avctx, void *arg, int slice, int thread_nb)
 
static int hap_decode (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int hap_init (AVCodecContext *avctx)
 
static av_cold int hap_close (AVCodecContext *avctx)
 

Variables

AVCodec 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

static int parse_section_header ( GetByteContext gbc,
int section_size,
enum HapSectionType section_type 
)
static

Definition at line 49 of file hapdec.c.

Referenced by hap_decode(), hap_parse_decode_instructions(), and hap_parse_frame_header().

static int hap_parse_decode_instructions ( HapContext ctx,
int  size 
)
static

Definition at line 71 of file hapdec.c.

Referenced by hap_parse_frame_header().

static int hap_can_use_tex_in_place ( HapContext ctx)
static

Definition at line 140 of file hapdec.c.

Referenced by hap_decode().

static int hap_parse_frame_header ( AVCodecContext avctx)
static

Definition at line 153 of file hapdec.c.

Referenced by hap_decode().

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

Definition at line 245 of file hapdec.c.

Referenced by hap_decode().

static int decompress_texture_thread_internal ( AVCodecContext avctx,
void arg,
int  slice,
int  thread_nb,
int  texture_num 
)
static

Definition at line 273 of file hapdec.c.

Referenced by decompress_texture2_thread(), and decompress_texture_thread().

static int decompress_texture_thread ( AVCodecContext avctx,
void arg,
int  slice,
int  thread_nb 
)
static

Definition at line 315 of file hapdec.c.

Referenced by hap_decode().

static int decompress_texture2_thread ( AVCodecContext avctx,
void arg,
int  slice,
int  thread_nb 
)
static

Definition at line 321 of file hapdec.c.

Referenced by hap_decode().

static int hap_decode ( AVCodecContext avctx,
void data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 327 of file hapdec.c.

static av_cold int hap_init ( AVCodecContext avctx)
static

Definition at line 422 of file hapdec.c.

static av_cold int hap_close ( AVCodecContext avctx)
static

Definition at line 490 of file hapdec.c.

Variable Documentation

AVCodec ff_hap_decoder
Initial value:
= {
.name = "hap",
.long_name = NULL_IF_CONFIG_SMALL("Vidvox Hap"),
.init = hap_init,
.decode = hap_decode,
.close = hap_close,
.priv_data_size = sizeof(HapContext),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
}
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
Definition: hap.h:61
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:40
static av_cold int hap_init(AVCodecContext *avctx)
Definition: hapdec.c:422
static int hap_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: hapdec.c:327
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:1012
static av_cold int hap_close(AVCodecContext *avctx)
Definition: hapdec.c:490
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: avcodec.h:1016
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:956

Definition at line 499 of file hapdec.c.