#include <stdio.h>
#include <stdlib.h>
#include <zlib.h>
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "internal.h"
#include "put_bits.h"
#include "bytestream.h"
Go to the source code of this file.
Definition in file flashsv2enc.c.
| #define COLORSPACE_15_7 0x10 |
| #define COLORSPACE_BGR 0x00 |
Definition at line 58 of file flashsv2enc.c.
| #define FLASHSV2_DUMB |
Definition at line 66 of file flashsv2enc.c.
| #define HAS_DIFF_BLOCKS 0x04 |
| #define HAS_IFRAME_IMAGE 0x02 |
Definition at line 55 of file flashsv2enc.c.
| #define HAS_PALLET_INFO 0x01 |
| #define ZLIB_PRIME_COMPRESS_CURRENT 0x02 |
| #define ZLIB_PRIME_COMPRESS_PREVIOUS 0x01 |
Definition at line 414 of file flashsv2enc.c.
Referenced by pixel_color7_slow(), and write_pixel_15_7().
| static av_cold void cleanup | ( | FlashSV2Context * | s | ) | [static] |
Definition at line 128 of file flashsv2enc.c.
Referenced by decode_frame(), flashsv2_encode_end(), flashsv2_encode_init(), and j2kenc_destroy().
| static int encode_all_blocks | ( | FlashSV2Context * | s, | |
| int | keyframe | |||
| ) | [static] |
| static int encode_block | ( | FlashSV2Context * | s, | |
| Palette * | palette, | |||
| Block * | b, | |||
| Block * | prev, | |||
| const uint8_t * | src, | |||
| int | stride, | |||
| int | comp, | |||
| int | dist, | |||
| int | keyframe | |||
| ) | [static] |
Definition at line 552 of file flashsv2enc.c.
Referenced by encode_all_blocks(), encode_block(), encode_frame(), ff_mjpeg_encode_mb(), and svq1_encode_plane().
| static av_cold int flashsv2_encode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 912 of file flashsv2enc.c.
| static int flashsv2_encode_frame | ( | AVCodecContext * | avctx, | |
| AVPacket * | pkt, | |||
| const AVFrame * | pict, | |||
| int * | got_packet | |||
| ) | [static] |
Definition at line 851 of file flashsv2enc.c.
| static av_cold int flashsv2_encode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 178 of file flashsv2enc.c.
| static void init_blocks | ( | FlashSV2Context * | s, | |
| Block * | blocks, | |||
| uint8_t * | encbuf, | |||
| uint8_t * | databuf | |||
| ) | [static] |
Definition at line 141 of file flashsv2enc.c.
Referenced by flashsv2_encode_init(), and reconfigure_at_keyframe().
| static int mark_all_blocks | ( | FlashSV2Context * | s, | |
| const uint8_t * | src, | |||
| int | stride, | |||
| int | keyframe | |||
| ) | [static] |
| static int new_key_frame | ( | FlashSV2Context * | s | ) | [static] |
| static int optimum_block_height | ( | FlashSV2Context * | s | ) | [static] |
| static int optimum_block_width | ( | FlashSV2Context * | s | ) | [static] |
| static int optimum_dist | ( | FlashSV2Context * | s | ) | [static] |
| static int optimum_use15_7 | ( | FlashSV2Context * | s | ) | [static] |
| static unsigned pixel_bgr | ( | const uint8_t * | src | ) | [inline, static] |
| static unsigned pixel_color15 | ( | const uint8_t * | src | ) | [inline, static] |
| static void recommend_keyframe | ( | FlashSV2Context * | s, | |
| int * | keyframe | |||
| ) | [static] |
| static int reconfigure_at_keyframe | ( | FlashSV2Context * | s, | |
| const uint8_t * | image, | |||
| int | stride | |||
| ) | [static] |
| static void reset_stats | ( | FlashSV2Context * | s | ) | [static] |
Definition at line 167 of file flashsv2enc.c.
Referenced by flashsv2_encode_init(), and reconfigure_at_keyframe().
| static int write_all_blocks | ( | FlashSV2Context * | s, | |
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
| static int write_header | ( | FlashSV2Context * | s, | |
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
| static int write_palette | ( | FlashSV2Context * | s, | |
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
const double block_size_fraction = 1.0 / 300 [static] |
Definition at line 736 of file flashsv2enc.c.
Referenced by optimum_block_height(), and optimum_block_width().
const double color15_7_factor = 100 [static] |
const unsigned int default_screen_video_v2_palette[128] [static] |
Initial value:
{
0x00000000, 0x00333333, 0x00666666, 0x00999999, 0x00CCCCCC, 0x00FFFFFF,
0x00330000, 0x00660000, 0x00990000, 0x00CC0000, 0x00FF0000, 0x00003300,
0x00006600, 0x00009900, 0x0000CC00, 0x0000FF00, 0x00000033, 0x00000066,
0x00000099, 0x000000CC, 0x000000FF, 0x00333300, 0x00666600, 0x00999900,
0x00CCCC00, 0x00FFFF00, 0x00003333, 0x00006666, 0x00009999, 0x0000CCCC,
0x0000FFFF, 0x00330033, 0x00660066, 0x00990099, 0x00CC00CC, 0x00FF00FF,
0x00FFFF33, 0x00FFFF66, 0x00FFFF99, 0x00FFFFCC, 0x00FF33FF, 0x00FF66FF,
0x00FF99FF, 0x00FFCCFF, 0x0033FFFF, 0x0066FFFF, 0x0099FFFF, 0x00CCFFFF,
0x00CCCC33, 0x00CCCC66, 0x00CCCC99, 0x00CCCCFF, 0x00CC33CC, 0x00CC66CC,
0x00CC99CC, 0x00CCFFCC, 0x0033CCCC, 0x0066CCCC, 0x0099CCCC, 0x00FFCCCC,
0x00999933, 0x00999966, 0x009999CC, 0x009999FF, 0x00993399, 0x00996699,
0x0099CC99, 0x0099FF99, 0x00339999, 0x00669999, 0x00CC9999, 0x00FF9999,
0x00666633, 0x00666699, 0x006666CC, 0x006666FF, 0x00663366, 0x00669966,
0x0066CC66, 0x0066FF66, 0x00336666, 0x00996666, 0x00CC6666, 0x00FF6666,
0x00333366, 0x00333399, 0x003333CC, 0x003333FF, 0x00336633, 0x00339933,
0x0033CC33, 0x0033FF33, 0x00663333, 0x00993333, 0x00CC3333, 0x00FF3333,
0x00003366, 0x00336600, 0x00660033, 0x00006633, 0x00330066, 0x00663300,
0x00336699, 0x00669933, 0x00993366, 0x00339966, 0x00663399, 0x00996633,
0x006699CC, 0x0099CC66, 0x00CC6699, 0x0066CC99, 0x009966CC, 0x00CC9966,
0x0099CCFF, 0x00CCFF99, 0x00FF99CC, 0x0099FFCC, 0x00CC99FF, 0x00FFCC99,
0x00111111, 0x00222222, 0x00444444, 0x00555555, 0x00AAAAAA, 0x00BBBBBB,
0x00DDDDDD, 0x00EEEEEE
}
Definition at line 485 of file flashsv2enc.c.
Referenced by generate_default_palette().
Initial value:
{
.name = "flashsv2",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_FLASHSV2,
.priv_data_size = sizeof(FlashSV2Context),
.init = flashsv2_encode_init,
.encode2 = flashsv2_encode_frame,
.close = flashsv2_encode_end,
.pix_fmts = (const enum PixelFormat[]){ PIX_FMT_BGR24, PIX_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video Version 2"),
}
Definition at line 921 of file flashsv2enc.c.
const double use15_7_threshold = 8192 [static] |
Definition at line 761 of file flashsv2enc.c.
1.5.8