FFmpeg
Data Structures | Macros | Functions | Variables
prosumer.c File Reference
#include <stdio.h>
#include <stdlib.h>
#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 "internal.h"

Go to the source code of this file.

Data Structures

struct  ProSumerContext
 

Macros

#define PAIR(high, low)   (((uint64_t)(high) << 32) | low)
 
#define TB(i)   (1 + ((i) > 10) + ((i) > 49))
 

Functions

static int decompress (GetByteContext *gb, int size, PutByteContext *pb, const uint32_t *lut)
 
static void vertical_predict (uint32_t *dst, int offset, const uint32_t *src, int stride, int height)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static void fill_elements (uint32_t idx, uint32_t shift, uint32_t *e0, uint32_t *e1)
 
static void fill_lut (uint32_t *lut)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static av_cold int decode_close (AVCodecContext *avctx)
 

Variables

static const uint16_t table []
 
AVCodec ff_prosumer_decoder
 

Macro Definition Documentation

#define PAIR (   high,
  low 
)    (((uint64_t)(high) << 32) | low)

Definition at line 46 of file prosumer.c.

Referenced by decompress().

#define TB (   i)    (1 + ((i) > 10) + ((i) > 49))

Definition at line 205 of file prosumer.c.

Referenced by fill_elements(), and fill_lut().

Function Documentation

static int decompress ( GetByteContext gb,
int  size,
PutByteContext pb,
const uint32_t *  lut 
)
static

Definition at line 48 of file prosumer.c.

Referenced by decode_frame().

static void vertical_predict ( uint32_t *  dst,
int  offset,
const uint32_t *  src,
int  stride,
int  height 
)
static

Definition at line 132 of file prosumer.c.

Referenced by decode_frame().

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

Definition at line 146 of file prosumer.c.

static void fill_elements ( uint32_t  idx,
uint32_t  shift,
uint32_t *  e0,
uint32_t *  e1 
)
static

Definition at line 282 of file prosumer.c.

Referenced by fill_lut().

static void fill_lut ( uint32_t *  lut)
static

Definition at line 308 of file prosumer.c.

Referenced by decode_init().

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 338 of file prosumer.c.

static av_cold int decode_close ( AVCodecContext avctx)
static

Definition at line 358 of file prosumer.c.

Variable Documentation

const uint16_t table[]
static
AVCodec ff_prosumer_decoder
Initial value:
= {
.name = "prosumer",
.long_name = NULL_IF_CONFIG_SMALL("Brooktree ProSumer Video"),
.priv_data_size = sizeof(ProSumerContext),
.close = decode_close,
.capabilities = AV_CODEC_CAP_DR1,
.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
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#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 int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: prosumer.c:146
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int decode_init(AVCodecContext *avctx)
Definition: prosumer.c:338
static av_cold int decode_close(AVCodecContext *avctx)
Definition: prosumer.c:358
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:981

Definition at line 368 of file prosumer.c.