Message ID | 20230331162205.428735-1-jeebjp@gmail.com |
---|---|
Headers |
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp851536pzb; Fri, 31 Mar 2023 09:22:44 -0700 (PDT) X-Google-Smtp-Source: AKy350YPxgEJdkxzZWktnCr7k2TMzFTikuODWuG1ZS7ulSMUR8NqSWkGJgKMhuoIcC9OsVwzRiEd X-Received: by 2002:a05:6402:417:b0:4c1:2252:f72c with SMTP id q23-20020a056402041700b004c12252f72cmr24322440edv.27.1680279764588; Fri, 31 Mar 2023 09:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680279764; cv=none; d=google.com; s=arc-20160816; b=rTCYOJp0IoZRC8bJYvUoqahIACxrLBt8+5Ww31hu2PMpxKzqkyGrCEabPxfZd3SYD9 DF7W+csJyTB6/WD7fDfh5BVfLKtU2pe6zacWspxNiJ/CC/W9d+Dc6bqG8RJHRbpmQ4pJ RKj/kQEe8KOwxyK6fS++6kLobjuvuqjCtFfg1tIm+LMpdEj4OdikkH8IF98T4KuEyRxn VV917h5U4rTwll72Zf440z6cLZsvW/gAAdwNS6JMO5tqR++Xi7uawLw/Mh8pG8QAK6Z+ ZFvMWK+ColvloIwFcWb9vYuCgzVLOODyeZKlVuSU+CDqJTh1VuQ4aCxq8cAj/eqL0Ex4 te1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=m9PqUHoJOn0vFU9MwafIypeMtzU8LritqeZ0UjrXG2A=; b=EwqKEGd/q0+fPo07aiPUpDQf/3eOW5BHqx8MN0MbBX/hEX8sPfclQKVApjwErMr3Rp RmV2OQTuf5c30wrzo5EVNfQ2vyIKQUjPSluROTOqm9e5Yu25FkMEZuKc+4Vkxo40Bhz+ I3z7RZP0ZxNcW7k99rZMA4415jbyGaRbbcZck0yfSc4IDm/l1QDIIV7bFMjyb2IZt7Cr w3J2VipeYeDHSHK0XUPJSCQDbM61PePvRhf4FsAA+3T/5XVtu4vOn1xyaUNzO3ZBHYVm lZFzuKSOcajBQb0+eKz/Z8d9TlXjDUPPwvRiPEbvIA4cGZ6Bn/LIcy+tnBDbkAaPqF81 zpwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=Ygiqwkce; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bo12-20020a0564020b2c00b004ab086046f3si1634798edb.141.2023.03.31.09.22.44; Fri, 31 Mar 2023 09:22:44 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=Ygiqwkce; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 86D6D68C29A; Fri, 31 Mar 2023 19:22:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4278368C282 for <ffmpeg-devel@ffmpeg.org>; Fri, 31 Mar 2023 19:22:16 +0300 (EEST) Received: by mail-lj1-f176.google.com with SMTP id x20so23602044ljq.9 for <ffmpeg-devel@ffmpeg.org>; Fri, 31 Mar 2023 09:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680279734; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=LpsN9eYzphfWwjXwbT+icADagLlb4Ih8Ggt3ydNKSa0=; b=YgiqwkceFqZUbwgLd32JQl3lCuRwFMjykxo2mH2WO/1ku6RhE7T3o1MxTmYAWQc6sh UgRIdszHphoEWsNvwrgYp6Veso5SuPx2HoHdJDd+TstQQsrEWPrGzrDOEtSWfKacPh5r jnR2C3C0nMIC8f3+NsaE7+HDv6hB2gMYzCGctoozNSyrsI9hi5BralHkoz/zxJq8FVqU G2QbwFXixrRVTnmyfInHCNLLDSSk/uvJUQSFpZ6pCeehU7NBtq3PrQ99kqfz663JcudO 0Zr5ZrWkwH4+pcSNTqQ6/3yXoV+n85ePpnSJAuXcoXa5rB6Angzohw1Gq++X1/VOFrm+ zcNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680279734; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LpsN9eYzphfWwjXwbT+icADagLlb4Ih8Ggt3ydNKSa0=; b=A6DzkGWKbjmKiHuAxd9fUm0kvp2m5v6xCov7vFPThYSB91G6tTRtSSDtK71e5vb497 TiTODnVySLV5OUogT6f6uiAkcYpnLdN+6xd+hQY9BcAJbqt30fDYivGrH3FBbm9I88Dy nrhNTSvCoQTcVV1hATlM5ta1lgiYaVzUF/9HkiDaSqdFgbrEckwrh4P2RKsfuBcbB4Vo VG1Wv24UOxvkqelQcUzk7IFOWFLni+nz623/h35zPzCu1RL3c+ilxx5KYip1AQSFxpO8 0qz3RZAQZwsWEVUNukMj9AecAgLWJG5HJWR5VsDJT7RrD62ycdrKsS0MGs2Z1xHBMX1q S1CQ== X-Gm-Message-State: AAQBX9drzlooD0Kun18lIS6uvPrK4j2UChn0ByAwAKGbf8OcoykyTfXZ Ck35FW2SXoy2IuFStJ+/y4FMkS0jHQ0= X-Received: by 2002:a05:651c:218:b0:298:aad1:5df0 with SMTP id y24-20020a05651c021800b00298aad15df0mr8504625ljn.41.1680279734419; Fri, 31 Mar 2023 09:22:14 -0700 (PDT) Received: from localhost.localdomain (91-153-198-187.elisa-laajakaista.fi. [91.153.198.187]) by smtp.gmail.com with ESMTPSA id n20-20020a2e8794000000b0029573844d03sm411483lji.109.2023.03.31.09.22.14 for <ffmpeg-devel@ffmpeg.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 09:22:14 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= <jeebjp@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Fri, 31 Mar 2023 19:21:53 +0300 Message-Id: <20230331162205.428735-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1 00/12] encoder AVCodecContext configuration side data X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: CIjn6Wbo2EW7 |
Series |
encoder AVCodecContext configuration side data
|
|
Message
Jan Ekström
March 31, 2023, 4:21 p.m. UTC
Differences to v0: 1. side data set structure moved to public AVCodecContext itself 2. set extension helper renamed to av_extend_side_data_set 3. avutil/frame.c cleanup patch removed as it was applied to master This patch set I've now been working for a while since I felt like it was weird we couldn't pass through information such as static HDR metadata to encoders from decoded input. This initial version adds the necessary framework, as well as adds static HDR metadata support for libsvtav1, libx264 as well as libx265 wrappers. An alternative to this would be to make encoders only properly initialize when they receive the first AVFrame, but that seems to be a bigger, nastier change than introducing an AVFrameSideDataSet in avctx as everything seems to presume that extradata etc are available after opening the encoder. Jan Jan Ekström (12): avutil/frame: add AVFrameSideDataSet for passing sets of side data avutil/frame: split side data list wiping out to non-AVFrame function avutil/frame: add helper for clearing out side data sets avutil/frame: split side_data_from_buf to base and AVFrame func avutil/frame: add helper for adding side data to set avutil/frame: add helper for getting side data from set avutil/frame: add helper for extending a set of side data avcodec: add private side data set to AVCodecContext ffmpeg: pass first video AVFrame's side data to encoder avcodec/libsvtav1: add support for writing out CLL and MDCV avcodec/libx264: add support for writing out CLL and MDCV avcodec/libx265: add support for writing out CLL and MDCV fftools/ffmpeg.c | 12 +++++ libavcodec/avcodec.h | 7 +++ libavcodec/libsvtav1.c | 70 ++++++++++++++++++++++++++ libavcodec/libx264.c | 79 +++++++++++++++++++++++++++++ libavcodec/libx265.c | 82 ++++++++++++++++++++++++++++++ libavcodec/options.c | 1 + libavutil/frame.c | 112 +++++++++++++++++++++++++++++++++-------- libavutil/frame.h | 49 ++++++++++++++++++ 8 files changed, 391 insertions(+), 21 deletions(-)