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

Screenpresso decoder. More...

#include <stdint.h>
#include <string.h>
#include <zlib.h>
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ScreenpressoContext


static av_cold int screenpresso_close (AVCodecContext *avctx)
static av_cold int screenpresso_init (AVCodecContext *avctx)
static void sum_delta_flipped (uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)
static int screenpresso_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)


AVCodec ff_screenpresso_decoder

Detailed Description

Screenpresso decoder.

Fourcc: SPV1

Screenpresso simply horizontally flips and then deflates frames, alternating full pictures and deltas. Deltas are related to the currently rebuilt frame (not the reference), and since there is no coordinate system they contain exactly as many pixel as the keyframe.

Supports: BGR0, BGR24, RGB555

Definition in file screenpresso.c.

Function Documentation

static av_cold int screenpresso_close ( AVCodecContext avctx)

Definition at line 55 of file screenpresso.c.

static av_cold int screenpresso_init ( AVCodecContext avctx)

Definition at line 65 of file screenpresso.c.

static void sum_delta_flipped ( uint8_t dst,
int  dst_linesize,
const uint8_t src,
int  src_linesize,
int  bytewidth,
int  height 

Definition at line 91 of file screenpresso.c.

Referenced by screenpresso_decode_frame().

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

Definition at line 103 of file screenpresso.c.

Variable Documentation

AVCodec ff_screenpresso_decoder
Initial value:
= {
.name = "screenpresso",
.long_name = NULL_IF_CONFIG_SMALL("Screenpresso"),
.priv_data_size = sizeof(ScreenpressoContext),
.capabilities = AV_CODEC_CAP_DR1,
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
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 screenpresso_close(AVCodecContext *avctx)
Definition: screenpresso.c:55
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static av_cold int screenpresso_init(AVCodecContext *avctx)
Definition: screenpresso.c:65
static int screenpresso_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: screenpresso.c:103
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 185 of file screenpresso.c.