From patchwork Mon Jan 18 22:44:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Thompson X-Patchwork-Id: 25031 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 2FAD344A83F for ; Tue, 19 Jan 2021 01:13:23 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1B16C6880FA; Tue, 19 Jan 2021 01:13:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 153B26804D2 for ; Tue, 19 Jan 2021 01:13:17 +0200 (EET) Received: by mail-wr1-f52.google.com with SMTP id q18so17987853wrn.1 for ; Mon, 18 Jan 2021 15:13:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=eF6hE5e0TY5OnuCXXeAsqnLQ7FqYkijDABBK2hRWjbs=; b=LwftL/p3UBuZ24Abh2SlBLLvsYwFFDlW+qo1LpqHhg4GKq6kR8lPxHsvAP7zyvl3uE npHiUnw1kARIym6vg6UQuLNhXWt3EmpOuuGDQu3nG9ekQSx3i9XZaa/pV3walS0bmLn6 DxMiDGxRiWdkYTXw9XtkRw8a0DZ3rSi1eLuS9k8b8w22URMprewvH4l6R2oYFWd0HqZo /yhrJ0aswnXvWdqzME500yF/zFhvx1197UQOI+nzeFMEYYORkfA1hus8Oz298RdJvHpi s+1pZ2AaMNhibyLKPe1jVyfoxMjkGdP+NFjxjw305XvTHDUyFWYwlqMKSj7cByKRydvX HK5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=eF6hE5e0TY5OnuCXXeAsqnLQ7FqYkijDABBK2hRWjbs=; b=CLdmsKHQszeFpEjCMuemTJUW1tJs+fSKNCrkCPnSb7e49byWsUVvMwT8FhFKwlyzNW osOTlyZOQ7kXJRIdyMpMQbJ+CITLSGvm82R2QFF9nKXc0n7wVvQFEgJmA05RkuJLeVX8 rvWnhlzCZAkpxE2tTg090YM5dIbXUFOMQLyfETFOIT/HIqnT3katRvQliBk/l2whI5Oc R0i0K6nFWab+jSesKIgaxMqXVUnKZIb6GPdJ0GHNnPoRP14KVpMgj6/MC4YIE/Vq77hw CtJ5Ba1cSdT7/3JKQgvDbq9u23t33KWeONOdXenWfNjhh7PMaxmOFFOTeHpHz5E3PE2T 6z9Q== X-Gm-Message-State: AOAM531jXwO/L9yvqOcvCG8xNlhlS8zlJva0vRef4eKayggXOqTfh2n3 9CXfsBqx7e9PPEPo1Kwlxw+tOqNxf5nM6A== X-Google-Smtp-Source: ABdhPJz3cnTcQU/xHgnitZiH7QNWc9Ma7DqojXEFWoJV6mjGiy/BsEsYGxiUjRFQfo3AY4IDZvl4Jg== X-Received: by 2002:a5d:6c66:: with SMTP id r6mr1472684wrz.86.1611010022725; Mon, 18 Jan 2021 14:47:02 -0800 (PST) Received: from localhost.localdomain (cpc91226-cmbg18-2-0-cust7.5-4.cable.virginm.net. [82.0.29.8]) by smtp.gmail.com with ESMTPSA id b3sm1525898wme.32.2021.01.18.14.47.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 14:47:01 -0800 (PST) From: Mark Thompson To: ffmpeg-devel@ffmpeg.org Date: Mon, 18 Jan 2021 22:44:42 +0000 Message-Id: <20210118224455.750030-1-sw@jkqxz.net> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 00/13] Metadata handling in CBS, first half, v2 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This is v2 of the first half of the series, which factorises out common parts of the existing code and fixes some minor issues but has little external effect. It is updated as noted from previous comments, but has no other significant changes. I'll apply this later this week if there are no further comments. The second half involves more new code and has had more changes, and so will follow after. Thanks, - Mark Mark Thompson (13): cbs_h2645: Merge SEI messages in common between codecs h264_metadata_bsf: Move SEI user data parsing to init time cbs_h2645: Merge SEI message handling in common between codecs cbs_sei: Remove restrictions on MDCV values h264_metadata_bsf: Refactor the filter function into smaller parts h264_metadata_bsf: Improve interpretation of input display matrices cbs: Implement common parts of cbs-based bitstream filters separately h264_metadata_bsf: Use common cbs bsf implementation h265_metadata_bsf: Use common cbs bsf implementation mpeg2_metadata_bsf: Use common cbs bsf implementation vp9_metadata_bsf: Use common cbs bsf implementation av1_metadata_bsf: Use common cbs bsf implementation h264_redundant_pps_bsf: Use common cbs bsf implementation libavcodec/Makefile | 6 +- libavcodec/av1_metadata_bsf.c | 176 +------- libavcodec/cbs_bsf.c | 159 +++++++ libavcodec/cbs_bsf.h | 131 ++++++ libavcodec/cbs_h264.h | 79 +--- libavcodec/cbs_h2645.c | 324 +++++++------- libavcodec/cbs_h264_syntax_template.c | 271 +----------- libavcodec/cbs_h265.h | 66 +-- libavcodec/cbs_h265_syntax_template.c | 372 ++-------------- libavcodec/cbs_sei.c | 369 ++++++++++++++++ libavcodec/cbs_sei.h | 315 ++++++++++++++ libavcodec/cbs_sei_syntax_template.c | 307 +++++++++++++ libavcodec/h264_metadata_bsf.c | 596 +++++++++++--------------- libavcodec/h264_redundant_pps_bsf.c | 99 +---- libavcodec/h265_metadata_bsf.c | 191 +-------- libavcodec/mpeg2_metadata_bsf.c | 94 +--- libavcodec/vaapi_encode_h264.c | 53 +-- libavcodec/vaapi_encode_h265.c | 45 +- libavcodec/vp9_metadata_bsf.c | 61 +-- 19 files changed, 1882 insertions(+), 1832 deletions(-) create mode 100644 libavcodec/cbs_bsf.c create mode 100644 libavcodec/cbs_bsf.h create mode 100644 libavcodec/cbs_sei.c create mode 100644 libavcodec/cbs_sei.h create mode 100644 libavcodec/cbs_sei_syntax_template.c