Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp782017pxb; Thu, 5 Nov 2020 12:53:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEU/1+g3gvhsdcMpOdvLn7vo8Hn7xjr7R5Jl/ALAMiugRGQ2OTkMQmjuqL93bTi9AdQyIm X-Received: by 2002:a17:906:c095:: with SMTP id f21mr4401117ejz.108.1604609598418; Thu, 05 Nov 2020 12:53:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604609598; cv=none; d=google.com; s=arc-20160816; b=Ji4fqXrTcNc9PZwSCFimwKRiRwYua16hVm96WvXIoVpPJydKtVI35LbR9lwFASd/8H 8c7yeqYJoxiibZo22uNPdH9PNaeaLd4fLYepjTr9bwJR++ZgehqQvcmrpak7Hqp13Ycm ivAg+CEECOqDChAJ79guQIJCdIDsOTkrRyHwtOYkRm/AWeCZUdXxl8SexjPjwf3agV1c arGbckCXvET+Erbez1wZCC6TE3Yu54YQbzmONWQUVJEHm/0R2Fak0so/PPT2ANp1MGQ6 8FzglJsrOnlUo45aZELjbVlGfF2oSP5UleAytVg5e9hwjjG7sOAUHOtdQIDiMKAeo7Qk D4+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vl5RtrQW+bI4RjvgMXoSy1NwumZ/wfkl4NwBg2V7Esw=; b=KTw98CPUkRzOoQkMyNzQQhS6X5VcXSvO2HvdFdHXWESt82eKgiK7up5VSSJmCwKJ3f sYFQfccuxf6dh5JkuoSGPNBF+zwrc1m06ojMo+9kIMey9CMaAYZ5MNTj5sE+qMqB3rZ/ IegMR++IujMBohYLD1vO1FuiFClkXDdDlCxeSshxdJKyzY1kQhQiAchKpMaQiHu2DgcM rgv+rzuqV+YUSxCm4qbYPzwrcA8qz4XGzyHPkXcmsnyEt2c7FzRr/EGfNNT1YKFa30gt 2XvxJVMQ32yAxA/IsYoFyAfTZuNFFVZY1XGtbd/pHEYDFrJxzoKyS0t+NqRbP7LC1Yux rIsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d3si1965214ejc.49.2020.11.05.12.52.54; Thu, 05 Nov 2020 12:53:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732120AbgKEUv3 (ORCPT + 99 others); Thu, 5 Nov 2020 15:51:29 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:52278 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731060AbgKEUv3 (ORCPT ); Thu, 5 Nov 2020 15:51:29 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 15F8D1F4662A From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@collabora.com, Jonas Karlman , Hans Verkuil , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski , Jernej Skrabec , Ezequiel Garcia Subject: [PATCH v2 0/3] MPEG-2 stateless API cleanup Date: Thu, 5 Nov 2020 17:51:15 -0300 Message-Id: <20201105205118.178458-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello everyone, Following the H.264 API cleanup, and with all the lessons learned from it, here's a revisit on the MPEG-2 API. The biggest changes are: * Drop slice size and offset parameters, given the API doesn't seem to be designed to work per-slice. * Convert all the 1-bit syntax elements from structure fields to bits in a bit field flags field, following the other codec APIs. * Split the sequence, picture and slice headers to separate controls. This is build tested only, I haven't yet modified the existing Ffmpeg-based implementation, as I'd like to have some consensus first. Reviews and feedback are appreciated! v2: * Fixed bad use of boolean negation in a flag, which was fortunately reported by 0day bot. Thanks, Ezequiel Ezequiel Garcia (3): media: uapi: mpeg2: Cleanup flags media: uapi: mpeg2: Remove unused slice size and offset media: uapi: mpeg2: Split sequence and picture parameters .../media/v4l/ext-ctrls-codec.rst | 159 +++++++++++------- .../media/v4l/pixfmt-compressed.rst | 5 +- drivers/media/v4l2-core/v4l2-ctrls.c | 59 ++++--- drivers/staging/media/hantro/hantro_drv.c | 10 ++ .../media/hantro/hantro_g1_mpeg2_dec.c | 82 +++++---- .../media/hantro/rk3399_vpu_hw_mpeg2_dec.c | 82 +++++---- drivers/staging/media/sunxi/cedrus/cedrus.c | 14 ++ drivers/staging/media/sunxi/cedrus/cedrus.h | 2 + .../staging/media/sunxi/cedrus/cedrus_mpeg2.c | 49 +++--- include/media/mpeg2-ctrls.h | 153 +++++++++++++---- include/media/v4l2-ctrls.h | 4 + 11 files changed, 395 insertions(+), 224 deletions(-) -- 2.27.0