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 10A014E00D for ; Sun, 27 Apr 2025 11:48:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B6C0B68B8E6; Sun, 27 Apr 2025 14:47:20 +0300 (EEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7FACA68AF86 for ; Sun, 27 Apr 2025 14:45:38 +0300 (EEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-73bb647eb23so3195508b3a.0 for ; Sun, 27 Apr 2025 04:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745754336; x=1746359136; 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=aY/ig+ylcbDjn30/vkqzSy50n6ivJAkWpVs1NgTcKZ8=; b=ZYW//CB7sUHQM8iW22Bf2sf9wUSRTBNkEewJ/40rrNtG/nf2mcue/NVEgstcJ370jR 7ERskrz+QW8STtc43NmBlSSWEOlHGPIstfH5qW4fhcerqXjyEkDrMZgxr1S1DneTvkwa amdGU9kWdlrIZOJaR0nkzNBsVMWp41FS5zsXXqsJqDf1ABLYVFxSdHKxklUO5C8EW/mr KjNDRI0SJbfIWG0JEZxm3sJ9fjTJQVQigRose5eY5IlcWQZZrJAHRYzWqAVJD1nHrMqt Nd+cBGMW/R0hQuM2d4oTl9YjiPuyQA6MTeCicZFqNdFTIPHLNFJmW9AMCBj5QLg/tNCt 1+xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745754336; x=1746359136; 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=aY/ig+ylcbDjn30/vkqzSy50n6ivJAkWpVs1NgTcKZ8=; b=kvx2asrT3STJB3jVGZLd0Wp3T4+IzvtSVOpIzdmcemeL1w0QcqqAx120078Km3LCKd ckHUCyuI3HbHl/NuF2mKH7d4hqkmDbj/HzCCv5alWtrybglNq26h1FXA685aMqjagPCI l11uQRQ6r+p64qdFkP56DukPlpxpVx2hVdcDBfr6QOKLtWHoJJVafntA1VNC8Y21ZNmi aiBB2hpiZteQoHF3RneNxxS4V9Bvz8TVAZ/9FIm8lqO9BDC35DmV7v8jcPxQfTRT3ae9 ujbLR+NqV/NlTV8IN46kqMBRHKIQJKqANXVn3Sl4aVy6ucnvfobtxgnq/gsfvHinOjWh 2QlQ== X-Gm-Message-State: AOJu0YworrEAjNh5guxOwgBaXWm0Txd/5cROJSlKhv6soTWQQ8TdIOrh 4NO/VdevuXRkSq8z3AzdhEkf4U92MGacjEdMcUkNNyqHulAJffUL0N9CCEfj X-Gm-Gg: ASbGncsEaOHijP15UlnC13t+h0RKKncyTl/RA2Ik37w4pt53KTvcUqW/94IPcb2rWNe O1yClMAwWgHwvYg7XHU7GZsx8Om3YAr9uxYASgX/qE9Qkd4EdsMBKnVlt+HZWCuGdqSIwig9Zsu Ys99aBaCfZ1k6HCHss6oLMBqH5IDWlFv4NpeLjn6laPPxF9cE99SBampVQepbWOfczyHJThvziL 5q6bx38qB5zjt1uI2EDZUj+GTGbpmtt89Mqm3FNzDkGWZs24ZRk3xwajOC2dE0YmcbDel/m83O1 S0kUqdfOpqYnuHvvYJJl3EqNF9NWNTsZBrtMhwOvd8eFwKVAPyEKEpoPobab1A== X-Google-Smtp-Source: AGHT+IEMS8Ga/YM0/k60iQqvhp+MdT6wrBa2jAR3qYUae+D7uUPwD5D9rT8lBwx3kzzyOJbOTzOO7Q== X-Received: by 2002:a05:6a00:2d21:b0:73f:e8c:1aac with SMTP id d2e1a72fcca58-73ff72473f4mr6910332b3a.2.1745754336547; Sun, 27 Apr 2025 04:45:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Apr 2025 04:45:36 -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:45 +0800 Message-ID: <20250427114451.1236-15-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 15/20] avcodec/cbs_sei_syntax_template: add sei message frame_field_information 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/cbs_h2645.c | 6 ++++++ libavcodec/cbs_sei.h | 12 ++++++++++++ libavcodec/cbs_sei_syntax_template.c | 26 ++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 60457d6b39..fa70a8fb7b 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -2323,6 +2323,12 @@ static const SEIMessageTypeDescriptor cbs_sei_h274_types[] = { sizeof(SEIRawDisplayOrientation), SEI_MESSAGE_RW(sei, display_orientation) }, + { + SEI_TYPE_FRAME_FIELD_INFO, + 1, 0, + sizeof(SEIRawFrameFieldInformation), + SEI_MESSAGE_RW(sei, frame_field_information) + }, SEI_MESSAGE_TYPE_END, }; diff --git a/libavcodec/cbs_sei.h b/libavcodec/cbs_sei.h index 7be12e33e0..81867b79a7 100644 --- a/libavcodec/cbs_sei.h +++ b/libavcodec/cbs_sei.h @@ -125,6 +125,18 @@ typedef struct SEIRawDisplayOrientation { uint8_t display_orientation_reserved_zero_3bits; } SEIRawDisplayOrientation; +typedef struct SEIRawFrameFieldInformation { + uint8_t ffi_field_pic_flag; + uint8_t ffi_bottom_field_flag; + uint8_t ffi_pairing_indicated_flag; + uint8_t ffi_paired_with_next_field_flag; + uint8_t ffi_display_fields_from_frame_flag; + uint8_t ffi_top_field_first_flag; + uint8_t ffi_display_elemental_periods_minus1; + uint8_t ffi_source_scan_type; + uint8_t ffi_duplicate_flag; +} SEIRawFrameFieldInformation; + typedef struct SEIRawMessage { uint32_t payload_type; uint32_t payload_size; diff --git a/libavcodec/cbs_sei_syntax_template.c b/libavcodec/cbs_sei_syntax_template.c index fb19f6ee42..e6863a0fd7 100644 --- a/libavcodec/cbs_sei_syntax_template.c +++ b/libavcodec/cbs_sei_syntax_template.c @@ -295,6 +295,32 @@ SEI_FUNC(display_orientation, (CodedBitstreamContext *ctx, RWContext *rw, return 0; } +SEI_FUNC(frame_field_information, (CodedBitstreamContext *ctx, RWContext *rw, + SEIRawFrameFieldInformation *current, + SEIMessageState *state)) +{ + int err; + + HEADER("Frame-field information"); + + flag(ffi_field_pic_flag); + if (current->ffi_field_pic_flag) { + flag(ffi_bottom_field_flag); + flag(ffi_pairing_indicated_flag); + if (current->ffi_pairing_indicated_flag) + flag(ffi_paired_with_next_field_flag); + } else { + flag(ffi_display_fields_from_frame_flag); + if (current->ffi_display_fields_from_frame_flag) + flag(ffi_top_field_first_flag); + u(8, ffi_display_elemental_periods_minus1, 0, 0xff); + } + u(2, ffi_source_scan_type, 0, 3); + flag(ffi_duplicate_flag); + + return 0; +} + static int FUNC(message)(CodedBitstreamContext *ctx, RWContext *rw, SEIRawMessage *current) { -- 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".