44 if (!pic->
f || !pic->
f->
buf[0])
54 for (
i = 0;
i < 2;
i++) {
60 memset((uint8_t*)pic + off, 0,
sizeof(*pic) - off);
69 for (
int i = 0;
i < 2;
i++) {
75 src->hwaccel_picture_private);
79 dst->qscale_table =
src->qscale_table;
80 dst->mb_type =
src->mb_type;
82 for (
int i = 0;
i < 2;
i++)
83 dst->motion_val[
i] =
src->motion_val[
i];
85 for (
int i = 0;
i < 2;
i++)
86 dst->field_poc[
i] =
src->field_poc[
i];
88 memcpy(
dst->ref_poc,
src->ref_poc,
sizeof(
src->ref_poc));
89 memcpy(
dst->ref_count,
src->ref_count,
sizeof(
src->ref_count));
92 dst->frame_num =
src->frame_num;
93 dst->mmco_reset =
src->mmco_reset;
94 dst->long_ref =
src->long_ref;
96 dst->field_picture =
src->field_picture;
97 dst->reference =
src->reference;
98 dst->recovered =
src->recovered;
100 dst->invalid_gap =
src->invalid_gap;
101 dst->sei_recovery_frame_cnt =
src->sei_recovery_frame_cnt;
102 dst->mb_width =
src->mb_width;
103 dst->mb_height =
src->mb_height;
104 dst->mb_stride =
src->mb_stride;
105 dst->needs_fg =
src->needs_fg;
139 if (!
src->f || !
src->f->buf[0]) {
168#if CONFIG_ERROR_RESILIENCE
171 memset(
dst, 0,
sizeof(*
dst));
179 for (
i = 0;
i < 2;
i++) {
180 dst->motion_val[
i] =
src->motion_val[
i];
181 dst->ref_index[
i] =
src->ref_index[
i];
184 dst->mb_type =
src->mb_type;
185 dst->field_picture =
src->field_picture;
199 h->poc.prev_poc_msb =
h->poc.poc_msb;
200 h->poc.prev_poc_lsb =
h->poc.poc_lsb;
202 h->poc.prev_frame_num_offset =
h->poc.frame_num_offset;
203 h->poc.prev_frame_num =
h->poc.frame_num;
210 "hardware accelerator failed to decode picture\n");
226 if (!in_setup && !
h->droppable)
231 h->current_slice = 0;
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Libavcodec external API header.
#define FF_THREAD_FRAME
Decode more than one frame at once.
#define i(width, name, range_min, range_max)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
@ AV_FRAME_DATA_FILM_GRAIN_PARAMS
Film grain parameters for a frame, described by AVFilmGrainParams.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void ff_h264_set_erpic(ERPicture *dst, const H264Picture *src)
void ff_h264_unref_picture(H264Picture *pic)
int ff_h264_ref_picture(H264Picture *dst, const H264Picture *src)
static void h264_copy_picture_params(H264Picture *dst, const H264Picture *src)
int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup)
int ff_h264_replace_picture(H264Picture *dst, const H264Picture *src)
int ff_h264_execute_ref_pic_marking(H264Context *h)
Execute the reference picture marking (memory management control operations).
H.264 / AVC / MPEG-4 part10 codec.
int ff_h274_apply_film_grain(AVFrame *out_frame, const AVFrame *in_frame, const AVFilmGrainParams *params)
H.274 film grain synthesis.
#define FF_HW_SIMPLE_CALL(avctx, function)
#define PICT_BOTTOM_FIELD
void ff_thread_report_progress(ThreadFrame *f, int n, int field)
Notify later decoding threads when part of their reference picture is ready.
void ff_thread_release_ext_buffer(ThreadFrame *f)
Unref a ThreadFrame.
void av_refstruct_unref(void *objp)
Decrement the reference count of the underlying object and automatically free the object if there are...
void av_refstruct_replace(void *dstp, const void *src)
Ensure *dstp refers to the same object as src.
main external API structure.
const struct AVHWAccel * hwaccel
Hardware accelerator in use.
int active_thread_type
Which multithreading methods are in use by the codec.
This structure describes how to handle film grain synthesis in video for specific codecs.
Structure to hold side data for an AVFrame.
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
atomic_int * decode_error_flags
RefStruct reference; its pointee is shared between decoding threads.
int8_t * ref_index[2]
RefStruct reference.
void * hwaccel_picture_private
RefStruct reference for hardware accelerator private data.
int8_t * qscale_table_base
RefStruct reference.
int16_t(*[2] motion_val_base)[2]
RefStruct reference.
uint32_t * mb_type_base
RefStruct reference.
int needs_fg
whether picture needs film grain synthesis (see f_grain)
int ff_thread_replace_frame(ThreadFrame *dst, const ThreadFrame *src)
int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src)