From patchwork Thu Oct 6 00:57:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38568 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp884991pzd; Wed, 5 Oct 2022 17:57:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4dYgXfpJ0LCoeOUu6O4Ozrn4/b2YpjLs2qUaKT4BKZ+eBxSuF/wNxXJaiG/VSqr1PdhD1s X-Received: by 2002:a17:907:7f13:b0:783:6227:b939 with SMTP id qf19-20020a1709077f1300b007836227b939mr1784594ejc.416.1665017846483; Wed, 05 Oct 2022 17:57:26 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z3-20020a05640240c300b0045157918d66si531060edb.355.2022.10.05.17.57.26; Wed, 05 Oct 2022 17:57:26 -0700 (PDT) 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=bDAzfLY4; 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 6C5C468BA81; Thu, 6 Oct 2022 03:57:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064095.outbound.protection.outlook.com [40.92.64.95]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9701368BA81 for ; Thu, 6 Oct 2022 03:57:16 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bvLhagZWxN8mA7+t2hx7Nmqd9wHgu+Xtd8R+Z69D3cDtS4BwsrcjCi1JJizXvKf6cZOUAQUju9jSURZ7nJJyYqSZZogpAdORun7i8dZft3tM95fKbIxM3gPnrN3hnLAzqRTrmrBOIlbq7WDjpl4+TtCJD3RURsjmB/cHZwk1XtLOeW/LnBHrTJHhZU1Tyy7yLAAi9Aa8Mm0lrmQDe1cMpiZE4t9X3TxHZk/Vru4jxYehvBNSBKSfuOk5gIekJKsor2gZwYXDfT/Mh8qgX3xKnI2vXtwznkaCqZzzVGfiLFwGMo7USSZ98V9YbRULMkRLKQUq+xpd15D59ZD3sJ05Hg== 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=uw3GGbrRAZSmQtO/Ajw9+3gCrdzV2xhiIVmskCMD/xU=; b=dUyPptFOY2doQNZRBbJFBHkyVaOWMn0IKT4Sdqdlp0Altxb8VR7ifmjElHmisZ6UCbJn/m8puObxVD98umiQ0jSidaIjJhAg3LicoIllb4+rKH1Eq3nV7TpDz/KLPPmg7iij33FoiCvDqNPkwJmaxFf61dzdXIG2mdK0TQKTG3j70QujfxWpTFcuU60LfZdxXXYjSVeMN3xtnEFsKorc1ETKwowyT1iSfS/Ii25bdCyd19qF4j6MnFIVfO0pgZfiXMcxQ+816MI1pwTckGzWsRrR0F9RIOO6dKhV5Mk2DkKfpX31+uN5MRfXhrzA8jMm05zHkeXAMpEPgANAJEmFwA== 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=uw3GGbrRAZSmQtO/Ajw9+3gCrdzV2xhiIVmskCMD/xU=; b=bDAzfLY427EjBoJXjeHSrQab+N4uhuVl77LLzdMuqoSCOr14nLxlfo/KeB7NAq/iFqQ8UwEO48D/mmgrgn6j48ymO16Bm8K4H0TEQwYXZ424ZX0JHXWCOaZkb+oWCEEkx5gQni08Ma+iztA18CJnHotqW/i3yk9lFSrbso3NcaHhmCWDCFXN9NP+3jAv57DAWkD5PqO4yHIq5+1rpdwRVzLNUwKPRO0c+G+s4oAfx5rrIZ6FfACs9ht0kaIrsPnkhYAUfbV3ZeAwlxurQodV5r6F7THzez5mkGfAXlfaohMm2EXGN+fufoXyl7GJKM9heOEtL+qUX/w/pPeenshjHA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0801.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Thu, 6 Oct 2022 00:57:13 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Thu, 6 Oct 2022 00:57:13 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Oct 2022 02:57:07 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [6Rg5jTrR4t6L7bmKXFy9ia8HVLYx7ZC8tZlqNuJuSkM=] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221006005714.3530026-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV2P250MB0801:EE_ X-MS-Office365-Filtering-Correlation-Id: 01df2ed4-94a3-4331-080d-08daa735b4e7 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqgQ4FT7B8ShVDNjokrWqh3zB5z5KMYwwEJGDyUgsw/vzcWhTffXlVt5PSO2vy3Xkrb0DRfXVJJH7LWLLXELVYJM8kmfNKV53CDDcOCWNqGa6yajCXi+Qx+5bzz2RqEdOjXo2fOiqj1tStM/qrHwcBlBlbKSCT3c2iwuiW6eV3vDFLevjmmAEEZ9wSwc+AnwohADAlWdd7X6cb3WraATGE0sJOkqDF6knnetQBmqNFF8g4rUSEHyKWUxEalmFp+v7+QhkqGo6Fp9u8T3o3IWb0Hg0FZ7czJFQGPshAjeFVkEgKFNW0cFbdo9FJMxnxG/4fibUChO1YGvCPo6QCTjf1oS7qQ0qaC68CX2sEy1kJFwAP6p2S51mbn7vxbTKT/KVFYepriDNg4zZiPrIusDBh9sjjZG1JafJqN6dmmlQLPIA4M8JZeBlXexTdkqu+8HwHNknakIfi2wT/CopWBch5/+3SZN5QpegS+br649zYKMeRUHwf6LIAbbFTFawz9Xk+NMaoM50F73DORAuxcPvx9gYlgUGVrr2BDvK2/NfoY4mKIxJ7P3HtdoB9SDi5mKnvma/ALfWz0732rk3LjcPAOICmQIWYvpAXB94yJPU0rMt7IbixRxWaDYUFyLp7GtSVVzib2kqSnUpI+6Pk7uz4de2AvBI2AtEh3UWM/GUmeUxoy65kyJUrkKBa6WNuqAaTW9OlXsEptyDh5VTJL0GAoyfNkkkpDPm1ZRwRPnNLnfx7vgqiTq6dfvawbgY38WnA= X-Microsoft-Antispam: BC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ook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01df2ed4-94a3-4331-080d-08daa735b4e7 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2022 00:57:13.8365 (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: GV2P250MB0801 Subject: [FFmpeg-devel] [PATCH 2/9] avcodec/mjpegenc_common: Don't check luma/chroma matrices unnecessarily 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: /KF4pIWcZqb8 These matrices are only used for MJPEG, not for LJPEG. So only check them for the former. This is in preparation for removing said matrices from LJPEG altogether (i.e. sending NULL matrices). Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegenc_common.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c index 98c464fc62..0076e94296 100644 --- a/libavcodec/mjpegenc_common.c +++ b/libavcodec/mjpegenc_common.c @@ -61,15 +61,13 @@ static void jpeg_table_header(AVCodecContext *avctx, PutBitContext *p, ScanTable *intra_scantable, uint16_t luma_intra_matrix[64], uint16_t chroma_intra_matrix[64], - int hsample[3], int use_slices) + int hsample[3], int use_slices, int matrices_differ) { int i, j, size; uint8_t *ptr; if (m) { - int matrix_count = 1 + !!memcmp(luma_intra_matrix, - chroma_intra_matrix, - sizeof(luma_intra_matrix[0]) * 64); + int matrix_count = 1 + matrices_differ; if (m->force_duplicated_matrix) matrix_count = 2; /* quant matrixes */ @@ -285,9 +283,7 @@ void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb, const int lossless = !m; int hsample[4], vsample[4]; int components = 3 + (avctx->pix_fmt == AV_PIX_FMT_BGRA); - int chroma_matrix = !!memcmp(luma_intra_matrix, - chroma_intra_matrix, - sizeof(luma_intra_matrix[0])*64); + int chroma_matrix; ff_mjpeg_init_hvsample(avctx, hsample, vsample); @@ -299,9 +295,12 @@ void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb, jpeg_put_comments(avctx, pb, frame); + chroma_matrix = !lossless && !!memcmp(luma_intra_matrix, + chroma_intra_matrix, + sizeof(luma_intra_matrix[0]) * 64); jpeg_table_header(avctx, pb, m, intra_scantable, luma_intra_matrix, chroma_intra_matrix, hsample, - use_slices); + use_slices, chroma_matrix); switch (avctx->codec_id) { case AV_CODEC_ID_MJPEG: put_marker(pb, SOF0 ); break; From patchwork Thu Oct 6 00:57:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38569 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp885038pzd; Wed, 5 Oct 2022 17:57:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ivGqjtpxthOiqw7Y/8dEqrKilg12J7z2zWYtee2+J8p87NTBFxcHisQ+vvPee2DpDGBU4 X-Received: by 2002:a17:906:9be9:b0:78d:2f63:10dd with SMTP id de41-20020a1709069be900b0078d2f6310ddmr1856479ejc.479.1665017855296; Wed, 05 Oct 2022 17:57:35 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b8-20020aa7c6c8000000b00458adad589asi11616989eds.80.2022.10.05.17.57.34; Wed, 05 Oct 2022 17:57:35 -0700 (PDT) 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=G75zMcX1; 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 9014068BB5A; Thu, 6 Oct 2022 03:57:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064095.outbound.protection.outlook.com [40.92.64.95]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C86F668BB5A for ; Thu, 6 Oct 2022 03:57:21 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kKAjCDA55+f8x6Ss6ApeMJusr144ieiC60YgAeNwwwmV/7DTEqwqYfcn+e3DTud1yDm5IbAe0KzQmmQrWnI+Nt7jD9Tl5+liXl+KIfyfM1rHG+xrscqmpBBIFeSGPgX6oQS8XgOaR216RDRUpEswyMnv0ZqMlOZLmnn0hVHzKuDJFmr+JeD6X01NAhROmPLq71nHT11IbvfYL+T2aKWJ5ZxzxL3BHF6u0oG5t2zgOdAQYbRzyXdlmZyriXa2m3qGV90/O0Id09bGuHv9BCk64UNHvCk3dg3Tr8tOFecSPFVkABCI5qr8//+5hfHu7cVIL9LX1zE9NImZgO4xWMvb7A== 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=PeMPvstg6rX1Zn+RbZO1hcgNFDDVlCflwdKoaxdMHnc=; b=AIjDCtdnYWgHG/g6SsVBlXBk4m6HTAdaLyYOE0AMFXhbcVfz4CAisuMdBnCI5D5mc2X+CiSVvvu1EnyfYi57/Z2ilQPbr4DzhhjVyG09J8o5x6SaeiX4wJ2AK76N/zvtOYbwlE+vhJsmftlIXU+YbzOuOD/7YAUrx9DDqcWmawH7K9UZ/9X4Vnq4BIIyWuQ9boulVft06p5wElAm5grgjh1HPUDpzqktZBNxY1lg0YKFNLOGJeKmYg13g7EYjFiOeCnFUgp9AvJQxYwG9SWYk6fYojCHQPLgrfRya/9yPTh6T+UPTyBf7SWvWIh/ZYDPchfoAy9Unawfm7AiHwYKPg== 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=PeMPvstg6rX1Zn+RbZO1hcgNFDDVlCflwdKoaxdMHnc=; b=G75zMcX1FBF1BGLbVy3B8CqZuaeuigtDpEZ+ekqSRaCUDXiX5KDed/clehplraN2mqdAMSDfj+03cpTvGnzJdiof0SEGCq/OOx582J3ZlWbPSDf9uLghQ0h+yJRomMDVcQaSEvGg/5VWZMvRx1+nHyEauAXdKcZKaAE/byLEwsEaqJcVtoDarIG1Oru3GXEnOVvAjMBstp9v1Ga5glT9tW4fkiwwNbIPeE5v+6gs3FX2XVo6kvBHeVQM+Fx1dwmfjRKNZxRZFKwFzuYzrcQvVI0A7RGAypGtok1TmGcAgGii8sTrM5DMmhB+ZV1zrg1d++E82PymA5YWMUfq5XR1jQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0801.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Thu, 6 Oct 2022 00:57:15 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Thu, 6 Oct 2022 00:57:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Oct 2022 02:57:08 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Lp6lL9PlLD9OKtJHVpJB/JzbArkqpswPdAYBP7B8PBo=] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221006005714.3530026-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV2P250MB0801:EE_ X-MS-Office365-Filtering-Correlation-Id: 29ac4e21-a7b7-4fe9-b6f1-08daa735b5e8 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqgQ4FT7B8ShVDNjokrWqh3zJkwAGTD/j/+mg/ofxjpgYooWUPgYProBTnKeb1t9Zrkr0GQji66M16C5u3+mWhOhgT5k03XE6aYEAx062HQ1pwypN5DwkYP5H25iXsAyArwmQVRIZpGsFuFj77yd9JYW0GNI3HffzK4IYDH/Xq0E9CrtQkaSL5+S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qXrRz7SeBq4oiFbxXauahJqRIpVN/fdIIbIIBV1HPrmEhGZV4n3DD7gVvydwtMbDsl+fALBOzSoEXSAv7JBo1nqcbsCx4AM1/j6XOY1kP8ZdU/SGoUo1/h6mMWJzPLkjD8RqSQkDwbg0g/MQxGLrxYNRpLElBfMO4bwXJTmkzVhDei6sv3bHLM304e0bXHPw2z0OR7a/QIdUK6siOqe7mXdQEqfA7twASJlesL3YwKj2yTDeHFirWrf6NhgyFMIK5YHJ2V2H/ZCukpk5ri17aHkgCqnnH3FsZAg4U+m1Z88uFFhdZ1mmxF//eMm4QY0BKoatbGcSKHdSTJ1tT9zSUdIotUBpK3z2advYASte3kVPzKxhqXTdRTd42Y0kbmKTO0WlkJfQIyKWZKUZC9fgrNpK/8guMl6ouwrjjP/ZmnGEq4Y5+rrPTORJxlVzYIqMJ3PWdBG3IQAUp+Yt8GGmG2idI3Ojz09tT8X+U5cx57ULiWqUk5bp1ulkE3Qf9Zf3vC8oeBtpBGnYTrwUWqEqKnkhr2RJLR2J9OhhfuiOe+9VaCdZFTn X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29ac4e21-a7b7-4fe9-b6f1-08daa735b5e8 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2022 00:57:15.5253 (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: GV2P250MB0801 Subject: [FFmpeg-devel] [PATCH 3/9] avcodec/ljpegenc: Remove unused IDCTDSPContext 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: +vVTqqGVqhxR It is basically write-only. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/ljpegenc.c | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 957b7fe13e..ab6ff27249 100755 --- a/configure +++ b/configure @@ -2869,7 +2869,7 @@ ipu_decoder_select="mpegvideodec" jpegls_decoder_select="mjpeg_decoder" jv_decoder_select="blockdsp" lagarith_decoder_select="llviddsp" -ljpeg_encoder_select="idctdsp jpegtables" +ljpeg_encoder_select="jpegtables" lscr_decoder_select="inflate_wrapper" magicyuv_decoder_select="llviddsp" magicyuv_encoder_select="llvidencdsp" diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index a708d71220..4b88218990 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -33,22 +33,16 @@ #include "libavutil/frame.h" #include "libavutil/mem.h" #include "libavutil/opt.h" -#include "libavutil/pixdesc.h" #include "avcodec.h" #include "codec_internal.h" #include "encode.h" -#include "idctdsp.h" #include "jpegtables.h" -#include "mathops.h" #include "mjpegenc_common.h" #include "mjpeg.h" typedef struct LJpegEncContext { AVClass *class; - IDCTDSPContext idsp; - ScanTable scantable; - uint16_t matrix[64]; int vsample[4]; int hsample[4]; @@ -240,8 +234,8 @@ static int ljpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt, init_put_bits(&pb, pkt->data, pkt->size); - ff_mjpeg_encode_picture_header(avctx, &pb, pict, NULL, &s->scantable, - s->pred, s->matrix, s->matrix, 0); + ff_mjpeg_encode_picture_header(avctx, &pb, pict, NULL, NULL, + s->pred, NULL, NULL, 0); header_bits = put_bits_count(&pb); @@ -287,10 +281,6 @@ static av_cold int ljpeg_encode_init(AVCodecContext *avctx) if (!s->scratch) return AVERROR(ENOMEM); - ff_idctdsp_init(&s->idsp, avctx); - ff_init_scantable(s->idsp.idct_permutation, &s->scantable, - ff_zigzag_direct); - ff_mjpeg_init_hvsample(avctx, s->hsample, s->vsample); ff_mjpeg_build_huffman_codes(s->huff_size_dc_luminance, From patchwork Thu Oct 6 00:57:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38570 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp885082pzd; Wed, 5 Oct 2022 17:57:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6afmwg3CuaIL7JZF7BgTg4LALvef5gZKBTM3nuUIv533qhnTGAmX55c9RYqTqKvWfoWH3S X-Received: by 2002:a17:907:9605:b0:6f5:c66:7c13 with SMTP id gb5-20020a170907960500b006f50c667c13mr1969928ejc.66.1665017865951; Wed, 05 Oct 2022 17:57:45 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id qw41-20020a1709066a2900b007820f00167fsi9307396ejc.260.2022.10.05.17.57.45; Wed, 05 Oct 2022 17:57:45 -0700 (PDT) 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=K2BnJF39; 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 90EED68BB9E; Thu, 6 Oct 2022 03:57:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2069.outbound.protection.outlook.com [40.92.90.69]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E66A68BB88 for ; Thu, 6 Oct 2022 03:57:24 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xtw1/zVCSqyO0SEt8dpzNSygfvlAmNqRgYmDR927nFq3iHVWNdXH+LgWBVGCgQj4kD6zyzqfM1X7IsVbxeWRWKpG2kjbvVQZHDwOmKKfOycZpqhLF0lyMt08ASzfnPvXXS3CJQgT3mDOmL4f7g8NlKKxXoGz6365qwgI7UvuqM+gc3GdX9ufKbM1fkz/E4OVPWGhqswebR6PBzxNBpHb86XJfc2wU1OiNX362H6uP8I2MzRXrrvACxcDSLh8mpc5lma4gPzWgOvC2zT51WDF7bqSfWmgRjFp6BpUDJVSdYFuuA5rUj4HAb1j0XZEAXhsvMj9KU0q1YLtUOUVjvKZ0A== 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=8oj6kROpUKU3ZetJAju7CEqRykjxoJuzrIGeYWQ96XQ=; b=gZ7pDl8q8kIAqONPaVj3Tf46Hj3YdVfSN5ck52G5QlxleF4WPL7Nm+r6jBwpfrRZu+nDc4kOj/ms1SK5Im6FsWQE/0dGMNBk7TuOwGrhpAJ9Lp+meUAEdlZt0Tiz7h3mi+jMQQAFK9nIpZdD1IY8k8rwYJOXkAkTOmNBYlEF4BmLEvNU1AAUu4zoQacJ7z1vztB63fUsf2rQhIg4GkaI/TZephSlsBoKrXkhT78IIPfILJULPZvJlOWuCGSiZXXazOYgdww54dJN0+u/qxyk3WC0Xl2HuudGme9ddVHH8xnT9eq0eq7acHBAkQm6PYHeRa0erGTp/h43Voy1stZ5ZA== 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=8oj6kROpUKU3ZetJAju7CEqRykjxoJuzrIGeYWQ96XQ=; b=K2BnJF39aYu5xvYE4vo4oYwTT10xpUA7IhDHIerwq+yHc4oTsNTmM8aDdBwhWoOmBzAh3rB0P+vWCYnFNFRARmSbfACJSQ7T9stiGI4nkAiwtlRYnakZE8SbaQf9fctZ+G+fDQ13x1RUbxrBl5e0HlnXZ1M8dHKgTz0Om0QYshy6ZfFhNQAWaBPvVbf5pKYk8UdlsFd/jN6p3tSarSMbZEBJVL1HxXOkf/ZkG+ndbxztKDWhOqhBL1QQ5uAg8nvegbCUBAaHeeGtC68wXPWFposUWSMZPQQkgahWEIpplhimXkjFVIdqqOQsO7GF1Z8FVbwEB0UXSVt+nah88s3R9g== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0801.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Thu, 6 Oct 2022 00:57:16 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Thu, 6 Oct 2022 00:57:16 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Oct 2022 02:57:09 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [onPmo3553uTnfbU39yw4w7ZZRphh47lfPmU5VDvWcys=] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221006005714.3530026-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV2P250MB0801:EE_ X-MS-Office365-Filtering-Correlation-Id: ef71859c-1b2f-4a7b-3124-08daa735b68d X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqgQ4FT7B8ShVDNjokrWqh36ReXVJuGcDtVx88AX4wrFe6G0voeIa7ZYAVVSBxKz2cKzIPSrc3TZxx1maugSxOf+WxuBeUKim0DtlHpz4y9hf6TATzzLOYtlJRw3zQec3n4lSWZuPzec3TdxBz0tXJE8leFVX/MqWRU2wSVcUf3nG5CtzUyY/ljM0KdscW6UbQxhTcq6qZhs2IGHfARHbgtOG6v28lDZPAFMk1xOuJvTNVt7M1YouyIoDlRIqjTcs7N1F3rJQcX+Vhrm+uM5bkdaRl5lQsv2awffmLYaS4vapa7k+9Ij/hPyTeC+4N9eqmMdg44hO7DxxrrxUw4qwBa+SIkzcMLTSTXXwMWHWuHaVWf35Xxv45MolEUC1Y+Qw9UrcyyJIcCPkwgKrbHchXEpP/WlyEXf/DOY6oJ7HeHE4qLjcuEcl3kopngycYmKUP56GbL9eImPTNBmJMFAxrNrmcwxckQ3oz9gX9vDFgW8Mtg3+hvcOpurvm0JioC3esQeDsirZCKzUQ5St2wPAyErFvdNYmUJnLIjRIPAsN3TxsSgBq4R2XLB5SWQG9bMG92/C5cQQlKo42qogpXCzA4R7xt2r6geum4o6/aV5ekcQraSEdtbeu3ITKbyLxEzH7m1nSi6Htp61vVEsWcpIO51odPh9nNJaMW4S2LnLSe2nif1dKHMASmGgwON7kJzLkSex36qSAz1ApaElWthMGBo3f4LRdOL+0lXgHz2TBdPyewHI0BqlvpdGrFm/oLJuU= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dwQHV8A+oa0XR+CqPisajhKLtpOjDyqp9wxMV3s6+lcZzk6djmveCEMXsJgAImFb6TWh6jIe3t2MtX8BknKpfIv6RIIQO6kV82TAsNg3tiG2sJ6jcqKBxihT66MwmVqvvm4VbJeZc/2gqgGFJc1LoaqZQGIhS8hItmN/SVAxy4d1j/1GmfI828l8stGD16OYglXGyjsQaa0lMQbS2hQ/YBhVk/Y9Nf5GtPqHCCOOlZrrXRTuw3yL9baqk2hFzygiL/w3NMmztKGVzPkV7eQ4Zuex/hcHqN22unIlJ3HBbwshRfnDvOPTffjadHel5NFmZTlPw0Xnblikt/e6/m++Z0qh8gKgOI/q9ZfU+7BAq9KDmn6A8d34Bn0KXKPobqD+Pmbc5MQ3LX1GkG213X1hiojwPH3lwEeP8+Q2kzEVOPVvQEW/E6KP7hqjB0pw9Mw8s5n8XFNboiV4GVRNs/lUb0mjVH/eszoi/gipqRsXVn7FbbaoUKiH0auzCdYwM2DxA8jUcgA67mf6eos7WLZTdOUim46oM9aIsCT3pSWBds/ahmg36wyVkJriLu+bLyCoUXYOvlZVqwiZVKCI5Dhyg8NHwgMkWDFJy/xfLk6tNG9T6KwwNtlSkd1xZwodT0YRB3gT7+VIFOur29e0+gBuUOLa9c/5r0l3Xc4esifUa5kpFwFUfu3wsp6SkpCb6MbI X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: d/JTh9ZuzZFWI4SJIzVA7HCp/FtY9yCrTvKoLDlemN4daa+fTVQTcJA+r5vducAWxOpveazduz0qcihVOOw/TsSa7SdzjCVhRqwqDWGq6LE66xh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4vpBGQzZEaRGIFQuCpO4YYCme19em0e6PWYp5WRmyYxkcfFJPrVV8x/9yIzHHUUii18ZKeCFDQucnIg+byoo25xZM1QGYH8N1Qauj3BMU+4y6FQTelyQ7uizncw/zbK27rKTlOL89U78ja6oxv2pzXb4gQ4L/ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef71859c-1b2f-4a7b-3124-08daa735b68d X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2022 00:57:16.6501 (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: GV2P250MB0801 Subject: [FFmpeg-devel] [PATCH 4/9] avcodec/ljpegenc: Remove unnecessary emms_c() 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: 7Dvc/C9Vtggs This encoder does not use any DSP function at all. Signed-off-by: Andreas Rheinhardt --- libavcodec/ljpegenc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index 4b88218990..81c52a7c78 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -248,8 +248,6 @@ static int ljpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt, if (ret < 0) return ret; - emms_c(); - ff_mjpeg_escape_FF(&pb, header_bits >> 3); ff_mjpeg_encode_picture_trailer(&pb, header_bits); From patchwork Thu Oct 6 00:57:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38571 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp885123pzd; Wed, 5 Oct 2022 17:57:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5nuJjKlCTjg1RLphSpJEcI+Zd3w7x5f2o4Lg35sLWLR4FnM/PZtsc9UAsaol+7vvFQ9ngu X-Received: by 2002:aa7:d848:0:b0:458:9ccc:f605 with SMTP id f8-20020aa7d848000000b004589cccf605mr2259737eds.68.1665017875697; Wed, 05 Oct 2022 17:57:55 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gj20-20020a170907741400b0076fbaba1addsi12088392ejc.896.2022.10.05.17.57.55; Wed, 05 Oct 2022 17:57:55 -0700 (PDT) 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=chj2nDA5; 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 A30E568BBA9; Thu, 6 Oct 2022 03:57:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064095.outbound.protection.outlook.com [40.92.64.95]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 068A468BBA0 for ; Thu, 6 Oct 2022 03:57:27 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YMzRJ7VobNlxs8l3pKFgYhr2EqRyK1AByWc/gEMmI5xoWrA8rjXTEKQOCYwOTQIE6rTJIYzJgaJSOWTWe1CbwDKnZCR5Oyhk/iQZAASuJBKCMjeoceVEOrZ3RuQLWqnHL2FB+j0P3oG/RtG8LlCm1GTiGzRiOphvqlVX9HD2IF98qtvRpOK4Qb+HvqjbGubCrzgLWJrA5IRYg1bu/B9HKrlCX9SzHJ0z/dtns/c1vwVzCKYKWKWSVoi1TjwOVTuvnXEQcgBoy81r/MKGn1wKOI3q53TYnWETz6MFLrN6G521XWyLRJauGMBrqkS+wEHFNV6f8YnvA2R4r4lD3WfgQg== 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=rD7lR+g8kV1ZcMxefIxbX4Rq2kjXPcQsVslJ/gg+e2w=; b=k2YWzrqwfMAcn0/kSAd396Cc7V0ZvozfgCaIr7qqjzaBa3ODubJZf97LuzZaramYtd3+ThYOtRGADr7+w/dUuwXhhzu3FT1ZsxJyIr8/A1UL51rKDuPTEvY2RRE4GTcxfHxzLBsRw5fQQqWFTwM/COAWcvQbXh6dof1gxRqZ5wlt6Ley5aWZwXD8AjiFSCSiZCw1jUmrNTU76nJ8J2eWmniRB/WWnr8SYCsfaQn97vLkowulCQUU615UXUeEQU+se47xmnQi2pg47ih3mzKPwngHAw6J7+TehBtdLh3Lzqa1frMHNrCtfd5i499mjgJCvMseGDFtPDdZAkFiwFJyUw== 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=rD7lR+g8kV1ZcMxefIxbX4Rq2kjXPcQsVslJ/gg+e2w=; b=chj2nDA5OiCKS2DLYWKLj1RWhoZdMq0w0ear0kanKAVS9+zm9wd8EsEkjB4wTs7AuwvO7cIgbddpw3WDyD/WX9WaXVjx3NuSkuvP/c7odZwkrk+o1PZMVxtLsXXpUcN5j5zY3u/AjEvB8cQBiLow3j9xm5LWRgDDkf5nmYt0ZDEwnQ96STFYN6OJVBvEPapzGdxTEw5zTnNTIPf7XpjU8lfJqOiiVypOaWUfeyUDgntcCPENS0TkFIoqHRlgrBHvAdKkkcKXdJLW4ybwRnqkwBJ/7TVoq9Fk84Bks+e73H7kIbRmBomCD/COjdVyTvmcJfxBOR9Krc77NGd3OofEfA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0801.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Thu, 6 Oct 2022 00:57:18 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Thu, 6 Oct 2022 00:57:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Oct 2022 02:57:10 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [s4+9Mzjoxmt8G/TGcGv6c91LNiiyd4fZcBowXhRaIgE=] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221006005714.3530026-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV2P250MB0801:EE_ X-MS-Office365-Filtering-Correlation-Id: b730bcbd-2f65-4c69-ec79-08daa735b750 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqgQ4FT7B8ShVDNjokrWqh3bdigyO+6Pw9SyikTjZzbejYBiLDcF/Zorg2wyoGLtrO4Z1nh+B/Wpy/V3jQsNbAlxiTKuHLhK0zV7wORsVLVP6FW3L8bEFsMNlUBpxMCcF70bWbf0jBHERcVFGhrBJUjmD1mQD604kJKVDh6m9XyZju42KIf9n9keVK4jta8K3GB91C54Jh1vT7cdcFtkjQgxKjcfgXPNwSJw35R/V+buTUEboJmOiszbF1fZefCtUipL10qWD+2IRx4HndUPe6v0d4wiu6oXr48QEesNc4O8wbwf8uYevD1AYeXYZxnqSybhQuIQYRAcK7G9XG28S8+ysQBgCFtVmoddFRUUIC7I3USn2PBeixUPMcOjDqDu91vYz6+gQbjTxt9xbJfFCT/iAlBXTvJ8C+Z8nN26qAFBTdzooXKA/MK4x6LP/kD/mQiYMLOVDS37vlPjDKTDuhhP+kzoFUcBG52L9RFqNkZH5b4YvpiB4Eapyhvnb7N79cRXZvnsti+AW/gn7+8Zw53t/5YSzld2D3fNftT4VNeUX1wIKNS2DVzRVK1LM1CXhn6sgQrc8MHrP1kxNbfuB6kyT2pdWY1PTxOTAWKUMgo9Iii1sq6KoCD+PDYSaXq8Jux0c+Ks+IWQ24EaHpFKA11FyTN8gAAB7iDwTJNByoVUBkQP0T4zx1ssMmt3sxNdJZOUhzV1ZAjnj9pR0MjaUTsCFIx6+wtOF5RYcz7f/SBmUryHALriG+QgSKyUMh1Hyk= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +vme6B1e6u1uAryxLlJa6SlzmbCfQ0UxF0Z5ORUDD17iXmEnaDrHm9KMsp73cIjvxvSBoPpwU+R1ERvMJI8PS36s5lrTVf8/UoZjQLuu9dne08pKEYDRYQ+KXcgRWEVs22+qVhj5tkXU3BDXlwykfkXolIPF+XFVCYsPzkWryAoSPdcmYRSxf9vLK9ykSrkIZyEbSzEt4li4EOC78F+0bnBZsYHE6UwznwrJIgWALIW9RRaC5w7XoLtJTXKNzwt7T0YZBygPLMDSOH8B2JWmlnuVX4NvVQ/aFUafstaOKORMjefSVYairGiBT+ZBfG09HOw9Gt3bHczQIyfTkFRz/5EENL7lIFRjmHzvf03MbwkrW2B3ASe7UqweYm8jvd8YNh+vDUe904bZGryynHrpm47Mmv67UyDj9KpcN1s44cFx0/T81cG6QBbS5gHizhtx2Kc9Odcq0T5AILocqkoQyT3MsCX/koLRkSOncqpCnavKmJT4A0Ycm37JvWRmvS/c+o1w8cjEDjBKufwExUDbD6zH02kjCdlWNH3IABwuesBjTD1KR2ubvLOS8tjXUEV8I6t3hxRSNc7q9i9AB3wxElumHhqZjp+C4Z0kZjJ4f4JFr1DOWDcA4fo82tVBTQSUyRhyu079wqT+d4hdqFy9AhMfwYMG1Wi13QWzKTAmfyoAlZGwJih7qsKoz2SJkNai X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nqSPstMP2wPfB2WPoz8/KxUJlHQ51VIOaTOqrvLpWxc366+/50iO/845t8R45/Io6iD1BrDSRn6OP8tsT72MLqwvTuVmdYCtgmnH2vr45gdDJXPUdkD3qs4eFy8K9v944OK+W4bIik4V7cPnDQj70VZCKw245H5Vhyxhf2tooDBmrL2Xngdwpg2FBe9M7HPpx6h8P+3NAIp88+1viomFjrneLd2pdTzDGa34lSFwE3jE74Y9YMxlBMoP6CmEm520sv+RtX2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Afr6lyrPaeJ7UvL X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b730bcbd-2f65-4c69-ec79-08daa735b750 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2022 00:57:17.9485 (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: GV2P250MB0801 Subject: [FFmpeg-devel] [PATCH 5/9] avcodec/asvdec: Remove unnecessary emms_c() 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: aLKrkB6Yidie This codec uses BswapDSP, BlockDSP and IDCTDSP. The former never used MMX, the latter does not use it for idct_put since bfb28b5ce89f3e950214b67ea95b45e3355c2caf and BlockDSP does not use it since commit ee551a21ddcbf81afe183d9489c534ee80f263a0. Therefore this emms_c() is can be removed. (It was actually always redundant, because its caller (decode_simple_internal()) calls emms_c() itself afterwards.) Signed-off-by: Andreas Rheinhardt --- libavcodec/asvdec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c index 7dafc115b3..be89544732 100644 --- a/libavcodec/asvdec.c +++ b/libavcodec/asvdec.c @@ -293,8 +293,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, *got_frame = 1; - emms_c(); - return (get_bits_count(&a->gb) + 31) / 32 * 4; } From patchwork Thu Oct 6 00:57:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38572 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp885161pzd; Wed, 5 Oct 2022 17:58:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4BqnipnO34VpjFpnG5pNIz/lREqCeuvAK7nV4CLMvNYMjJ06FvOfLrAQTXS4L7OWcC/Kr5 X-Received: by 2002:a05:6402:350b:b0:459:72ef:cf6b with SMTP id b11-20020a056402350b00b0045972efcf6bmr2250699edd.19.1665017885900; Wed, 05 Oct 2022 17:58:05 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i23-20020a170906091700b007416e100f3dsi12183857ejd.986.2022.10.05.17.58.05; Wed, 05 Oct 2022 17:58:05 -0700 (PDT) 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=gH8yp8qD; 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 B801468BBA0; Thu, 6 Oct 2022 03:57:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2069.outbound.protection.outlook.com [40.92.90.69]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7198D68BBA0 for ; Thu, 6 Oct 2022 03:57:29 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wqb0kjRPWV/ydZsRexOETNx3vIeu0C6CZp9QcYgruD5PeTHxeQwfVIwestwT7byAe3YXVdvNL2qdjLZAXDg7o/7A7cm1divapD1kbOB2TSoJ8KTmeBDhor4dkBo3V9qUBDnyjElzEV7y7meflreauJVNIr65VGYz1Nw3ssQP1R9G7QxYoEcB9Nc5UIBGQd/gC3bbTv2WSSsOFMNYFPl99sq4AxIgUNF6yG80HDjMgeXbykLvxw1gJqSlOho8/fzx+todgLOIfpDKQYlebl4lrpRC3/5gxz1tKxBWX4qh3nONKe/DM5IeRZ5BOTBCkfwjY4tH72KmBcTVMfsXbmo5fw== 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=yY58WjF8tSmxFLhERLFHdic23OeCn8qpEE62IxYYySQ=; b=VAuVdhz01QohDeza4zj1IhygLi+fkqN6xeKuETJS/ttBJVAS4cLvY8h80jiFRtCpJtIUakW/OHqp72q8KA5/LB7ZXIgLajXsDDlf+zSLZmcmmLHjZ+oOXM6XPoy76YMxdhmRTDdleYPq+jpNEOJJ1ZXSnZAH8oKost/VlsfFtTVNU91swDizTzNVteuOoI0Sghs7HxuvWgdpycCudti0i560vreIjmjOs3DfXLObMa1rhJ2MsJAeonkt1ZqOF2wIXihpjm6UXZO6ZSUeGFZeuBaAHiYnU4hm7HlrX9SbQZh651aQWCeU8CBlHIiaJ9/EqooRAZnUnXzZMbMR34aQFQ== 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=yY58WjF8tSmxFLhERLFHdic23OeCn8qpEE62IxYYySQ=; b=gH8yp8qDp/33v60dldKrpmoTajOgILB4OMCBoZ96D2C/i+PcsCswnEbWCbp6UQ4XHN42ZKBnvFi5h8ngzDxvFZM+ftFv45HooXd2V41ieCcqfHBNqXR0aoZEURguLcUVWTsvWZVCgONCUX1IhQP7dkMvm0yXB6TpwCweiVZfn+bPdNs76f+Wt0YPa53h4DVyrgwgonQwaV/KAhiX6zbYzDFPzYgQ8HR08Sa9gKbzPRoff3O6SkwzwbTF4Tgc9E8x+d2Ms7IzFVIwkGj2cQ/msyR7M9ZYrls6vgRqjPit8+Dl0WYO79BkZZ6GBm3z9sdvOuJpAg0G0IkpdRkiWFDQ6A== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0801.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Thu, 6 Oct 2022 00:57:19 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Thu, 6 Oct 2022 00:57:19 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Oct 2022 02:57:11 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [QiLBjSD7/7GiRdDGEbo9RAfdoNKaLHqVvma0it5+F5U=] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221006005714.3530026-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV2P250MB0801:EE_ X-MS-Office365-Filtering-Correlation-Id: ecc227d3-eb8a-4fa2-a24b-08daa735b7f0 X-MS-Exchange-SLBlob-MailProps: feAVlmA1hHWKN9wtHV8b/JzYDx++V57m1VSBMlKjx7GeInRygfzADZmYlLSp4etmUuLH0cbXkC0MceOSrOPYm885OIiHTIYRiCULaQBqqkL1fGB/5xqPOAZeSsbEIx/OXbUXlxm+bcjCFCyDmPOi+sWbiQe1dnCkM3QXyL52uYtblidsv2IYqJURPrrYeHXaHii/p5a8LbubaZC0T+FDq/juyOzhUysI+owziZMs1vtlBi0HgyEgiPiCBQnBF8lQVnVTTI4wvgmIJ+izT//tsTQjjm2kSjDUzyhtqf2aYZ+Ejv1L05IyjrZBWSsrY3Fy8NbFSBnum6/Dw/c+PxXRQ7aafToVbJX6//Z8R3nslfPxOjfQ5/fbGkYpyxOzD8xgWBtverrURUAvcIkX4AG2mmct422LGKKpwNDNcnkBfvh/XjD/vVGk7X2ApD9+Kc0XBTLZcw9btzh0GcoykbvukpCgOmtv+FJ0kF9XI/XA0pP8XNLKDANIhF1oOpRwfMUErwyioywi6g9HUTrqkvx1n5w6xzBfNF1OQIRS7WWS5c/NUOWnQ6X0Xy6fKnLKB6mv/UVrrnwg5QSOW+vddAisvAp5V4Iw+x7m3k+svbfq67NJQFEfae8dXbjntP0kPy0DxKw8OB8OLp4a1SfgPhdSnSFKNkgdnx2P1idwzuGp9CXKorbnqwwrI/u9f7tFMp9gjCpsb4sVKO8M8IaYLe8e3g== X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EwaseE9s+NUSL8CU3EXUvWArONyJrytczrsy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Tenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2022 00:57:18.9796 (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: GV2P250MB0801 Subject: [FFmpeg-devel] [PATCH 6/9] avcodec/me_cmp: Mark ff_square_tab as hidden 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: C8xlrAhDmnYr ff_square_tab is always used with an offset; if this table is marked as hidden, the compiler can infer that it and therefore also ff_square_tab + 256 have a fixed offset from the code. This allows to avoid performing "+ 256" at runtime by baking it into the offset from the code to the table. Signed-off-by: Andreas Rheinhardt --- libavcodec/me_cmp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/me_cmp.h b/libavcodec/me_cmp.h index c6de2d0061..90ea76c891 100644 --- a/libavcodec/me_cmp.h +++ b/libavcodec/me_cmp.h @@ -21,9 +21,11 @@ #include +#include "libavutil/attributes_internal.h" + #include "avcodec.h" -extern const uint32_t ff_square_tab[512]; +extern const uint32_t attribute_visibility_hidden ff_square_tab[512]; /* minimum alignment rules ;) From patchwork Thu Oct 6 00:57:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38575 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp885234pzd; Wed, 5 Oct 2022 17:58:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7lWDTRTzPP68TSZOKch17Z8GLiIuO8D+qOQdndIOsEikNl3giMMwxklYxOltBQaKlk5Ob0 X-Received: by 2002:a17:907:9711:b0:78b:db86:a92d with SMTP id jg17-20020a170907971100b0078bdb86a92dmr1837360ejc.107.1665017911302; Wed, 05 Oct 2022 17:58:31 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id he36-20020a1709073da400b007417c6edb0asi16580471ejc.402.2022.10.05.17.58.30; Wed, 05 Oct 2022 17:58:31 -0700 (PDT) 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=P6+Kxm0i; 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 A899168BBCE; Thu, 6 Oct 2022 03:57:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064095.outbound.protection.outlook.com [40.92.64.95]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 44C8968BB93 for ; Thu, 6 Oct 2022 03:57:32 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MGVwWvvWnQeOIkQA56ns2dRUEFwhf4WaWppjANXq5XHeNKsGw5skJi29UOV9EFsNAnuE/hzGaXO7mpJXrF49oQnA+CftQS1jFOAyy7zkTh7OrYMr6UfOI602Ihwj+UkScUgR6Q+D+PBF62c7h1EtTiwbBD9pBRdK+xc8z48JPfdPzTzZqPQwkxHgl3rHxJJaiyjJ1vrmYiRdcvvX/giAg59J5CI5I1LRUWZpQNToJapoVOxDfCyotXxPWIkPHHbV4/+9fY+QmpDOtj9aZCJWRJCjWWkTb+8v+yJLBDv/UwP2uehw3GDoALycQnCwhSx/7HZeK7+vlgfYTkifcreMSw== 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=PjIARGzEVqMqwiL26ddNRWJahn6FGS6Atz0txqDydhU=; b=fQTwH+ZgDMrNqYdZJYCb4J5g8MmGlfhyyLAMRVBSii2mN0hD/91rdDO9Df/XWpLS1hA3diT7XchE1oS+c6d2HXwWAEFp7Oxavr2yMthH5M/SbXb0ANgZ9y4I8cr2RoyEET4YkzmDG+WrF5KfNq6FNVDiX2C4wX3TFKvpjYkw5X13krmMzuSqTT4Gm1eOyF/IPBxqMldYB9kek4lfUXhyIHZfb6vHojaVF1+m08tEWtgBDKjWYo+v0o0QkFknB6g1kLq7WBpPTXY2sjYC6pmCz1FpX0nXAy9kexvAa0hsC30llAqTsmdbYCEmW5LXbl5N9Rp6/vHnP72ruUUq1CfRiw== 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=PjIARGzEVqMqwiL26ddNRWJahn6FGS6Atz0txqDydhU=; b=P6+Kxm0iuyrsdKNEzRjWF7ZbkQuNanHJCe39f4JkLvMW0H/Ed6kE/MNOItFQUwH/IGJ268F51LFBBm30UE6zMB6znsTRggbwG96MUihejhGOTOetM4JLYtOOk7Z5oB3ND5gxYtYtNLsAPdkxHqNsntKE+VEb/4u5yM2vwwwqsj3KPGk14rCvJ6BmgjqqGG5fe6H/efhQ/dML0jqLlONJ8YrXs+SWHrmxCReZMX/tNxoZVnwHKKaNQKtLo3XMHSEe/3BvgvJNIFfAoCOQ96iEka9vCqL1/Am6r68xmt7IEofS1uUU5Xxl988Cs4um44UXay54W/DEf9WQ7gIQop92ug== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0801.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Thu, 6 Oct 2022 00:57:20 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Thu, 6 Oct 2022 00:57:20 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Oct 2022 02:57:12 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [sso7P2449J2vNw6Jdko9fSHuj/dXYrcHiNi6ydmDDtk=] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221006005714.3530026-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV2P250MB0801:EE_ X-MS-Office365-Filtering-Correlation-Id: 12fd8655-9294-4eb8-60ee-08daa735b900 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqgQ4FT7B8ShVDNjokrWqh3TdArK1torF3td320DYFa9wwCdz1PpW+3YH72eEeqaZt8ZXCp3ixmpoB8XUvgy8kZJIWhdWKDBL95JsFFDMr2jL1NUO77/8by8eJ9zvicQNlSDT6YILZrSbwJeu7DHt4u0oBB8CfI6nBuSmLJYW/yOffjqjycY8SROs8DzNUfrijySBNJ7XFDtAkVWLgNVhJpSS6g94eokISz67Y3k64u2e+nMlNFbcZBSpUFS71XA7wRPVzwHYJk8R0m5IMJiRCXLJuDvJTYrz5XcUz+czQeABPJsnEv/qw0o4Z3wkGbM5835vhu4slwXFfw8a5QnzFPQcBwqTi5h258Lku1VH33iqAAAxfeOHviVEJT2HhTNsb9rTHz0Rksq/utqbSTdCBaRRW8YE5sLtsMWqP8yHPMSvnquYHC0aSkWdHT8cnjsPbjOFpib5M+FW8McYUShP1UJNGmh9Hg8hqJAO5rJ1h9WVSV9TO0UMj++TTfmFSreVdJJWTfjKPYkzAUgnTT/Gp/973nsT5AC72ey0mb/m6qjKvPaV87P0UrHq1DYjYQTiCnhtq3rq2XW0alaJjFuRsJ9AQGujzv77fXmDLBrd9Zvy+dh3VRu1r38bEjjak9VqUDgN2IfBaKFacfP7QqIlxbE4x7oaksJ4a5lgMsMQLeJzqu5vPN+9I+EPg+yCUGRJXAWbj1oH4DKgEqbY+WOluyBRf49ugpalnIXR21zR+tnLfW4MYuo3nfIN3Awng/yN8= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rXJHzMKlT9Q2YUkWYT3nGiNn5Mtp0amveX6rAQ7hlH1SKLG7p5qCD67pVy5r3hMMEm59rX77OlcYDHXMrpliSh7NyoV54dSBgk08af8xsXwcZfc22qgHuGrA8evI5x9TR3p6g4G8I1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d6T59vlnS5lP5FKuqyJqCOGRWILwilxS3EH/Cw8Ap3AY1n0bJ8L4yfAM0waesnMttms0j8M8B31xlx9YkOs0KKplHclTHXaOMLYW6dQTO8TW+oNNC1MwWlPYDhNviN3Ah7hX1anOL6rFgBLANNKBotsKk/Zi8cJ9bzl7wcQGN83Jaa8Tg7zH1hWkaHGdzqNc5oEak4ElSJhIttrf48gWofBQTTFgUY5v/D3a2NfvogwaIGt+rehy5av30nRpdgMBFGuiGk3/O1vR5BZ9E/YApuafrjMyje/n8WAslcpAlmjiElrs118ASRWBApAYOLTTllFLUNVIo0aAh5G28m9hf6gCGGa8lrhJSZWwdmDUjKQpCdJ0p1Uib7peymo+DIynxPcCtebSNkpSkQgDWNuZWnFpglvxdhecB1oG5ZD94WZ3urnJezQZRZph16OQ61a555NkJKtBDv4OLEkkK5qf8thRJiuphkW/57b9y64lPpkSVkJ58G3RRQaP1lg+M/he4FBptrinmzLm3/vLVq0PYjI/+0D4wpvFHbCTAK6vRNv2Lykr0PzsVKk+eK77ScvxeOpz1kgW55riSQiygRKv47xayGjGsydJXIyzTXpYcD9XSrw5+SuLUSPPX7S3CflSsJhst/U+HxvxSiPRqkZEdubRyp2TFCdfDXaA4DE4dIU3pFvKR8kqkCp+04EcopCnTQCdwOtI2YJbgthizYbolHIDO6IHpBHyQdE+u2Enu9iHj1pdfHurJz1R5gtcnafHOpF88G4cQKAUhtoptTWI0/PrYmlMTrCixAjHgWyDv40q3nfY/zoAyDFXokzcypQ09/Ki5Z1GNa/GQEqEqQIq1Q6pGDi9kj9032rWgO53bc X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12fd8655-9294-4eb8-60ee-08daa735b900 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2022 00:57:20.6980 (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: GV2P250MB0801 Subject: [FFmpeg-devel] [PATCH 7/9] avcodec/vc2enc: Don't use bitcount when byte-aligned 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: dWz8oUFzG3BM (There is a small issue that is now being treated differently: The earlier code would record a position in a buffer that is being written to via put_bits(), then write data, then overwrite the byte at the position recorded earlier and only then flush the PutBitContext. In case there was no writeout in the meantime, said flush would overwrite what one has just written. This never happened in my tests, but maybe it can happen. In this case this commit fixes this issue by flushing before overwriting the old data.) Signed-off-by: Andreas Rheinhardt --- libavcodec/vc2enc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 5cb6e0d198..82d11462aa 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -233,7 +233,7 @@ static void encode_parse_info(VC2EncContext *s, enum DiracParseCodes pcode) align_put_bits(&s->pb); - cur_pos = put_bits_count(&s->pb) >> 3; + cur_pos = put_bytes_count(&s->pb, 0); /* Magic string */ ff_put_string(&s->pb, "BBCD", 0); @@ -746,7 +746,7 @@ static int encode_hq_slice(AVCodecContext *avctx, void *arg) /* Luma + 2 Chroma planes */ for (p = 0; p < 3; p++) { int bytes_start, bytes_len, pad_s, pad_c; - bytes_start = put_bits_count(pb) >> 3; + bytes_start = put_bytes_count(pb, 0); put_bits(pb, 8, 0); for (level = 0; level < s->wavelet_depth; level++) { for (orientation = !!level; orientation < 4; orientation++) { @@ -755,10 +755,10 @@ static int encode_hq_slice(AVCodecContext *avctx, void *arg) quants[level][orientation]); } } - align_put_bits(pb); - bytes_len = (put_bits_count(pb) >> 3) - bytes_start - 1; + flush_put_bits(pb); + bytes_len = put_bytes_output(pb) - bytes_start - 1; if (p == 2) { - int len_diff = slice_bytes_max - (put_bits_count(pb) >> 3); + int len_diff = slice_bytes_max - put_bytes_output(pb); pad_s = FFALIGN((bytes_len + len_diff), s->size_scaler)/s->size_scaler; pad_c = (pad_s*s->size_scaler) - bytes_len; } else { @@ -766,7 +766,6 @@ static int encode_hq_slice(AVCodecContext *avctx, void *arg) pad_c = (pad_s*s->size_scaler) - bytes_len; } pb->buf[bytes_start] = pad_s; - flush_put_bits(pb); /* vc2-reference uses that padding that decodes to '0' coeffs */ memset(put_bits_ptr(pb), 0xFF, pad_c); skip_put_bytes(pb, pad_c); From patchwork Thu Oct 6 00:57:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38573 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp885186pzd; Wed, 5 Oct 2022 17:58:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5JihB1IkCvf1VaWyvOCuWcfpv0PEgTG+QuCqVAmGR39SZvDxcH7utHjB7HVBRpmaiRqqcF X-Received: by 2002:a17:907:2cf5:b0:78d:2790:b79c with SMTP id hz21-20020a1709072cf500b0078d2790b79cmr1853396ejc.73.1665017894208; Wed, 05 Oct 2022 17:58:14 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w23-20020aa7da57000000b0045919a1a07esi7919504eds.126.2022.10.05.17.58.13; Wed, 05 Oct 2022 17:58:14 -0700 (PDT) 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=DjMeryg+; 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 B550E68BBAC; Thu, 6 Oct 2022 03:57:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2069.outbound.protection.outlook.com [40.92.90.69]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A73DD68BBA0 for ; Thu, 6 Oct 2022 03:57:34 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HEqmf/uX9EaOFzFlzAEhZPwmb5vOIHt76rDw/ek1Xn5hy7RGCZnYbND84p5yMDswvNs0bf/1OitN0nR5Nx0RFoFN1LMrIEQAfDAkSS27BrNAWyEfpCNV+Old2ZVK/dgG1PQzni3JxmIhYco7yNh6RqrKrphrIO0V49S517Na9xyHgFz5DM+qqdOhxWtLfoGHPfFnZdlBpbUTFFoPu6PdJprTsyeqAOA54upNqrcYtt/w3lXm6vHV8Zyiif5NJeRD1Xp7CQhWeEwI8Hg6E5i2OvxtZbfKZuF+PDonlQTry+Y+7QyfhzHktlutXpGunnwg61/xUpiWOiW9Lh2+8ULHdQ== 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=iXKmxxBGuV1rrC0/IvuZKgBsLLEtCR5uxuUgGE57K4o=; b=RCZ52aq5JjOeAZtd/8QUZJMCYvfFJPCtj+rHAy30noypfFv/wgvFSz+xuh//X1xwl86NF+S4xfqvMHZX7ckKJpA+d2XB73VDyvDt2jPWztkzZZxd/DPlxhbQoNKoHBMmyMfgrhuwImhR48s7IJARZ/GYSY9NA4U3+mTB4e6IQFlH5ryb3NJljpDcHLnw0wXHMAlOvOrbUadoA2VdnUMTlP4rDWcDen2o0DcV0HtH0xa2jG2sf7jDQKpeQwANl2F2tFGa+HJ37q1aslIlduWA9rSH/m1kdA2NHAAKNqWlmzNLsrzKlHd8Lt9l6kHQmHHMN6XVb4Wx6r5XtHoNzUxOXQ== 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=iXKmxxBGuV1rrC0/IvuZKgBsLLEtCR5uxuUgGE57K4o=; b=DjMeryg+SaZMTBwUl8IxaaT5SM5vupOe+fVnS9cqnOmg9L49Tkl8gZfAKF+q2yS1rdUefuI2fHVAfpRBQhqCRCyutWNjJes7/70dNY12gdlOWmFDiL9lgblEaqCGNqYN8vTYFoueydJXZ47zCGZBBeE1qPSEDAnRgxFFwfW88EgFUcn4wR8AO5KvXeDFmxun+GX44sX+v4yAbSCNctE0qP0MpaBotKtGfN/A3Tg+Wceq+4ojbRNq+w7G7jx8FOCXOme3E/9qBJcsHZhBTLfSzymxJ/AQj2iAilqL8id9XngBs/dmXl3dDb0hQmzXzth86bhLPCfFcuoXQU3no2X2TQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0801.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Thu, 6 Oct 2022 00:57:22 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Thu, 6 Oct 2022 00:57:22 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Oct 2022 02:57:13 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [LFdgO7QCquIJr4d72RS2E6VCl2Uy4nAK75D5+XsrEVY=] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221006005714.3530026-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV2P250MB0801:EE_ X-MS-Office365-Filtering-Correlation-Id: 66fbd65f-be6b-49d9-8496-08daa735b9ba X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqgQ4FT7B8ShVDNjokrWqh3zJkwAGTD/j/+mg/ofxjpge7J+7uc1E8/KNoqfBcsdqBcdCdZ7yh0A5pUVrrd4EJ1AwIv6aD+QDnRWV/5FehyMdb23FpvD0/N5Kv/Qfhmlev8U0qr8micSFHwdyO2E98usPlSmIw5zor2ji2fDD0EZRiKOers6zZbEhE7h/grnQorI2eJYFOe38KKW3e7oXHXRdvgnW1vg2tEf6u+HGeLJsj6PH8qzX9K1fEsw7SUXPQ5vqfcBc7KeAqgqEb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WQjD+9G5fNM4dr/ZnbQyvHFy5I0HWrGsm76qWZqXWaXHwc3+C2+WGyrgNeO/wN413LCI0nqfldw5hUO/xs0AW95mJGvTliwIvVMPA/GEt8lL/muUTsh8+w8YBx88rNZuFE1rpEcz/3XGQ/6Rij7/11cTIOzxkPlHGFXUWiulgke3zQNim1hG/E+pdHzTaulpT8H8qpCBU+2SpexpD981FAclrpFyZtXJNIRIkaMiFYM8VZX+5Hg7JvWwO0vy0R+KV2g09jfi/BtEk5Xs+Y4WrTqSGgs2U9EKiwQCD5wD96FytXJp4m+nIOjr37XJurSGJIoECxJYwRjOa01cW+X+NlCfYV9rfOZyS3CUuP2LFX8ZgfX5RF5MVyk6+FrpF8+ZQ/kAWsNavA+VuBEZJQIFJLhOEms9vLDxyd//Tf7B9Sb9YLP8T9JBOoqm58sr7Iw2swAtp/NoZPHi3u7g0QoND1/auiviTosFgaE+zaCK5x X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66fbd65f-be6b-49d9-8496-08daa735b9ba X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2022 00:57:22.1210 (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: GV2P250MB0801 Subject: [FFmpeg-devel] [PATCH 8/9] avcodec/speedhqenc: 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: Fgz7VWTokSx7 Signed-off-by: Andreas Rheinhardt --- libavcodec/speedhqenc.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/speedhqenc.h b/libavcodec/speedhqenc.h index 5100bb2d34..0c52e6a380 100644 --- a/libavcodec/speedhqenc.h +++ b/libavcodec/speedhqenc.h @@ -31,10 +31,7 @@ #include -#include "mjpeg.h" -#include "mjpegenc_common.h" #include "mpegvideo.h" -#include "put_bits.h" int ff_speedhq_encode_init(MpegEncContext *s); void ff_speedhq_encode_close(MpegEncContext *s); From patchwork Thu Oct 6 00:57:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38574 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp885219pzd; Wed, 5 Oct 2022 17:58:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Okv2UpyE61vq6K/ESKzPV3Nb7ARYn9F4RKt/iLK+wuCN8VkVCNDN5TzJp6CkE+7Uimaee X-Received: by 2002:a17:907:c25:b0:782:9dc8:eef1 with SMTP id ga37-20020a1709070c2500b007829dc8eef1mr1884274ejc.667.1665017903036; Wed, 05 Oct 2022 17:58:23 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f16-20020a0564021e9000b0045856855250si17284941edf.256.2022.10.05.17.58.22; Wed, 05 Oct 2022 17:58:23 -0700 (PDT) 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=iHJdlNQu; 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 BD67468BB88; Thu, 6 Oct 2022 03:57:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2069.outbound.protection.outlook.com [40.92.90.69]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CB02668BBAC for ; Thu, 6 Oct 2022 03:57:34 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZyJlQhocoZa7sdMvRTd78fLAazmJYl4IU4OKbFEKYDuV/BqgidU1EwbY1DrTuM8j++pa7ycYNLekxquE2o18oDHU8fYnJ9/dmXqDtpCMnywu3tIn2zmrkuQu+R2fvfqkYCDFg3gBXFVfqKF3LhUi0r9q6/F+01rFLtVQ9z/HXupdv9hj/j48IU3Q6e0KfUe4ZHbgtk60bS9WgLBUJFO+5RSOzbpJqNzSrxX8HvssBf+K6rfMs1qeybS49Tx6UVdKpCiGpMf/tC8tqh2Miz6NoznYru7ZHv8tmpGkSRGi9nGMjnEwOQAjFDsr/ssI/+AqvckXgBkolXa87+BgwpE63w== 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=f8TccDuLjDTp8HK134LlFlSLv8MXJ0k2GldFOI9qeQM=; b=X8pqFKo311MueEC41nqfhbP6e0LsUlUSU6CpFDtG/kivyoblkw95tuIBw3T2VQulTg1/7rBJ3r74DPUfYb9wv3d2b2c0ujYqe4LHGkES/Thtn0gvEVilsloQY931x/Lg4eGYM43KAg1NJJN80uOhYHFMdHH0gEVDJPNlAc5XvEsIFvH1pyI21h9Jp6ZcgKDSm8Qsq6/U1P8yh1K6kxfK4A8TxEjBLGdulGW1kMBWHOufDS/wf7sR7fk1L2ifxozJ+YS/HCduLmw/EYXXxMGpo+GCf97QTndYM08Z7qTVFxB+yDstFkNMaSc6mMX2FPmO9lYpiil/O/i17evc+XaTUg== 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=f8TccDuLjDTp8HK134LlFlSLv8MXJ0k2GldFOI9qeQM=; b=iHJdlNQublf3KyVUPc+Nkus1d4RuvM6+yUrwaGtZEqzpmJtY3T+qWo12u8rSLQbO5W2B4xauTPb/7h4Fin/6Ke32q1Hc3kLLkKNgyQae480L37ZpccvHr3doLBkE/5PSmXUu6R7ayJe94P/P/34yG+0WHIn8XX61KtJ7VNOsFv3p6D92TQueskW/Up10y7XHkk4jwWaWr1XHY2HQ0k2n2WWngcBucmd/ozzB6ogfNu+1pHf7FGorXplrlFHbYdWbdOFcQPddwS0QykwipT8yaqNxzf7bQaZx5Ce/Idg/0Xuv309BJhWyp4zyv/DHNbwSj68J7fJylO48cBGkf10kbQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0801.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Thu, 6 Oct 2022 00:57:24 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Thu, 6 Oct 2022 00:57:24 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Oct 2022 02:57:14 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [St2i8tyP53zmfukrc4nfzhlJcmkOqvwmaJgK5ZFdxYU=] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221006005714.3530026-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV2P250MB0801:EE_ X-MS-Office365-Filtering-Correlation-Id: 9abcf374-f80b-4c14-c57b-08daa735baf7 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKxN7rIWGehk/7luim5jgmug6T7NHWO8jUy91UHtaHbnGYi3GYZwtCMEB++TgS0T/WvMxBJPSwhWRxGDJKgHaq9GhoFQus6oela8MK0gxAmPrji+z3R+UBvf+SNScMx5S7ozVPrC504WH/1kX3ppLVYipaOaUUXedmkP6bLGtdWDpdsqUTwGfBVJbgsodUfuD+jNbvMIJinHdwTxYdgAmTWvVXWXl1j0D4df4KeGw+Y1ToGNKY1DgXQhLgSu7CDaf2RDJbpSIfJxkM5zA0et7aC1FWByK6ei9WkI1FuRehyW0sNTVslmTds0/+v/57/nsSZprbfia/+wJ7qAO2CgPrToRm6InsijmzcPIomCE3BLmTzuokQwFKvoXUYWUvKa9RLt6HZv6dYbM2UsgNIII3C/kylQ6YZ9MLSbStWNWCviylYs1EPaPFH/ueBPuMpJ8lwWXcOnOlpATJgGGFGI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hRXDqiTkiP4mObPw2pAyHrTShmIju0PInr0Mkvw4iohTaXGnZhrmLdJT4/pyQMbtPI/rMqGOlwr3F9WvnyIPivYkpDOQBVYHyXSFfmRK2GY9HJCyTGaAw++8f0GGMeQBJ/zd//bFoUDngKRy9TBz5nkEwqnFDEUJOuAGppTEXNjLzI3exdQNkgByfTCzJRyhGMo5G+w+aB+2oqHD5z0SUR0QJaXPcqCndXVUcB/9KcvhiA7tg13FCfMZ2AIMvGhJjbCpju2oDx+AsTT6L53ZU7Q44 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9abcf374-f80b-4c14-c57b-08daa735baf7 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2022 00:57:24.0438 (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: GV2P250MB0801 Subject: [FFmpeg-devel] [PATCH 9/9] avcodec/mjpegenc_common: Don't flush unnecessarily 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: c1yR0HcMdXlb The PutBitContext has already been flushed a few lines above and nothing has been written to it in the meantime. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegenc_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c index 0076e94296..c37c964931 100644 --- a/libavcodec/mjpegenc_common.c +++ b/libavcodec/mjpegenc_common.c @@ -423,7 +423,6 @@ void ff_mjpeg_escape_FF(PutBitContext *pb, int start) if(ff_count==0) return; - flush_put_bits(pb); skip_put_bytes(pb, ff_count); for(i=size-1; ff_count; i--){