47 s->
hencdsp.
diff_int16((uint16_t *)dst, (
const uint16_t *)src0, (
const uint16_t *)src1, s->
n - 1, w);
55 int min_width =
FFMIN(w, 32);
58 for (i = 0; i < min_width; i++) {
59 const int temp = src[
i];
68 const uint16_t *src16 = (
const uint16_t *)src;
69 uint16_t *dst16 = ( uint16_t *)dst;
70 for (i = 0; i < min_width; i++) {
71 const int temp = src16[
i];
72 dst16[
i] = temp -
left;
84 int *red,
int *green,
int *blue,
89 int min_width =
FFMIN(w, 8);
95 for (i = 0; i < min_width; i++) {
96 const int rt = src[i * 4 +
R];
97 const int gt = src[i * 4 +
G];
98 const int bt = src[i * 4 +
B];
99 const int at = src[i * 4 +
A];
100 dst[i * 4 +
R] = rt -
r;
101 dst[i * 4 +
G] = gt -
g;
102 dst[i * 4 +
B] = bt -
b;
103 dst[i * 4 +
A] = at -
a;
112 *red = src[(w - 1) * 4 +
R];
113 *green = src[(w - 1) * 4 +
G];
114 *blue = src[(w - 1) * 4 +
B];
115 *alpha = src[(w - 1) * 4 +
A];
120 int *red,
int *green,
int *blue)
127 for (i = 0; i <
FFMIN(w, 16); i++) {
128 const int rt = src[i * 3 + 0];
129 const int gt = src[i * 3 + 1];
130 const int bt = src[i * 3 + 2];
131 dst[i * 3 + 0] = rt -
r;
132 dst[i * 3 + 1] = gt -
g;
133 dst[i * 3 + 2] = bt -
b;
141 *red = src[(w - 1) * 3 + 0];
142 *green = src[(w - 1) * 3 + 1];
143 *blue = src[(w - 1) * 3 + 2];
161 for (i = 0; i < n;) {
165 for (; i < n && len[
i] == val && repeat < 255; i++)
168 av_assert0(val < 32 && val >0 && repeat < 256 && repeat>0);
171 buf[index++] = repeat;
173 buf[index++] = val | (repeat << 5);
189 for (i = 0; i <
count; i++) {
215 #define STATS_OUT_SIZE 21*MAX_N*3 + 4 225 #if FF_API_CODED_FRAME 231 #if FF_API_PRIVATE_OPT 312 #if FF_API_PRIVATE_OPT 322 "context=1 is not compatible with " 323 "2 pass huffyuv encoding\n");
331 "Error: YV12 is not supported by huffyuv; use " 332 "vcodec=ffvhuff or format=422p\n");
335 #if FF_API_PRIVATE_OPT 338 "Error: per-frame huffman tables are not supported " 339 "by huffyuv; use vcodec=ffvhuff\n");
344 "Error: ver>2 is not supported " 345 "by huffyuv; use vcodec=ffvhuff\n");
351 "using huffyuv 2.2.0 or newer interlacing flag\n");
355 av_log(avctx,
AV_LOG_ERROR,
"Ver > 3 is under development, files encoded with it may not be decodable with future versions!!!\n" 356 "Use vstrict=-2 / -strict -2 to use it anyway.\n");
362 "Error: RGB is incompatible with median predictor\n");
386 for (i = 0; i < 4; i++)
387 for (j = 0; j < s->
vlc_n; j++)
391 for (i = 0; i < 4; i++) {
394 for (j = 0; j < s->
vlc_n; j++) {
395 s->
stats[
i][j] += strtol(p, &next, 0);
396 if (next == p)
return -1;
400 if (p[0] == 0 || p[1] == 0 || p[2] == 0)
break;
403 for (i = 0; i < 4; i++)
404 for (j = 0; j < s->
vlc_n; j++) {
407 s->
stats[
i][j] = 100000000 / (d*d + 1);
417 for (i = 0; i < 4; i++) {
419 for (j = 0; j < s->
vlc_n; j++) {
421 s->
stats[
i][j] = pels/(d*d + 1);
425 for (i = 0; i < 4; i++)
426 for (j = 0; j < s->
vlc_n; j++)
453 int y1 = y[2 * i + 1];\ 460 for(i = 0; i <
count; i++) {
471 for (i = 0; i <
count; i++) {
483 for(i = 0; i <
count; i++) {
504 int y0 = s->temp[0][width-1]; 506 int y0 = s->temp16[0][width-1] & mask; 508 int y0 = s->temp16[0][width-1]; 510 s->stats[plane][y0]++; 512 s->stats[plane][y0>>2]++; 514 put_bits(&s->pb, s->len[plane][y0], s->bits[plane][y0]); 516 put_bits(&s->pb, s->len[plane][y0>>2], s->bits[plane][y0>>2]);\ 517 put_bits(&s->pb, 2, y0&3); 520 int y0 = s->temp[0][2 * i];\ 521 int y1 = s->temp[0][2 * i + 1]; 523 int y0 = s->temp16[0][2 * i] & mask;\ 524 int y1 = s->temp16[0][2 * i + 1] & mask; 526 int y0 = s->temp16[0][2 * i];\ 527 int y1 = s->temp16[0][2 * i + 1]; 529 s->stats[plane][y0]++;\ 530 s->stats[plane][y1]++; 532 s->stats[plane][y0>>2]++;\ 533 s->stats[plane][y1>>2]++; 535 put_bits(&s->pb, s->len[plane][y0], s->bits[plane][y0]);\ 536 put_bits(&s->pb, s->len[plane][y1], s->bits[plane][y1]); 538 put_bits(&s->pb, s->len[plane][y0>>2], s->bits[plane][y0>>2]);\ 539 put_bits(&s->pb, 2, y0&3);\ 540 put_bits(&s->pb, s->len[plane][y1>>2], s->bits[plane][y1>>2]);\ 541 put_bits(&s->pb, 2, y1&3); 545 for (i = 0; i <
count; i++) {
558 for (i = 0; i <
count; i++) {
569 for (i = 0; i <
count; i++) {
578 }
else if (s->
bps <= 14) {
581 for (i = 0; i <
count; i++) {
594 for (i = 0; i <
count; i++) {
605 for (i = 0; i <
count; i++) {
616 for (i = 0; i <
count; i++) {
629 for (i = 0; i <
count; i++) {
640 for (i = 0; i <
count; i++) {
666 int y0 = s->temp[0][2 * i];\ 667 int y1 = s->temp[0][2 * i + 1]; 672 put_bits(&s->pb, s->len[0][y0], s->bits[0][y0]);\ 673 put_bits(&s->pb, s->len[0][y1], s->bits[0][y1]); 678 for (i = 0; i <
count; i++) {
687 for (i = 0; i <
count; i++) {
693 for (i = 0; i <
count; i++) {
706 4 * planes * count) {
712 int g = s->temp[0][planes == 3 ? 3 * i + 1 : 4 * i + G]; \ 713 int b =(s->temp[0][planes == 3 ? 3 * i + 2 : 4 * i + B] - g) & 0xFF;\ 714 int r =(s->temp[0][planes == 3 ? 3 * i + 0 : 4 * i + R] - g) & 0xFF;\ 715 int a = s->temp[0][planes * i + A]; 725 put_bits(&s->pb, s->len[1][g], s->bits[1][g]); \ 726 put_bits(&s->pb, s->len[0][b], s->bits[0][b]); \ 727 put_bits(&s->pb, s->len[2][r], s->bits[2][r]); \ 729 put_bits(&s->pb, s->len[2][a], s->bits[2][a]); 733 for (i = 0; i <
count; i++) {
738 for (i = 0; i <
count; i++) {
744 for (i = 0; i <
count; i++) {
753 const AVFrame *pict,
int *got_packet)
757 const int width2 = s->
width>>1;
762 const AVFrame *
const p = pict;
773 for (i = 0; i < 4; i++)
774 for (j = 0; j < s->
vlc_n; j++)
775 s->
stats[i][j] >>= 1;
782 int lefty, leftu, leftv, y, cy;
796 int lefttopy, lefttopu, lefttopv;
813 lefttopy = p->
data[0][3];
814 lefttopu = p->
data[1][1];
815 lefttopv = p->
data[2][1];
822 for (; y <
height; y++,cy++) {
832 if (y >= height)
break;
845 for (cy = y = 1; y <
height; y++, cy++) {
861 if (y >= height)
break;
888 const int fake_stride = -fake_ystride;
890 int leftr, leftg, leftb, lefta;
898 &leftr, &leftg, &leftb, &lefta);
901 for (y = 1; y < s->
height; y++) {
906 &leftr, &leftg, &leftb, &lefta);
909 &leftr, &leftg, &leftb, &lefta);
916 const int fake_stride = -fake_ystride;
918 int leftr, leftg, leftb;
926 &leftr, &leftg, &leftb);
929 for (y = 1; y < s->
height; y++) {
935 &leftr, &leftg, &leftb);
938 &leftr, &leftg, &leftb);
944 for (plane = 0; plane < 1 + 2*s->
chroma + s->
alpha; plane++) {
948 int fake_stride = fake_ystride;
950 if (s->
chroma && (plane == 1 || plane == 2)) {
953 fake_stride = plane == 1 ? fake_ustride : fake_vstride;
970 lefttop = p->
data[plane][0];
980 for (y = 1; y <
h; y++) {
1009 for (i = 0; i < 4; i++) {
1010 for (j = 0; j < s->
vlc_n; j++) {
1029 pkt->
size = size * 4;
1048 #define OFFSET(x) offsetof(HYuvContext, x) 1049 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM 1051 #define COMMON_OPTIONS \ 1052 { "non_deterministic", "Allow multithreading for e.g. context=1 at the expense of determinism", \ 1053 OFFSET(non_determ), AV_OPT_TYPE_BOOL, { .i64 = 1 }, \ 1055 { "pred", "Prediction method", OFFSET(predictor), AV_OPT_TYPE_INT, { .i64 = LEFT }, LEFT, MEDIAN, VE, "pred" }, \ 1056 { "left", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LEFT }, INT_MIN, INT_MAX, VE, "pred" }, \ 1057 { "plane", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PLANE }, INT_MIN, INT_MAX, VE, "pred" }, \ 1058 { "median", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MEDIAN }, INT_MIN, INT_MAX, VE, "pred" }, \ 1095 .priv_class = &normal_class,
1104 #if CONFIG_FFVHUFF_ENCODER 1115 .priv_class = &ff_class,
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
#define AV_CODEC_FLAG_INTERLACED_ME
interlaced motion estimation
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
const struct AVCodec * codec
#define AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_YUVA422P9
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
static av_cold int encode_init(AVCodecContext *avctx)
ptrdiff_t const GLvoid * data
#define AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUVA422P10
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
#define LIBAVUTIL_VERSION_INT
packed RGB 8:8:8, 24bpp, RGBRGB...
static av_cold int init(AVCodecContext *avctx)
#define AV_PIX_FMT_GBRP10
const char * av_default_item_name(void *ptr)
Return the context name.
static int encode_plane_bitstream(HYuvContext *s, int width, int plane)
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
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
#define AV_PIX_FMT_YUV420P12
char * stats_in
pass2 encoding statistics input buffer Concatenated stuff from stats_out of pass1 should be placed he...
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
LLVidEncDSPContext llvidencdsp
static const struct @322 planes[]
av_cold void ff_huffyuvencdsp_init(HuffYUVEncDSPContext *c, AVCodecContext *avctx)
av_cold void ff_llvidencdsp_init(LLVidEncDSPContext *c)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64_t min_size)
Check AVPacket size and/or allocate data.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
void(* bswap_buf)(uint32_t *dst, const uint32_t *src, int w)
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 offset
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
#define u(width, name, range_min, range_max)
#define AV_PIX_FMT_YUVA420P9
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)
void(* diff_bytes)(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, intptr_t w)
attribute_deprecated int context_model
#define AV_PIX_FMT_YUV444P16
static void sub_left_prediction_rgb24(HYuvContext *s, uint8_t *dst, uint8_t *src, int w, int *red, int *green, int *blue)
void(* sub_hfyu_median_pred_int16)(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w, int *left, int *left_top)
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
#define AV_PIX_FMT_YUV422P12
char * stats_out
pass1 encoding statistics output buffer
#define AV_PIX_FMT_YUVA420P16
#define AV_INPUT_BUFFER_MIN_SIZE
minimum encoding buffer size Used to avoid some checks during header writing.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
uint8_t len[4][MAX_VLC_N]
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
av_cold int ff_huffyuv_alloc_temp(HYuvContext *s)
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void(* sub_median_pred)(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, intptr_t w, int *left, int *left_top)
Subtract HuffYUV's variant of median prediction.
av_cold void ff_huffyuv_common_end(HYuvContext *s)
AVCodec ff_ffvhuff_encoder
static const uint16_t mask[17]
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVClass ff_class
#define AV_PIX_FMT_YUVA444P16
int flags
AV_CODEC_FLAG_*.
const char * name
Name of the codec implementation.
#define AV_PIX_FMT_YUV444P10
static const AVClass normal_class
huffyuv codec for libavcodec.
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
int flags
A combination of AV_PKT_FLAG values.
static int put_bits_count(PutBitContext *s)
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
#define AV_PIX_FMT_YUV422P9
uint8_t nb_components
The number of components each pixel has, (1-4)
enum AVPictureType pict_type
Picture type of the frame.
#define AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_GRAY16
AVCodec ff_huffyuv_encoder
void(* diff_int16)(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w)
#define AV_CODEC_FLAG_PASS1
Use internal 2pass ratecontrol in first pass mode.
int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table, int n)
#define AV_PIX_FMT_YUVA444P10
static av_cold int encode_end(AVCodecContext *avctx)
#define AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_GBRP14
#define AV_PIX_FMT_YUV420P16
#define AV_LOG_INFO
Standard information.
#define AV_PIX_FMT_YUV420P14
int ff_huff_gen_len_table(uint8_t *dst, const uint64_t *stats, int stats_size, int skip0)
static int sub_left_prediction(HYuvContext *s, uint8_t *dst, const uint8_t *src, int w, int left)
Libavcodec external API header.
static int encode_422_bitstream(HYuvContext *s, int offset, int count)
attribute_deprecated int prediction_method
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
static const AVOption ff_options[]
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
static const int16_t alpha[]
main external API structure.
Tag MUST be and< 10hcoeff half pel interpolation filter coefficients, hcoeff[0] are the 2 middle coefficients[1] are the next outer ones and so on, resulting in a filter like:...eff[2], hcoeff[1], hcoeff[0], hcoeff[0], hcoeff[1], hcoeff[2]...the sign of the coefficients is not explicitly stored but alternates after each coeff and coeff[0] is positive, so...,+,-,+,-,+,+,-,+,-,+,...hcoeff[0] is not explicitly stored but found by subtracting the sum of all stored coefficients with signs from 32 hcoeff[0]=32-hcoeff[1]-hcoeff[2]-...a good choice for hcoeff and htaps is htaps=6 hcoeff={40,-10, 2}an alternative which requires more computations at both encoder and decoder side and may or may not be better is htaps=8 hcoeff={42,-14, 6,-2}ref_frames minimum of the number of available reference frames and max_ref_frames for example the first frame after a key frame always has ref_frames=1spatial_decomposition_type wavelet type 0 is a 9/7 symmetric compact integer wavelet 1 is a 5/3 symmetric compact integer wavelet others are reserved stored as delta from last, last is reset to 0 if always_reset||keyframeqlog quality(logarithmic quantizer scale) stored as delta from last, last is reset to 0 if always_reset||keyframemv_scale stored as delta from last, last is reset to 0 if always_reset||keyframe FIXME check that everything works fine if this changes between framesqbias dequantization bias stored as delta from last, last is reset to 0 if always_reset||keyframeblock_max_depth maximum depth of the block tree stored as delta from last, last is reset to 0 if always_reset||keyframequant_table quantization tableHighlevel bitstream structure:==============================--------------------------------------------|Header|--------------------------------------------|------------------------------------|||Block0||||split?||||yes no||||.........intra?||||:Block01:yes no||||:Block02:.................||||:Block03::y DC::ref index:||||:Block04::cb DC::motion x:||||.........:cr DC::motion y:||||.................|||------------------------------------||------------------------------------|||Block1|||...|--------------------------------------------|------------------------------------|||Y subbands||Cb subbands||Cr subbands||||------||------||------|||||LL0||HL0||||LL0||HL0||||LL0||HL0|||||------||------||------||||------||------||------|||||LH0||HH0||||LH0||HH0||||LH0||HH0|||||------||------||------||||------||------||------|||||HL1||LH1||||HL1||LH1||||HL1||LH1|||||------||------||------||||------||------||------|||||HH1||HL2||||HH1||HL2||||HH1||HL2|||||...||...||...|||------------------------------------|--------------------------------------------Decoding process:=================------------|||Subbands|------------||||------------|Intra DC||||LL0 subband prediction------------|\Dequantization-------------------\||Reference frames|\IDWT|--------------|Motion\|||Frame 0||Frame 1||Compensation.OBMC v-------|--------------|--------------.\------> Frame n output Frame Frame<----------------------------------/|...|-------------------Range Coder:============Binary Range Coder:-------------------The implemented range coder is an adapted version based upon"Range encoding: an algorithm for removing redundancy from a digitised message."by G.N.N.Martin.The symbols encoded by the Snow range coder are bits(0|1).The associated probabilities are not fix but change depending on the symbol mix seen so far.bit seen|new state---------+-----------------------------------------------0|256-state_transition_table[256-old_state];1|state_transition_table[old_state];state_transition_table={0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 190, 191, 192, 194, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 204, 205, 206, 207, 208, 209, 209, 210, 211, 212, 213, 215, 215, 216, 217, 218, 219, 220, 220, 222, 223, 224, 225, 226, 227, 227, 229, 229, 230, 231, 232, 234, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 0, 0, 0, 0, 0, 0, 0};FIXME Range Coding of integers:-------------------------FIXME Neighboring Blocks:===================left and top are set to the respective blocks unless they are outside of the image in which case they are set to the Null block top-left is set to the top left block unless it is outside of the image in which case it is set to the left block if this block has no larger parent block or it is at the left side of its parent block and the top right block is not outside of the image then the top right block is used for top-right else the top-left block is used Null block y, cb, cr are 128 level, ref, mx and my are 0 Motion Vector Prediction:=========================1.the motion vectors of all the neighboring blocks are scaled to compensate for the difference of reference frames scaled_mv=(mv *(256 *(current_reference+1)/(mv.reference+1))+128)> the median of the scaled left
#define AV_PIX_FMT_YUV420P10
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Describe the class of an AVClass context structure.
huffman tree builder and VLC generator
static int encode_bgra_bitstream(HYuvContext *s, int count, int planes)
#define AV_PIX_FMT_YUV420P9
static enum AVPixelFormat pix_fmts[]
#define AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_GBRP12
HuffYUVEncDSPContext hencdsp
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV444P12
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static void diff_bytes(HYuvContext *s, uint8_t *dst, const uint8_t *src0, const uint8_t *src1, int w)
GLint GLenum GLboolean GLsizei stride
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define FF_DISABLE_DEPRECATION_WARNINGS
common internal api header.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
static int store_huffman_tables(HYuvContext *s, uint8_t *buf)
planar GBRA 4:4:4:4 32bpp
static int store_table(HYuvContext *s, const uint8_t *len, uint8_t *buf)
#define AV_CODEC_FLAG2_NO_OUTPUT
Skip bitstream encoding.
#define AV_PIX_FMT_YUVA444P9
attribute_deprecated AVFrame * coded_frame
the picture in the bitstream
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
static int encode_gray_bitstream(HYuvContext *s, int count)
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
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)
av_cold void ff_huffyuv_common_init(AVCodecContext *avctx)
#define AV_CODEC_FLAG_PASS2
Use internal 2pass ratecontrol in second pass mode.
#define FF_ENABLE_DEPRECATION_WARNINGS
int key_frame
1 -> keyframe, 0-> not
int flags2
AV_CODEC_FLAG2_*.
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
uint32_t bits[4][MAX_VLC_N]
uint64_t stats[4][MAX_VLC_N]
static const AVOption normal_options[]
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions
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 local context
int depth
Number of bits in the component.
AVPixelFormat
Pixel format.
static double val(void *priv, double ch)
This structure stores compressed data.
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
int strict_std_compliance
strictly follow the standard (MPEG-4, ...).
#define AV_PIX_FMT_YUV422P16