Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2985625ybh; Sat, 25 Jul 2020 07:35:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzOQWA6E2639qod1ajaDSIxSLLSG7+LucQJrEEhOvmuCVkhsWyZu3FyT7/H8ga6JaGALRy X-Received: by 2002:a05:6402:3048:: with SMTP id bu8mr14055579edb.367.1595687735857; Sat, 25 Jul 2020 07:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595687735; cv=none; d=google.com; s=arc-20160816; b=xI8aau1a9sStL0sive4c226h4s6Ztjg5zDugAfOOb8j3Zd/rt78NzRKCyadFSRFubu 0M67+xg72QvOdqW814cUrFW3V6LuMO95qyhbus6OVTxfvgk+HXzzG9UsO58UbJY5Q5Vy lLyFVAZCOY0ErSTCsbyX1UVB8MhGqfe7yMGupPB7Yif1KS1ZvzYHQAjaqW+C6U144VoW iGqoLHxtXSzGsPbHR7aHuPCha8kBIOjbs0+dnz6z9VxrwAZ7p7NySk+o5hHwh1Yayn1t 6scNL81da9l9ofz8dRGJKsBF6GCXlVRRgADj/kVQsN2EOhJ09oYpjCf4yjniSYbijbeE 6TQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wrDqlxNNVLuF8POl1GDyeWkvGNEXgQCKCSRteLM6tS4=; b=DlBt9POQdv+aUNB6+F19Zquqe6JpEme6XTLZJON2DMGeW7oYYXdXt5L7q25dPAon3Y 3rLn/AiMTaP568KU9RMbx+1uX8py7sQKjj8k6b0Z5qgxaA6ZVxvmMvoA6u3x4NN6go8X szqmvIixbVSgkJ1Grin/XCBTNboWLI//uoccLID9QKC8Z9qsuCkgC/cLd9H2AXg+9C3V 3FpSP46RxEtcWLySWGExfV7eAFBOnJqyB3jC+PPIH7eNAmUuAoREkG6bZ1W1p3x7tt8s d36YMg8oiQCfOlEnQbK1vGpxUr7q651kvmktLemibWuAKjERmaqgq1XR2l5K1N+QDPAr wUjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="m/mqefN5"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si624063edn.359.2020.07.25.07.35.13; Sat, 25 Jul 2020 07:35:35 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b="m/mqefN5"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727771AbgGYOeS (ORCPT + 99 others); Sat, 25 Jul 2020 10:34:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbgGYOeS (ORCPT ); Sat, 25 Jul 2020 10:34:18 -0400 Received: from mail-oo1-xc42.google.com (mail-oo1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FC44C08C5C0 for ; Sat, 25 Jul 2020 07:34:18 -0700 (PDT) Received: by mail-oo1-xc42.google.com with SMTP id r13so853144ool.3 for ; Sat, 25 Jul 2020 07:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wrDqlxNNVLuF8POl1GDyeWkvGNEXgQCKCSRteLM6tS4=; b=m/mqefN5jqg+eR2S3kGzASpiUbbyyR6SFj9m2pkRIXzdxs9BCmUDKOeq0H2RmV9p+y g2sB24A7EDA5B66T9zEQOagrTmm8RbfOZDLfQACKwZ9YInx2Fzxp7CWGbLkVMjB/uf+n 1HYeToPIeOghavqiZEX1Aecbx/mqCSuMVu35A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wrDqlxNNVLuF8POl1GDyeWkvGNEXgQCKCSRteLM6tS4=; b=sFAF/NSiByFb+bhMyIVp21y0/tPdUrDd7XiSHcJeS6hL1s/XPMgleGFeyJW10SArL9 VYjrPTcvGUFAqvXApvahqW2EZ5fVwz9CGWhajEG5//5xfQSKvedicvCAoDYT3uOEeSSC R/IBsPzAvcl65CEziayLPcunkS6GO6s8/7VYp+JHOswqUe5GStnaQoXZlE3bpEmD1ktP CU9MI7Ed2OCjgAHRJpHgFvcdtfK9D/AsGmsjL9e8jD+29pI6Qxe0O++1o46d1Kt1JGbf p9iM8IlraE/fNZniuR1dOjXwvgBPneYA661KSCJFKgLCbhN1uQP9V9aZR4KIfO9rlaR+ mQVw== X-Gm-Message-State: AOAM530cAZ84WBBZ6R4uLrvPM6dNRO2o6W1HYmQFTJRotcllu9ZAqGYH LsysgPmLXZO7GSmrGVHrQOi9CSSUwEM= X-Received: by 2002:a4a:9e05:: with SMTP id t5mr11322583ook.76.1595687656325; Sat, 25 Jul 2020 07:34:16 -0700 (PDT) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com. [209.85.210.44]) by smtp.gmail.com with ESMTPSA id j16sm868990oib.35.2020.07.25.07.34.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Jul 2020 07:34:15 -0700 (PDT) Received: by mail-ot1-f44.google.com with SMTP id n24so9128383otr.13 for ; Sat, 25 Jul 2020 07:34:14 -0700 (PDT) X-Received: by 2002:a9d:5609:: with SMTP id e9mr12808433oti.141.1595687653817; Sat, 25 Jul 2020 07:34:13 -0700 (PDT) MIME-Version: 1.0 References: <20200715202233.185680-1-ezequiel@collabora.com> <20200715202233.185680-9-ezequiel@collabora.com> In-Reply-To: <20200715202233.185680-9-ezequiel@collabora.com> From: Alexandre Courbot Date: Sat, 25 Jul 2020 23:34:00 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 08/10] media: uapi: h264: Clean slice invariants syntax elements To: Ezequiel Garcia Cc: Linux Media Mailing List , LKML , Tomasz Figa , kernel@collabora.com, Jonas Karlman , Hans Verkuil , Jeffrey Kardatzke , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 16, 2020 at 5:23 AM Ezequiel Garcia wrote: > > The H.264 specification requires in its "Slice header semantics" > section that the following values shall be the same in all slice headers: > > pic_parameter_set_id > frame_num > field_pic_flag > bottom_field_flag > idr_pic_id > pic_order_cnt_lsb > delta_pic_order_cnt_bottom > delta_pic_order_cnt[ 0 ] > delta_pic_order_cnt[ 1 ] > sp_for_switch_flag > slice_group_change_cycle > > and can therefore be moved to the per-frame decode parameters control. I am really not a H.264 expert, so this question may not be relevant, but are these values specified for every slice header in the bitstream, or are they specified only once per frame? I am asking this because it would certainly make user-space code simpler if we could remain as close to the bitstream as possible. If these values are specified once per slice, then factorizing them would leave user-space with the burden of deciding what to do if they change across slices. Note that this is a double-edged sword, because it is not necessarily better to leave the firmware in charge of deciding what to do in such a case. :) So hopefully these are only specified once per frame in the bitstream, in which case your proposal makes complete sense.