From patchwork Mon Jan 24 17:00:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33798 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp494664ioh; Mon, 24 Jan 2022 09:00:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuiJCxOwqOZO26AP80fd9SUjPdd+9USefpvqQioFLdXvIEgbCibT7Zuu3ATV+axOLD1KuU X-Received: by 2002:a05:6402:3486:: with SMTP id v6mr17141500edc.390.1643043641230; Mon, 24 Jan 2022 09:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043641; cv=none; d=google.com; s=arc-20160816; b=kcYKVK8/CuqIpATZjizBbtUW5YA8RdDjPden+vA0165CfEvSbORTa6B3OVNOHrsWXU PQkYWoZ05w9HGtkw/og6k/JjZKZtNk9o6ysh265L2PrHL4pmS3KDRncZg5Z6jY5EbuKn Ha2HNL8FAIYv2k8qQ6Cvrc0nZTw+UCzPulHYvWvtLG2AazKZeph5/Kl1yRv0G1WjR5uc zM8C769FTdhlO1NkCAga5kbig21Y90aqT9snoihaDkvUaJDQpz95LunXQtdpt2NYGGZS GCPXr+Udk4Oqty4Dp15YcDiQ50svTiJ0byS20YUHZ826xovzZUEw5f8S9oOryUXwg+2q r2Pg== 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:message-id:date:to:from :delivered-to; bh=dnvEH+DnnJ7qoUJyG9+f/VwcDdEAnsdBuPgyluJgqK0=; b=LOxPXBr+jfWgLKOcRQv32AXg/epSqzaa00s/PiwYv1gJdJ5i3ecQwTdRHWNR/a824j Sln1Zutm64rP4A9wiAVccamQWYQs2vNsgw5sLYkdnhGDjSs+EMmmCFY5Is+w7H07a1CV oL31YWkH26IPgELiSS2u+/H0MGVAXq21zR0kRVPPjesFE7qcQiuaC40zgFnUVve9ua02 SVppxsEKkSg3rk6OA07CIZZr2PCLJAq4KHRgVQbYNEQro55x0KJWmEO8VJqAn5HuCrJz XdXSYQtvJry4bB+M3xMoY/tq1kXDn4ccvPwsggTX1+3CitTkGvJDkshCu744TQS+teGB j3hA== 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 js12si537240ejc.118.2022.01.24.09.00.40; Mon, 24 Jan 2022 09:00:41 -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 D200668B0DB; Mon, 24 Jan 2022 19:00:36 +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 F10EA68AF55 for ; Mon, 24 Jan 2022 19:00:30 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 657BD240590 for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id pIGGjbsM3xyE for ; Mon, 24 Jan 2022 18:00:29 +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 CA83224017E for ; Mon, 24 Jan 2022 18:00:29 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 93BA23A045A; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:02 +0100 Message-Id: <20220124170014.17189-1-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 01/13] lavc/h264: replace MAX_MMCO_COUNT with H264_MAX_MMCO_COUNT 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: heh3GVgSLjuu They apparently serve the same purpose; the latter is one larger and has a comment explaining how the value is derived, so seems more trustworthy. --- libavcodec/h264_parser.c | 2 +- libavcodec/h264_refs.c | 2 +- libavcodec/h264dec.h | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index bb84cea821..e3a11702c5 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -210,7 +210,7 @@ static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb, if (get_bits1(gb)) { // adaptive_ref_pic_marking_mode_flag int i; - for (i = 0; i < MAX_MMCO_COUNT; i++) { + for (i = 0; i < H264_MAX_MMCO_COUNT; i++) { MMCOOpcode opcode = get_ue_golomb_31(gb); if (opcode > (unsigned) MMCO_LONG) { av_log(logctx, AV_LOG_ERROR, diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index dae8bd278a..93526b11e2 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -849,7 +849,7 @@ int ff_h264_decode_ref_pic_marking(H264SliceContext *sl, GetBitContext *gb, } else { sl->explicit_ref_marking = get_bits1(gb); if (sl->explicit_ref_marking) { - for (i = 0; i < MAX_MMCO_COUNT; i++) { + for (i = 0; i < FF_ARRAY_ELEMS(sl->mmco); i++) { MMCOOpcode opcode = get_ue_golomb_31(gb); mmco[i].opcode = opcode; diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 87c4e4e539..ca3001ec4b 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -53,8 +53,6 @@ #define H264_MAX_PICTURE_COUNT 36 -#define MAX_MMCO_COUNT 66 - #define MAX_DELAYED_PIC_COUNT 16 /* Compiling in interlaced support reduces the speed @@ -331,7 +329,7 @@ typedef struct H264SliceContext { uint8_t cabac_state[1024]; int cabac_init_idc; - MMCO mmco[MAX_MMCO_COUNT]; + MMCO mmco[H264_MAX_MMCO_COUNT]; int nb_mmco; int explicit_ref_marking; @@ -490,7 +488,7 @@ typedef struct H264Context { /** * memory management control operations buffer. */ - MMCO mmco[MAX_MMCO_COUNT]; + MMCO mmco[H264_MAX_MMCO_COUNT]; int nb_mmco; int mmco_reset; int explicit_ref_marking; From patchwork Mon Jan 24 17:00:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33801 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp495295ioh; Mon, 24 Jan 2022 09:01:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDXMfU1DqoiLxU9kwXVM7BvB/MaUviUIQ7sd+Qy4CJdWTHEu5yTM0mqARgv9//dWo3zN0H X-Received: by 2002:a17:906:58c8:: with SMTP id e8mr12875062ejs.444.1643043675034; Mon, 24 Jan 2022 09:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043675; cv=none; d=google.com; s=arc-20160816; b=dGuPh6bnTLn7hQmiX2n0mqdkon5hIlw4oA8GuVTkgRoGOrzavR5FjPTY4MIvXIE7ue x0ZjKCFhClOXbmYvhBh9EWTPqmNccecyamvIG3LGiaKtbx1x2nFooctJwo5l8Bcxp0yP Q9xsynrB63sgdaB3uc1UNxBkIdHKS3V2cH3jrdoCST+I7wyyjbGMMFV63NYxI5mYN8/f OU20RDNT9b4lwPICoJrQhp3lthrreibSReiQtqCVP/veAYNshcBI7SvuGb05Yb9FkB/9 VR5KVZresl/ygIv3TgOuV5p5m8QSCo6nHWetKD6hIiohHP/dZM8//l6DAVWRrNlMKr7D hL2w== 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=w0U8ncsux+3xIHj15lymzZ/3wpimg3ytL1RoKrWZYh0=; b=TjMkeu0NwaGBdZ4iQDVen2rogrgYnSr9Ir1rAXjJzNU4/B0f2utHQLTGzbcsdPGjqk f32uIPPqMXq3l1ZpEmirnDVBQi111dYYbeZQEmOgRfVqMvW4+cKaqVgow+Z/zKiWSddl hxcJv58uKJq/xdlTfTW5AYePuUehwgXlzPpWEjMOP3OJIYDj0eOX1Ny/CTnOOcbf89ao 2nd4oHYyKyHa+ffy45Sb0ymcddTG2K0qxGGFvJ0H9GVkghmRkf2ytJfrRJGU1cTEeWcQ YjlmebOb1xbTa89QkNSQiUqylSITNWDFqvGaRYcUpJFkharLMGhOX2DdYmWIx+4lIxmj rHCw== 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 hu8si8576688ejc.247.2022.01.24.09.01.14; Mon, 24 Jan 2022 09:01:15 -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 5755A68B113; Mon, 24 Jan 2022 19:00:40 +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 A5F8968B0C7 for ; Mon, 24 Jan 2022 19:00:32 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 20D38240506 for ; Mon, 24 Jan 2022 18:00:32 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id zSFdrCy2Fm3i for ; Mon, 24 Jan 2022 18:00:31 +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 CC7512404FE for ; Mon, 24 Jan 2022 18:00:29 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 951B43A0404; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:03 +0100 Message-Id: <20220124170014.17189-2-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 02/13] lavc/h264_parser: stop accessing H264Context 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: 6g4e+vuO5fwH Parsers should not mess with decoder private data. It is also completely unnecessary here. --- libavcodec/h264_parser.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index e3a11702c5..816b04845e 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -247,7 +247,6 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t * const buf, int buf_size) { H264ParseContext *p = s->priv_data; - H264Context *h = avctx->priv_data; H2645RBSP rbsp = { NULL }; H2645NAL nal = { NULL }; int buf_index, next_avc; @@ -553,11 +552,10 @@ static inline int parse_nal_units(AVCodecParserContext *s, p->last_picture_structure = s->picture_structure; p->last_frame_num = p->poc.frame_num; } - if (h && sps->timing_info_present_flag) { + if (sps->timing_info_present_flag) { int64_t den = sps->time_scale; - if (p->sei.unregistered.x264_build >= 0) - h->x264_build = p->sei.unregistered.x264_build; - if (h->x264_build < 44U) + if (p->sei.unregistered.x264_build >= 0 && + p->sei.unregistered.x264_build < 44U) den *= 2; av_reduce(&avctx->framerate.den, &avctx->framerate.num, sps->num_units_in_tick * avctx->ticks_per_frame, den, 1 << 30); From patchwork Mon Jan 24 17:00:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33802 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp495492ioh; Mon, 24 Jan 2022 09:01:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvOq635De7Vg6HQA4nVTMbMczECIGbPeL2GSOu25XWwlzKoN1XjxjUZT5OuOiq8Bill5b8 X-Received: by 2002:a17:907:7291:: with SMTP id dt17mr200732ejc.521.1643043686166; Mon, 24 Jan 2022 09:01:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043686; cv=none; d=google.com; s=arc-20160816; b=Ta5qyO+UTRYfCyMObBRgiJ6TiWiXrL2PnhILiyeXytb8KqdXDG01i9SoajWpkf1dOU 2Ot1VAIwh9JE0kXJjgUHu81wAORXaz3yjZgnoaCvJdjHqgj9a5haXo+oC8q0S1KYwjIC pEKMmLKQbQQf0tnsJ/2isZDZdsXOsjU/P8/hH18BU93xMaAfc9PGwrWm4q1R7gLxl3yM S640hG9wDIMjCKsYirIUQCTgKfNbU1o60i9ujFM3hlrM10fao5SbdR33Lt9tuk/ClmFx TGlca2E4lhEgRgxX49YKs4rjBDFFVnLVSSXvkM8VodOAPODu5O1QUKZoTnxII3OlpX/0 qUig== 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=xRpK3X8G5wKJKYzdscjo3QScM14dgK6xxZK2PtXF7nY=; b=1HXLUG+mJUxePXt0jOu4hNt6MG8zTZiwyPCm+O8VMxao6CtVI+nqXZcu4tlvkKsvMo ex7NwCvq06vYpUT1i8p2Gfq/YIiNu383vRNCCNumzHeRqnkpKBEY6+l3h6Qh2znQeaNi TassP6SKRibv1pwY/YIQ9gwotmCW/nHR2B5Bqusg3xvRLCmaQrMvfxiSLMrbXSuSAnCy l4tMZjq5YL5z0MR9Fi9IjEF2LEALx6JUDWQxP3yQz9WRim2So7xFE7FKxQaEXXo+75HA bvPrR8aiNCNSH8q/mNx69iwl5N/UrNEQ1ranSH5Fhtjd5U/Wj3kEolybf2OH3DTaNlWF yDpw== 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 w4si5317719edt.364.2022.01.24.09.01.25; Mon, 24 Jan 2022 09:01:26 -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 31CB268B0E6; Mon, 24 Jan 2022 19:00:42 +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 8ED0C68B0E7 for ; Mon, 24 Jan 2022 19:00:33 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 09A192404FE for ; Mon, 24 Jan 2022 18:00:33 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id LXTgX2wJFpP3 for ; Mon, 24 Jan 2022 18:00:29 +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 BC2EE240179 for ; Mon, 24 Jan 2022 18:00:29 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 976FD3A047E; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:04 +0100 Message-Id: <20220124170014.17189-3-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 03/13] lavc/h264dec.h: move find_start_code and MMCOOpcode to h264_parse.h 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: cD6ZzaWPmuiD Both parser and decoder use these, so h264_parse is the proper place for them. --- libavcodec/h264_parse.h | 28 ++++++++++++++++++++++++++++ libavcodec/h264dec.h | 23 ----------------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h index 4d01620125..9f329db77a 100644 --- a/libavcodec/h264_parse.h +++ b/libavcodec/h264_parse.h @@ -24,8 +24,26 @@ #ifndef AVCODEC_H264_PARSE_H #define AVCODEC_H264_PARSE_H +#include + +#include "libavutil/common.h" + #include "get_bits.h" #include "h264_ps.h" +#include "internal.h" + +/** + * Memory management control operation opcode. + */ +typedef enum MMCOOpcode { + MMCO_END = 0, + MMCO_SHORT2UNUSED, + MMCO_LONG2UNUSED, + MMCO_SHORT2LONG, + MMCO_SET_MAX_LONG, + MMCO_RESET, + MMCO_LONG, +} MMCOOpcode; typedef struct H264PredWeightTable { int use_weight; @@ -90,4 +108,14 @@ int ff_h264_decode_extradata(const uint8_t *data, int size, H264ParamSets *ps, */ int ff_h264_get_profile(const SPS *sps); +static inline int find_start_code(const uint8_t *buf, int buf_size, + int buf_index, int next_avc) +{ + uint32_t state = -1; + + buf_index = avpriv_find_start_code(buf + buf_index, buf + next_avc + 1, &state) - buf - 1; + + return FFMIN(buf_index, buf_size); +} + #endif /* AVCODEC_H264_PARSE_H */ diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index ca3001ec4b..1e1f84ef33 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -103,19 +103,6 @@ #define IS_REF0(a) ((a) & MB_TYPE_REF0) #define IS_8x8DCT(a) ((a) & MB_TYPE_8x8DCT) -/** - * Memory management control operation opcode. - */ -typedef enum MMCOOpcode { - MMCO_END = 0, - MMCO_SHORT2UNUSED, - MMCO_LONG2UNUSED, - MMCO_SHORT2LONG, - MMCO_SET_MAX_LONG, - MMCO_RESET, - MMCO_LONG, -} MMCOOpcode; - /** * Memory management control operation. */ @@ -831,16 +818,6 @@ static av_always_inline int get_dct8x8_allowed(const H264Context *h, H264SliceCo 0x0001000100010001ULL)); } -static inline int find_start_code(const uint8_t *buf, int buf_size, - int buf_index, int next_avc) -{ - uint32_t state = -1; - - buf_index = avpriv_find_start_code(buf + buf_index, buf + next_avc + 1, &state) - buf - 1; - - return FFMIN(buf_index, buf_size); -} - int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup); int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src); From patchwork Mon Jan 24 17:00:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33799 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp494828ioh; Mon, 24 Jan 2022 09:00:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUZbz2lQGI/ib/+DhZ471G8SFJKsTBm7QULt88A/ja3OL4W+bGpj0Cv20c/xd7P5aTsphA X-Received: by 2002:a17:906:5248:: with SMTP id y8mr12813850ejm.365.1643043652438; Mon, 24 Jan 2022 09:00:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043652; cv=none; d=google.com; s=arc-20160816; b=h/sBlc5DRDCZXRfnROykKauCgGnATAWTveAiGaBwe0KkipcQAioPArvNzhdcPExkfC V7EEz88RiOofHxm4QsY2ygOndq1T8t9M4mrESrhwiUxcxup75uNS2tWPBC8U5qnTL351 0gxGwgoJvuzbVWqnnU0lSyq9Bhgyq5HDkL5HE5hABZFzBSAGM6YUrM1HquSWHXFREjZB N02j7PHVzEgU8qHUd4pgJKU3Ob5LO4cAJr7nWc6+fa3jkjfa3Qrqhx1xdF9I1d1wpG+m Uc7zskWP7H8aK+LeMtpyodONwF/neJ57CK8HglUmzrnIK8+uO8CKnhfRE+SkW2XIWGkt uTyQ== 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=HqK+wT521lMA3iixIo3+1jPzXhc9DUbbB1trniJUAto=; b=hsP3qFE1TPd/CBDiB7C1M1s+l3J2M+CStzkx9NkqmzG5XBXHquNPX45sn4U7X2+Jgz E9w21R3ni7vxOUe595EY6p1rxxuQXx77p60xGyQAzktdTan94ftWWUJ2ZoikHU++/pN1 4xyzY8lIlc2JWcZPZHJZwQGXNU2ka/8ypLZrL0vkIOj5ksVSAZxWuXlY/AlziKVLQ7tr 8I4lnROEKz/XZW7z6eSk8wVg+k1xQpTYanv6LgxHEoodzPZqcYlqnZ7fitTgsoCyvyB2 jJ6knLcEf3GiAe+aMMIvGCKIirMXeL4ZCXWf36XyGRBSlxUDnxXNpxNsKD9pBi7Mp1Vz zrew== 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 fy1si10168674ejc.492.2022.01.24.09.00.51; Mon, 24 Jan 2022 09:00:52 -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 C3D5D68B0E7; Mon, 24 Jan 2022 19:00:38 +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 7883F68B094 for ; Mon, 24 Jan 2022 19:00:31 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id E354B24017E for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id rOAhvudiPT_J for ; Mon, 24 Jan 2022 18:00:30 +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 C846A24017C for ; Mon, 24 Jan 2022 18:00:29 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 9CB193A0631; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:05 +0100 Message-Id: <20220124170014.17189-4-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 04/13] lavc/h264: replace MAX_DELAYED_PIC_COUNT with FF_ARRAY_ELEMS where appropriate 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: WdUFDHVdlgno --- libavcodec/h264_refs.c | 2 +- libavcodec/h264_slice.c | 2 +- libavcodec/h264dec.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 93526b11e2..94b473257f 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -729,7 +729,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h) h->poc.frame_num = h->cur_pic_ptr->frame_num = 0; h->mmco_reset = 1; h->cur_pic_ptr->mmco_reset = 1; - for (j = 0; j < MAX_DELAYED_PIC_COUNT; j++) + for (j = 0; j < FF_ARRAY_ELEMS(h->last_pocs); j++) h->last_pocs[j] = INT_MIN; break; default: av_assert0(0); diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 4833282191..d6d4497fc9 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -428,7 +428,7 @@ int ff_h264_update_thread_context(AVCodecContext *dst, copy_picture_range(h->short_ref, h1->short_ref, 32, h, h1); copy_picture_range(h->long_ref, h1->long_ref, 32, h, h1); copy_picture_range(h->delayed_pic, h1->delayed_pic, - MAX_DELAYED_PIC_COUNT + 2, h, h1); + FF_ARRAY_ELEMS(h->delayed_pic), h, h1); h->frame_recovered = h1->frame_recovered; diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 7f10026340..3706ae0e31 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -308,7 +308,7 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h) h->sei.unregistered.x264_build = -1; h->next_outputed_poc = INT_MIN; - for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) + for (i = 0; i < FF_ARRAY_ELEMS(h->last_pocs); i++) h->last_pocs[i] = INT_MIN; ff_h264_sei_uninit(&h->sei); @@ -445,7 +445,7 @@ static void idr(H264Context *h) h->poc.prev_frame_num_offset = 0; h->poc.prev_poc_msb = 1<<16; h->poc.prev_poc_lsb = -1; - for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) + for (i = 0; i < FF_ARRAY_ELEMS(h->last_pocs); i++) h->last_pocs[i] = INT_MIN; } From patchwork Mon Jan 24 17:00:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33800 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp495101ioh; Mon, 24 Jan 2022 09:01:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+rJQlYHG6hirFAJ0B7p470EQYDGbihVN3SKkuRa46laejQQ7t4FWJDzXaSBPDeaTnP0s5 X-Received: by 2002:a17:907:1b11:: with SMTP id mp17mr13233206ejc.374.1643043665867; Mon, 24 Jan 2022 09:01:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043665; cv=none; d=google.com; s=arc-20160816; b=S3fSR//Q8XmoyjB91x7cGbXTTj3ZCYO886UChTt24dkvaGKnZlfusizw/10vy4NDr3 LBCyHfUD2HCBcJo07xPg+9ZzytmbjwnSwWZ1sA+GNwLGdtjRPNeGucmL3sNMNITiHYRL IKcNlaHcuu0sD1NLNkcqSgiQCnNkAkIaKT8nasfovB3clBHkNH0sr1v+L9Clw5bxrEJP +HDsnsZulFLzyabI6eg/43PimT72lPZtWtG6ftFoAH1XRyemO1cHjbcEx1E6+ypid25v y1U65XWhpS1G+/XRLFifROAL0A+tZRXtlN2dDUm0kOcN0YwaM0PI3sQPrg9LwnLE0CXk SMyg== 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=+x43pTBD2l2ZPL/eZKqh3iD/Oc2wUjPRcsANJUAUhfw=; b=dQIYz1NDkTGhmS848d/5ppSEeWneqk1tjwtJYhPGSJRVv8zhqzfj/HWZYpkbbdGspL UKnbXpUz/Oz+sK6ZY6WxnbpACP1bWS2hUgKfggaRgk9s5in3usCgs+EHcUlqZBQS3sds xqiDsws7dHCdtJuZzhmh1hRNS+pJFzVQx3YeuKT0rvTH31F7rYJbGeQrgJYc9KEqVOA/ 2rccWdNCcbdlZJLbnT5grMunsmdbu4Lt/p7lx4KAFg5m5Bst06/RtvIA60aP2O0b2lER 85oHd3RJ683DdmmEKe/AhhHt5V29LChD+FF7kvfnooW+lCH5Okjarl1rCd+aruIXzRgx W5FQ== 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 4si7758090ejl.790.2022.01.24.09.01.03; Mon, 24 Jan 2022 09:01:05 -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 9600468B10D; Mon, 24 Jan 2022 19:00:39 +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 1A61868B0DE for ; Mon, 24 Jan 2022 19:00:32 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 7F2AF24017C for ; Mon, 24 Jan 2022 18:00:31 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id LhpJrXpdd91w for ; Mon, 24 Jan 2022 18:00:30 +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 CE0C2240506 for ; Mon, 24 Jan 2022 18:00:29 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id A01D63A0663; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:06 +0100 Message-Id: <20220124170014.17189-5-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 05/13] lavc/h264: replace MAX_DELAYED_PIC_COUNT by H264_MAX_DPB_FRAMES 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: YzHOkO5K/4U9 --- libavcodec/h264_ps.c | 4 ++-- libavcodec/h264_slice.c | 12 ++++++------ libavcodec/h264dec.h | 6 ++---- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index e21c2b56ac..f68d5bf81c 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -485,7 +485,7 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx, sps->ref_frame_count = get_ue_golomb_31(gb); if (avctx->codec_tag == MKTAG('S', 'M', 'V', '2')) sps->ref_frame_count = FFMAX(2, sps->ref_frame_count); - if (sps->ref_frame_count > MAX_DELAYED_PIC_COUNT) { + if (sps->ref_frame_count > H264_MAX_DPB_FRAMES) { av_log(avctx, AV_LOG_ERROR, "too many reference frames %d\n", sps->ref_frame_count); goto fail; @@ -590,7 +590,7 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx, * level */ if (!sps->bitstream_restriction_flag && (sps->ref_frame_count || avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT)) { - sps->num_reorder_frames = MAX_DELAYED_PIC_COUNT - 1; + sps->num_reorder_frames = H264_MAX_DPB_FRAMES - 1; for (i = 0; i < FF_ARRAY_ELEMS(level_max_dpb_mbs); i++) { if (level_max_dpb_mbs[i][0] == sps->level_idc) { sps->num_reorder_frames = FFMIN(level_max_dpb_mbs[i][1] / (sps->mb_width * sps->mb_height), diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index d6d4497fc9..32df9fd3ae 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1456,7 +1456,7 @@ static int h264_select_output_frame(H264Context *h) } for (i = 0; 1; i++) { - if(i == MAX_DELAYED_PIC_COUNT || cur->poc < h->last_pocs[i]){ + if(i == H264_MAX_DPB_FRAMES || cur->poc < h->last_pocs[i]){ if(i) h->last_pocs[i-1] = cur->poc; break; @@ -1464,13 +1464,13 @@ static int h264_select_output_frame(H264Context *h) h->last_pocs[i-1]= h->last_pocs[i]; } } - out_of_order = MAX_DELAYED_PIC_COUNT - i; + out_of_order = H264_MAX_DPB_FRAMES - i; if( cur->f->pict_type == AV_PICTURE_TYPE_B - || (h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > INT_MIN && h->last_pocs[MAX_DELAYED_PIC_COUNT-1] - (int64_t)h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > 2)) + || (h->last_pocs[H264_MAX_DPB_FRAMES-2] > INT_MIN && h->last_pocs[H264_MAX_DPB_FRAMES-1] - (int64_t)h->last_pocs[H264_MAX_DPB_FRAMES-2] > 2)) out_of_order = FFMAX(out_of_order, 1); - if (out_of_order == MAX_DELAYED_PIC_COUNT) { + if (out_of_order == H264_MAX_DPB_FRAMES) { av_log(h->avctx, AV_LOG_VERBOSE, "Invalid POC %d<%d\n", cur->poc, h->last_pocs[0]); - for (i = 1; i < MAX_DELAYED_PIC_COUNT; i++) + for (i = 1; i < H264_MAX_DPB_FRAMES; i++) h->last_pocs[i] = INT_MIN; h->last_pocs[0] = cur->poc; cur->mmco_reset = 1; @@ -1484,7 +1484,7 @@ static int h264_select_output_frame(H264Context *h) while (h->delayed_pic[pics]) pics++; - av_assert0(pics <= MAX_DELAYED_PIC_COUNT); + av_assert0(pics <= H264_MAX_DPB_FRAMES); h->delayed_pic[pics++] = cur; if (cur->reference == 0) diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 1e1f84ef33..4a56463340 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -53,8 +53,6 @@ #define H264_MAX_PICTURE_COUNT 36 -#define MAX_DELAYED_PIC_COUNT 16 - /* Compiling in interlaced support reduces the speed * of progressive decoding by about 2%. */ #define ALLOW_INTERLACE @@ -466,8 +464,8 @@ typedef struct H264Context { H264Ref default_ref[2]; H264Picture *short_ref[32]; H264Picture *long_ref[32]; - H264Picture *delayed_pic[MAX_DELAYED_PIC_COUNT + 2]; // FIXME size? - int last_pocs[MAX_DELAYED_PIC_COUNT]; + H264Picture *delayed_pic[H264_MAX_DPB_FRAMES + 2]; // FIXME size? + int last_pocs[H264_MAX_DPB_FRAMES]; H264Picture *next_output_pic; int next_outputed_poc; int poc_offset; ///< PicOrderCnt_offset from SMPTE RDD-2006 From patchwork Mon Jan 24 17:00:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33803 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp495884ioh; Mon, 24 Jan 2022 09:01:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpweb9Xp0nKBle523UsN/AhOAGcc7Vr1kQBBZ8/TljgYE2P7A/hS9irwzinTx9ow4l3oMA X-Received: by 2002:a50:cf86:: with SMTP id h6mr17146747edk.82.1643043709298; Mon, 24 Jan 2022 09:01:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043709; cv=none; d=google.com; s=arc-20160816; b=jKbmbV4kVNa38lvRK6zYaj5xCEKy/A/gh/eYeLl355tjCTW2mQDqGzhIaCCsQAJRbd N+H8JxNXkEq1fsbl5RCOjsoIn7m0kOaEKQD6NCrlvVUFJ5OOzenP24IeSgShIlO4aCLS aUzjpYhEUieeCHjo7rgIA2AIrlD4nzHjC3E1Yq+N85bgV1BpP02X4UVA391Vc6XW57zD 7JHp6hnUK3DO47cAJbwTKcdjL+iuq7f6fO1ArOgUFZM/sTQEXn6DSpbBZOMgYX/xo9Un di+tSq8QXGicXUdIwmUKrKsfWDu+XBZodHZDpzuMx+K4naNaURImambwcgHLOqb8kp4E 9rcw== 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=/o/rcftAlVF0n7nmFIEXszM9a+8BNJFnH+OyK999KeA=; b=ImYfVsT7Pk9detif5EKzQ6toQ8rHI5vlh2P/MDRQb3MrcWPJ9Afiz/oB0zT60TVl2O 2UWQ4gtGKzYOtqoZpqvtRPMChaji9wuvYRQmbAJ/AR/pJPrF7U1RTBs0MmZZETDqgBvz hp/TnnE1H/+aD6J46UJt9McXE7auAhlAnR19GIzPlV6wt29L5UHdQETnOnJ0DZXtgzdF H22/3PtyaFoZknuWk29BkJPIFQvqNWlTaL04q7GLbnu/XWzDl/wKLLuiOFQRzi/5kfpT NDRLGB/E12NlvZrG7QuJ7P+WI7Aw5MV/CBo8UVm+ErIuKQIoQv/5jkZ9FOYW8Nn7eZ/P ASAw== 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 js12si538701ejc.118.2022.01.24.09.01.48; Mon, 24 Jan 2022 09:01:49 -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 CB70968AE9D; Mon, 24 Jan 2022 19:00:44 +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 3F54768B115 for ; Mon, 24 Jan 2022 19:00:36 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id D27CF240511 for ; Mon, 24 Jan 2022 18:00:33 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 7YB7cEn4ClhL for ; Mon, 24 Jan 2022 18:00:33 +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 15149240507 for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id A379D3A06C7; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:07 +0100 Message-Id: <20220124170014.17189-6-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 06/13] lavc/h264_parser: add missing headers 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: wGwOBT+6IHB4 --- libavcodec/h264_parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 816b04845e..b221459c1b 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -40,8 +40,11 @@ #include "get_bits.h" #include "golomb.h" #include "h264.h" +#include "h264dsp.h" +#include "h264_parse.h" #include "h264_sei.h" #include "h264_ps.h" +#include "h2645_parse.h" #include "h264data.h" #include "internal.h" #include "mpegutils.h" From patchwork Mon Jan 24 17:00:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33807 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp496889ioh; Mon, 24 Jan 2022 09:02:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzaTk0HASnQZsWGhc8X9Q2S6Q6Ui3xVAUHpXGoI7RI5j/d1RjyCdOEbULZqTVdK5TEr6xRJ X-Received: by 2002:a05:6402:5174:: with SMTP id d20mr16885683ede.21.1643043769285; Mon, 24 Jan 2022 09:02:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043769; cv=none; d=google.com; s=arc-20160816; b=NyIZAZDYHR9/YoMkbh43u74DGVqlTeUbLH2FWKxFq2IRFz8gffLLfRlcImPhnp/px9 U3oXjgJu12QF8k04IJT8qnWBNJTuZplnPVDTatrwFkktZGgpQnrGrrvvYYP5dkx1vXDn QlWvJhjASG8w3gsG4KUGVVkQevOIw/RbUuWNQpnQjul6ZJxmZMUyVohiufbpjA2XjdpF kn9mgDL/NiicPsLMlweR95A+FnLYRxPR2GoMK7C/KCfNuZF/4VV5/lD9VfrcdOca+rz2 HJI2W10l4B/eKG5K2ORFr4l016DhCDjVdGnorPlcxoh9v0oL8MSJVR+csCybrkPUDEn6 jthA== 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=0spLpmjfllYG5lzcQrPDCjkfqwtbQCt3fCgKj6KTCNc=; b=cEgie9B96Mc49tMY8mIWL774coxQV+cYSbtTez7buIUP1XTHyrBmfrKIYpppkZBrts 2rRtlXjNhaiZxU1usGf6xsBLCMu5fXqO4dycvnW3tlJRrUN1H18b0Sd8PAWn5T5SvSSG 4kCzhL2gijPYHNDNbaPGfUT4MirDZW9NeiRsMqy2KhuZ6gZpTaK4eCGX+kkBFC6cyJGV Pon/8W1QX+/UMABN0mRVQR0ONDKXf0pVYzIXV71au8QW+8ZUCPXM0RKeXTdFTpE/xrB5 SQLnKHWS0Wsw/dkVVKm0cTspCUinNiTSCJMHLV77ejjTN4LiUucN9kRRmtrZ75IfzSfG 96iw== 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 gt31si555802ejc.194.2022.01.24.09.02.47; Mon, 24 Jan 2022 09:02:49 -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 07FDB68B119; Mon, 24 Jan 2022 19:00:49 +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 DF76968B14F for ; Mon, 24 Jan 2022 19:00:37 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 991B924055A for ; Mon, 24 Jan 2022 18:00:36 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 3MemYBuPwtTn for ; Mon, 24 Jan 2022 18:00:32 +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 1799D24050B for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id A6FAF3A06CD; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:08 +0100 Message-Id: <20220124170014.17189-7-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 07/13] lavc/h264: move some shared code from h264dec 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: ZUexMaJCN54Y --- libavcodec/h264_parse.h | 37 +++++++++++++++++++++++++++++++++++++ libavcodec/h264dec.h | 35 ----------------------------------- tests/checkasm/h264dsp.c | 1 + 3 files changed, 38 insertions(+), 35 deletions(-) diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h index 9f329db77a..95a80c425f 100644 --- a/libavcodec/h264_parse.h +++ b/libavcodec/h264_parse.h @@ -24,6 +24,8 @@ #ifndef AVCODEC_H264_PARSE_H #define AVCODEC_H264_PARSE_H +#include "config.h" + #include #include "libavutil/common.h" @@ -32,6 +34,23 @@ #include "h264_ps.h" #include "internal.h" +// 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, + 6 + 1 * 8, 7 + 1 * 8, 6 + 2 * 8, 7 + 2 * 8, + 4 + 3 * 8, 5 + 3 * 8, 4 + 4 * 8, 5 + 4 * 8, + 6 + 3 * 8, 7 + 3 * 8, 6 + 4 * 8, 7 + 4 * 8, + 4 + 6 * 8, 5 + 6 * 8, 4 + 7 * 8, 5 + 7 * 8, + 6 + 6 * 8, 7 + 6 * 8, 6 + 7 * 8, 7 + 7 * 8, + 4 + 8 * 8, 5 + 8 * 8, 4 + 9 * 8, 5 + 9 * 8, + 6 + 8 * 8, 7 + 8 * 8, 6 + 9 * 8, 7 + 9 * 8, + 4 + 11 * 8, 5 + 11 * 8, 4 + 12 * 8, 5 + 12 * 8, + 6 + 11 * 8, 7 + 11 * 8, 6 + 12 * 8, 7 + 12 * 8, + 4 + 13 * 8, 5 + 13 * 8, 4 + 14 * 8, 5 + 14 * 8, + 6 + 13 * 8, 7 + 13 * 8, 6 + 14 * 8, 7 + 14 * 8, + 0 + 0 * 8, 0 + 5 * 8, 0 + 10 * 8 +}; + /** * Memory management control operation opcode. */ @@ -118,4 +137,22 @@ static inline int find_start_code(const uint8_t *buf, int buf_size, return FFMIN(buf_index, buf_size); } +static av_always_inline uint32_t pack16to32(unsigned a, unsigned b) +{ +#if HAVE_BIGENDIAN + return (b & 0xFFFF) + (a << 16); +#else + return (a & 0xFFFF) + (b << 16); +#endif +} + +static av_always_inline uint16_t pack8to16(unsigned a, unsigned b) +{ +#if HAVE_BIGENDIAN + return (b & 0xFF) + (a << 8); +#else + return (a & 0xFF) + (b << 8); +#endif +} + #endif /* AVCODEC_H264_PARSE_H */ diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 4a56463340..4441cf6613 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -643,41 +643,6 @@ void ff_h264_filter_mb(const H264Context *h, H264SliceContext *sl, int mb_x, int #define LUMA_DC_BLOCK_INDEX 48 #define CHROMA_DC_BLOCK_INDEX 49 -// 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, - 6 + 1 * 8, 7 + 1 * 8, 6 + 2 * 8, 7 + 2 * 8, - 4 + 3 * 8, 5 + 3 * 8, 4 + 4 * 8, 5 + 4 * 8, - 6 + 3 * 8, 7 + 3 * 8, 6 + 4 * 8, 7 + 4 * 8, - 4 + 6 * 8, 5 + 6 * 8, 4 + 7 * 8, 5 + 7 * 8, - 6 + 6 * 8, 7 + 6 * 8, 6 + 7 * 8, 7 + 7 * 8, - 4 + 8 * 8, 5 + 8 * 8, 4 + 9 * 8, 5 + 9 * 8, - 6 + 8 * 8, 7 + 8 * 8, 6 + 9 * 8, 7 + 9 * 8, - 4 + 11 * 8, 5 + 11 * 8, 4 + 12 * 8, 5 + 12 * 8, - 6 + 11 * 8, 7 + 11 * 8, 6 + 12 * 8, 7 + 12 * 8, - 4 + 13 * 8, 5 + 13 * 8, 4 + 14 * 8, 5 + 14 * 8, - 6 + 13 * 8, 7 + 13 * 8, 6 + 14 * 8, 7 + 14 * 8, - 0 + 0 * 8, 0 + 5 * 8, 0 + 10 * 8 -}; - -static av_always_inline uint32_t pack16to32(unsigned a, unsigned b) -{ -#if HAVE_BIGENDIAN - return (b & 0xFFFF) + (a << 16); -#else - return (a & 0xFFFF) + (b << 16); -#endif -} - -static av_always_inline uint16_t pack8to16(unsigned a, unsigned b) -{ -#if HAVE_BIGENDIAN - return (b & 0xFF) + (a << 8); -#else - return (a & 0xFF) + (b << 8); -#endif -} - /** * Get the chroma qp. */ diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c index 7392452957..3c95f9d74d 100644 --- a/tests/checkasm/h264dsp.c +++ b/tests/checkasm/h264dsp.c @@ -23,6 +23,7 @@ #include "libavcodec/avcodec.h" #include "libavcodec/h264dsp.h" #include "libavcodec/h264data.h" +#include "libavcodec/h264_parse.h" #include "libavutil/common.h" #include "libavutil/internal.h" #include "libavutil/intreadwrite.h" From patchwork Mon Jan 24 17:00:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33804 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp496075ioh; Mon, 24 Jan 2022 09:02:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxm0j5cwKg/GgYRA/khuBTO9zBJsWp2YhSMMBC2SxU+sLBd/TxDiVlvZ3/0kLPTrgoEgroH X-Received: by 2002:a05:6402:3496:: with SMTP id v22mr16947988edc.347.1643043720636; Mon, 24 Jan 2022 09:02:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043720; cv=none; d=google.com; s=arc-20160816; b=m2FhC36CEvD/2NVSZPsPLT7zRuyfb39LuqCS0yKvME1/jxyU6qEXgrFS26xN2DkhQa bqm1Vkyy9IfqaaeSbBP2TM2AqpIqCEbsWbzSbnh6V1jfJf32K8P73OkTWw8nvxl2Tak2 CU8CflNI1JEZQj4fuFNCl7EFsN9ietZA7WqH1thWVp3EY1EdfRz3Phh0fokRkjFVJx4G /z2AQaCqi74ohBCxzzFKGFiHe5PkoGcF3M8kJ5GoWIzCtoiBLg426NZXLcxI6hQFcD13 WJdGeARfKNyCTeufL1zcHCCCm4kzsipW/BUkN4Lz+6bQZmJFC1pQdV9x0cEQMuvH/zW/ eddQ== 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=PSfucXLQFW0+KJm/rQ76Eq5gPHTbWT+IVDSXeKwaU9Q=; b=WGfVdBEVkiDr3k/3f30FeiigfAXxaQL9kYJ/o16rWeGRqkHk75hdEXFcL7b4pRgihX 6mE2ktHAV5zhAgzahwnO/BLAJcBrf3dRRgAa3SNioTBIWlnVZUEUb2DBWdt2/U6OrPo9 3oMr4uiZrEr4/lDswhdsibjahLa6NUCLyZ4bB53Ci/pc/vUW/ozwk6zm0JryQspfoNfm BYbYtsuunRsDnw67hh6esnaj/AJbbyWnbvzCulWebbVPNkdkAd4kw/Pl28F89zdqKZzg AagH1TkAh2fajFu4HDDvUvBeoLRYikuIhOj9d6D/KvXwf/xNAGegp8Qx/hrY2qGlW3PG 3P/w== 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 i11si5712633edb.485.2022.01.24.09.02.00; Mon, 24 Jan 2022 09:02:00 -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 843BB68B175; Mon, 24 Jan 2022 19:00:45 +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 B69C268B115 for ; Mon, 24 Jan 2022 19:00:36 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 491D3240507 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 dSb6Z8OwoGpR for ; Mon, 24 Jan 2022 18:00:33 +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 18211240512 for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id AA5A33A06EC; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:09 +0100 Message-Id: <20220124170014.17189-8-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 08/13] lavc/h264data.h: stop including h264dec.h 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: yhgQ9igzZP/9 This header does not need anything from there. --- libavcodec/h264data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264data.h b/libavcodec/h264data.h index 2968b08b7e..988352aa9a 100644 --- a/libavcodec/h264data.h +++ b/libavcodec/h264data.h @@ -21,7 +21,7 @@ #include -#include "h264dec.h" +#include "h264.h" extern const uint8_t ff_h264_golomb_to_pict_type[5]; extern const uint8_t ff_h264_golomb_to_intra4x4_cbp[48]; From patchwork Mon Jan 24 17:00:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33795 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp495671ioh; Mon, 24 Jan 2022 09:01:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWs2xrQS2G79HGSg1u2APHhPQIgXgVDbCzhKRfN4nE2mG4ijWc9KzOl4pFrx2ScUvG0myJ X-Received: by 2002:a17:907:8a15:: with SMTP id sc21mr6084363ejc.312.1643043697276; Mon, 24 Jan 2022 09:01:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043697; cv=none; d=google.com; s=arc-20160816; b=MhDbu6xuJ8Utl2fR31L7T83Olk3/WQ+P8i8uj6Q1cCbXislNcYsUbPHhs+n7lDbxM/ AuED0hUclq40ImFrPzl9mi3CwAaI+o1OEs/w9fIVnhTpjvFYHvFTVqPLl0NhKXTWJQWs Hp573Atd5U0AclFbxKcoB33hwwogXjGnuqxAU+esNWj/o60T9Wm730Qcz/G9Yplk8cbc WuQxdCdvgv3GKTW0ixa8dQqCnaXPY7FMq5Czc+tgRk3wV0fYkA9Ij8rJ2lbuPkEYSc6b GO8+rrJ6o1ET4uOWHg2+++5zoRr1F7+O2f8zhfPSIcXCqSiHZjpkzCOSx0UPkPYWFXdC hOig== 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=MbQXRqlSuMG4El5H67cuQH8h5WkIz1VouH1T8GpReIA=; b=X3TfXrRHdQBliFUs+tp2+H5VB0KVpeJ1npxEHS6uHKz7YZ0ZbSlCoGqbf+LpgMaeRA gj2Sryu82iKxJ+S7gwL9GCZR/KPZE8Fj5C5qYjyGf4Wza5DnR8JHOP4e6oq53UFIeQ1G WWqVb4+6hxyTihrAzWf68ud7Q1dF27lmYrTelyusELkguK4F/k1e/gbWKpA103jlokDH rVVWIhDwbZXrZHfczb6/2ZFoa87mftE6ST3R3P6PRgi91rXq+1zYGC8F07MBQFIiAG8D dar27g6HNbb/tVZ7roRo6PRhFbT9czRZwHu372xsaPbUtZPlMq5JdzEG/tqdAkApx/aJ yUPA== 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 2si8842649ejl.719.2022.01.24.09.01.36; Mon, 24 Jan 2022 09:01:37 -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 121F968B160; Mon, 24 Jan 2022 19:00:44 +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 3535268B106 for ; Mon, 24 Jan 2022 19:00:36 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 71630240179 for ; Mon, 24 Jan 2022 18:00:33 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id sb_MLssWK8qU for ; Mon, 24 Jan 2022 18:00:33 +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 17D0F240511 for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id ADBAB3A0702; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:10 +0100 Message-Id: <20220124170014.17189-9-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 09/13] lavc/h264_parse: stop including h264dec.h 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: pdf7Q2ToCYhn It is unnecessary and only files that are parts of the decoder (as opposed to standalone code called by the decoder) are allowed to include h264dec.h --- libavcodec/h264_parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c index 1c1d1c04b0..97ddf0e437 100644 --- a/libavcodec/h264_parse.c +++ b/libavcodec/h264_parse.c @@ -20,9 +20,11 @@ #include "get_bits.h" #include "golomb.h" #include "h264.h" -#include "h264dec.h" +#include "h264pred.h" #include "h264_parse.h" #include "h264_ps.h" +#include "h2645_parse.h" +#include "mpegutils.h" int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps, const int *ref_count, int slice_type_nos, 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) From patchwork Mon Jan 24 17:00:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33796 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp496713ioh; Mon, 24 Jan 2022 09:02:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJgbcJpDGL4o6qoheU1Q398RwNqNwHfjhHUKOOpGTN6TCRK9sNrWPMywq+FO5/UGeJ9R00 X-Received: by 2002:aa7:c90b:: with SMTP id b11mr15737312edt.392.1643043756633; Mon, 24 Jan 2022 09:02:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043756; cv=none; d=google.com; s=arc-20160816; b=kMCvaupAKzkkh5ax0+fwJgtAnMG0ktqacbvgcRoK4tDBAYzX2Or65Kf5r5P9l0RNHi jnmUWmUJ4QW3RLzQ1yE3DyzxuQS4Vepw8MM3BGOzKSyBsLl71SQMskEnnlBrKyq84X/V U1n/bqq6FzLBeUOhX3sLVEKV7ff/PedaQS3lB3HyScDKnveBCjGckIucQ2eSRj7kHKWS +F2Gg01UDv/Wx/YACmR6ifjm6nRAgTa+17IOM896HKjeUWmkyL7vtkv2WEKZzu1vH6jd PShxYlETNQ9EsTPuB5uilzIlEA+Nj8eTL35JJUGnpiFsu6Z2IJGuOPGj6zapKzGz+/4R VibQ== 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=VQ8SkTJVsdaNXyq5Ro0I0go+CQxBBfVZ3OOyYbdb52w=; b=cVHsNO2VlZhdS0LGYnEnu9xEbTk1yO8u71+YimBT4G/pFYT1dNPOvzznn0Bg9DRnon Ph02j1NQYFXqOzaT0Yoa6XxVcatdVBROaj9ep8ym5Y10rMELWpUGBYZC3MsBy7gzh48S wfjjnPOnWW0vq8BilRc5D1hAuTYeR0khrxT5yrSuM5zIECZb6F2zFWIyOI7+nmvURkAf 7ncVdL9kSzysvxRutjAdJQc78wUfYKGcgBmZbNfmR26LclNdpkZ9YgSrVM0XRJI3ixF/ lIR3e+7u4+iGSLHUBJbQojps5vbMMPvOAAVnWPaqqhgtYUp/UVQJ0dknL3Df1knGBwUo xTvg== 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 mp1si8846055ejc.963.2022.01.24.09.02.36; Mon, 24 Jan 2022 09:02:36 -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 11C8168B12D; Mon, 24 Jan 2022 19:00:48 +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 57BFD68B13F for ; Mon, 24 Jan 2022 19:00:37 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id B1C43240555 for ; Mon, 24 Jan 2022 18:00:35 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id SRCeh0im7S6f for ; Mon, 24 Jan 2022 18:00:35 +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 3064224055A for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id B49E43A0708; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:12 +0100 Message-Id: <20220124170014.17189-11-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 11/13] lavc/vdpau: stop unnecessarily including h264dec 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: G85zza8F/8Ph --- libavcodec/vdpau.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 7c29746adb..f96ac15e2a 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -26,7 +26,6 @@ #include "avcodec.h" #include "decode.h" #include "internal.h" -#include "h264dec.h" #include "vc1.h" #include "vdpau.h" #include "vdpau_internal.h" From patchwork Mon Jan 24 17:00:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33806 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp496598ioh; Mon, 24 Jan 2022 09:02:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxi5HrsOfeCyQQfkWxXbDKAKZnDQq5ys0DbepHxX2Dz5d58q26I+OJliYIYjhJv9uuEjwp3 X-Received: by 2002:a17:907:7ea8:: with SMTP id qb40mr6302681ejc.541.1643043748208; Mon, 24 Jan 2022 09:02:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043748; cv=none; d=google.com; s=arc-20160816; b=P/woPuRCbRnaC1a63lcOWapa8lkZWBpREoF5wPXzvMB1ukoGMGW7wRfBwxKxQ/EJI2 w79cvtxFxT2QELmWpDyIHKzNfRXiiOuamoa9+OJLY1ykTnZ2ctT0PI07y6GNrRf8yXgb tu3MsxngPZN+FRH8WgrfMWRcHUgdMZA6wRc08QIKtlzdEZ7T2bFWNoP/E5jPp4xchkZR mYys2js24b+G95muSOB2UlP4cPWi+W4K7AMGetiLgUi8FaZAEtnKAsTKMZLEGewTgVFS PBlsy2FlyAQUv+jN0DYWpgwjdAYVNOzH5x1HTcR6oxLl88Nv9VOlS+RPtrK4wKUH6vpj ASpg== 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=jG2JSBnry9U7/1kpm3dTRH+2MeA5hjuStvfQUkCcVgg=; b=DrHivpm15NBSz4VEXlIGDgRgie+g1GSN5e6nxq45F4YU4GdBTgbNKdF6WBh/oSucsK 1OBQKZD3QBKbJBkxcNosViAra3J/mHMDRerp9Z1qX0Yq4LPiuuqrn7hpex/ZC2cJHedR NOeC/zYH5haYW7nDax9vWWnAdYtMBJgCnLJ48gc8Zf//sdXZxcHmA2nuE9yPKTiaGa4K sUM1JwhImoPfrT3h1oVZW/qra5sPopJVnnO6TN72wkXwqXNpg7FiDov2cxTRlcomsOqm p+LDG9pO24chMwE8eiYcq9DLCuoa6GTk1L1XEkwZfrjCtiVjPxjHVIYYEx3skWKsB569 mV7g== 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 l19si9704220edb.601.2022.01.24.09.02.23; Mon, 24 Jan 2022 09:02:28 -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 40F4168B189; Mon, 24 Jan 2022 19:00:47 +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 4E5EB68B13D for ; Mon, 24 Jan 2022 19:00:37 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 43A8224052D for ; Mon, 24 Jan 2022 18:00:35 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id sC0IMi23lini 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 2FCE7240555 for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id B84BF3A076E; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:13 +0100 Message-Id: <20220124170014.17189-12-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 12/13] lavc/x86/h264_qpel: stop unnecessarily including h264dec 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: 6mlV+hFWgeaQ --- libavcodec/x86/h264_qpel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c index 320d98933a..dda50ded89 100644 --- a/libavcodec/x86/h264_qpel.c +++ b/libavcodec/x86/h264_qpel.c @@ -24,7 +24,6 @@ #include "libavutil/mem_internal.h" #include "libavutil/x86/asm.h" #include "libavutil/x86/cpu.h" -#include "libavcodec/h264dec.h" #include "libavcodec/h264qpel.h" #include "libavcodec/pixels.h" #include "fpel.h" From patchwork Mon Jan 24 17:00:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33808 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp497121ioh; Mon, 24 Jan 2022 09:03:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyOjT3EI72Gg2rjvjRLBJfT1pk3COo6CWBSR6X+an2tBJbQMhkIw9+EEc2lFZ8+1QnWYqQF X-Received: by 2002:a17:906:4fd1:: with SMTP id i17mr13633423ejw.656.1643043780329; Mon, 24 Jan 2022 09:03:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643043780; cv=none; d=google.com; s=arc-20160816; b=RF7/eegenGXFKoYhsT3q2oSL4OgaAwo7qClaEhI07dP8mirZspaNYyJrlmRKkH5qUl mdXzJYLYjoSDXhaHxALcNfze8kilkxaV42UzOsa22DqrxevmBXRtCmkcez0ss2wdzTFg iW/VwJk3+piaiqWKN39Epp/c7qfWlj3tCe/bnEETs2wub2rALNjMdBPy3vxX1yB4LScp zfcuj3mdyzR4RpmedyjtlXDuIvNdVb6+ifBFOD23Qzp57/QZgA4HrC5lpMLwSdy9WY7c opEytvlNMUNEt/SglsHslaNcZcbOXo4+IUvzZvyfhdIn93BUL7XX0k9aGELR3oc7zujl 1mTw== 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=KOpCt5FiqpIjjnGnA+9XJ+BZSKEU/2f2GyBYypB1Ev4=; b=LdpgVZeUEtntbPAtEg5SQFcthxRvQY3WPFi043Np5K9wznN70zhmjd9OgSLRnBvK5/ UMAkeqVsQZ5GCwhwu40zjDyoZudrsdKLz6SNps0+DgO23L0pRnuHzhwQTHReqGgUpww4 /2UtlFpqdUVU8d0NqYgQDvuS4JBW0ChMOJVtGhanNmnxwjP5sGaESX1c7gF4TGp+2fLa 2TMErs4Q6Ddrbcq88U6HdP90Rs3M5aFwppAWxq9JwGMCAZvU4uL8JaCW8Hby+rI5kXXH H9R1UEDcrlasPGFarsc243J99koLQIz6zRmdD9HsY57oe+ZCZnLTHOaBnK8/DEFBkGO5 VEBQ== 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 sa39si5422331ejc.693.2022.01.24.09.02.59; Mon, 24 Jan 2022 09:03:00 -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 CFCBE68B1AD; Mon, 24 Jan 2022 19:00:49 +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 DE6C368B149 for ; Mon, 24 Jan 2022 19:00:37 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 3CE2424017E for ; Mon, 24 Jan 2022 18:00:36 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 7pVMIbogsuCy for ; Mon, 24 Jan 2022 18:00:35 +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 30BE224056A for ; Mon, 24 Jan 2022 18:00:30 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id BBB6D3A07AE; Mon, 24 Jan 2022 18:00:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 18:00:14 +0100 Message-Id: <20220124170014.17189-13-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 13/13] lavc/svq3: stop including h264dec.h 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: +b27Gsbna4xg The only thing that is actually used directly from there is the PART_NOT_AVAILABLE constant, which can be trivially copied to svq3 decoder itself. Otherwise it only depends on other indirectly included headers. --- libavcodec/svq3.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index a3f434ff8d..f06404da9d 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -49,13 +49,16 @@ #include "internal.h" #include "avcodec.h" #include "mpegutils.h" -#include "h264dec.h" #include "h264data.h" +#include "h264dsp.h" +#include "h264pred.h" +#include "h264_parse.h" #include "golomb.h" #include "hpeldsp.h" #include "mathops.h" #include "rectangle.h" #include "tpeldsp.h" +#include "videodsp.h" #if CONFIG_ZLIB #include @@ -63,6 +66,8 @@ #include "svq1.h" +#define PART_NOT_AVAILABLE -2 + /** * @file * svq3 decoder. From patchwork Mon Jan 24 18:48:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 33809 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp577685ioh; Mon, 24 Jan 2022 10:48:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYNMYHcH2njSkDoriqBKMFhhVMTw/aNASqYasyLtHXqq0VDiAWLnn3XBGEoOv75fvsrRE6 X-Received: by 2002:a17:907:7faa:: with SMTP id qk42mr13382848ejc.742.1643050127398; Mon, 24 Jan 2022 10:48:47 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u9si2043275edx.431.2022.01.24.10.48.46; Mon, 24 Jan 2022 10:48:47 -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; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=Mratygje; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 96EDE68B0A6; Mon, 24 Jan 2022 20:48:43 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069088.outbound.protection.outlook.com [40.92.69.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D952B68AE87 for ; Mon, 24 Jan 2022 20:48:36 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QFT3zcsboEvyg4m2t/UaHA3jNPT2RGRC32QR+V0wDGJv1TE5syJPL/i4Qbjb2dUj24zS1R0bV+rp9ux4YjDple7Nxz8nrGbiepH6DPBeXmrcK3iNFhmtSyk8KtEGN7XbHuCvXL1JKJoS8Qmjk64voALMhA9gEAW9SgbtpD0YBYKYFNexlhhR0fUOW96cb96oMp7G1Y50NyaxbMxF9WC36V4x1Kfu7PnPoHY3SYzu+26z0LNUl7U9YvXiAbjm2o4R5TuGvzlBdG/FTrszCY/2jBbu7fPEbIlnakJQtzjFeP6rIKYFpM/5NatWYzjnepVNEORlSbpQDemiwduleTRIZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JjZCXeGVXcxiu92Z8Yo+Hw6tgpwYkbzzlHPONtZsEw4=; b=iccR5w3Pm6pLGcnvPNZgQumiiQDid1UtPkY+Rds4ZWR7gXQu4AY0pCrjSQA2dNUSX6TjtXT+C2C8yLG/R+qJpJ3PkG9iF/H27Kfk8F/kz2hgKp9aVqvKFxSDr6kIOkBCrFNIubRG5CIjegXolNw+cTcrU9RPoy6KJRXglC4PNqvUFQxdqwKP0OArR/cTvGVRUyyjP7nI8WkKCCcNP9C0TKgVOytxrOh82O+UTsmj3FuO4KTOj940TU86rH2NlRPsvvHqzi1szOIQzIPbJVk9JMoIrPncnACvx/S3VwV6ws6GM6B04hFSV6owJJAvwHKv5DP6e50iJUX60jRPMLK1PQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JjZCXeGVXcxiu92Z8Yo+Hw6tgpwYkbzzlHPONtZsEw4=; b=MratygjeNI7/UKQYuNX4hIVxX13owfeNnumgpo6S4EaFDFV0OIv3lpSZiKQ3kuJqbvZaz/eVK8jAfooLzOA6U0BBF78m9fCmiU1DKCt7YxYNpOMlQFHEVHbqmQ6CQpWnQriqH1qALwM34p5Zm7w17/Na38NqtvwYd53D5tetKM/lxScmPl4c23524NpOAXrtMdzNXx1JF0ENsf0Ch77cJvMoqcPAST1rlL2dR0N0LgBhQbI9j/hH0Swa8gJP8eSDJTJp+ZyfnSrX2LdnQFwdmBXJ6f750T8O4vjTyQDl75UH16HWVpBiQuRzIWc2M5I4ONxQBX9gFpoqH+FK2SZmgw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by HE1PR0302MB2732.eurprd03.prod.outlook.com (2603:10a6:3:f0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Mon, 24 Jan 2022 18:48:35 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%4]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 18:48:35 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 19:48:23 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124170014.17189-1-anton@khirnov.net> References: <20220124170014.17189-1-anton@khirnov.net> X-TMN: [GphX08GO7E0w41GEjHAAnay9QF9azWQi] X-ClientProxiedBy: AM4PR0701CA0016.eurprd07.prod.outlook.com (2603:10a6:200:42::26) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220124184827.584491-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a262ac5-5566-48f9-29a0-08d9df6a201d X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRuJzjo+afAgK4jr0IBXHTxsfp6m0uSpQM1UXlX/DDSKukruyO7nI/DTU1xTTYpcZceHqIQO0YjEA2Z53rlxwxjyaa12mtN/t/CUAb0PJ+4gJBTzWZNdn8pTL5ZaBL4/JhtO/KHueoZhflKWoCyA7yhT1uzh6R/FAaUkr5qrUhsyPwAUkSPHavRnceQ4VmAH5DdFwNaoP4mLivdOFhdk16MHKs8GRzx//RQeSP35EXWFIlFYgE1WnFBbPECBZewrEVeptckGVSg8AFL3fbb0uz4D23v3l367Cexcihpq9BF51NQxzH6juzklXOubi/K4ZeXEfolhtVJUxQAZxf2owu8xZD1JKACU1QZliD7HYHfniXAcB+d3PAYkHldFspxHJSbfj2It1mgrSV1jt12Ib16aWm9vTTIjaKNnR0BGzkhusTeDJPoxC69b6dbcLiKbzqmlaLIXCqtjDM5HWl0XS94dg5/AYR5gqFDl8wH0rVef0fVwv6DZjyxlipMzv4PO1ln/zcSH+mN/AibdLNMMA2emSc6S+g7+EzQ660qEIzj7yVOtOrU3E7EeOsB6ff5WiBa9ueHk11ObiTOiUJtMzR+TYH8WNMMtaWBYzwA4c9Bx7AaFZOpdjqu9pf+JhrUtp/+shkEnXx95Ut9nnKnLYlafviQPh3Flrgx+kd+PKqzp5N0mYvemPiiUpejQcIQd1bNZscwc0ssY7iJcYKmp+EoSIJxbQBIl70OOHAlzyVCryjoctpj1LNqBORSorzJdoM= X-MS-TrafficTypeDiagnostic: HE1PR0302MB2732:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XO5ugK8DbGZwPfHdLkRGNjK86SwhN7GzZb4kt8JSGtXg7++koTJEtojOATT2q7GhJM8ynNsYKrIA78n97k8fZidNYDPB/15dfXRcJ8UJ1SQLA3YhyBGYRywY4gBhNvJKzkQRhjkjqiydf26gLQ52WAGUcuruQPVrcntwhv2RejJOQ7Fpj80NWyp107GFIN1u0Wbtc+x3jybdsbuwbwm0AL2xtjYE9D9pAB+c/NEQejjrtY8ZbhI4a7FWumvpEtud95VBr2oU9UNm53DnN8aENzThhmYiKGdqKfP1JxoK6alsvPrXRgPgYDP+oxpSRQO1fkLhXfC5dcvQSJ/0sRYzTKfAAkefBs3squ1/6/d83V7+ZF7VWqKQ56ulAwObJdHsF0PEpt3F5Acw+OzhhKFTHl34ZjFRkUcHXP/9cHXthb4c/JbTbbI+7XDFZmPxreHJ1srFHuS6RPm5s4h9yeEPohJfQVQb1lqdqPLKvsGh576DA2Uqh3qU5AHTw4GOIR/UTzQ4pFOPiwnuXeaohGQuYgiIygDf6zFdnBz4fwgUt0WTtAPqpMJ3PzKNQplV9FxPrV1qFb8NX6Fi0B4aig2Tlw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uh/yLWq0We/tsFzTXFWm6rL/PJx4dvXvYCNHBiUfgk+kElQTgeGcCkBz7QQYBOfE7AR2I1qlaeKMEnK59XmI/uAgRf9tAU8i7Rp4YcydfpAJFbCxWO3tfN98RLDL8OGKgu7+q0eYv1tBqWdTw2nifOyID2RK8QaiMD76LogcuZeHXDLjiMGh+4Ns3iw80hjjtqf5KqMj6PvHXKGvHIB7SojAIjBJhYc93lBmjhS5g4Yl473a5I3ERRIJ94G4R4mqiHBg5WozvBdeNfeEZlmzZc75G3+2jhJBfCQE9oGibKDH4r74DNYMDVQLdW83GzfphM535gQsDS/RiIJJ64cBNTHl/S0G5U49zpT6y5Y7/6GzEiKs0pSvArPfs/i4dSBhbTMqwRjt3HSnAqD1Z+iuTNyyWPF6b8Y12ledVIbUEWdhYTgPeOu5iogT+UPrOWqYYGxGxjytgiVvZ0iNxq63qCVhYV9K8jvWBqs/9cjvdlBmcXoRTGUIK2BphqRonNAGF7ZythbDjIZj3DV5OeCkx5s1qmLlBYxzqxOWJiSwG4828NzATMDB7+bUxIPjAluL7OgWTp9h8BIHdk9aZt/n+gRs3DSf0Lb659JJKOmqG2muL8PRygv9WVPSrBY0Xa4nFiyy3qmWzE+zueVFVskDOOrDpUctKVZW9IAMhsrdF72F2VttpqjvSOxR7ZPtgIJBB/3YWeweFyHrltQATDj3I2CXGfZ/yRyahEFpPlGm0u910kaqJ1RWytaV/w105HBMjO0x65eDyaNlauVqni0rJtA6bYSA54bvl4FHeDmHdHoU/FJODq1/PRvCqW4k9YkmSmgeCbhiwYjPWOiBBoBwSSP1YZzaK5YPiMG1NUSUkeAIdFb8NB/h359zkCursWHf9Q14aMLNf6fVDkTwmnaB4D6U6NFS2iMN7LNMaMIQxeeTTcghg4ImqgO1UWiwWz5XJAweQXL8PgOwiyxrKwRkrw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a262ac5-5566-48f9-29a0-08d9df6a201d X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2022 18:48:35.1862 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0302MB2732 Subject: [FFmpeg-devel] [PATCH 14/18] avcodec/h264*: Remove unnecessary h264_mvpred.h inclusions 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: cBIgx7iHKAME This is only needed by h264_cabac.c and h264_cavlc.c. Also fix up the other headers while at it. Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_picture.c | 9 --------- libavcodec/h264_slice.c | 3 +-- libavcodec/h264dec.c | 9 --------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c index adf8a32378..dcd5874c2e 100644 --- a/libavcodec/h264_picture.c +++ b/libavcodec/h264_picture.c @@ -26,19 +26,10 @@ */ #include "libavutil/avassert.h" -#include "libavutil/imgutils.h" -#include "internal.h" -#include "cabac.h" -#include "cabac_functions.h" #include "error_resilience.h" #include "avcodec.h" #include "h264dec.h" -#include "h264data.h" -#include "h264chroma.h" -#include "h264_mvpred.h" -#include "mathops.h" #include "mpegutils.h" -#include "rectangle.h" #include "thread.h" void ff_h264_unref_picture(H264Context *h, H264Picture *pic) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 32df9fd3ae..dc636c5e78 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -27,8 +27,8 @@ #include "libavutil/avassert.h" #include "libavutil/display.h" -#include "libavutil/imgutils.h" #include "libavutil/film_grain_params.h" +#include "libavutil/pixdesc.h" #include "libavutil/stereo3d.h" #include "libavutil/timecode.h" #include "internal.h" @@ -40,7 +40,6 @@ #include "h264dec.h" #include "h264data.h" #include "h264chroma.h" -#include "h264_mvpred.h" #include "h264_ps.h" #include "golomb.h" #include "mathops.h" diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 3706ae0e31..ed9a74b0c6 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -28,29 +28,20 @@ #define UNCHECKED_BITSTREAM_READER 1 #include "libavutil/avassert.h" -#include "libavutil/display.h" #include "libavutil/imgutils.h" #include "libavutil/opt.h" -#include "libavutil/stereo3d.h" #include "libavutil/video_enc_params.h" #include "internal.h" -#include "bytestream.h" -#include "cabac.h" -#include "cabac_functions.h" #include "error_resilience.h" #include "avcodec.h" #include "h264.h" #include "h264dec.h" #include "h2645_parse.h" #include "h264data.h" -#include "h264chroma.h" -#include "h264_mvpred.h" #include "h264_ps.h" #include "golomb.h" #include "hwconfig.h" -#include "mathops.h" -#include "me_cmp.h" #include "mpegutils.h" #include "profiles.h" #include "rectangle.h" From patchwork Mon Jan 24 18:48:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 33810 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp577791ioh; Mon, 24 Jan 2022 10:48:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwv3NUhqY8/JU9FzjrECl5PsQbXJcIcAwLDOcqtHifJWcDUwYyZpS2SXOVxk2xkKKSMKhIQ X-Received: by 2002:a05:6402:50cb:: with SMTP id h11mr17210929edb.250.1643050136482; Mon, 24 Jan 2022 10:48:56 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 6si7241590ejr.742.2022.01.24.10.48.56; Mon, 24 Jan 2022 10:48:56 -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; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=oHYo3s4U; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C117568B106; Mon, 24 Jan 2022 20:48:48 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069088.outbound.protection.outlook.com [40.92.69.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 02D4168B10A for ; Mon, 24 Jan 2022 20:48:42 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ERnTOKMm7VHE37hlkTgx87axDi255JB1yKxB+K9dqbwMLqrozFP+e+hnQeCwv0isq9DM2Rl+e5QfaTXQD4YoI6jrdsL8nJWIPPqxkFmKUtb/pTd92rxqhJIpfJETPyatSpeXxwpJ+4fVodIkpRxiRusIvxaO8NyR+O/+EmvVtRbQ1++URVaGUBTO4cHpbIC54nUrAJXXi4KqdlXCMkBAWcsHo+juIaEuuKDXYDyoWB1si417uw0V1dV03mgdhDX6EbpOS8PxzWBwm8W0do0idTjGb+aQNJIemc6U7OJhT1UfkQSDxiX4Tanil7Ub8e63UenISWCw5fgq1oTDgRVcAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z/I1jwe7/f8NojDd0jbjKeG1dzV5f1p52lLHKYpbnv4=; b=fLLZ/m6gs8x8cKtcIC3EKtptU/VpBUsv1n3SqlGOcKABAor7j5SwNlI17iIRctNuzeF5WM22sYlg0RZEPyjaKCYWXUjm4sgLUfXhTBj1UZmc6U2ePyYrc5sm04twnNzmZ5+1mBQUYHPxHk1YvDR2YT7T0jy1s7vc4OjnAMaSHmq9NAhwxA/GyVIzQ/E+jpIbnXf+j5xxlVU0mvsmH03xAeXOQhhROtf7SZXpoDKZq7YDzpfFdGBHvTD79y1DqA5ktGdrGNp9ZvQQisvzI4wtgiK/Ja19OvtxbCmuNshx73yTVdai9uUComJw2q/9WhW+e9jh7SMFMQAHchblqSFHfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z/I1jwe7/f8NojDd0jbjKeG1dzV5f1p52lLHKYpbnv4=; b=oHYo3s4U9citVl91STrCkP00P6vDB0U364MaUfj8+dbX6smbOB+TqN/BRJVmqBoTrK9sI6NFjyPh7tUJVTnQIl0jQo7KOzcj8Y0h9rWj03ss01cj3+tvEc4oWJL+ENCWiASakOjVaBa6qU1UVBX7EbpChys0Bvz5Elo4Uq/1qQMNirl6+wZisYRJZhN42iGM3fP7hqPs6jtAtPD+M+sm+3Z7gygGkl1TDLQ5Sj5bUxxtbvZtxhsgS8icm1aaL/4xDOUwQfWhUmdOEMIEg02kn5C0of9xtcKfOSOPaL+G1GonPa4p6zhn/Ep3+asQhgOT4ai0VerKm+g90DeR2r0awA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by HE1PR0302MB2732.eurprd03.prod.outlook.com (2603:10a6:3:f0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Mon, 24 Jan 2022 18:48:40 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%4]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 18:48:40 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 19:48:24 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124170014.17189-1-anton@khirnov.net> References: <20220124170014.17189-1-anton@khirnov.net> X-TMN: [e13ncRg41JBXl54heL0dBreaa3+U7QMc] X-ClientProxiedBy: AM4PR0701CA0016.eurprd07.prod.outlook.com (2603:10a6:200:42::26) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220124184827.584491-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c8cea4e9-5908-4ae4-7431-08d9df6a239b X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXG2AS1I1R/T45K/68k5ZmOzn0GxK+KY+i7VEy6SZpbpAKkqGRnLBdCUbpnnuwUt7dQGKQVYU3P4EqbAkG1DKV1vpxob477FR2TIoIkgdpB9jMMyzcnPN//MKhGweRCxx1vDDcOF1ZK9Re9rAh9G3ZcTRO4twbNRIGrq4A0p935M9Z+I1qtONnSV1AlHqRau8jxNw4LkGSpSecKvwwNr2bgADyNy0U5XUm8Rx/amP0HDKWI0FOwS9gg761RVGuVqpvMob20W2Tg6/1ikrxQP/7WGnQjfiFxcs5rXRjxwSfLjreFKEhvANMPNU5kVZtpkojELa81LkGITb1ncoSMnqW/8hm8aX+Y2iKrGxB0Yq1NsJBSlxVwycrwKSWk4+w+6pEq7gGXLr8RH+kEHrnvzVw3fG8ugHpP//0aHYRvpv7uza1ww67gYIYPA3kAFy6oc632ezPPeXSy24V6NuE/MLMNo4IBNzfS0/+ZPqi566I5DdL/M7lt1crra80S3qDdT8UxfcHue4lNpKMr2Dw7Tb6H2VShH4i2ssSKTbN7VHqisih3Z0qkLJ72TFw3Q2II4Ii6eUF/UPQ5FbCXyTMOOOSG88hUTZWcDexjQ1BcUOsPooK0sdlABYSzEyjvtSsLUUFd6K1fViS5Fptkwb+FMICC3xXXDz0SnneoDwW7nWgDu/wGkd0Ua3BiEh/Or08iKB7/eWW15HvwcCRDCLaCAEWTb526vb+LNdM= X-MS-TrafficTypeDiagnostic: HE1PR0302MB2732:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /CAQnZ/80RP3YZJryGWkeBjNaaVA0jAscwZ3d9Bp8oPVJSMoldEpqlZagPtAm51m09+TbTD05MisOVSHEuWBc/v5b9f1c2UERB1Vod0bpWHNnpZdBxgknUQi2bJm0dHYDCvHn7q1CHsDouSiypWHFazK3wbz+WaQ/m8N6hkD6XShc5Gt6TyyO/0zVXvZiHEsTwi+Ki1JlBZ875BEv8dgC1yj/AghBLJICHG0GMF+c00cfWflc0wRCm22xwaI5iPGviDeV3dIhPk9FdOz+ZxgMRkW9BTJay1pV67Yxn61H9ydrYGNuYXJ/gSciAvK9fafvDVz7Y5Lh93fBULuhWjUxaNRwst1J/X0pMnPzRZt6w9pKxUWmRCtMZCEeCV47cGPJ49PGiT3cwPjzR/zGbAfwb0vsrZ7oqv1CGU5dVMefQELTOVMfwSY75NepQhV9c//FUYTI3SSwc44slVE8ER+gWrEAJzC43JzYiaHJ6aiDDHvBQzCcp/k5A/ddIJ6u6y6zc3vvI//vnqfMBFLKKegY5Qyg9FeKz0rzg7rcu0zUlwCKk+SzNqqWgKV/UdZhi6Ol7p/x9oda3CHRIPYrUKuJA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Hb7AELeyUTCjpZLY1Igkm/Jz1UA2NUA6QUoLrLytlT7LJBgFcTHY9l0ukobBF0Der8Vxelp1fctMx6wDNXUnemRx4EyPiTqAkcctKX4P7geMCOxiPOkfz3O9nZQPAEo4bwgcjMo7C9mCF25RYVjT7Yy04w/lo6mbT+xbfH44V0h8lWQeecpiNowswjt7C8FAyS8X0v8vokIDYFi6n6KPs/aLd3Z5ItfDTMQODTg1SjA43hqbVMMeHaQ6qRqqLeLfIpkIXGdBqyTPv+1AxvjT61OOoy9mYWT+EVLOGZNTsd6MlFTXUApp/apC0meQrtK55KBJozM7kKFDhIYBuKQdsgXjvYo14gUQjLZ5KL5RNTsFV8Fc+HPfqVw7ALSffLlbMLuUfcEtX0t1yElkNnlc2Vff19QrfW7iv4/V6sV5IGUrqQxbGB+P4lg0PCOCr/5cx+AUZKVHJn2nt7YfUeuS59z1dpYRm632xWgwuhkbJ5oZ7fjuVE/Ln3kwFe8Zg1JbZHeYQ3ahA6L3y/pYtYWbeYdgIkjgarSxR7jI9m5Y+cPcOE3VOiR4NcZlU/XxXY/HHINyRFjnL9BE3I0cl0pEAG0eqVXeUbYVXwxPK4mtrhC6q3Ua/F8TYNp4WDnk28IL1Mg50bg4O7ETUrc2DFQKX1gJjThikpT39SW1R2HaR76awAk5rCPaMPFJ+fwnhjJRkjUW7jtMP6/lmOR7QmXZZ7++Qznyy2XcHECCSN1KZzUtuXSCeRPKa3jZqr8QQH0AaTN/j6dSe0dJSaV1sRiODJspZ3qbqFo4EThijxwCMEG/N8+8IKPeQD2K3URerFaj59TbPQ8wY24aQTRcuCKXAgwghVPVr1dpNgDBrVph3naTyi87I7fgL0jUECDN2laDphQDJy+Oknowfpov7xpyUYy4FJOSmCikLk4QlEmytx/jn4N+Rsn3M1Uf5461MkL5DeCZlPCuS1Ya9x6VM/RiqQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8cea4e9-5908-4ae4-7431-08d9df6a239b X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2022 18:48:40.8584 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0302MB2732 Subject: [FFmpeg-devel] [PATCH 15/18] avcodec/h264dec: Remove unnecessary headers 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: pGlkq2ybIv5U E.g. the inclusion of parser.h comes from a time when the parser used a H264Context. Signed-off-by: Andreas Rheinhardt --- libavcodec/h264dec.c | 1 + libavcodec/h264dec.h | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index ed9a74b0c6..a47caa95e8 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -30,6 +30,7 @@ #include "libavutil/avassert.h" #include "libavutil/imgutils.h" #include "libavutil/opt.h" +#include "libavutil/thread.h" #include "libavutil/video_enc_params.h" #include "internal.h" diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 6b72588854..79835e2d09 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -31,7 +31,6 @@ #include "libavutil/buffer.h" #include "libavutil/intreadwrite.h" #include "libavutil/mem_internal.h" -#include "libavutil/thread.h" #include "cabac.h" #include "error_resilience.h" @@ -44,10 +43,7 @@ #include "h264pred.h" #include "h264qpel.h" #include "h274.h" -#include "internal.h" #include "mpegutils.h" -#include "parser.h" -#include "qpeldsp.h" #include "rectangle.h" #include "videodsp.h" From patchwork Mon Jan 24 18:48:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 33811 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp577893ioh; Mon, 24 Jan 2022 10:49:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyOaLIId5bW8YmCKUqTzaPYUDLpKxEqq6RjRWDeZX8pYLUFRSo1gCMphhem4PHMw0QxGlj X-Received: by 2002:a05:6402:7cf:: with SMTP id u15mr17358026edy.325.1643050145781; Mon, 24 Jan 2022 10:49:05 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z22si5374368edd.620.2022.01.24.10.49.05; Mon, 24 Jan 2022 10:49:05 -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; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=NPWD0iF9; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D995268B142; Mon, 24 Jan 2022 20:48:53 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069088.outbound.protection.outlook.com [40.92.69.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 207DC68B110 for ; Mon, 24 Jan 2022 20:48:47 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SUNIV/FZIiJr2ZB5MPaRBGbVQqzOin2QHy/2m30d+CMszfewcBlR7LpUp32FvGDMB+f3OuGVR0UjvJIAeeVq7ha9MUgZntvgHSoBsg4Uy+/kLecqoclsYocOC3JnEIPMgydKi18hU+LK1UOpBieLhUsWyOQkCjj7UscnurM2amNPAiw6zXWqiLw9fN8PSj8TLRgM+hSob9Ww8AYAdu3ov8TQNkS3hQIXHOLMzRPqHqHLGOirzuhaz02o8/AVNPINzVdbyqmqVY+ZhLiojKDTYhd4sNd/8JeOwEE9fjzLA+7s0M5X8Poi/6jgJryM142EvuPBGnP44GiOcMSeWvnyIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=P45OvWp/EZ78y08EJQsbkeft6dvD+5qrvdgz90B9iWI=; b=IMTJ4ySRLvS5MCbHnOsL3Drffb9GYGy4RERJD/78Ee0AmmDJ7p13JwG98M5KpaYW/vcIeAyJglWePop3NCHcX7RFFQG3QOhRCkV0q+iWIIMka4ZotGg9J5CEqqddBxlT7H/jrgItxZgQJ8P5MLgJxehWo+pboKd62MfAX5cgwWhr75GGV/agRpuLcaf7pfLOQE3LBSEZ9BadD46cu4ORx387GmVBV0Ni6TYkIn9B+9yKnRH40fuBCMGQd8FhXOD4U3BeKU97DwWa7Zs7x/Oh0fJIFCwr8kcU3GwLLLIi02dHxXghBF71mTf7SxUraxC4HvOe8m2XVS+JkkQur5mEGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P45OvWp/EZ78y08EJQsbkeft6dvD+5qrvdgz90B9iWI=; b=NPWD0iF9feB5Gq7fsCvScdZ326czJs5d2Y7BIq3rhnNDt1J4hDYZwD6Hl9t/teW/heiEjOC+jNGcmOByVHiDoFFf/86E7Y/xBwKVQbbPLVjxpGwlDxfcT24fK2gaQjPOBe53tGKVF9K6OuJOaJML11jXTn6pKr6pNziZpnwdn4fiLJ69a5zL6SgD+BAdooW+OGdW1PZ6wssu4NchjTZzkUWLNI/a+a9WM92wrnapBWwpeoAbB/5rBXS1Uv5cCU4slIrQ7Xl0NU3vVwegkXQ7U/OQOexMTOdoHVCkZBn/F3uWkWFhE1BOP5S3OzI7PuJ3tHiPwPNp0EpuoZdWe5rYDA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by HE1PR0302MB2732.eurprd03.prod.outlook.com (2603:10a6:3:f0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Mon, 24 Jan 2022 18:48:42 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%4]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 18:48:42 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 19:48:25 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124170014.17189-1-anton@khirnov.net> References: <20220124170014.17189-1-anton@khirnov.net> X-TMN: [Etb4/6XtVmgQ31bBc09hkmEkNXAtazNx] X-ClientProxiedBy: AM4PR0701CA0016.eurprd07.prod.outlook.com (2603:10a6:200:42::26) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220124184827.584491-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8ad3340-ffb2-4e9f-0121-08d9df6a2466 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRuJzjo+afAgK4jr0IBXHTxrAVSSqOlntTx56IggyMXmxOOL5unfiFWenB19+B2gGuC2ZX1D63TMHNDhbFF4aj6B0x+ZsVUMzGSLdl34L3edPpLPmfFNzlSemi0H6VqtueInig0pX8ychh27wwYjhAbfMnSQEmdsqnSFvoFJVvVbJkJvSP3PjhHycrb2xVrNvNgM6/66EuPZUMVaIL/fDfBmcE3i3G7iRUrjw9i1xf7Ad+mAUtS0YmvgeZKblXG+9WLrsXpSmblF9k8NPO4sxQlrXACmURXbKy1Szx3vXCsuLE4vGiZ0cHyZwMVXK1pSqfRXN2YlpNYxFzHmkUheFzK2FvOoJcaRk7gwP1NZifRAg0mYn3SLV4woxX1fop0XlnaNQX1CLsppoTn/IlYl2T9cJqHe/cEwlWfGnleJgk3uIPVibGrLtnTDUxIboDYopAXRcefihiKCkWpVTPww6xzzcYHVowy3pNMWWRMeHEjIgx4YvyFPZL8UWtEocBfX1tt0WwmkDVBdezwPlY97RP7Ge0TP9iyCdxOITdQkKJTI6xIOONB8swTBaBiSQCcpwKhTsmQ/N6fDbdA6q/yiQFOvrSbixa7OIdwgYuc47VdvRpcrSQe5Rm60c4PIKp+UqjsVf9u2WBLGe6grGaGAPEMXw9/+W7DRx0TfHAztb9OKnnvb4QKDOacbPBW1JyoOj7oI1ToPbnYE0tI7NHwxfdSiYUyX/xE8B3y7YI3RpRypwkVykFEGcArLe9jy+r6o0Q= X-MS-TrafficTypeDiagnostic: HE1PR0302MB2732:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZGW9EuiQqblOxSf6Gbtt8JUhjN07einkXQcmFkNKtxS3EDHoFC5PNQ2Q4juq+WSuOvDOIB9nWjBi15315D7QS5jyCt/IWF7/Ew6iMaShWD9uu3gY4Ia/CEwifUg4PNrRvQ9xwa3k24ynpRCY1jDlPa/xH9eJ5j24CLSIPzz8benSmGNWCmx6Ypap+ECWGF2L1ksIpQzbMS+ZU3++RYEtMVluoadyVy/ifETyzrldcjt/722LuTcvQaA3uGoq1sV511uCk9fjLu49oqrgL1jhExJtKtqiLKwuzvY7NrUQzYKhFqWsqWy6kTsdBeK2daH7a/TZJttDfUqcm1PRLxo3ffP5PEsaiSt1jCd96zVRNkkktxaj8uO4D0tl/i3mIZWy78JTPcWOItCC8pETxX6V54+Fr4JMXNoitMYhykrav9Ecd9RMp3jW9VHZCGcG5MosgP8zvKcmTKD4UnWKbIKUbz3u2E5B0FeDBchJ2Y618DLze97IPG7VBYUs9i5eIrOTOEQCpxbBv4ljFL8RDRIq3MueiTR5PZp6WDO42vgZKHoaPXtmY83n2OsK2yAwBw9IzUwzavSfCsrr8dOGfXQupA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dSzivtHx2ZG6fRlrp8+6G2ae21T7RREqv6ocetBpCPkJ5K7851hXsN0kCnCesUI0ZjVWcLjwNXVRW/upj/oVSvZ9COaDirLFvmUSStLaeBaP30c+Y/PXD/afm8MTeY4FopoO0v60iJx948eRD1m5i3HFgT7na2j1gq24zgDv4GEUBiwl7j4pAHIPyuTEmlxTYzRqWJMJgS3YI29RQlddbCGuv7F2IZ6cUK/Dd57Nqrq4KSGoXatJbKHMS0QWt8dfoshmjcAQ2W7FBhTqlkLpEXwT/bVq5LoD0tqOl+gTFORneLxYGWKJmt3YZqPhXgw85/UXiqAPSorZb9UsVf6il7baDLgSQxuXpuxwCrGd/g5lMlzFTT8VwA9GgXxvjeXYJGoQLYBgWwaBWqhPDSdqHqqG6t0D5kw6Ib0j46XTDWwVZ5GY7Ru2Nbm5qSjlR/K5sU/MnOjcwHChsokzancRki+sR5pcF+br2F4QJ01PN+fT0LU1DOUCXkEJQl3TxjWUlPjTyQojDjJ0kFs6WRb0+fetw7qHCMaZPAIbKW961j9uDMelKS0vuMLnwqfzkh934syvWdbi90NlsQMJxkH2tKfPK2wiWgicamiq1pRLzemFk12IkZi+SLA/P5EmljIlshGoAxOz+ZE+JCzwBZBhhJdRNF5k3CFBWimDzNJhqV0lfywkzx1HoeCQI/cee+bIp4Jaa0LHrlJfBEuWnmXXCKK7ODM7/UZVUt9OhTloC77X/Af8/LnY1hUO+/G2Xj1XBpt5zY1U4ZwCCxYPMCSsq/IngnIR7TrUuiZWpsxar3Lc2SfxevE4sptbIM/A2j3WEckawRd0kyC512E77HU8O3VZDr56cnOJSFD6MBOfHq0brOyLQE8JjiFkMGWhDjDJEfxA85Qh/uw/EOTsuiws376YRfOZGE3t+qFvF1G6+q2fwcdKK7J1wiq+4ARnQ5RyqUIXZQnJp3KX/vJcMe8hPQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8ad3340-ffb2-4e9f-0121-08d9df6a2466 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2022 18:48:42.1701 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0302MB2732 Subject: [FFmpeg-devel] [PATCH 16/18] avcodec/h264_parse: Move find_start_code() to its only user 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: o16KVJsaiblz Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_parse.h | 13 +------------ libavcodec/h264_parser.c | 9 +++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h index 9b6391edda..3901b46ac2 100644 --- a/libavcodec/h264_parse.h +++ b/libavcodec/h264_parse.h @@ -28,11 +28,10 @@ #include -#include "libavutil/common.h" +#include "libavutil/attributes.h" #include "get_bits.h" #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 @@ -130,16 +129,6 @@ int ff_h264_decode_extradata(const uint8_t *data, int size, H264ParamSets *ps, */ int ff_h264_get_profile(const SPS *sps); -static inline int find_start_code(const uint8_t *buf, int buf_size, - int buf_index, int next_avc) -{ - uint32_t state = -1; - - buf_index = avpriv_find_start_code(buf + buf_index, buf + next_avc + 1, &state) - buf - 1; - - return FFMIN(buf_index, buf_size); -} - static av_always_inline uint32_t pack16to32(unsigned a, unsigned b) { #if HAVE_BIGENDIAN diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index b221459c1b..d9cbb7d6d5 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -67,6 +67,15 @@ typedef struct H264ParseContext { int last_frame_num, last_picture_structure; } H264ParseContext; +static int find_start_code(const uint8_t *buf, int buf_size, + int buf_index, int next_avc) +{ + uint32_t state = -1; + + buf_index = avpriv_find_start_code(buf + buf_index, buf + next_avc + 1, &state) - buf - 1; + + return FFMIN(buf_index, buf_size); +} static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf, int buf_size, void *logctx) From patchwork Mon Jan 24 18:48:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 33812 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp577972ioh; Mon, 24 Jan 2022 10:49:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuEndEvTLWrWCVSlIHVXdPHuEA7DQzo32dJuv1k8pBbXEsszvmMoRovaOwSDJllUkLC+IE X-Received: by 2002:a17:906:cc84:: with SMTP id oq4mr14369160ejb.736.1643050155828; Mon, 24 Jan 2022 10:49:15 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 10si9338105ejj.230.2022.01.24.10.49.15; Mon, 24 Jan 2022 10:49:15 -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; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b="L5Ji/XZN"; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DA31D68B158; Mon, 24 Jan 2022 20:48:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069088.outbound.protection.outlook.com [40.92.69.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3E37A68B112 for ; Mon, 24 Jan 2022 20:48:52 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zs4CGqckyz5VSNqjzvlMbcRRA81aRgRbV6K0uAgouUd4awL2yFRhbetJFdZ8l21s+dRi5zUN8RMzqXxWiW24KgpTwLlwLD0l0+MXE235PKCsnW0e0J84RWOyFIbVOYQD588X6yXi3n0vGGeegGH3tqgeCTO65KhZ32idhd+e/H/hPI/mqZs8n6msAOZmUGwqe85brgqKkd0YQv3RbKBi89Ggj3sW/FYWNQQ9XYktGTgcD/UNXaFpAtJPLzUDRwd9lUnBZDOBW3+dbcOdwTRbT09KWP4P/6iDfX4UECdVuvnmEegyIam0yV7JYWSmWDFPL7cZ80raK2/cwPcs2rktZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tIG62IqA8/1JoST0w5NgukPh3YdfCEe0qqH5oDtQOyo=; b=XfhWVMwURprZ3ffUb6N35vVu4zrd1A9UB+a6jUzVdR3KA5l2BRAYAzQp5XKCDq3DWwp3BcSsotuBz6nxQqwp5c3aa1O8Q13GxbDEdQDONVwW3eYOKvh/gxOL2ZXXSemYRkjLEQES8lecM1dOTSr4iM833DPZ2xt2Vp7LdHnVzvqX6M6ec2MdzZ4qCOLf7k6FbSIr/KKz+IjrN3PiLAxtQCgWV67yE20mlo3ffpJUGxzLbULZhoxRMsa3J0FZOWFoZEk5eAUotGA3FEdDi5l+i3hfwQzzUvDnlzQ6j/SAXC+N64gRcHYCrdYOc94PDdXpsRWllZEfHHeXNPZNk1IpLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tIG62IqA8/1JoST0w5NgukPh3YdfCEe0qqH5oDtQOyo=; b=L5Ji/XZNxSvOV9Go1S9CY6Fod4kJkMNR76VhNMwbShFdG74tIZ1zl6F08jmo/VAThh6T4svZylULZKJprqKGYFiYhhQG8bBMjMWQ8RfkhEF9dcwBy/TNI7hdBpGr3aDTGna4B/E+TFGf3it+sxQ7SkZyvS2s7ih6xA+imwMZk09wPHLXDaZFZPu53fbJBfoJ9DSAbWptWjAnykTENmoDp+gqQWmNXLOKTwkn3jF0KH/ueAniineA/Wz5qow61q9fzLpuvWLraleFKnl7urnNo1BQclFsLzziVjUR6YpIXhL8LLK1NGrlexIt3JFGLsc0CutqOjas2C4TuecEXjsgIw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by HE1PR0302MB2732.eurprd03.prod.outlook.com (2603:10a6:3:f0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Mon, 24 Jan 2022 18:48:43 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%4]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 18:48:43 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 19:48:26 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124170014.17189-1-anton@khirnov.net> References: <20220124170014.17189-1-anton@khirnov.net> X-TMN: [RW1XcFkFQDto4M7xZWnaOXzMkv5ho+2W] X-ClientProxiedBy: AM4PR0701CA0016.eurprd07.prod.outlook.com (2603:10a6:200:42::26) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220124184827.584491-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c393cc5d-a9ab-4148-75ec-08d9df6a2565 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRuJzjo+afAgK4jr0IBXHTx6noOHscShK1NC/ZCi4M6SJHcJFgkXaU4gaCdwvnYOsRsrUx8DbRSDltRsLEAJYScDR00oV5BClghUmUi4RvyM3pGZIF3ytp9h2sgqKbHrU5pWTI22hFzH/AJc4RglGfNtiBuYs7RC56wesxr8SpYeu1HGv8aJrQUW5+JXJfex6YBrFNWs/adRUgsC26zpdfLSAs2QP/7YY5yxrT3Yj8ebPDaF2XPFLsJUCN/bWu4C1mazI2Uej6cKGbYDWw8lL340EOhotG/raaTuRWwIyUDTOi0mNQGNBj3J0K9PvL7rOy99FMIffmvulgk7U0EtextH54r4v+LiIJ2iI/ORXViVPFjXWMc8MyVk4R6hKFn42iEnjntbqqM7dPtUos8eHcE4u/fC0hWuRUwlO0YgpMxXWQpmG5R1b9CvWxD813+WSiFkQgFN+tXdtVXllf9Av6KKLp0Q8WQkh0T9NYbnAntyYKifer8pHAgesAXqWZituNzXZt4BZUmb5iw1Z+tR3Af6gz581EzA0ZBb+3O3hYKapu3PJOpy5AwQhOkpWOfyT3PFu/CtejGQpRXuaTaT86nsHSP2/K6Vrou3OsRcf29L4/H9NqbhmakbREtKKLbZsVHgAXbWn92WCMOU7bssgof0O8iUu3LIcoSA9Otgh8wJtSjvSaMJIgKAxoPt7h6Umg1Q2Sg7aW+NVbJDA5IOlOB6zKZRE0I6uykRMyBoUORyHZPw4K49kvRkhlRpMaUf7M= X-MS-TrafficTypeDiagnostic: HE1PR0302MB2732:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FNbhvostPhifIiyfuNQZ4t9Y//TQsnp4eB2qkadYLW99klw55NMyDszHvuTp0+PIoDAzSqySIPI2CtD4gim6TioaXS65Hu187UdP/LcdxKqJZi+tZTYriZu5JENpOpr3qcKnnjpMtSiafrir+eWMphQZRyHF0hEnvW+c311BQOpKCvVBJA92RbLJZoweZnwzxXc0j7t6ZY2RHuaGJCmRn0efPUbD8tfvtN4WeD49/dv6c/z/bYdLL5c6DYNCVoY5h4akXzOCXTCE6kYpk1S4P0bfbjaRO6qw7JdYDlIvwFeg7S/r+kMx4UC2feXxX6T70x/lrUc1tLQ59mjXKNTi2sYmhv7yD+ck22wRiqN70VXNOknKuwxqtxfAOau3T6qh5flP5S3LbTaroPJr887o+XhGILtuzLfR8jHIO8AbMLCb+9PfxgJjgDsCOYHVrz080xsH4NTS8DMhiRYKvvlMdjX3WqA64cz15aKEKvYOmHkyRlHIW5qZDNeViCI0GznJ+XEYLeN+M+HEs0cvQmpsxDqnHzEr7XtiwMqmSuGRu6FbgC5PmqO3bC7Vnj62qgTzOsN4tHHmn4z93hqfl++SPQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VRb1RkL1njP+ehLFXc2DFRrXegu119fjdSw3eYtwB9dtI+xmaBWJeAWfDzAotsCaSwRDEVR0RIvX+rESRATkukxlXy65jC21nPYEUmNKwXbb/eRyYEwAxvXnKtEhkZSIEcP7T7pWR1PDEm9BMo/8iso9uZwmhakvC5FVRoqN4R9iFoAK2FPgJ9nKAH7CtHH69+39RP56clAP5aAwncHvc+lYjCeK6oZaGATcWHTV9jL2Mos8KgodVDhIV8XjqCqJPNPn6Rhgn9t66iAdIcEBXzegDE1B7vHN6s//oc+ofCJ+bmMyBiIDasTqraltU+n0dV9zeLpksdEcNM4Ktu7QomgHLgcABaZn9Q988FKMr/BJM5EhdFDj6Ej40TKpyNo+n6z0Qs9E5hnoeq8yC7cj1Vh/PtCR+JNDVukfJ7ezUGzQJ/lt1AF7eH8np8BTr96zJ649h/5Cf/KnLW1A97gHyanBeSWVn4FLu3brkXeDI2hDFwtQqhuJN5BWNbRZjczmN4S0MHTP6oL1iUiwbzUF2Q0OOmfJvtRA17rXRWPsM/I12BZUq/A0KC+/wCmjkmz8EXEN77quiQhSVeY8xEbOjBkuVyq0wbAjBdH5IOjoZvZ2DeHoceI3YG/UgLN4j/tcuaDcKxKBVjWHw4b8WOt7FW91EASrsFy8MWBHZo+efildF9AOW7K9wgZ/pSHD+9An4Z6K5uo17eXO2WbJKyjbt6f2FJHpSfTQar/xAcYfnkDPaELL6cRNCYhWeng4YVu4v6Gu6yZ8d3jLj/tnAIApJsOAUReemniglt9dZFpMSm/KRS94RMyhepC1vZF2mc/xrQjJLR/neIe2fUXyEvg8zNxFiJzcIAbIjfVU429iKIA4lHd1ySVhjrk90CHj6wWSzDUAuRDHydIItI30oLOyLk2WydaGIykNyReS/1l01m2viQIshSBDsmm5O4SGJWqhroROg3/TD13X3aDUVBZsxQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c393cc5d-a9ab-4148-75ec-08d9df6a2565 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2022 18:48:43.8444 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0302MB2732 Subject: [FFmpeg-devel] [PATCH 17/18] avcodec/h264_*: Remove unnecessary internal.h inclusions 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8l7xSnR+/I5A Also remove some other unnecessary headers while at it. Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_cabac.c | 1 - libavcodec/h264_cavlc.c | 1 - libavcodec/h264_direct.c | 1 - libavcodec/h264_loopfilter.c | 3 --- libavcodec/h264_mvpred.h | 2 -- 5 files changed, 8 deletions(-) diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index 040fa0a257..31a0832a5e 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -34,7 +34,6 @@ #include "config.h" #include "cabac.h" #include "cabac_functions.h" -#include "internal.h" #include "h264dec.h" #include "h264data.h" #include "h264_mvpred.h" diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index fa8ba5dac7..9191df0303 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -28,7 +28,6 @@ #define CABAC(h) 0 #define UNCHECKED_BITSTREAM_READER 1 -#include "internal.h" #include "h264dec.h" #include "h264_mvpred.h" #include "h264data.h" diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index 8f07981130..93c2e1e438 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -25,7 +25,6 @@ * @author Michael Niedermayer */ -#include "internal.h" #include "avcodec.h" #include "h264dec.h" #include "h264_ps.h" diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index 558ec6c02d..2440cfa831 100644 --- a/libavcodec/h264_loopfilter.c +++ b/libavcodec/h264_loopfilter.c @@ -28,13 +28,10 @@ #include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/mem_internal.h" -#include "internal.h" #include "avcodec.h" #include "h264dec.h" #include "h264_ps.h" -#include "mathops.h" #include "mpegutils.h" -#include "rectangle.h" /* Deblocking filter (p153) */ static const uint8_t alpha_table[52*3] = { diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h index 19d9ee462d..46ae2738f9 100644 --- a/libavcodec/h264_mvpred.h +++ b/libavcodec/h264_mvpred.h @@ -28,8 +28,6 @@ #ifndef AVCODEC_H264_MVPRED_H #define AVCODEC_H264_MVPRED_H -#include "internal.h" -#include "avcodec.h" #include "h264dec.h" #include "mpegutils.h" #include "libavutil/avassert.h" From patchwork Mon Jan 24 18:48:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 33813 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:e71a:0:0:0:0:0 with SMTP id b26csp578092ioh; Mon, 24 Jan 2022 10:49:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfq2zU0HDvCGexz7ij/v1GytOh8r5Qq23wCt1sMM2GhsXXi6ZD6wq5a1Ln+qqZZeNsvAJJ X-Received: by 2002:a17:906:d9b:: with SMTP id m27mr13622368eji.364.1643050167549; Mon, 24 Jan 2022 10:49:27 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z6si2834715edc.603.2022.01.24.10.49.26; Mon, 24 Jan 2022 10:49:27 -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; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=Mx6dOkIs; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EF12D68B165; Mon, 24 Jan 2022 20:49:03 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069088.outbound.protection.outlook.com [40.92.69.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C41F68B149 for ; Mon, 24 Jan 2022 20:48:57 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kuPsrCUYx6rWdYn34+cVXgkW09MlwZvLoRGFwa/hTWEawa5im0BKqQK003kEZ0RL0HyM1Mnj7ehrEu/1p4QvuO21OcRK0e8au8IiE9gKFNS5mHVv/1GC251/zNqI/TtuT23W65PD3I5Il+tjm4AmZ4Sg2+U/SfLeSgOzXkDpKcLRDtDfLvNO6mi4cjBNG+e75WxQojFukb0Fj2U/JtALQ6h+zpGcO4OPwhhuEb0/lS95an5jAOX+WC4Ftt/cp3cGIaCd1PksOMNtZkUgCFIdKn84Onq+4iCEnrmydowCcwtK1MnfcMLa3be8vWzogC9kdeDFO9ukNNoNFdrinXaelQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L7N/GdVygOgdvG2qqUfdbFoTar93DqWYwMKN2wMf3II=; b=TUeTex1kASHa/if9jP/GcUwEBV9DM0rMtLzz1a8v8dfp6rqlagw8V2ke1Hzo3E8CudO1PwqF5BaY+hmuM41rpZJNmzST0BapEkiwypijB/03c2ck1YnAPjdUwNHTuwoqFpxgjSZJ1UvpLTdg1T89xIgCxJxuj55jM/gKEjeFuV/Wx4Y2PHwf6RkcRmBf2H/6LxDrdU6OcH9bs+FMwYZcONbjYJPNGwZN5/CYGhWdPshyBqOJkM9oMmHr/49fCLww+QWvTWJflg54cAapvMalSx4wmDhXv7YtHUHXwo9C9hJ2inKiLBbUGWxZtoQCAW1sDKq2GFzRMo2LIMovXOLZiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L7N/GdVygOgdvG2qqUfdbFoTar93DqWYwMKN2wMf3II=; b=Mx6dOkIslDDD+p/efJmmywmCnrwohvRJR10WIHHLF5xduInpILTuCCdzhvMX2+vVxw+hfelT/SYyOkpZc+vg0RBmZviFI9LgyQ7mKvre1J1PwnMxE3riZXTTvY9FhsIk4RJI7DzcYkVUpq2UMpDRmu9fJFAjRiwD49+8Rtg9igPchO0LdZrk2YFrAw3M29Z25AEaKK7kTx16qUT9w/3kLct35y5f6y15P5F8RGBZ4RK7G6EB5YyO1LOM69klgbm0OTWrIgctK06Hl0UrkaZJyABKEbh1d/5Zanilr53RI7tSTRiPoBnuO3BvlzI1jPib+YKnpOovdEE8Z4jP0ar0ew== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by HE1PR0302MB2732.eurprd03.prod.outlook.com (2603:10a6:3:f0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Mon, 24 Jan 2022 18:48:45 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%4]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 18:48:45 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 19:48:27 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124170014.17189-1-anton@khirnov.net> References: <20220124170014.17189-1-anton@khirnov.net> X-TMN: [REvYYSGMRE9r2zsiLv0gm5aIpNuSqSLK] X-ClientProxiedBy: AM4PR0701CA0016.eurprd07.prod.outlook.com (2603:10a6:200:42::26) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220124184827.584491-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b9474a73-eff3-47ed-6791-08d9df6a267c X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXG2AS1I1R/T45K/68k5ZmO19fqc+6PtBB1oGYfUkMfFGY6QKD0Xpq5yPGJ3pHjQEcaWrLRQ9G4+ynl/qYdu8whSQScbeDOe2nU1UtiV/5JYrejaEeSfMypPRi3F2YBaGakGLyCFIAlxW2q+ZVsq/o7l+pxkUxyN+dthao1cWmP1P6HqSTM91T4EEi0qFewh2y9YY9zoao53JKfZrcDIg0QZ7xYSP7N+zUPSDstrw0bpFzYZctcULqb4upI2fMTBbu/kOhncPD0BPVr8De2tBvT9cYo8jBnwSlj9opU+tOqMsGJJ3e5RTCqz7ysISkIiyOA+A6GkJrctxnJOHRzv1smEeIAL+f8hjvO20AikImoS2nZTMAGpd35MXtMvIqlA8OaaJlGhjaNoZawgWeg8/iUKQTGNMToGn1umX7T5hXeXYR3dRNqKp/iSXMDDUAsAA7Ir9dOpV0wfZdGI5F1NgdWYqKDJwzFU3e70AzgcOI7MsF/VeZK6lOrxV+YMBraGgEDt0wYGSK0ppmcOSOnu0BnFf+MokT4onUXyXf/O7tR9+IXcS66DA4ntSTY8LSLfx/oaWyXBWoy6lYyL9OT/+fVmO7SWf5bGHmQpoWNS0WI1RIKa+NSgexbG5o7n7fTryE/ct/5k9O7CfkVFJCqwBrzmxYul5231QJwC2ffl2IfoVO+hALRSxCDzL0gWfuyuWt7b1jwGDDzytjxSrAAOaVM0D9X7fOWDYA= X-MS-TrafficTypeDiagnostic: HE1PR0302MB2732:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kwx/6zpTsR7+GR1V24fGlsuZSuQH1reZhAh3vwU0doQOlMbmZP7HtTxhNCMO6J+jPamD01lvVMH92Xr4fiEScOwdEsz/g89IsjJxCdjl48bhS66ZVWpdfZ2sOPNexpCtfYLJfbYbPicqbyvHLblCAxcYqAI9DPWbPeSFBhNR4g7CskI34QlB0AhyzqBoUHFockgyxaRQzAIsREho1STadicJflpGAl2w8T8DyHUTirgxjYEihgNUKOlamPRLRbhY1ynSbNLIA/XX2CzNG9N9Bi0dGrfXJs+1nE7KDqtDgdUUAqHL1lZCTnmveNf6GW7poIo84D7ihyKoNGiQbBMJXPBBPVLWJymIKCPqsV0ov99lSnVQ6AWHXclDmwd41xGbznoCkxFhc1rf9HjTJjr5tb7ox7DrGWVJ81v7deyGSX6vYMFaQ4S/y/HFTp+LBMGo32ngRI3m/hSQL5BaEg0aa/3MnmOVCmlTMcAXoZJ2/g7BaxoxJ/8ZKXD9/2Y/Q+C06GkcimC2VFrCcQvtfLsxRp4JQRz5OQ/gt0lR/pnYqx3hK/h16aw60pAu7B24pSGtD1Xn4PQU4UsKQAAPqbC7SA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fpRlGgSOOvzKZTBiW7D6VVbnIGTObiJAsWq+X6T4STCd5erRcCLKM4WNchTczemXzXJHENUpLlNbLNpz/JhiIBoFTIpcw/xaKXSVyMi4Xgm9jEuD/WpuJeYrQ48UW5+j/fdYdV7c3ppE+437lnCpL7YM60a8HmzHA+4IZlA7eeZC2AJXEtrhT7KEdTJ9qkX4XtWYQLrK1vQdGmxiK5hOpRiP/6MrGeBzT+hP+1mvdlqQWVPUUd/zvs6WNxHeUcSxzdUhC3G1kihOeb8PDChqUWZz4xajK5nCGTx9w/f5EXxdKKC2AG9RAXdH91qI7nwfv4L5d7Rt77yg0k7aciFXbsYDBkLMOY9nLlDw74QbMVqgcqG8sDX/TA49EqsOkkpGW7bY0g0k4Dz3hr8fu8n9qkW5MCNioZltcpV9lqpCsBPcEA/nxHU/aWb290HGM0eTJQ7ZTaWSSphXRFFpsVxEB8Ontbb5dkAyZBPj6idRJbR7dwiy9gZ37TRvqNOvXQxFrUtO0h9UYpyUOqXkXN/s2oSEVNGJN4+cg2Yv2NE3WjlJe9ytvgH3PKvX4tH5qBmZYr2SBvupokfIgu5dILSBd1I30SY2E57bdSiK4ZIrGn+9Zln8k90U427atW1A4i94z48w/b681h3hKkfKk0uDhXyyVnjiL10hx0pCAjNK7N7IPMTeLEVmQdmsj7iKM/IBBTGP53M8hjvjcAbdfmu2cdT5ge0OmZoyniI1ZLufVv8igGHXBfkooiCnWi9UvxmJo0ZziwYdBOc8HfugJPA8d/rMRzEHOELWXT5vtzl61rJ/vt1FzVaBJ9bIl2bGdJQMgH40diwRsejcxACM3xGCnDYgODOPI3YhBbwt4uE4ioa4GIQ3jv7hE1NEKWS9yY1xCtwL/0GEj4JPfx8Oj116d6kDb3QImxr0wZMkVRylbAMVyUL7lGTEYF0RAN9v6ZiW9rDhwvLFdEugnHI9Ztn88A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9474a73-eff3-47ed-6791-08d9df6a267c X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2022 18:48:45.7037 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0302MB2732 Subject: [FFmpeg-devel] [PATCH 18/18] avcodec/h264_parse: Move ff_h264_get_profile() to h264_ps.h 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: GfW6CT0rVfvv It is a more fitting place for it. Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_parse.h | 5 ----- libavcodec/h264_ps.h | 5 +++++ libavcodec/mediacodecdec.c | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h index 3901b46ac2..4b79bd63eb 100644 --- a/libavcodec/h264_parse.h +++ b/libavcodec/h264_parse.h @@ -124,11 +124,6 @@ int ff_h264_decode_extradata(const uint8_t *data, int size, H264ParamSets *ps, int *is_avc, int *nal_length_size, int err_recognition, void *logctx); -/** - * compute profile from sps - */ -int ff_h264_get_profile(const SPS *sps); - static av_always_inline uint32_t pack16to32(unsigned a, unsigned b) { #if HAVE_BIGENDIAN diff --git a/libavcodec/h264_ps.h b/libavcodec/h264_ps.h index 3f1ab72e38..dc52835ed4 100644 --- a/libavcodec/h264_ps.h +++ b/libavcodec/h264_ps.h @@ -152,6 +152,11 @@ typedef struct H264ParamSets { int overread_warning_printed[2]; } H264ParamSets; +/** + * compute profile from sps + */ +int ff_h264_get_profile(const SPS *sps); + /** * Decode SPS */ diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c index 04d5026e68..e8af00ec00 100644 --- a/libavcodec/mediacodecdec.c +++ b/libavcodec/mediacodecdec.c @@ -33,6 +33,7 @@ #include "avcodec.h" #include "decode.h" #include "h264_parse.h" +#include "h264_ps.h" #include "hevc_parse.h" #include "hwconfig.h" #include "internal.h"