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 5AFD7455A8 for ; Wed, 7 Jun 2023 19:25:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 534F668BFEE; Wed, 7 Jun 2023 22:25:05 +0300 (EEST) Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0DDCF68BE50 for ; Wed, 7 Jun 2023 22:24:58 +0300 (EEST) Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-75ec7e8e826so276195185a.0 for ; Wed, 07 Jun 2023 12:24:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ltnglobal-com.20221208.gappssmtp.com; s=20221208; t=1686165896; x=1688757896; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=XtQ6vD+hgQUO+imLLnce129sfypLRSS9CCoAaM0wCdQ=; b=i79nSmiGPOhP+jE4xSqolDti0GgC1oNsBG8eGrtUL/3lzoqnvPleif5pEmz2Vfyt+b 2wGQ217U/NkzXIUxN+B/hmwhGuAWtoyKOkNgD8BMqDVmOeBtBNbJRrbPFt78RAXt/rMw vdHEPTOdR4GP61J8lcolO/wXpuMWSm5iMXYNh5ikvj2mBVfS/vyJoL+5cmnV2uFiujSa oVo6Gt1DzPsW2OOpO4iCbjSJSMWhczPFbmrFQHOQdUNCHNYwcbX6aUffjYdP+UAxhhn6 f09+M0qCHOlsK8HtNMsLGgYTbCdKZkXTXOc0+pENva1KZFzB7h31L2RkZxKlc86Exfk/ AGqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686165896; x=1688757896; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XtQ6vD+hgQUO+imLLnce129sfypLRSS9CCoAaM0wCdQ=; b=YRzIJoipkdGAoevfmpJ4X31KGli9stdX0fLupd8hJBHs6W2jH0OSd1/9c5zwmCDQIK qWkIIq+aGhwDt9mf470INoXXBrAUDb6ZICxU6H/UesSBl+YXQUF0zByBU8vqTrjwlziA 3np86Fj4EuKRLJ6ZsntqHmYosrBgNw8ocUF764Nk0OpWVovc6NmC9053SM0wTdD3zzHj c6UlseOczJuANwCU4LlfGPOQcfZZRfGaFZv1a9e0A9zXWnPx2XiJrGEoUWzVAR8I7OpV DIyLqlfp6LdDP17+zwA9WJITtvnZahgMH8Y4BSW30uMuSf8g2WWGh2FdqwRB/mvJP6iz aVyw== X-Gm-Message-State: AC+VfDxSxAx+0AC0j44MBEiDvzK9QdOO3LDlLs7P31sMDfyoS6qx82Ng DpiNqioLCwHIiFKF+tNlH2tCfq4Wum33BF1hRQw= X-Google-Smtp-Source: ACHHUZ7nKSxpq2KpoXscHufS/UNYZF4jyqoJ67r79RBQd0AYs7vHhdFQ91pz1qpYAmJ2yMT8DHKvgg== X-Received: by 2002:ad4:5f8d:0:b0:615:a18b:d5af with SMTP id jp13-20020ad45f8d000000b00615a18bd5afmr4802511qvb.35.1686165896478; Wed, 07 Jun 2023 12:24:56 -0700 (PDT) Received: from ltnt-nyc-580testdevin.livetimenet.com (pool-71-105-132-214.nycmny.fios.verizon.net. [71.105.132.214]) by smtp.gmail.com with ESMTPSA id j18-20020a0cf512000000b006261c80d76dsm133643qvm.71.2023.06.07.12.24.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Jun 2023 12:24:56 -0700 (PDT) From: Devin Heitmueller X-Google-Original-From: Devin Heitmueller To: ffmpeg-devel@ffmpeg.org Date: Wed, 7 Jun 2023 16:22:23 -0400 Message-Id: <1686169347-28987-4-git-send-email-dheitmueller@ltnglobal.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1686169347-28987-1-git-send-email-dheitmueller@ltnglobal.com> References: <1686169347-28987-1-git-send-email-dheitmueller@ltnglobal.com> Subject: [FFmpeg-devel] [PATCH 3/7] avcodec/avframe: add new side data types for Bar Data 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 Cc: Devin Heitmueller MIME-Version: 1.0 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: Add new side data types for both AVPacket and AVFrame to support "bar data" as defined in SMPTE 2016-1, ATSC A/53, and SCTE 128-1. Signed-off-by: Devin Heitmueller --- libavcodec/decode.c | 1 + libavcodec/defs.h | 12 ++++++++++++ libavcodec/packet.h | 6 ++++++ libavutil/frame.h | 6 ++++++ 4 files changed, 25 insertions(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 6ee2c85..5aafce7 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -1332,6 +1332,7 @@ int ff_decode_frame_props_from_pkt(const AVCodecContext *avctx, { AV_PKT_DATA_CONTENT_LIGHT_LEVEL, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL }, { AV_PKT_DATA_A53_CC, AV_FRAME_DATA_A53_CC }, { AV_PKT_DATA_AFD, AV_FRAME_DATA_AFD }, + { AV_PKT_DATA_BARDATA, AV_FRAME_DATA_BARDATA }, { AV_PKT_DATA_ICC_PROFILE, AV_FRAME_DATA_ICC_PROFILE }, { AV_PKT_DATA_S12M_TIMECODE, AV_FRAME_DATA_S12M_TIMECODE }, { AV_PKT_DATA_DYNAMIC_HDR10_PLUS, AV_FRAME_DATA_DYNAMIC_HDR_PLUS }, diff --git a/libavcodec/defs.h b/libavcodec/defs.h index fbe3254..deadfe7 100644 --- a/libavcodec/defs.h +++ b/libavcodec/defs.h @@ -119,6 +119,18 @@ typedef struct AVPanScan { } AVPanScan; /** + * Bar data - used by side data for avcodec and avframe. Defines the location + * of horizontal or vertical black bars (i.e. letterbox/pillar bars) + */ +typedef struct AVBarData { + int top_bottom; /* 0=top/bottom 1=left/right */ + int top; + int left; + int bottom; + int right; +} AVBarData; + +/** * This structure describes the bitrate properties of an encoded bitstream. It * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD * parameters for H.264/HEVC. diff --git a/libavcodec/packet.h b/libavcodec/packet.h index f28e7e7..bdad21e 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -300,6 +300,12 @@ enum AVPacketSideDataType { AV_PKT_DATA_DYNAMIC_HDR10_PLUS, /** + * Bar data. See SMPTE ST2016-1, ATSC A/53, SCTE 128-1 + * Format for this data can be found in the AVBarData struct + */ + AV_PKT_DATA_BARDATA, + + /** * The number of side data types. * This is not part of the public API/ABI in the sense that it may * change when new side data types are added. diff --git a/libavutil/frame.h b/libavutil/frame.h index a491315..317b663 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -214,6 +214,12 @@ enum AVFrameSideDataType { * Ambient viewing environment metadata, as defined by H.274. */ AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT, + /** + * SMPTE ST 2016-1 Bar data + * The data is the AVBarData struct defined in libavcodec. + * Note: See SMPTE ST 2016-1:2009 Section 8 for the interaction between AFD and Bar Data + */ + AV_FRAME_DATA_BARDATA, }; enum AVActiveFormatDescription { -- 1.8.3.1 _______________________________________________ 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".