Go to the documentation of this file.
   46 #include "config_components.h" 
   55     while (i < state->error_sum) { 
 
   60         ff_dlog(
NULL, 
"k-overflow bias:%d error:%d drift:%d count:%d k:%d",
 
   66     ff_dlog(
NULL, 
"v:%d bias:%d error:%d drift:%d count:%d k:%d",
 
   69     v ^= ((2 * 
state->drift + 
state->count) >> 31);
 
   91 #define RENAME(name) name 
   97 #define RENAME(name) name ## 32 
  102                         uint8_t *
src, 
int w, 
int h, 
int stride, 
int plane_index,
 
  103                         int remap_index, 
int pixel_stride, 
int ac)
 
  114         bits = 
f->avctx->bits_per_raw_sample;
 
  124     for (y = 0; y < 
h; y++) {
 
  133         if (
f->avctx->bits_per_raw_sample <= 8) {
 
  138                 for (x = 0; x < 
w; x++)
 
  140             for (x = 0; x < 
w; x++)
 
  148                 if (
f->packed_at_lsb || 
f->avctx->bits_per_raw_sample == 16) {
 
  149                     for (x = 0; x < 
w; x++) {
 
  153                     for (x = 0; x < 
w; x++) {
 
  155                         ((uint16_t*)(
src + 
stride*y))[x*pixel_stride] = v << (16 - 
f->avctx->bits_per_raw_sample) | v >> (2 * 
f->avctx->bits_per_raw_sample - 16);
 
  159                 if (
f->packed_at_lsb || 
f->avctx->bits_per_raw_sample == 16) {
 
  160                     for (x = 0; x < 
w; x++) {
 
  164                     for (x = 0; x < 
w; x++) {
 
  165                         ((uint16_t*)(
src + 
stride*y))[x*pixel_stride] = 
sample[1][x] << (16 - 
f->avctx->bits_per_raw_sample) | ((uint16_t **)
sample)[1][x] >> (2 * 
f->avctx->bits_per_raw_sample - 16);
 
  179     unsigned ps, context_count;
 
  191     if (sx < 0 || sy < 0 || sw <= 0 || sh <= 0)
 
  193     if (sx > 
f->num_h_slices - sw || sy > 
f->num_v_slices - sh)
 
  209     for (
unsigned i = 0; 
i < 
f->plane_count; 
i++) {
 
  212         if (idx >= (
unsigned)
f->quant_table_count) {
 
  216         p->quant_table_index = idx;
 
  217         context_count = 
f->context_count[idx];
 
  219         if (
p->context_count < context_count) {
 
  223         p->context_count = context_count;
 
  230     } 
else if (ps == 2) {
 
  233     } 
else if (ps == 3) {
 
  240                            frame->sample_aspect_ratio) < 0) {
 
  242                frame->sample_aspect_ratio.num,
 
  243                frame->sample_aspect_ratio.den);
 
  247     if (
f->version > 3) {
 
  258         if (
f->combined_version >= 0x40004) {
 
  267     if (
f->avctx->bits_per_raw_sample == 32) {
 
  284         f->frame_damaged = 1;
 
  289     int ndx = (
i * mul_count) >> 32;
 
  300     unsigned int end = (1LL<<
f->avctx->bits_per_raw_sample) - 1;
 
  301     int flip = sc->
remap == 2 ? (end>>1) : 0;
 
  304     for (
int p= 0; 
p < 1 + 2*
f->chroma_planes + 
f->transparency; 
p++) {
 
  307         uint8_t 
state[2][3][32];
 
  315         if (mul_count > 4096
U)
 
  317         for (
int i = 0; 
i<mul_count; 
i++) {
 
  325         for (
i=0; 
i <= end ;) {
 
  327             unsigned run0 = lu ? 0   : 
run;
 
  328             unsigned run1 = lu ? 
run : 1;
 
  330             i += run0 * current_mul;
 
  333                 if (current_mul > 1) {
 
  335                     if (delta <= -current_mul || delta > current_mul/2)
 
  337                     i += current_mul - 1 + 
delta;
 
  367     const int      si = sc - 
f->slices;
 
  374     if (
f->slice_damaged[si])
 
  380     if (
f->version > 2) {
 
  405         for(
int p = 0; 
p < 1 + 2*
f->chroma_planes + 
f->transparency ; 
p++) {
 
  406             if (
f->avctx->bits_per_raw_sample == 32) {
 
  423         if (
f->combined_version >= 0x30002)
 
  424             get_rac(&sc->
c, (uint8_t[]) { 129 });
 
  432     if (
f->colorspace == 0 && (
f->chroma_planes || !
f->transparency)) {
 
  435         const int cx            = x >> 
f->chroma_h_shift;
 
  436         const int cy            = y >> 
f->chroma_v_shift;
 
  437         decode_plane(
f, sc, &gb, 
p->data[0] + ps*x + y*
p->linesize[0], 
width, 
height, 
p->linesize[0], 0, 0, 1, ac);
 
  439         if (
f->chroma_planes) {
 
  440             decode_plane(
f, sc, &gb, 
p->data[1] + ps*cx+cy*
p->linesize[1], chroma_width, chroma_height, 
p->linesize[1], 1, 1, 1, ac);
 
  441             decode_plane(
f, sc, &gb, 
p->data[2] + ps*cx+cy*
p->linesize[2], chroma_width, chroma_height, 
p->linesize[2], 1, 2, 1, ac);
 
  444             decode_plane(
f, sc, &gb, 
p->data[3] + ps*x + y*
p->linesize[3], 
width, 
height, 
p->linesize[3], (
f->version >= 4 && !
f->chroma_planes) ? 1 : 2,
 
  445                                                                                                           (
f->version >= 4 && !
f->chroma_planes) ? 1 : 3, 1, ac);
 
  446     } 
else if (
f->colorspace == 0) {
 
  447          decode_plane(
f, sc, &gb, 
p->data[0] + ps*x + y*
p->linesize[0]          , 
width, 
height, 
p->linesize[0], 0, 0, 2, ac);
 
  448          decode_plane(
f, sc, &gb, 
p->data[0] + ps*x + y*
p->linesize[0] + (ps>>1), 
width, 
height, 
p->linesize[0], 1, 1, 2, ac);
 
  449     } 
else if (
f->use32bit) {
 
  450         uint8_t *
planes[4] = { 
p->data[0] + ps * x + y * 
p->linesize[0],
 
  451                                p->data[1] + ps * x + y * 
p->linesize[1],
 
  452                                p->data[2] + ps * x + y * 
p->linesize[2] };
 
  454             planes[3] =        
p->data[3] + ps * x + y * 
p->linesize[3];
 
  457         uint8_t *
planes[4] = { 
p->data[0] + ps * x + y * 
p->linesize[0] };
 
  458         if (
f->avctx->bits_per_raw_sample > 8) {
 
  459             planes[1] =        
p->data[1] + ps * x + y * 
p->linesize[1];
 
  460             planes[2] =        
p->data[2] + ps * x + y * 
p->linesize[2];
 
  462                 planes[3] =    
p->data[3] + ps * x + y * 
p->linesize[3];
 
  468         get_rac(&sc->
c, (uint8_t[]) { 129 });
 
  488 #if CONFIG_FFV1_VULKAN_HWACCEL 
  501     int context_count = -1; 
 
  510     if (
f->configured_pix_fmt != 
f->pix_fmt) {
 
  512         if (
f->avctx->pix_fmt < 0)
 
  514         f->configured_pix_fmt = 
f->pix_fmt;
 
  518             f->chroma_h_shift, 
f->chroma_v_shift, 
f->pix_fmt);
 
  519     if (
f->version < 2) {
 
  521         if (context_count < 0) {
 
  525         f->slice_count = 
f->max_slice_count;
 
  526     } 
else if (
f->version < 3) {
 
  529         const uint8_t *
p = 
c->bytestream_end;
 
  530         for (
f->slice_count = 0;
 
  531              f->slice_count < 
MAX_SLICES && 3 + 5*!!
f->ec < 
p - 
c->bytestream_start;
 
  533             int trailer = 3 + 5*!!
f->ec;
 
  535             if (
size + trailer > 
p - 
c->bytestream_start)
 
  540     if (
f->slice_count > (
unsigned)
MAX_SLICES || 
f->slice_count <= 0 || 
f->slice_count > 
f->max_slice_count) {
 
  541         av_log(
f->avctx, 
AV_LOG_ERROR, 
"slice count %d is invalid (max=%d)\n", 
f->slice_count, 
f->max_slice_count);
 
  547     if (!
f->slice_damaged)
 
  550     for (
int j = 0; j < 
f->slice_count; j++) {
 
  553         if (
f->version == 2) {
 
  559             if (sx < 0 || sy < 0 || sw <= 0 || sh <= 0)
 
  561             if (sx > 
f->num_h_slices - sw || sy > 
f->num_v_slices - sh)
 
  580         for (
int i = 0; 
i < 
f->plane_count; 
i++) {
 
  583             if (
f->version == 2) {
 
  585                 if (idx >= (
unsigned)
f->quant_table_count) {
 
  587                            "quant_table_index out of range\n");
 
  590                 p->quant_table_index = idx;
 
  591                 context_count = 
f->context_count[idx];
 
  594             if (
f->version <= 2) {
 
  596                 p->context_count = context_count;
 
  624                            uint8_t *buf, uint8_t *buf_end, 
int idx,
 
  625                            uint8_t **
pos, uint32_t *
len)
 
  630     uint32_t v = buf_end - buf;
 
  631     if (idx || 
f->version > 2) {
 
  633         uint32_t trailer = 3 + 5*!!
f->ec;
 
  634         if (trailer > buf_end - buf)
 
  637             v = 
AV_RB24(buf_end - trailer) + trailer;
 
  640     if (buf_end - buf < v) {
 
  656                          uint8_t *buf, 
size_t buf_size)
 
  661     uint8_t keystate = 128;
 
  672         if (!
f->key_frame_ok) {
 
  674                    "Cannot decode non-keyframe without valid keyframe\n");
 
  681         if (buf_size < avctx->
width * avctx->
height / (128*8))
 
  685         int s = 1 + 
w / (1<<23);
 
  692         if (buf_size < (avctx->
height + 
i + 6) / 8 * 
s)
 
  705     uint8_t *buf = avpkt->
data;
 
  706     size_t buf_size = avpkt->
size;
 
  707     uint8_t *buf_end = buf + buf_size;
 
  709     for (
int i = 
f->slice_count - 1; 
i >= 0; 
i--) {
 
  725             if (crc != 
f->crcref) {
 
  758     for (
int i = 
f->slice_count - 1; 
i >= 0; 
i--) {
 
  762             const uint8_t *
src[4];
 
  765             for (
int j = 0; j < 
desc->nb_components; j++) {
 
  766                 int pixshift = 
desc->comp[j].depth > 8;
 
  767                 int sh = (j == 1 || j == 2) ? 
f->chroma_h_shift : 0;
 
  768                 int sv = (j == 1 || j == 2) ? 
f->chroma_v_shift : 0;
 
  769                 dst[j] = 
p->data[j] + 
p->linesize[j] *
 
  771                 src[j] = 
f->last_picture.f->data[j] + 
f->last_picture.f->linesize[j] *
 
  777                           f->last_picture.f->linesize,
 
  782             f->slice_damaged[
i] = 1;
 
  804     FFSWAP(
void *, 
f->hwaccel_picture_private, 
f->hwaccel_last_picture_private);
 
  807     f->frame_damaged = 0;
 
  815                f->version, !!
f->key_frame, 
f->ac, 
f->ec, 
f->slice_count, 
f->avctx->bits_per_raw_sample);
 
  855         uint8_t *buf_end = avpkt->
data + avpkt->
size;
 
  860         for (
int i = 
f->slice_count - 1; 
i >= 0; 
i--) {
 
  993 #if CONFIG_FFV1_VULKAN_HWACCEL 
  
void ff_progress_frame_report(ProgressFrame *f, int n)
Notify later decoding threads when part of their reference frame is ready.
const struct AVHWAccel * hwaccel
Hardware accelerator in use.
#define AV_LOG_WARNING
Something somehow does not look correct.
AVPixelFormat
Pixel format.
#define AV_EF_EXPLODE
abort decoding on minor error detection
static void update_vlc_state(VlcState *const state, const int v)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
static int get_bits_left(GetBitContext *gb)
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
static int decode_slice(AVCodecContext *c, void *arg)
int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
Select the (possibly hardware accelerated) pixel format.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
static int get_sr_golomb(GetBitContext *gb, int k, int limit, int esc_len)
read signed golomb rice code (ffv1).
This structure describes decoded (raw) audio or video data.
static int decode_plane(FFV1Context *f, FFV1SliceContext *sc, GetBitContext *gb, uint8_t *src, int w, int h, int stride, int plane_index, int remap_index, int pixel_stride, int ac)
enum AVPixelFormat configured_pix_fmt
static const struct @540 planes[]
static int decode_header(AVCodecContext *avctx, RangeCoder *c, uint8_t *buf, size_t buf_size)
enum AVFieldOrder field_order
Field order.
int ff_progress_frame_get_buffer(AVCodecContext *avctx, ProgressFrame *f, int flags)
Wrapper around ff_progress_frame_alloc() and ff_thread_get_buffer().
int step
Number of elements between 2 horizontally consecutive pixels.
static int decode_remap(FFV1Context *f, FFV1SliceContext *sc)
void * hwaccel_picture_private
unsigned int fltmap_size[4]
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)
int16_t quant_tables[MAX_QUANT_TABLES][MAX_CONTEXT_INPUTS][MAX_QUANT_TABLE_SIZE]
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
int ff_ffv1_read_extra_header(FFV1Context *f)
void ff_ffv1_clear_slice_state(const FFV1Context *f, FFV1SliceContext *sc)
#define FF_DEBUG_PICT_INFO
#define AV_FRAME_FLAG_TOP_FIELD_FIRST
A flag to mark frames where the top field is displayed first if the content is interlaced.
static av_cold void close(AVCodecParserContext *s)
static int decode_current_mul(RangeCoder *rc, uint8_t state[32], int *mul, int mul_count, int64_t i)
@ AV_FIELD_TT
Top coded_first, top displayed first.
AVCodec p
The public AVCodec.
enum AVDiscard skip_frame
Skip decoding for selected frames.
static av_cold int ffv1_decode_close(AVCodecContext *avctx)
@ AV_FIELD_TB
Top coded first, bottom displayed first.
static int RENAME() decode_rgb_frame(FFV1Context *f, FFV1SliceContext *sc, GetBitContext *gb, uint8_t *src[4], int w, int h, int stride[4])
static void * av_refstruct_allocz(size_t size)
Equivalent to av_refstruct_alloc_ext(size, 0, NULL, NULL)
#define FF_CODEC_CAP_USES_PROGRESSFRAMES
The decoder might make use of the ProgressFrame API.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_FRAME_FLAG_KEY
A flag to mark frames that are keyframes.
#define FF_CODEC_DECODE_CB(func)
int ff_hwaccel_frame_priv_alloc(AVCodecContext *avctx, void **hwaccel_picture_private)
Allocate a hwaccel frame private data if the provided avctx uses a hwaccel method that needs it.
#define AV_CEIL_RSHIFT(a, b)
#define AV_GET_BUFFER_FLAG_REF
The decoder will keep a reference to the frame and may reuse it later.
static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
static double av_q2d(AVRational a)
Convert an AVRational to a double.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static enum AVPixelFormat pix_fmts[]
static int is_input_end(RangeCoder *c, GetBitContext *gb, int ac)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
unsigned int fltmap32_size[4]
void ff_progress_frame_unref(ProgressFrame *f)
Give up a reference to the underlying frame contained in a ProgressFrame and reset the ProgressFrame,...
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before ff_progress_frame_await() has been called on them. reget_buffer() and buffer age optimizations no longer work. *The contents of buffers must not be written to after ff_progress_frame_report() has been called on them. This includes draw_edges(). Porting codecs to frame threading
static av_always_inline int fold(int diff, int bits)
int ac
1=range coder <-> 0=golomb rice
static int get_vlc_symbol(GetBitContext *gb, VlcState *const state, int bits)
#define CODEC_LONG_NAME(str)
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
@ AVDISCARD_ALL
discard all
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
Rational number (pair of numerator and denominator).
@ AV_PICTURE_TYPE_I
Intra.
const FFCodec ff_ffv1_decoder
FFV1SliceContext * slices
uint8_t state_transition[256]
int ff_ffv1_get_symbol(RangeCoder *c, uint8_t *state, int is_signed)
#define UPDATE_THREAD_CONTEXT(func)
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 int decode_slices(AVCodecContext *avctx, RangeCoder c, AVPacket *avpkt)
av_cold void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf, int buf_size)
int(* init)(AVBSFContext *ctx)
static enum AVPixelFormat get_pixel_format(FFV1Context *f)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
static void flip(AVCodecContext *avctx, AVFrame *frame)
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.
void ff_build_rac_states(RangeCoder *c, int factor, int max_p)
#define AV_NOPTS_VALUE
Undefined timestamp value.
static void slice_set_damaged(FFV1Context *f, FFV1SliceContext *sc)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
#define FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame sett...
static av_flatten int get_symbol_inline(RangeCoder *c, uint8_t *state, int is_signed)
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
const AVCRC * av_crc_get_table(AVCRCId crc_id)
Get an initialized standard CRC table.
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
av_cold int ff_ffv1_init_slice_state(const FFV1Context *f, FFV1SliceContext *sc)
static int read_header(FFV1Context *f, RangeCoder *c)
#define FF_THREAD_FRAME
Decode more than one frame at once.
void av_refstruct_unref(void *objp)
Decrement the reference count of the underlying object and automatically free the object if there are...
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
av_cold int ff_ffv1_common_init(AVCodecContext *avctx, FFV1Context *s)
const char * name
Name of the codec implementation.
static int get_rac(RangeCoder *c, uint8_t *const state)
#define AV_FRAME_FLAG_INTERLACED
A flag to mark frames whose content is interlaced.
int ff_ffv1_read_quant_tables(RangeCoder *c, int16_t quant_table[MAX_CONTEXT_INPUTS][256])
static int find_next_slice(AVCodecContext *avctx, uint8_t *buf, uint8_t *buf_end, int idx, uint8_t **pos, uint32_t *len)
#define FFSWAP(type, a, b)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
static int decode_slice_header(const FFV1Context *f, FFV1SliceContext *sc, AVFrame *frame)
static const char * hwaccel
av_cold void ff_ffv1_close(FFV1Context *s)
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call ff_thread_finish_setup() afterwards. If some code can 't be moved
int ff_slice_coord(const FFV1Context *f, int width, int sx, int num_h_slices, int chroma_shift)
This is intended for both width and height.
PlaneContext * ff_ffv1_planes_alloc(void)
void ff_progress_frame_replace(ProgressFrame *dst, const ProgressFrame *src)
Do nothing if dst and src already refer to the same AVFrame; otherwise unreference dst and if src is ...
#define HWACCEL_VULKAN(codec)
enum AVPixelFormat pix_fmt
main external API structure.
uint8_t * bytestream_start
int(* execute)(struct AVCodecContext *c, int(*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size)
The codec may call this to execute several independent things.
static av_cold int decode_init(AVCodecContext *avctx)
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length)
Calculate the CRC of a block.
void av_refstruct_replace(void *dstp, const void *src)
Ensure *dstp refers to the same object as src.
static const FFHWAccel * ffhwaccel(const AVHWAccel *codec)
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call have update_thread_context() run it in the next thread. Add AV_CODEC_CAP_FRAME_THREADS to the codec capabilities. There will be very little speed gain at this point but it should work. Use ff_thread_get_buffer()(or ff_progress_frame_get_buffer() in case you have inter-frame dependencies and use the ProgressFrame API) to allocate frame buffers. Call ff_progress_frame_report() after some part of the current picture has decoded. A good place to put this is where draw_horiz_band() is called - add this if it isn 't called anywhere
int ff_ffv1_parse_header(FFV1Context *f, RangeCoder *c, uint8_t *state)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
The ProgressFrame structure.
This structure stores compressed data.
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
int width
picture width / height.
av_cold int ff_ffv1_init_slice_contexts(FFV1Context *f)
const uint8_t ff_log2_run[41]
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int av_image_check_sar(unsigned int w, unsigned int h, AVRational sar)
Check if the given sample aspect ratio of an image is valid.
void av_image_copy(uint8_t *const dst_data[4], const int dst_linesizes[4], const uint8_t *const src_data[4], const int src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height)
Copy image in src_data to dst_data.
int ac_byte_count
number of bytes used for AC coding
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_RB24