Go to the documentation of this file.
37 int run_index = sc->run_index;
42 if (sc->slice_coding_mode == 1) {
44 for (x = 0; x <
w; x++) {
55 for (x = 0; x <
w; x++) {
76 if (
context == 0 && run_mode == 0)
80 if (run_count == 0 && run_mode == 1) {
83 if (x + run_count <=
w)
96 while (run_count > 1 &&
w-x > 1) {
102 while (run_count > 1 &&
w-x > 1) {
121 ff_dlog(
f->avctx,
"count:%d index:%d, mode:%d, x:%d pos:%d\n",
130 sc->run_index = run_index;
140 int lbd =
f->avctx->bits_per_raw_sample <= 8;
141 int bits =
f->avctx->bits_per_raw_sample > 0 ?
f->avctx->bits_per_raw_sample : 8;
143 int transparency =
f->transparency;
146 for (x = 0; x < 4; x++) {
147 sample[x][0] =
RENAME(sc->sample_buffer) + x * 2 * (
w + 6) + 3;
148 sample[x][1] =
RENAME(sc->sample_buffer) + (x * 2 + 1) * (
w + 6) + 3;
153 memset(
RENAME(sc->sample_buffer), 0, 8 * (
w + 6) *
sizeof(*
RENAME(sc->sample_buffer)));
155 for (y = 0; y <
h; y++) {
156 for (p = 0; p < 3 + transparency; p++) {
165 if (lbd && sc->slice_coding_mode == 0)
172 for (x = 0; x <
w; x++) {
178 if (sc->slice_coding_mode != 1) {
181 g -= (
b * sc->slice_rct_by_coef +
r * sc->slice_rct_ry_coef) >> 2;
187 *((uint32_t*)(
src[0] + x*4 +
stride[0]*y)) =
b + ((
unsigned)
g<<8) + ((
unsigned)
r<<16) + ((
unsigned)
a<<24);
188 else if (
sizeof(
TYPE) == 4 || transparency) {
189 *((uint16_t*)(
src[0] + x*2 +
stride[0]*y)) =
g;
190 *((uint16_t*)(
src[1] + x*2 +
stride[1]*y)) =
b;
191 *((uint16_t*)(
src[2] + x*2 +
stride[2]*y)) =
r;
193 *((uint16_t*)(
src[3] + x*2 +
stride[3]*y)) =
a;
195 *((uint16_t*)(
src[0] + x*2 +
stride[0]*y)) =
b;
196 *((uint16_t*)(
src[1] + x*2 +
stride[1]*y)) =
g;
197 *((uint16_t*)(
src[2] + x*2 +
stride[2]*y)) =
r;
static int get_bits_count(const GetBitContext *s)
static av_always_inline void predict(PredictorState *ps, int *coef, int output_enable)
uint8_t(* state)[CONTEXT_SIZE]
static av_always_inline int RENAME() decode_line(FFV1Context *f, FFV1SliceContext *sc, GetBitContext *gb, int w, TYPE *sample[2], int plane_index, int bits, int ac)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static av_flatten int get_symbol_inline(RangeCoder *c, uint8_t *state, int is_signed)
static int RENAME() decode_rgb_frame(FFV1Context *f, FFV1SliceContext *sc, GetBitContext *gb, uint8_t *src[4], int w, int h, int stride[4])
static int is_input_end(RangeCoder *c, GetBitContext *gb, int ac)
static int get_vlc_symbol(GetBitContext *gb, VlcState *const state, int bits)
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
static const int16_t quant_table[64]
static unsigned int get_bits1(GetBitContext *s)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static av_always_inline int diff(const struct color_info *a, const struct color_info *b, const int trans_thresh)
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
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
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define i(width, name, range_min, range_max)
static int get_rac(RangeCoder *c, uint8_t *const state)
const uint8_t ff_log2_run[41]
#define AVERROR_INVALIDDATA
Invalid data found when processing input.