Go to the source code of this file.
|
static void | diff_bytes (HYuvContext *s, uint8_t *dst, const uint8_t *src0, const uint8_t *src1, int w) |
|
static int | sub_left_prediction (HYuvContext *s, uint8_t *dst, const uint8_t *src, int w, int left) |
|
static void | sub_left_prediction_bgr32 (HYuvContext *s, uint8_t *dst, const uint8_t *src, int w, int *red, int *green, int *blue, int *alpha) |
|
static void | sub_left_prediction_rgb24 (HYuvContext *s, uint8_t *dst, uint8_t *src, int w, int *red, int *green, int *blue) |
|
static void | sub_median_prediction (HYuvContext *s, uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w, int *left, int *left_top) |
|
static int | store_table (HYuvContext *s, const uint8_t *len, uint8_t *buf) |
|
static int | store_huffman_tables (HYuvContext *s, uint8_t *buf) |
|
static av_cold int | encode_init (AVCodecContext *avctx) |
|
static int | encode_422_bitstream (HYuvContext *s, int offset, int count) |
|
static int | encode_plane_bitstream (HYuvContext *s, int width, int plane) |
|
static int | encode_gray_bitstream (HYuvContext *s, int count) |
|
static int | encode_bgra_bitstream (HYuvContext *s, int count, int planes) |
|
static int | encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) |
|
static av_cold int | encode_end (AVCodecContext *avctx) |
|
huffyuv encoder
Definition in file huffyuvenc.c.
◆ STATS_OUT_SIZE
#define STATS_OUT_SIZE 21*MAX_N*3 + 4 |
◆ LOAD4
◆ LOADEND
◆ LOADEND_14
◆ LOADEND_16
#define LOADEND_16 int y0 = s->temp16[0][width-1]; |
◆ STATEND
◆ STATEND_16
◆ WRITEEND
◆ WRITEEND_16
Value:
put_bits(&
s->pb, 2, y0&3);
◆ LOAD2 [1/2]
Value: int y0 =
s->temp[0][2 *
i];\
int y1 =
s->temp[0][2 *
i + 1];
◆ LOAD2_14
Value: int y0 =
s->temp16[0][2 *
i] &
mask;\
int y1 =
s->temp16[0][2 *
i + 1] &
mask;
◆ LOAD2_16
Value: int y0 =
s->temp16[0][2 *
i];\
int y1 =
s->temp16[0][2 *
i + 1];
◆ STAT2 [1/2]
◆ STAT2_16
Value:
s->stats[
plane][y1>>2]++;
◆ WRITE2 [1/2]
◆ WRITE2_16
Value:
put_bits(&
s->pb, 2, y0&3);\
put_bits(&
s->pb, 2, y1&3);
◆ LOAD2 [2/2]
Value: int y0 =
s->temp[0][2 *
i];\
int y1 =
s->temp[0][2 *
i + 1];
◆ STAT2 [2/2]
◆ WRITE2 [2/2]
Value:
put_bits(&
s->pb,
s->len[0][y1],
s->bits[0][y1]);
◆ LOAD_GBRA
Value: int g =
s->temp[0][
planes == 3 ? 3 *
i + 1 : 4 *
i +
G]; \
int
b =(
s->temp[0][
planes == 3 ? 3 *
i + 2 : 4 *
i +
B] -
g) & 0xFF;\
int
r =(
s->temp[0][
planes == 3 ? 3 *
i + 0 : 4 *
i +
R] -
g) & 0xFF;\
◆ STAT_BGRA
◆ WRITE_GBRA
Value:
put_bits(&
s->pb,
s->len[0][
b],
s->bits[0][
b]); \
put_bits(&
s->pb,
s->len[2][
r],
s->bits[2][
r]); \
put_bits(&
s->pb,
s->len[2][
a],
s->bits[2][
a]);
◆ OFFSET
◆ VE
◆ COMMON_OPTIONS
Value: { "non_deterministic", "Allow multithreading for e.g. context=1 at the expense of determinism", \
Definition at line 1051 of file huffyuvenc.c.
◆ diff_bytes()
◆ sub_left_prediction()
◆ sub_left_prediction_bgr32()
◆ sub_left_prediction_rgb24()
◆ sub_median_prediction()
◆ store_table()
◆ store_huffman_tables()
◆ encode_init()
◆ encode_422_bitstream()
◆ encode_plane_bitstream()
◆ encode_gray_bitstream()
◆ encode_bgra_bitstream()
◆ encode_frame()
◆ encode_end()
◆ normal_options
◆ ff_options
◆ normal_class
Initial value:= {
.class_name = "huffyuv",
}
Definition at line 1071 of file huffyuvenc.c.
◆ ff_class
Initial value:= {
.class_name = "ffvhuff",
}
Definition at line 1078 of file huffyuvenc.c.
◆ ff_huffyuv_encoder
Initial value:= {
.name = "huffyuv",
},
}
Definition at line 1085 of file huffyuvenc.c.
#define AV_CODEC_CAP_INTRA_ONLY
Codec is intra only.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
AVPixelFormat
Pixel format.
static av_cold int init(AVCodecContext *avctx)
#define u(width, name, range_min, range_max)
static av_cold int encode_init(AVCodecContext *avctx)
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
static const uint16_t mask[17]
static enum AVPixelFormat pix_fmts[]
static const AVClass normal_class
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option keep it simple and lowercase description are in without and describe what they for example set the foo of the bar offset is the offset of the field in your context
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
#define LIBAVUTIL_VERSION_INT
const char * av_default_item_name(void *ptr)
Return the context name.
static av_cold int encode_end(AVCodecContext *avctx)
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
static const struct @314 planes[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
#define i(width, name, range_min, range_max)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
static const AVOption normal_options[]
static const AVOption ff_options[]
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)