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 5022246A6E for ; Fri, 1 Sep 2023 20:40:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DF84368C80D; Fri, 1 Sep 2023 23:38:47 +0300 (EEST) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1919C68C795 for ; Fri, 1 Sep 2023 23:38:35 +0300 (EEST) Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2bcda0aaf47so4492501fa.1 for ; Fri, 01 Sep 2023 13:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693600714; x=1694205514; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GBPMA1CTjYmKFgB7zp2e2wquuKZfiQxo0Uv0jnvD0Fk=; b=n47XXxv/8JfnF5IoNtXUpvzJI6TVVq/hnU72N/LW8W6P0PJRTX5t/43SnDKTg0Xh8J AXdv962Vyq6i/pxzmDGfr3M9lU4H31wncd1AaCkpWddWF+Q8yQLAIbzQpeoQjHfscG7x VKoR+GCMOynnTJHayoIpjYStKCZSSEx8LeXAmhx4YSo7/9VOF6NVirSKcPVA2STvDB71 8MTz0kWqtLiCsjA4/Z1R7I1vc6apxRbwfqKHWd5xkCeZqDFqB2zceDInQpBqcuaiu/If IPTKaSu97q7cNzNCg3NDFS3E9NXRfb+rT0kQpkygy2LgpnrZ4Vt5SHiJ8Do9EauMt56M uicA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693600714; x=1694205514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GBPMA1CTjYmKFgB7zp2e2wquuKZfiQxo0Uv0jnvD0Fk=; b=SBAOR5mYV+0hOn2KUNxefyrv0gKntrq0/AHoF9hjpLmbhGXeITc9pOZYA3oZ7cuXfM +Q+iSPwUVZCfEnPLrmLuRtMBJfNXaV8+qh5S6fthVzz0n9HoEvvB7Kvl8msNtSb+8Tfl Yq/RY3OrpU8yApsecAckSMhIY3H5fnrV2CoW+YAOPe6PG2q8T/xQypPP0s6OwFOS03oM GHdiHXY5A8MRtWV53bEY6/1ctC1NZ55uXDp3WdD80Zqk8jA0TYP2vYxtUkpDgdGjuOu6 bLAUJEqR2gatzb++HUyFxQrK2RevN6CGe0RXti44WRdXM7mlHBZuMlgYcEW1nfZuFsbl bhbw== X-Gm-Message-State: AOJu0YwEG4U42GogopxgZnhqHDHH3l8LQ0gl8dwKMCo+pnwv0QZt/Go6 Hf6k/XqvcGXaGPmMNtd9Iw7xopBtylTkHQ== X-Google-Smtp-Source: AGHT+IGBTYtTzGA537CM5ha2Yf3nlpVmPp3Tqp+SZZfDm8Qf/ytqj2r3KDIQa6rdqnSkJzs35iI2wQ== X-Received: by 2002:a2e:8718:0:b0:2bc:bc6f:e296 with SMTP id m24-20020a2e8718000000b002bcbc6fe296mr1504679lji.13.1693600714230; Fri, 01 Sep 2023 13:38:34 -0700 (PDT) Received: from hifumi.mshome.net (91-153-198-187.elisa-laajakaista.fi. [91.153.198.187]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b002b9a1e9ba68sm907954ljg.136.2023.09.01.13.38.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Sep 2023 13:38:33 -0700 (PDT) From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 1 Sep 2023 23:38:20 +0300 Message-ID: <20230901203828.275197-11-jeebjp@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230901203828.275197-1-jeebjp@gmail.com> References: <20230901203828.275197-1-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 10/13] ffmpeg: pass first video AVFrame's side data to encoder 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: This enables further configuration of output based on the results of input decoding and filtering in a similar manner as the color information. --- fftools/ffmpeg_enc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index f28884e50c..0d022700cf 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -356,6 +356,19 @@ int enc_open(OutputStream *ost, AVFrame *frame) enc_ctx->colorspace = frame->colorspace; enc_ctx->chroma_sample_location = frame->chroma_location; + ret = av_frame_side_data_set_extend( + &enc_ctx->frame_sd_set, + (const AVFrameSideDataSet){ + .sd = frame->side_data, + .nb_sd = frame->nb_side_data + }, + AV_FRAME_SIDE_DATA_SET_FLAG_NO_DUPLICATES); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "failed to configure video encoder: %s!\n", + av_err2str(ret)); + return ret; + } + // Field order: autodetection if (enc_ctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) && ost->top_field_first >= 0) -- 2.41.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".