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 ESMTPS id 145754E01B for ; Sun, 27 Apr 2025 11:49:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4F46B68BA34; Sun, 27 Apr 2025 14:47:38 +0300 (EEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 088CD687AB8 for ; Sun, 27 Apr 2025 14:45:41 +0300 (EEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-736b0c68092so3300211b3a.0 for ; Sun, 27 Apr 2025 04:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745754340; x=1746359140; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hidntdVyXOml2vQ39eQ3b6Vs827TDppkwGxlMiYzURs=; b=OuSDk9hPlnXEwyWINyGHe3Od4QPqR6xJds0Kj3YekVEzSLnS2SH0dWqHT9PJUE3QxJ cI7L8mkUk4A5RbHU5WAvJhzplIlxIbam00HVE0j2risTGUpPDHBYUl5w3JY7RbZ1dztX 3+hifq9G15okYUhUuL8bxpaK6/VRcnkPcnalI+t132qCsf2srOXirVnwSWvREOZMrHM4 1HbmRwLb+oxkC6eKsVbzBfLxkM6CflN7uWeVt50kriPTpWa6IvahR1qkEcnO/63G8h8y VJLXn8XQrsOTXnm7bXIzmJe90EeHFgtuwk8f9Gm/5lktZWO59L32khDlaCk14/cSygGW ZoNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745754340; x=1746359140; h=content-transfer-encoding:mime-version: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=hidntdVyXOml2vQ39eQ3b6Vs827TDppkwGxlMiYzURs=; b=eB+AUKYbBmyufGGOzFECxtFfKaTG57D1TgYDF44KHpY27PQgTq4XVG3EQJPlsbJtJe dI9DMm7plnBGgkuTpaBI1Px008wFTJm/Wu2YEV/GuK+rHYJjg9M2f8RTHqg9rLeuu36q lHtijys/JNnEUHZ3R+9vTP8lg5YaMXasT6VbDncb+0N6BFEDrcnYw77WWqujFo4XWDuP A4guyN16HWOt2VGq8vzsVoxclQtQK4Qyxbf/yeGGviwVAbJzNjo1S22Eq5q82gg+IsvT wHUEy0EsvvnmeG+XYS3eTeZTBgA2WwBV4fcUd1ZHTnlrmB6m1Vk77QYho78KQP0TR//X X6Ug== X-Gm-Message-State: AOJu0YxT9bU1yVFG5WQBfBHyifbBzQXUdGSFEN9+9fHG6s//yb89HF5P zfuxuVdB+WeASVrqfnqKTVFLc2D17vNANoAdkgc3Zjzjx1aqCSLtN6IxmnuO X-Gm-Gg: ASbGnctivrBGxv3LcLNVubk3Dyw+5r2e1Bi3yaotagB0BorCnkkBGTtoLr3YR77S02d uwBVVcm11IFsu1v5Y/CnPzeBNkgcbLRsrSyX/y5CaRJ5QK0rg2FhWZYcCp2A2PXQhiGGUaaw05T 20NQ5v/Xz0vL1/5EupdLcbibalyCqL+cXfxI/59D2doga0WE76zg2Awi3oldcWSZ19LjHMkldf2 rsi97S4kXCCa1aTLVvR1Jw9tCLPm4NwJQaBKQzkRXCsCiExE6EVWUfX0cJMQNwWLw7RJyW6R5hw ocahBt9gDk7qDgVvCE0KJr71Xr8rS/U1erM/eTeo9I2Py67qCnEvAmpNe/vACw== X-Google-Smtp-Source: AGHT+IH6s1Ny1Q9EBQg+NhiX0v9FgaizXAW+05d1cGUDB+ytRwvFRBri0qbAtcgeyvFS2s3kHRTnDQ== X-Received: by 2002:a05:6a00:928d:b0:736:5753:12f7 with SMTP id d2e1a72fcca58-73fd6beb1afmr11676404b3a.3.1745754339785; Sun, 27 Apr 2025 04:45:39 -0700 (PDT) Received: from localhost.localdomain ([124.79.129.75]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e259134ebsm6064452b3a.27.2025.04.27.04.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Apr 2025 04:45:39 -0700 (PDT) From: toqsxw@gmail.com X-Google-Original-From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Sun, 27 Apr 2025 19:44:47 +0800 Message-ID: <20250427114451.1236-17-toqsxw@outlook.com> X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20250427114451.1236-1-toqsxw@outlook.com> References: <20250427114451.1236-1-toqsxw@outlook.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 17/20] avcodec/vvc/sei: add decode_frame_field_info 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: nuomi2021@gmail.com, Wu Jianhua 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: From: Wu Jianhua Signed-off-by: Wu Jianhua --- libavcodec/vvc/sei.c | 26 ++++++++++++++++++++++++++ libavcodec/vvc/sei.h | 1 + 2 files changed, 27 insertions(+) diff --git a/libavcodec/vvc/sei.c b/libavcodec/vvc/sei.c index 49a7961c63..47edd94fb2 100644 --- a/libavcodec/vvc/sei.c +++ b/libavcodec/vvc/sei.c @@ -127,6 +127,27 @@ static int decode_content_light_level_info(H2645SEIContentLight *h, const SEIRaw return 0; } +static int decode_frame_field_info(H274SEIFrameFieldInfo *h, const SEIRawFrameFieldInformation *s) +{ + if (s->ffi_source_scan_type > 3) + return AVERROR_INVALIDDATA; + + h->present = 1; + if (s->ffi_field_pic_flag) { + if (s->ffi_bottom_field_flag) + h->picture_struct = AV_PICTURE_STRUCTURE_BOTTOM_FIELD; + else + h->picture_struct = AV_PICTURE_STRUCTURE_TOP_FIELD; + } else { + h->display_elemental_periods = s->ffi_display_elemental_periods_minus1 + 1; + } + + h->source_scan_type = s->ffi_source_scan_type; + h->duplicate_flag = s->ffi_duplicate_flag; + + return 0; +} + int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameContext *fc) { H2645SEI *c = &s->common; @@ -155,6 +176,9 @@ int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameCon case SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO: return decode_content_light_level_info(&s->common.content_light, payload); + case SEI_TYPE_FRAME_FIELD_INFO: + return decode_frame_field_info(&s->frame_field_info, payload); + default: av_log(fc->log_ctx, AV_LOG_DEBUG, "Skipped %s SEI %d\n", sei->nal_unit_header.nal_unit_type == VVC_PREFIX_SEI_NUT ? @@ -169,6 +193,7 @@ int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameCon int ff_vvc_sei_replace(VVCSEI *dst, const VVCSEI *src) { dst->picture_hash.present = 0; // drop hash + dst->frame_field_info.present = 0; // drop field info return ff_h2645_sei_ctx_replace(&dst->common, &src->common); } @@ -176,4 +201,5 @@ void ff_vvc_sei_reset(VVCSEI *s) { ff_h2645_sei_reset(&s->common); s->picture_hash.present = 0; + s->frame_field_info.present = 0; } diff --git a/libavcodec/vvc/sei.h b/libavcodec/vvc/sei.h index 6e4855bf60..578b48a0e4 100644 --- a/libavcodec/vvc/sei.h +++ b/libavcodec/vvc/sei.h @@ -36,6 +36,7 @@ typedef struct VVCSEI { H2645SEI common; H274SEIPictureHash picture_hash; + H274SEIFrameFieldInfo frame_field_info; } VVCSEI; struct VVCFrameContext; -- 2.44.0.windows.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".