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 11B974A682 for ; Wed, 3 Apr 2024 11:31:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C149368D12C; Wed, 3 Apr 2024 14:31:12 +0300 (EEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9FB4468CD27 for ; Wed, 3 Apr 2024 14:31:06 +0300 (EEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1e27c303573so12717135ad.3 for ; Wed, 03 Apr 2024 04:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712143864; x=1712748664; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=cfHS+2DbCN1oinIvBZ96J4Kle3gDBlpZlywzuPUPj94=; b=O1z0qMGzPKfqjbFEqVFOk2ktTIzmRG3xV9a4JrMiXKDYN4EdkI1uiyuFIl77rv1j9D I7oxzDZDrHQQCBG+i9Vac5okj9ftvyk0ZfyjjgrXcKfJ+nBBCgjJtsRTDdnFHrlm8wwQ TvVwNEV9tnEweJ7gRb0Iqz8W+Vv44ij935JDl6Tpzg9ecvDAKBKlkMtUwyJFaQ9DBtxN UCEMWA2uZDDXzCwhZJtgTeCpbggY0w/dvn2SzAnfyzCDD08tKQmGYEfwELrw4MMn/va6 UeSCawJ+7fZ60b56qFo75oafajfdvaNIcNMaryZBNIueZO5rbtrofIc82SqwwUcxGm5z spQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712143864; x=1712748664; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cfHS+2DbCN1oinIvBZ96J4Kle3gDBlpZlywzuPUPj94=; b=FKViISRn/nQDWlgVvFFNCgRmSIPhC5rZFkJuqlGfy5LFZZsKr8ObiCs8cxwbzZ46WJ BP2aBweqfjF9Vv9+1exHzaG+FnWydanU04sLs730/rmu/sHbQ6DIag+aF8p8q54iiHew za23YDtwcRflFJ2dobt0xK0deHpIOMpTeFN60kxgACtG5+x1fpW3TitYrlGFCXtfnrrj bs8Fbg8TMM3EGK7C9+I7IThaeHOaOu3mizqP3RJ5FZRq+T3eLlvyq+f3FUMX2f379Ltv U/oMsMPH4vFQY0wh2xmaaMoxNUOpwngWPg4gxFrWYdeCW1FsnlcBHIgx3QHYasMsfOI1 Y8Zg== X-Gm-Message-State: AOJu0Yyy1C8wAfrgt3iripXm/Wt8FbFwoRJAS0t7V0lcqaUbN4eKtaKU 29lsV7UkCCKsCmBTBe8sMi9O+cbR2ymgbSvwVRXi+OyQK54Pr7Wd7tN7WDwA X-Google-Smtp-Source: AGHT+IH2IUPdxZjh+OsrppiVLTV9UGgjUH/nlr07XFZ+IMFaDm1puBG3qAGWGIhmmHLLLgb6Y5YrAQ== X-Received: by 2002:a17:903:247:b0:1e0:e2c2:5712 with SMTP id j7-20020a170903024700b001e0e2c25712mr16063706plh.3.1712143859978; Wed, 03 Apr 2024 04:30:59 -0700 (PDT) Received: from [192.168.0.15] ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id i10-20020a170902c94a00b001db9c3d6506sm12983406pla.209.2024.04.03.04.30.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Apr 2024 04:30:59 -0700 (PDT) Message-ID: <9d426b73-4ee3-4666-a3b4-4a473da7ce74@gmail.com> Date: Wed, 3 Apr 2024 08:31:15 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20240328165250.64259-1-jamrial@gmail.com> <20240328165250.64259-7-jamrial@gmail.com> <171213313946.28449.14791803443405725197@lain.khirnov.net> Content-Language: en-US From: James Almer In-Reply-To: <171213313946.28449.14791803443405725197@lain.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 7/7 v5] avcodec/hevcdec: export global side data in AVCodecContext 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 4/3/2024 5:32 AM, Anton Khirnov wrote: > Quoting James Almer (2024-03-28 17:52:50) >> diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c >> index fd356bd190..a693e12670 100644 >> --- a/libavcodec/pthread_frame.c >> +++ b/libavcodec/pthread_frame.c >> @@ -334,6 +334,15 @@ FF_ENABLE_DEPRECATION_WARNINGS >> if (for_user) { >> if (codec->update_thread_context_for_user) >> err = codec->update_thread_context_for_user(dst, src); >> + >> + av_frame_side_data_free(&dst->decoded_side_data, &dst->nb_decoded_side_data); >> + for (int i = 0; i < src->nb_decoded_side_data; i++) { >> + int ret = av_frame_side_data_clone(&dst->decoded_side_data, >> + &dst->nb_decoded_side_data, >> + src->decoded_side_data[i], 0); >> + if (ret < 0) >> + return ret; >> + } > > Seems wasteful to do this for every frame, when it only needs to be done > once. Is there a reason not to put this code in init_thread()? Hadn't thought about it. Will try that. _______________________________________________ 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".