From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id DA2174BDBC for ; Tue, 16 Jul 2024 18:17:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F115A68DA9D; Tue, 16 Jul 2024 21:14:33 +0300 (EEST) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B568D68DAB1 for ; Tue, 16 Jul 2024 21:14:04 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=K2lXHB+U; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 03CD94E0C for ; Tue, 16 Jul 2024 19:16:36 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id z3741LgcSVZp for ; Tue, 16 Jul 2024 19:16:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1721150189; bh=xKvfYg1vjjRlXGK0xaPAOiR7sMeXuTwbjchgABeVv90=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K2lXHB+UVVydWk2wmjzPmmgFKzXnAVG+pbOB4JMjd18bqMI6PJrbmIh1q0nuzLq2M CEbxBwCpSrbhJE58tzC+XG1kaWTztX+eVUf4I3CTOXZphDA5mlyR57azyBoqBFBcg/ c1q9FSt0+dwxaFDsZm5vCsbyqwlNHsHIzgZba2IMTVey8srjQtV6mIqc+6XuxD30hd Oz2d8Ze9/xZK3BlQUSTWvoUAg9Cq2FcuSkG6tH0WAD68NvtRG1Cy031kK6tCLvD6i6 TueDVclN6Zr4MJ2/a5jpth2P/7Pl1lplfjAIR5ibdkOw06BPE+V4hhvzEI6drR1QX0 rM3czVqtNrUQA== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 81FF74E05 for ; Tue, 16 Jul 2024 19:16:28 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 614393A2E47 for ; Tue, 16 Jul 2024 19:16:21 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Jul 2024 19:11:41 +0200 Message-ID: <20240716171155.31838-26-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240716171155.31838-1-anton@khirnov.net> References: <20240716171155.31838-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 26/39] lavc/ffv1dec: inline copy_fields() into update_thread_context() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: It is now only called from a single place, so there is no point in it being a separate function. --- libavcodec/ffv1dec.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 8bb9b83daa..be4a1a2bf3 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -1021,27 +1021,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, } #if HAVE_THREADS -static void copy_fields(FFV1Context *fsdst, const FFV1Context *fssrc, - const FFV1Context *fsrc) -{ - fsdst->version = fsrc->version; - fsdst->micro_version = fsrc->micro_version; - fsdst->chroma_planes = fsrc->chroma_planes; - fsdst->chroma_h_shift = fsrc->chroma_h_shift; - fsdst->chroma_v_shift = fsrc->chroma_v_shift; - fsdst->transparency = fsrc->transparency; - fsdst->plane_count = fsrc->plane_count; - fsdst->ac = fsrc->ac; - fsdst->colorspace = fsrc->colorspace; - - fsdst->ec = fsrc->ec; - fsdst->intra = fsrc->intra; - fsdst->key_frame_ok = fsrc->key_frame_ok; - - fsdst->packed_at_lsb = fsrc->packed_at_lsb; - fsdst->slice_count = fsrc->slice_count; -} - static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) { FFV1Context *fsrc = src->priv_data; @@ -1050,7 +1029,22 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) if (dst == src) return 0; - copy_fields(fdst, fsrc, fsrc); + fdst->version = fsrc->version; + fdst->micro_version = fsrc->micro_version; + fdst->chroma_planes = fsrc->chroma_planes; + fdst->chroma_h_shift = fsrc->chroma_h_shift; + fdst->chroma_v_shift = fsrc->chroma_v_shift; + fdst->transparency = fsrc->transparency; + fdst->plane_count = fsrc->plane_count; + fdst->ac = fsrc->ac; + fdst->colorspace = fsrc->colorspace; + + fdst->ec = fsrc->ec; + fdst->intra = fsrc->intra; + fdst->key_frame_ok = fsrc->key_frame_ok; + + fdst->packed_at_lsb = fsrc->packed_at_lsb; + fdst->slice_count = fsrc->slice_count; fdst->use32bit = fsrc->use32bit; memcpy(fdst->state_transition, fsrc->state_transition, sizeof(fdst->state_transition)); -- 2.43.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".