FFmpeg
Data Structures | Macros | Functions | Variables
cpia.c File Reference
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  CpiaContext
 

Macros

#define FRAME_HEADER_SIZE   64
 
#define MAGIC_0   0x19
 First header byte. More...
 
#define MAGIC_1   0x68
 Second header byte. More...
 
#define SUBSAMPLE_420   0
 
#define SUBSAMPLE_422   1
 
#define YUVORDER_YUYV   0
 
#define YUVORDER_UYVY   1
 
#define NOT_COMPRESSED   0
 
#define COMPRESSED   1
 
#define NO_DECIMATION   0
 
#define DECIMATION_ENAB   1
 
#define EOL   0xfd
 End Of Line marker. More...
 
#define EOI   0xff
 End Of Image marker. More...
 

Functions

static int cpia_decode_frame (AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
 
static av_cold int cpia_decode_init (AVCodecContext *avctx)
 
static av_cold int cpia_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_cpia_decoder
 

Macro Definition Documentation

◆ FRAME_HEADER_SIZE

#define FRAME_HEADER_SIZE   64

Definition at line 31 of file cpia.c.

◆ MAGIC_0

#define MAGIC_0   0x19

First header byte.

Definition at line 32 of file cpia.c.

◆ MAGIC_1

#define MAGIC_1   0x68

Second header byte.

Definition at line 33 of file cpia.c.

◆ SUBSAMPLE_420

#define SUBSAMPLE_420   0

Definition at line 34 of file cpia.c.

◆ SUBSAMPLE_422

#define SUBSAMPLE_422   1

Definition at line 35 of file cpia.c.

◆ YUVORDER_YUYV

#define YUVORDER_YUYV   0

Definition at line 36 of file cpia.c.

◆ YUVORDER_UYVY

#define YUVORDER_UYVY   1

Definition at line 37 of file cpia.c.

◆ NOT_COMPRESSED

#define NOT_COMPRESSED   0

Definition at line 38 of file cpia.c.

◆ COMPRESSED

#define COMPRESSED   1

Definition at line 39 of file cpia.c.

◆ NO_DECIMATION

#define NO_DECIMATION   0

Definition at line 40 of file cpia.c.

◆ DECIMATION_ENAB

#define DECIMATION_ENAB   1

Definition at line 41 of file cpia.c.

◆ EOL

#define EOL   0xfd

End Of Line marker.

Definition at line 42 of file cpia.c.

◆ EOI

#define EOI   0xff

End Of Image marker.

Definition at line 43 of file cpia.c.

Function Documentation

◆ cpia_decode_frame()

static int cpia_decode_frame ( AVCodecContext avctx,
AVFrame rframe,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 51 of file cpia.c.

◆ cpia_decode_init()

static av_cold int cpia_decode_init ( AVCodecContext avctx)
static

Definition at line 194 of file cpia.c.

◆ cpia_decode_end()

static av_cold int cpia_decode_end ( AVCodecContext avctx)
static

Definition at line 216 of file cpia.c.

Variable Documentation

◆ ff_cpia_decoder

const FFCodec ff_cpia_decoder
Initial value:
= {
.p.name = "cpia",
CODEC_LONG_NAME("CPiA video format"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(CpiaContext),
.close = cpia_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 225 of file cpia.c.

cpia_decode_init
static av_cold int cpia_decode_init(AVCodecContext *avctx)
Definition: cpia.c:194
CpiaContext
Definition: cpia.c:46
cpia_decode_frame
static int cpia_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: cpia.c:51
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
AV_CODEC_ID_CPIA
@ AV_CODEC_ID_CPIA
Definition: codec_id.h:264
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
cpia_decode_end
static av_cold int cpia_decode_end(AVCodecContext *avctx)
Definition: cpia.c:216
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201