From patchwork Mon Jul 6 21:08:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongle Lin X-Patchwork-Id: 20855 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 B353044A911 for ; Tue, 7 Jul 2020 00:09:36 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8A67668B110; Tue, 7 Jul 2020 00:09:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 31E0B68A41E for ; Tue, 7 Jul 2020 00:09:30 +0300 (EEST) Received: by mail-pj1-f67.google.com with SMTP id l6so14226213pjq.1 for ; Mon, 06 Jul 2020 14:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a/6L5I5uJSh1FG0htDOtVZOyX2ahZaRUw0JwOyWLAAI=; b=giWhR5UrNp0rPrjXvJCDFbiCfRPC8K/44EwLsGJ+VAici/Y3J2jE0p015t4VtJbhS9 Wk0aRKmfjCFC59pAHtzdYnYPP2OA+Xf1tkWWDIbn5coF6/ViwUXONxsu6Y+f3yI68163 gnj8CzcYHKTVX5/G49WS9gwbwvJEDNhFDp/bgFdICYVbOw2oFD+RcsqGaAYgCNOZkY5/ +r7JGO7/owKotuBqAebp1Q0lEdn5Xfe6NkPNB29XnC2IChDHBnd8g65xqXJSU16hfBpM x2GQc+fzGwGwKoOFFLCoP/A8Gy6++crKuhz9tVVhsA2b5b3ai5FP8r635V/YXrC0av0q 0HEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a/6L5I5uJSh1FG0htDOtVZOyX2ahZaRUw0JwOyWLAAI=; b=qADwHvYiVin+IHyzzngyIW66/3oo2goGEhADATYZy3ZTCHCbnPF+q9eyvJkUw8w9ZW 1JCsWRsEexGEz5bQJBbSupV/xKLKP9EMWAlOPMm4aMWLwPT23AoZaqQTrneiG5czRXb6 eF9j5XswYkeZdG/D8NhAKwzNFEtFAFxo+bP5a4aJGweYoP7z8QZQID9A34b6VS2bVkU4 Xq6ze+8DB3hRP0ZwvstYcpd+1ugHT7zQU1ksBziWw0bsy41NxUJkZujEuyXrg+egeOxl ededjBqwi8lQE6FsZRXngup4HfgDLrWwD8aH50VklNyfi9PS9fwQ9k5lK/RnAXUrSEK3 W37w== X-Gm-Message-State: AOAM532UCY5QqjB8WmNqxDezK9YcikqBFbXg0BRn8ywmCzt+H1qhZdbr ZrQGP7FbP0WbeifE2N45aDlSANrS X-Google-Smtp-Source: ABdhPJzStWXmXQWsEHAoJlNl3SVisA7kJHduvQB06n9xaQmtQ9P6CCiI1jMlaLLed08acyWffvIxsw== X-Received: by 2002:a17:902:8a96:: with SMTP id p22mr44595668plo.281.1594069768266; Mon, 06 Jul 2020 14:09:28 -0700 (PDT) Received: from yonglel.c.googlers.com.com (219.29.83.34.bc.googleusercontent.com. [34.83.29.219]) by smtp.gmail.com with ESMTPSA id kx3sm341289pjb.32.2020.07.06.14.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 14:09:27 -0700 (PDT) From: Yongle Lin X-Google-Original-From: Yongle Lin To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Jul 2020 21:08:17 +0000 Message-Id: <20200706210817.2502907-1-yonglel@google.com> X-Mailer: git-send-email 2.27.0.383.g050319c2ae-goog MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavutil/video_enc_params: add block type 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 Cc: Yongle Lin Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" add block type field to AVVideoBlockParams so we could either export or visualize it later. --- libavutil/video_enc_params.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libavutil/video_enc_params.h b/libavutil/video_enc_params.h index 43fa443154..55b9fc4031 100644 --- a/libavutil/video_enc_params.h +++ b/libavutil/video_enc_params.h @@ -101,6 +101,21 @@ typedef struct AVVideoEncParams { int32_t delta_qp[4][2]; } AVVideoEncParams; +typedef struct MacroBlockType { + /** + * Is intra prediction + */ + int intra; + /** + * Skip flag + */ + int skip; + /** + * Reference to the past or future + */ + int ref[2]; +} MacroBlockType; + /** * Data structure for storing block-level encoding information. * It is allocated as a part of AVVideoEncParams and should be retrieved with @@ -126,6 +141,11 @@ typedef struct AVVideoBlockParams { * corresponding per-frame value. */ int32_t delta_qp; + + /** + * Type of block + */ + MacroBlockType mb_type; } AVVideoBlockParams; /*