FFmpeg
Data Structures | Functions | Variables
ulti.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "ulti_cb.h"

Go to the source code of this file.

Data Structures

struct  UltimotionDecodeContext
 

Functions

static av_cold int ulti_decode_init (AVCodecContext *avctx)
 
static av_cold int ulti_decode_end (AVCodecContext *avctx)
 
static void ulti_convert_yuv (AVFrame *frame, int x, int y, uint8_t *luma, int chroma)
 
static void ulti_pattern (AVFrame *frame, int x, int y, int f0, int f1, int Y0, int Y1, int chroma)
 
static void ulti_grad (AVFrame *frame, int x, int y, uint8_t *Y, int chroma, int angle)
 
static int ulti_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 

Variables

static const int block_coords [8]
 
static const int angle_by_index [4] = { 0, 2, 6, 12}
 
static const uint8_t ulti_lumas [64]
 
static const uint8_t ulti_chromas [16]
 
const AVCodec ff_ulti_decoder
 

Detailed Description

IBM Ultimotion Video Decoder.

Definition in file ulti.c.

Function Documentation

◆ ulti_decode_init()

static av_cold int ulti_decode_init ( AVCodecContext avctx)
static

Definition at line 45 of file ulti.c.

◆ ulti_decode_end()

static av_cold int ulti_decode_end ( AVCodecContext avctx)
static

Definition at line 65 of file ulti.c.

◆ ulti_convert_yuv()

static void ulti_convert_yuv ( AVFrame frame,
int  x,
int  y,
uint8_t *  luma,
int  chroma 
)
static

Definition at line 96 of file ulti.c.

Referenced by ulti_decode_frame(), ulti_grad(), and ulti_pattern().

◆ ulti_pattern()

static void ulti_pattern ( AVFrame frame,
int  x,
int  y,
int  f0,
int  f1,
int  Y0,
int  Y1,
int  chroma 
)
static

Definition at line 120 of file ulti.c.

Referenced by ulti_decode_frame().

◆ ulti_grad()

static void ulti_grad ( AVFrame frame,
int  x,
int  y,
uint8_t *  Y,
int  chroma,
int  angle 
)
static

Definition at line 143 of file ulti.c.

Referenced by ulti_decode_frame().

◆ ulti_decode_frame()

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

Definition at line 216 of file ulti.c.

Variable Documentation

◆ block_coords

const int block_coords[8]
static
Initial value:
=
{ 0, 0, 0, 4, 4, 4, 4, 0}

Definition at line 74 of file ulti.c.

Referenced by ulti_decode_frame().

◆ angle_by_index

const int angle_by_index[4] = { 0, 2, 6, 12}
static

Definition at line 77 of file ulti.c.

Referenced by ulti_decode_frame().

◆ ulti_lumas

const uint8_t ulti_lumas[64]
static
Initial value:
=
{ 0x10, 0x13, 0x17, 0x1A, 0x1E, 0x21, 0x25, 0x28,
0x2C, 0x2F, 0x33, 0x36, 0x3A, 0x3D, 0x41, 0x44,
0x48, 0x4B, 0x4F, 0x52, 0x56, 0x59, 0x5C, 0x60,
0x63, 0x67, 0x6A, 0x6E, 0x71, 0x75, 0x78, 0x7C,
0x7F, 0x83, 0x86, 0x8A, 0x8D, 0x91, 0x94, 0x98,
0x9B, 0x9F, 0xA2, 0xA5, 0xA9, 0xAC, 0xB0, 0xB3,
0xB7, 0xBA, 0xBE, 0xC1, 0xC5, 0xC8, 0xCC, 0xCF,
0xD3, 0xD6, 0xDA, 0xDD, 0xE1, 0xE4, 0xE8, 0xEB}

Definition at line 80 of file ulti.c.

Referenced by ulti_convert_yuv().

◆ ulti_chromas

const uint8_t ulti_chromas[16]
static
Initial value:
=
{ 0x60, 0x67, 0x6D, 0x73, 0x7A, 0x80, 0x86, 0x8D,
0x93, 0x99, 0xA0, 0xA6, 0xAC, 0xB3, 0xB9, 0xC0}

Definition at line 90 of file ulti.c.

Referenced by ulti_convert_yuv().

◆ ff_ulti_decoder

const AVCodec ff_ulti_decoder
Initial value:
= {
.name = "ultimotion",
.long_name = NULL_IF_CONFIG_SMALL("IBM UltiMotion"),
.priv_data_size = sizeof(UltimotionDecodeContext),
.close = ulti_decode_end,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 421 of file ulti.c.

FF_CODEC_CAP_INIT_THREADSAFE
#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:42
init
static int init
Definition: av_tx.c:47
ulti_decode_init
static av_cold int ulti_decode_init(AVCodecContext *avctx)
Definition: ulti.c:45
ulti_decode_frame
static int ulti_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: ulti.c:216
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
ulti_decode_end
static av_cold int ulti_decode_end(AVCodecContext *avctx)
Definition: ulti.c:65
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_CODEC_ID_ULTI
@ AV_CODEC_ID_ULTI
Definition: codec_id.h:107
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
UltimotionDecodeContext
Definition: ulti.c:37