Go to the documentation of this file.
54 if (!
s->picture.f || !
s->last_picture.f)
71 fs->plane_count =
f->plane_count;
72 fs->transparency =
f->transparency;
73 for (j = 0; j <
f->plane_count; j++) {
97 for (j = 1; j < 256; j++) {
98 fs->c. one_state[ j] =
f->state_transition[j];
99 fs->c.zero_state[256 - j] = 256 -
fs->c.one_state[j];
109 for (
i = 0;
i <
f->max_slice_count;
i++) {
121 f->max_slice_count =
f->num_h_slices *
f->num_v_slices;
124 for (
i = 0;
i <
f->max_slice_count;
i++) {
125 int sx =
i %
f->num_h_slices;
126 int sy =
i /
f->num_h_slices;
127 int sxs =
f->avctx->width * sx /
f->num_h_slices;
128 int sxe =
f->avctx->width * (sx + 1) /
f->num_h_slices;
129 int sys =
f->avctx->height * sy /
f->num_v_slices;
130 int sye =
f->avctx->height * (sy + 1) /
f->num_v_slices;
136 f->slice_context[
i] =
fs;
137 memcpy(
fs,
f,
sizeof(*
fs));
138 memset(
fs->rc_stat2, 0,
sizeof(
fs->rc_stat2));
140 fs->slice_width = sxe - sxs;
141 fs->slice_height = sye - sys;
146 sizeof(*
fs->sample_buffer));
148 sizeof(*
fs->sample_buffer32));
149 if (!
fs->sample_buffer || !
fs->sample_buffer32) {
160 av_freep(&
f->slice_context[
i]->sample_buffer);
161 av_freep(&
f->slice_context[
i]->sample_buffer32);
171 for (
i = 0;
i <
f->quant_table_count;
i++) {
173 sizeof(*
f->initial_states[
i]));
174 if (!
f->initial_states[
i])
176 memset(
f->initial_states[
i], 128,
177 f->context_count[
i] *
sizeof(*
f->initial_states[
i]));
186 for (
i = 0;
i <
f->plane_count;
i++) {
219 if (
s->last_picture.f)
223 for (j = 0; j <
s->max_slice_count; j++) {
225 for (
i = 0;
i <
s->plane_count;
i++) {
236 for (j = 0; j <
s->quant_table_count; j++) {
238 for (
i = 0;
i <
s->max_slice_count;
i++) {
245 for (
i = 0;
i <
s->max_slice_count;
i++)
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
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
av_cold int ff_ffv1_common_init(AVCodecContext *avctx)
uint8_t(* state)[CONTEXT_SIZE]
void * av_mallocz_array(size_t nmemb, size_t size)
av_cold int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
#define AC_RANGE_CUSTOM_TAB
av_cold int ff_ffv1_init_slices_state(FFV1Context *f)
int flags
AV_CODEC_FLAG_*.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
uint8_t interlace_bit_state[2]
#define fs(width, name, subs,...)
char * stats_out
pass1 encoding statistics output buffer
av_cold int ff_ffv1_close(AVCodecContext *avctx)
#define i(width, name, range_min, range_max)
#define av_malloc_array(a, b)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
uint64_t(*[MAX_QUANT_TABLES] rc_stat2)[32][2]
int ff_ffv1_allocate_initial_states(FFV1Context *f)
main external API structure.
int width
picture width / height.
av_cold int ff_ffv1_init_slice_contexts(FFV1Context *f)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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 add an so the codec calls ff_thread_report set AVCodecInternal allocate_progress The frames must then be freed with ff_thread_release_buffer(). Otherwise leave it at zero and decode directly into the user-supplied frames. Call ff_thread_report_progress() 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