FFmpeg  4.0
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
 

Functions

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)
 

Variables

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

◆ screenpresso_close()

static av_cold int screenpresso_close ( AVCodecContext avctx)
static

Definition at line 55 of file screenpresso.c.

◆ screenpresso_init()

static av_cold int screenpresso_init ( AVCodecContext avctx)
static

Definition at line 65 of file screenpresso.c.

◆ sum_delta_flipped()

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

Definition at line 91 of file screenpresso.c.

Referenced by screenpresso_decode_frame().

◆ screenpresso_decode_frame()

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

Definition at line 103 of file screenpresso.c.

Variable Documentation

◆ ff_screenpresso_decoder

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,
.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
#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 screenpresso_close(AVCodecContext *avctx)
Definition: screenpresso.c:55
#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 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.