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 CED3444BDC for ; Tue, 8 Nov 2022 14:48:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5F66068BB22; Tue, 8 Nov 2022 16:48:15 +0200 (EET) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5EAA768B196 for ; Tue, 8 Nov 2022 16:48:08 +0200 (EET) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id E249D35B2EF for ; Tue, 8 Nov 2022 15:48:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1667918883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0rgkPaEHCtLBWePLrndPISCdjJNh4w+sf3ZfsBHwZUA=; b=rzFwTZLuNovOLLB7jWZ2zkOhFAmtcsrJ9FrOJmvQcBpqQpQax5c46rXCSvtrtcWp7AfLeA mSK21uSG+XEVUFJgYBaZFYhH2jH2SQzA6P8lGSqH8NySaf1YYaNA6WURsQ8u4AoGB+mfb9 fZuKtZwzpEYEnmNV/aJRZm7jF9h0stOKYXDJ56OkqH9qxekiHK6GXvdhi0Vk9N5j0Ictvv 5ze0wqtnfkaESFg/uNW0d/L0fxbY7d2Rb0gb1LErBbLJa64ygNbw1zVhYukgSD0iQURjhV bW6W1LRGv2iK+cGP35g7LXKN+ym/3UqaZFxPrNBsIoKSf3+q37c+UT8kBKDGzw== Message-ID: Date: Tue, 8 Nov 2022 15:48:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <0c1cb14c-0a9b-8212-c3c0-eede6a74acec@rothenpieler.org> From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] libx265: support ATSC A/53 captions 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 08.11.2022 15:25, Eran Kornblau wrote: >> >> -----Original Message----- >> From: ffmpeg-devel On Behalf Of Timo Rothenpieler >> Sent: Tuesday, 8 November 2022 13:33 >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re: [FFmpeg-devel] [PATCH] libx265: support ATSC A/53 captions >> >>> >>> The attached patch adds rendering of ATSC A/53 captions as HEVC SEI messages. >>> The option name/implementation is aligned with the corresponding libx264 feature. >> >> What frees the sei data on success? >> > Thanks Timo, good point! > > I missed the fact that libx264 gets a callback for freeing the SEI payloads (sei_free). > It seems libx265 does not have this option, so I added some 'for' loop to free the payloads after the call to encoder_encode. > > In addition: > 1. I added av_memdup on the 'user-data-unregistered' side data so that it won't be freed twice. > 2. I added a 'free_picture' function for freeing the x265_picture in case of error. > (both changes are aligned with the implementation in libx264.c) > > Updated patch attached. One nit: splitting the first line of free_picture() in two isn't really neccesary and makes the function a bit uglier. One small problem: libx265 now needs to select atsc_a53 in configure, analog to how libx264 and all the others do. Otherwise the file containing the a53 code might not get compiled. LGTM otherwise > While checking the point you raised, I ran some libx265 transcode with valgrind, and it reported errors unrelated to this patch. > Attaching the full output, in case anyone wants to have a look. x265 has a bunch of issues related to SEI data. See for example https://trac.ffmpeg.org/ticket/9666#comment:1 i.e. if the number of per-frame sei data ever increases past its initial count, it'll just straight up explode. _______________________________________________ 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".