Lines Matching refs:src

271  * @param src The source context.
275 static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, int for_user)
280 if (dst != src && (for_user || codec->update_thread_context)) {
281 dst->time_base = src->time_base;
282 dst->framerate = src->framerate;
283 dst->width = src->width;
284 dst->height = src->height;
285 dst->pix_fmt = src->pix_fmt;
286 dst->sw_pix_fmt = src->sw_pix_fmt;
288 dst->coded_width = src->coded_width;
289 dst->coded_height = src->coded_height;
291 dst->has_b_frames = src->has_b_frames;
292 dst->idct_algo = src->idct_algo;
293 dst->properties = src->properties;
295 dst->bits_per_coded_sample = src->bits_per_coded_sample;
296 dst->sample_aspect_ratio = src->sample_aspect_ratio;
298 dst->profile = src->profile;
299 dst->level = src->level;
301 dst->bits_per_raw_sample = src->bits_per_raw_sample;
302 dst->ticks_per_frame = src->ticks_per_frame;
303 dst->color_primaries = src->color_primaries;
305 dst->color_trc = src->color_trc;
306 dst->colorspace = src->colorspace;
307 dst->color_range = src->color_range;
308 dst->chroma_sample_location = src->chroma_sample_location;
310 dst->sample_rate = src->sample_rate;
311 dst->sample_fmt = src->sample_fmt;
314 dst->channels = src->channels;
315 dst->channel_layout = src->channel_layout;
318 err = av_channel_layout_copy(&dst->ch_layout, &src->ch_layout);
322 if (!!dst->hw_frames_ctx != !!src->hw_frames_ctx ||
323 (dst->hw_frames_ctx && dst->hw_frames_ctx->data != src->hw_frames_ctx->data)) {
326 if (src->hw_frames_ctx) {
327 dst->hw_frames_ctx = av_buffer_ref(src->hw_frames_ctx);
333 dst->hwaccel_flags = src->hwaccel_flags;
335 err = av_buffer_replace(&dst->internal->pool, src->internal->pool);
342 err = codec->update_thread_context_for_user(dst, src);
345 err = codec->update_thread_context(dst, src);
355 * @param src The source context.
358 static int update_context_from_user(AVCodecContext *dst, AVCodecContext *src)
360 dst->flags = src->flags;
362 dst->draw_horiz_band= src->draw_horiz_band;
363 dst->get_buffer2 = src->get_buffer2;
365 dst->opaque = src->opaque;
366 dst->debug = src->debug;
368 dst->slice_flags = src->slice_flags;
369 dst->flags2 = src->flags2;
370 dst->export_side_data = src->export_side_data;
372 dst->skip_loop_filter = src->skip_loop_filter;
373 dst->skip_idct = src->skip_idct;
374 dst->skip_frame = src->skip_frame;
376 dst->frame_number = src->frame_number;
377 dst->reordered_opaque = src->reordered_opaque;
380 dst->thread_safe_callbacks = src->thread_safe_callbacks;
384 if (src->slice_count && src->slice_offset) {
385 if (dst->slice_count < src->slice_count) {
386 int err = av_reallocp_array(&dst->slice_offset, src->slice_count,
391 memcpy(dst->slice_offset, src->slice_offset,
392 src->slice_count * sizeof(*dst->slice_offset));
394 dst->slice_count = src->slice_count;