FFmpeg
Data Structures | Macros | Functions | Variables
flashsvenc.c File Reference
#include <stdint.h>
#include <zlib.h>
#include "libavutil/buffer.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"
#include "put_bits.h"
#include "bytestream.h"

Go to the source code of this file.

Data Structures

struct  FlashSVContext
 

Macros

#define BLOCK_WIDTH   (4 * 16U)
 
#define BLOCK_HEIGHT   (4 * 16U)
 

Functions

static int copy_region_enc (const uint8_t *sptr, uint8_t *dptr, int dx, int dy, int h, int w, int stride, const uint8_t *pfptr)
 
static av_cold int flashsv_encode_end (AVCodecContext *avctx)
 
static av_cold int flashsv_encode_init (AVCodecContext *avctx)
 
static int encode_bitstream (FlashSVContext *s, const AVFrame *p, uint8_t *buf, int buf_size, int block_width, int block_height, const uint8_t *previous_frame, int *I_frame)
 
static int flashsv_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
 

Variables

const FFCodec ff_flashsv_encoder
 

Detailed Description

Flash Screen Video encoder

Author
Alex Beregszaszi
Benjamin Larsson

A description of the bitstream format for Flash Screen Video version 1/2 is part of the SWF File Format Specification (version 10), which can be downloaded from http://www.adobe.com/devnet/swf.html.

Definition in file flashsvenc.c.

Macro Definition Documentation

◆ BLOCK_WIDTH

#define BLOCK_WIDTH   (4 * 16U)

Definition at line 59 of file flashsvenc.c.

◆ BLOCK_HEIGHT

#define BLOCK_HEIGHT   (4 * 16U)

Definition at line 60 of file flashsvenc.c.

Function Documentation

◆ copy_region_enc()

static int copy_region_enc ( const uint8_t *  sptr,
uint8_t *  dptr,
int  dx,
int  dy,
int  h,
int  w,
int  stride,
const uint8_t *  pfptr 
)
static

Definition at line 72 of file flashsvenc.c.

Referenced by encode_bitstream().

◆ flashsv_encode_end()

static av_cold int flashsv_encode_end ( AVCodecContext avctx)
static

Definition at line 92 of file flashsvenc.c.

◆ flashsv_encode_init()

static av_cold int flashsv_encode_init ( AVCodecContext avctx)
static

Definition at line 101 of file flashsvenc.c.

◆ encode_bitstream()

static int encode_bitstream ( FlashSVContext s,
const AVFrame p,
uint8_t *  buf,
int  buf_size,
int  block_width,
int  block_height,
const uint8_t *  previous_frame,
int I_frame 
)
static

Definition at line 128 of file flashsvenc.c.

Referenced by flashsv_encode_frame().

◆ flashsv_encode_frame()

static int flashsv_encode_frame ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame pict,
int got_packet 
)
static

Definition at line 201 of file flashsvenc.c.

Variable Documentation

◆ ff_flashsv_encoder

const FFCodec ff_flashsv_encoder
Initial value:
= {
.p.name = "flashsv",
CODEC_LONG_NAME("Flash Screen Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(FlashSVContext),
.p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
}

Definition at line 249 of file flashsvenc.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
AV_PIX_FMT_BGR24
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:76
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:296
flashsv_encode_frame
static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
Definition: flashsvenc.c:201
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition: codec.h:159
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
FlashSVContext
Definition: flashsv.c:54
AV_CODEC_ID_FLASHSV
@ AV_CODEC_ID_FLASHSV
Definition: codec_id.h:138
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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
flashsv_encode_init
static av_cold int flashsv_encode_init(AVCodecContext *avctx)
Definition: flashsvenc.c:101
flashsv_encode_end
static av_cold int flashsv_encode_end(AVCodecContext *avctx)
Definition: flashsvenc.c:92
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201