FFmpeg
|
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "libavutil/lfg.h"
#include "elbg.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
Go to the source code of this file.
Data Structures | |
struct | mb_info |
struct | strip_info |
struct | CinepakEncContext |
Macros | |
#define | CVID_HEADER_SIZE 10 |
#define | STRIP_HEADER_SIZE 12 |
#define | CHUNK_HEADER_SIZE 4 |
#define | MB_SIZE 4 |
#define | MB_AREA (MB_SIZE*MB_SIZE) |
#define | VECTOR_MAX 6 |
#define | CODEBOOK_MAX 256 |
#define | MAX_STRIPS 32 |
#define | MIN_STRIPS 1 |
#define | OFFSET(x) offsetof(CinepakEncContext, x) |
#define | VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
#define | CERTAIN(x) ((x)!=ENC_UNCERTAIN) |
#define | SMALLEST_CODEBOOK 1 |
Enumerations | |
enum | CinepakMode { MODE_V1_ONLY = 0, MODE_V1_V4, MODE_MC, MODE_COUNT } |
enum | mb_encoding { ENC_V1, ENC_V4, ENC_SKIP, ENC_UNCERTAIN } |
Functions | |
static av_cold int | cinepak_encode_init (AVCodecContext *avctx) |
static int64_t | calculate_mode_score (CinepakEncContext *s, int h, strip_info *info, int report, int *training_set_v1_shrunk, int *training_set_v4_shrunk) |
static int | write_chunk_header (unsigned char *buf, int chunk_type, int chunk_size) |
static int | encode_codebook (CinepakEncContext *s, int *codebook, int size, int chunk_type_yuv, int chunk_type_gray, unsigned char *buf) |
static void | get_sub_picture (CinepakEncContext *s, int x, int y, uint8_t *in_data[4], int in_linesize[4], uint8_t *out_data[4], int out_linesize[4]) |
static void | decode_v1_vector (CinepakEncContext *s, uint8_t *data[4], int linesize[4], int v1_vector, strip_info *info) |
static void | decode_v4_vector (CinepakEncContext *s, uint8_t *data[4], int linesize[4], int *v4_vector, strip_info *info) |
static void | copy_mb (CinepakEncContext *s, uint8_t *a_data[4], int a_linesize[4], uint8_t *b_data[4], int b_linesize[4]) |
static int | encode_mode (CinepakEncContext *s, int h, uint8_t *scratch_data[4], int scratch_linesize[4], uint8_t *last_data[4], int last_linesize[4], strip_info *info, unsigned char *buf) |
static int | compute_mb_distortion (CinepakEncContext *s, uint8_t *a_data[4], int a_linesize[4], uint8_t *b_data[4], int b_linesize[4]) |
static int | quantize (CinepakEncContext *s, int h, uint8_t *data[4], int linesize[4], int v1mode, strip_info *info, mb_encoding encoding) |
static void | calculate_skip_errors (CinepakEncContext *s, int h, uint8_t *last_data[4], int last_linesize[4], uint8_t *data[4], int linesize[4], strip_info *info) |
static void | write_strip_header (CinepakEncContext *s, int y, int h, int keyframe, unsigned char *buf, int strip_size) |
static int | rd_strip (CinepakEncContext *s, int y, int h, int keyframe, uint8_t *last_data[4], int last_linesize[4], uint8_t *data[4], int linesize[4], uint8_t *scratch_data[4], int scratch_linesize[4], unsigned char *buf, int64_t *best_score) |
static int | write_cvid_header (CinepakEncContext *s, unsigned char *buf, int num_strips, int data_size, int isakeyframe) |
static int | rd_frame (CinepakEncContext *s, const AVFrame *frame, int isakeyframe, unsigned char *buf, int buf_size) |
static int | cinepak_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) |
static av_cold int | cinepak_encode_end (AVCodecContext *avctx) |
Variables | |
static const AVOption | options [] |
static const AVClass | cinepak_class |
AVCodec | ff_cinepak_encoder |
#define CVID_HEADER_SIZE 10 |
Definition at line 82 of file cinepakenc.c.
Referenced by cinepak_encode_init(), rd_frame(), and write_cvid_header().
#define STRIP_HEADER_SIZE 12 |
Definition at line 83 of file cinepakenc.c.
Referenced by cinepak_encode_init(), rd_strip(), and write_strip_header().
#define CHUNK_HEADER_SIZE 4 |
Definition at line 84 of file cinepakenc.c.
Referenced by calculate_mode_score(), cinepak_encode_init(), encode_mode(), and write_chunk_header().
#define MB_SIZE 4 |
Definition at line 86 of file cinepakenc.c.
Referenced by calculate_skip_errors(), compute_mb_distortion(), copy_mb(), decode_frame(), encode_blocks(), encode_frame(), encode_init(), encode_mode(), ff_snow_common_init_after_header(), ff_snow_pred_block(), get_4block_rd(), get_dc(), iterative_me(), predict_slice_buffered(), quantize(), and rd_frame().
Definition at line 87 of file cinepakenc.c.
Referenced by calculate_mode_score(), cinepak_encode_init(), encode_mode(), quantize(), and rd_strip().
#define VECTOR_MAX 6 |
Definition at line 89 of file cinepakenc.c.
Referenced by cinepak_encode_init().
#define CODEBOOK_MAX 256 |
Definition at line 90 of file cinepakenc.c.
Referenced by cinepak_encode_init(), and rd_strip().
#define MAX_STRIPS 32 |
Definition at line 92 of file cinepakenc.c.
#define MIN_STRIPS 1 |
Definition at line 93 of file cinepakenc.c.
#define OFFSET | ( | x | ) | offsetof(CinepakEncContext, x) |
Definition at line 168 of file cinepakenc.c.
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 169 of file cinepakenc.c.
#define CERTAIN | ( | x | ) | ((x)!=ENC_UNCERTAIN) |
Definition at line 802 of file cinepakenc.c.
Referenced by quantize().
#define SMALLEST_CODEBOOK 1 |
Referenced by rd_strip().
enum CinepakMode |
Enumerator | |
---|---|
MODE_V1_ONLY | |
MODE_V1_V4 | |
MODE_MC | |
MODE_COUNT |
Definition at line 103 of file cinepakenc.c.
enum mb_encoding |
Enumerator | |
---|---|
ENC_V1 | |
ENC_V4 | |
ENC_SKIP | |
ENC_UNCERTAIN |
Definition at line 111 of file cinepakenc.c.
|
static |
Definition at line 186 of file cinepakenc.c.
|
static |
Definition at line 314 of file cinepakenc.c.
Referenced by rd_strip().
|
static |
Definition at line 475 of file cinepakenc.c.
Referenced by encode_codebook(), and encode_mode().
|
static |
Definition at line 482 of file cinepakenc.c.
Referenced by encode_mode().
|
static |
Definition at line 528 of file cinepakenc.c.
Referenced by calculate_skip_errors(), encode_mode(), quantize(), and rd_frame().
|
static |
Definition at line 545 of file cinepakenc.c.
Referenced by encode_mode(), and quantize().
|
static |
Definition at line 584 of file cinepakenc.c.
Referenced by encode_mode(), and quantize().
|
static |
Definition at line 604 of file cinepakenc.c.
Referenced by encode_mode(), and mjpeg_decode_scan().
|
static |
Definition at line 626 of file cinepakenc.c.
Referenced by rd_strip().
|
static |
Definition at line 774 of file cinepakenc.c.
Referenced by calculate_skip_errors(), and quantize().
|
static |
Definition at line 803 of file cinepakenc.c.
Referenced by rd_strip().
|
static |
Definition at line 927 of file cinepakenc.c.
Referenced by rd_strip().
|
static |
Definition at line 950 of file cinepakenc.c.
Referenced by rd_strip().
|
static |
Definition at line 968 of file cinepakenc.c.
Referenced by rd_frame().
|
static |
Definition at line 1150 of file cinepakenc.c.
Referenced by rd_frame().
|
static |
Definition at line 1161 of file cinepakenc.c.
Referenced by cinepak_encode_frame().
|
static |
Definition at line 1325 of file cinepakenc.c.
|
static |
Definition at line 1349 of file cinepakenc.c.
|
static |
Definition at line 170 of file cinepakenc.c.
|
static |
Definition at line 179 of file cinepakenc.c.
AVCodec ff_cinepak_encoder |
Definition at line 1379 of file cinepakenc.c.