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 9623F47900 for ; Sun, 26 Nov 2023 20:00:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1283168CF87; Sun, 26 Nov 2023 21:59:06 +0200 (EET) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7204F68CF71 for ; Sun, 26 Nov 2023 21:58:52 +0200 (EET) Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-507975d34e8so4931687e87.1 for ; Sun, 26 Nov 2023 11:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701028732; x=1701633532; 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=CodGVD4u1YPkLhfLyC3RS6jO6M4nc9OHJLsgqTxmWqI=; b=QeIAE2EPe/muubAzXPYEHy4a/BAS2ipcrW7wP4+0WCd73C4vwY0BfAoLxX9PQx9OXx 9p1XyJSBSe8yXA59h7yyKynUqCLeU3H3FB/AtUaoZ0+xLqzUd14UngFZGhTaL2G+yD6n 6kmNv+4nz/OS8izru3T+e5d+n0oq+NQZKrAvMynmS7n7QBGizVHBKbEpi5+CAmsqreHv Rs6dhivvpBwF6aanesG6IoUMZMJCKuADEjClGZDdkWfaD1gKGvpTV2ggh3HM32xUnypW 9ZAmiIblNGXxUPLMiofcm42Z6gjkm4S0ehelPpL5frrYmQ3CawGl1TFPzd9wMNfsZlYz JlrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701028732; x=1701633532; 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=CodGVD4u1YPkLhfLyC3RS6jO6M4nc9OHJLsgqTxmWqI=; b=BK2f9REChUzYUpHWTKl3qBryvw3dWl6tFqBUfBvKBNeoSVoepI5kPQ70+4o2u8znNA NgzXH/fWwBIxMOH4lwiiCWXsbHo0cU4o35ARXNo3jiCqvj9GtWHBibl0EyXPFxejBYe/ 43fQLfYDLQqnb2unHL7nHtUpiFlsVoHzvOJBGZ3Su0L1nlw+ynt3MybI7SN3vy+26IYu 8IRZGykO7tjQ5zLra42TGdIu1Ms9H4ajCh3qpwA8b8Q4mKR30OTnY7aUQ7r400qPgXKO cxCiPhH9VgYsBh9/gSROn4/v3ewLkEfbVGS670k6ueYXpHfjCBqy9jjjbaPfKOflYGvX Ni1A== X-Gm-Message-State: AOJu0YwksSKgot9/Ld+HVcqow7dH33sgU9KxFz/RkRiZzaJ7292bhZfi 9EXqGS0GRvZ0iWwYR8of0H0IP5nUgRM= X-Google-Smtp-Source: AGHT+IGAxTsCRUBXFDNpbdbmRUi9d/R5ZSbmkCYBL8GhHjuz0H9EH4trl1MuTLsd8ogPjyCc/Q+zHA== X-Received: by 2002:a05:6512:3f1e:b0:507:9803:ff8b with SMTP id y30-20020a0565123f1e00b005079803ff8bmr7357945lfa.44.1701028731665; Sun, 26 Nov 2023 11:58:51 -0800 (PST) Received: from localhost.localdomain (91-153-198-187.elisa-laajakaista.fi. [91.153.198.187]) by smtp.gmail.com with ESMTPSA id k16-20020ac24f10000000b00500d1a72734sm1281833lfr.130.2023.11.26.11.58.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 11:58:51 -0800 (PST) From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Sun, 26 Nov 2023 21:58:30 +0200 Message-ID: <20231126195838.392467-12-jeebjp@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231126195838.392467-1-jeebjp@gmail.com> References: <20231126195838.392467-1-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 11/14] 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 fa4539664f..8ec9cb7cd5 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -239,6 +239,19 @@ int enc_open(OutputStream *ost, const AVFrame *frame) enc_ctx->colorspace = frame->colorspace; enc_ctx->chroma_sample_location = frame->chroma_location; + ret = avcodec_configure_side_data( + enc_ctx, + &(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; + } + if (enc_ctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) || (frame->flags & AV_FRAME_FLAG_INTERLACED) #if FFMPEG_OPT_TOP -- 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".