From patchwork Mon Jan 24 17:00:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33805 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp496264ioh; Mon, 24 Jan 2022 09:02:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCnCbXgo/oTGwxCBnlxgNfoqbZzp464kNuujlJ9lOxIS5yJRLlpwyk22dB0nr6DNWGsFa0 X-Received: by 2002:a17:906:4790:: with SMTP id cw16mr4799964ejc.39.1643043732211; Mon, 24 Jan 2022 09:02:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043732; cv=none; d=google.com; s=arc-20160816; b=S+aFgOauR9lGdzJRpuNFtBVCHMK+VUAzXSEwxX2e4kM+8gCrcHUAtgjUhUfaVz3InX xa7QWbRLowpaNz2U8FZwaNd7zO4U2Bu0JW1oZ8qHB3yauShP0WYvrbzjDSWFi8ccwEsM K983VHa0e+Uhp34c+SZXT9yPuC/HGFOMI1Yc6slL9T584FBfVSDxDbIp0ZdCRD+ZLcvG QQTUkf8atT0J02JKbcvoWZkbUCQV1QvB7R69de0SPJDupfbo8NmpQZOjiG4EjSfoApk1 X/7k9Wg20GEwx8Gx2fKEOYb3PwvI5l5dDhR/YbtdbgkTdTmmi9jLfyMU7vS+jr5wRbk8 dCFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=dgTOokvN9fznE0v+ZaCElNlXE0CG83mxqPeAsQ1RcVA=; b=e6LKl+fMmyX2g+N1Z+kHj+CwPGSqfbJAC1z/H5Bak3GRvKt6ihyMphlJTUaTNxEsl1 mICfuBuRcoRa9Yk3bDaLkV/7sntPHtovPq8Tu8o3WHj1GF7wogIrRYuAfMgaQcq8okZ/ KLGssCylG30T9IqzpBlb2N/Hn7do3rR9P7UubuAbzGqIoWWDrBbV2mCUU/7S7x2AGSOG PFUrno6lqn9+KqrIy5YB3bw+P0jTVen/Om/VE5t9F+ZELNBG8277LKyLYburnhEE/RrU EgCQ3cnCcv2dE5ELPIMrJDiXGj80pN0ad6XcN8y1uBggaSM5YG8YQJRtGpJiPriZ1+hD 1xLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g8si9056161edz.31.2022.01.24.09.02.11; Mon, 24 Jan 2022 09:02:12 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 51EC468B0AD; Mon, 24 Jan 2022 19:00:46 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BA80468B12C for ; Mon, 24 Jan 2022 19:00:36 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id BCE64240512 for ; Mon, 24 Jan 2022 18:00:34 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id nwHgv8hz9a_s for ; Mon, 24 Jan 2022 18:00:34 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 2AD1324052D for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id B136A3A0703; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:11 +0100 Message-Id: <20220124170014.17189-10-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124170014.17189-1-anton@khirnov.net> References: <20220124170014.17189-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/13] lavc/h264: move MB_TYPE defs from h264dec.h to h264_parse 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: sqZxQ+pYs/jQ Allows to stop including h264dec.h in h264data.c. --- libavcodec/h264_parse.h | 3 +++ libavcodec/h264data.c | 2 +- libavcodec/h264dec.h | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h index 95a80c425f..9b6391edda 100644 --- a/libavcodec/h264_parse.h +++ b/libavcodec/h264_parse.h @@ -34,6 +34,9 @@ #include "h264_ps.h" #include "internal.h" +#define MB_TYPE_REF0 MB_TYPE_ACPRED // dirty but it fits in 16 bit +#define MB_TYPE_8x8DCT 0x01000000 + // This table must be here because scan8[constant] must be known at compiletime static const uint8_t scan8[16 * 3 + 3] = { 4 + 1 * 8, 5 + 1 * 8, 4 + 2 * 8, 5 + 2 * 8, diff --git a/libavcodec/h264data.c b/libavcodec/h264data.c index eb8728a9db..3e9e68cb04 100644 --- a/libavcodec/h264data.c +++ b/libavcodec/h264data.c @@ -30,7 +30,7 @@ #include "libavutil/avutil.h" -#include "h264dec.h" +#include "h264_parse.h" #include "h264data.h" #include "mpegutils.h" diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 4441cf6613..6b72588854 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -96,8 +96,6 @@ #define CHROMA422(h) ((h)->ps.sps->chroma_format_idc == 2) #define CHROMA444(h) ((h)->ps.sps->chroma_format_idc == 3) -#define MB_TYPE_REF0 MB_TYPE_ACPRED // dirty but it fits in 16 bit -#define MB_TYPE_8x8DCT 0x01000000 #define IS_REF0(a) ((a) & MB_TYPE_REF0) #define IS_8x8DCT(a) ((a) & MB_TYPE_8x8DCT)