From patchwork Sun Oct 2 00:06:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38499 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp527057pzh; Sat, 1 Oct 2022 17:06:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5d3pf/VYR1hyXbVdjrf5n9bLOqvccmQiNa+zVlYYvjP/1P+wr/kH9b8SkVCfGCpENZMfDb X-Received: by 2002:a17:907:80d:b0:73d:1e3f:3d83 with SMTP id wv13-20020a170907080d00b0073d1e3f3d83mr10705562ejb.372.1664669191719; Sat, 01 Oct 2022 17:06: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 k14-20020a17090666ce00b00741d9a1e2dbsi4113830ejp.1004.2022.10.01.17.06.30; Sat, 01 Oct 2022 17:06: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=dHXruYkM; 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 983E068B9C2; Sun, 2 Oct 2022 03:06:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2026.outbound.protection.outlook.com [40.92.89.26]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF72568B9C2 for ; Sun, 2 Oct 2022 03:06:21 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bQ1fk+IfgRJI3HMpSCUjQz3ZLgAjD9Hn6YcHJ7Mwwj/tenBOUECWTmZBEjQSjPPBgK0ZDPnRTDV5vMd/BqeZNcTTaSS+xcjiSxn/WomYlj29UW0CKYizqDX0wOntA163DRnCbngefG0YDdwrvC20P4wVNXWPgiNLLCaK/XNw3UuVcAMza0A4qi0evGYO4DkUcOE3irnYfCYR7G/UflpvrShpOufPWh6GIUe2dj/ojdpmRPw7GIZvzxouIuir59lknHykvmspkRHfup2QcXaMHAhiikS8y7VTSFY3NB7ZtmtLT4trLKerDyYgZaBiuwzCCnfQ+Gh5Ne0r5upHatP2LQ== 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=0WsoXjtzF4zTUeSD86o1JGP1YhCn1Yxdx21p7aXOlZc=; b=lMY/CUb1wwg/GpwXmhwazmqhIjaStWEIqFeRizpjYXZRiyjIQGD0m8sxNxwgNIX9feGUH6wwSJvhESK+HNvWL+aL8lYGYut/Cd6aGiE46AAF/UlzMVQAbRg3rpsFKEwtzG+xOKIrXf68CUkPEzYCrTa9EnHmVLJD9YACsjybpwfbKp+qvRKYGRLSsSFN6hkXm+axv3YUq4yLgoA1s25LHt7eVbnVGP0k+zn+bsCe5RWo4AwKZbY90RWgVbtzGB4rk4qbb3RMvD983E6ukdZB8wuNXa5PpZYDKtkkUmE8yK7EJ2FLhQMBpUGifREqfJQr6hfdJjbMNMg7WJFPWLEYpA== 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=0WsoXjtzF4zTUeSD86o1JGP1YhCn1Yxdx21p7aXOlZc=; b=dHXruYkMXUPmk+u0XtsKRe4M/IrZz6nV3czWLlwcYEdfaY99/WO9UDesJyyzJrewRIeaOShmHz6Bv0EufQMqHndkGMC860pro1WrBMxl1FH+MjlraNA5xZeA3+GljwQhXqjVHyGzl36MZLXCKzjCl4Bh5j/YMfMY2DP6jSRhdXccct+Rhl9/FWemq0mnDI0ewQT3j4RTbIiQGlArpL6XU2K6Upjo9jXFfiyj5Lus0akmytYrTqXHZ3HMvaZJAfGNZgkt2RWNnRHF9pAwrbWzyVe3kvlpEcGblkr7ZG/3MmU09T7oKpqbyT/OP5UiIpTkdcbrUtKuYTdOmsXoR2npIw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0997.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:d7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Sun, 2 Oct 2022 00:06: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.023; Sun, 2 Oct 2022 00:06:19 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 2 Oct 2022 02:06:05 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [pD5I6Ng9Pe4HJPFmmXyKEzddgF+3v/Jhjk3up1bTxDQ=] X-ClientProxiedBy: ZR2P278CA0010.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:50::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221002000617.469194-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV2P250MB0997:EE_ X-MS-Office365-Filtering-Correlation-Id: 3307a413-e679-44bf-c1f2-08daa409eee4 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKx7KypBKN6CnruNpK5hV6MtjxDdSzi83JwzaeEqQgwCuSoum7S8fCS9dV3+Rdkmqa7fvKd8QA8rEaB+QaXk7xqhMLgW+SZswp2IoaRMCo04CjEgy54cRW2tv74akU6b1EIH+MObo01U/ieMFuu8/0XdjzIhmrBocKCKfyOjCEX94EmqyRsuBK0DqWK39kH3iANJ0+hkGS+CYAB1b6j/GvrAGqeTh7OmK+pQakp2m2SlDKfs/gp8pW6/6FODzwVQFLB1aMcUnn+yTnqZDLHIPnWkeZKUqr2Vq2gHdLYiN+XtbenCInA/lC7iq19+JeoGGGel5uNGEOIcrLRFRcIoheZ+fJijvCSxnBmDGhHs5YVOtE+G2HgaLzy0VVz8MxCssBP9jUvAq9Dm8RzEIbIsHS1tXCBh9bygpJN4PPFlpAxZJxBJ0n/wGvWxFhhMoN/OmOwBkPgJ+mLA/PqCDi1tiD2ZKcZqmZts1QX6W0UosSa+joZ6qWxM83Mkki5d3kgccuPwva2Zq8e2atcV0uMb1r+AB3E/JR7XJOXucXolrE0VetrP6WqtfJlsIrhDSxUrxNkvXfv4908gRjtBPb3WY7x7P7JDRsbLrn65gH1P3wZDZ3tD39xig007EKJZlO5enFSttDeCBH5h2KYYkzKDfK+uByGMYPG7Gf62A1sYzDdxRDy8gmvwFSrrrwDwFa/FlccablsXDWw7zhnQmCwTOxMyTx+qtwdQNLA= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-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307a413-e679-44bf-c1f2-08daa409eee4 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2022 00:06:19.7695 (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: GV2P250MB0997 Subject: [FFmpeg-devel] [PATCH 02/14] avcodec/huffyuvenc: Remove redundant casts 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: uOmhUVTs64zQ Signed-off-by: Andreas Rheinhardt --- libavcodec/huffyuvenc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c index 2d63b12abc..d159d5d309 100644 --- a/libavcodec/huffyuvenc.c +++ b/libavcodec/huffyuvenc.c @@ -333,20 +333,20 @@ static av_cold int encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } - ((uint8_t*)avctx->extradata)[0] = s->predictor | (s->decorrelate << 6); - ((uint8_t*)avctx->extradata)[2] = s->interlaced ? 0x10 : 0x20; + avctx->extradata[0] = s->predictor | (s->decorrelate << 6); + avctx->extradata[2] = s->interlaced ? 0x10 : 0x20; if (s->context) - ((uint8_t*)avctx->extradata)[2] |= 0x40; + avctx->extradata[2] |= 0x40; if (s->version < 3) { - ((uint8_t*)avctx->extradata)[1] = s->bitstream_bpp; - ((uint8_t*)avctx->extradata)[3] = 0; + avctx->extradata[1] = s->bitstream_bpp; + avctx->extradata[3] = 0; } else { - ((uint8_t*)avctx->extradata)[1] = ((s->bps-1)<<4) | s->chroma_h_shift | (s->chroma_v_shift<<2); + avctx->extradata[1] = ((s->bps-1)<<4) | s->chroma_h_shift | (s->chroma_v_shift<<2); if (s->chroma) - ((uint8_t*)avctx->extradata)[2] |= s->yuv ? 1 : 2; + avctx->extradata[2] |= s->yuv ? 1 : 2; if (s->alpha) - ((uint8_t*)avctx->extradata)[2] |= 4; - ((uint8_t*)avctx->extradata)[3] = 1; + avctx->extradata[2] |= 4; + avctx->extradata[3] = 1; } s->avctx->extradata_size = 4;