Message ID | 1377829038-4726-15-git-send-email-posciak@chromium.org (mailing list archive) |
---|---|
State | Changes Requested, archived |
Delegated to: | Laurent Pinchart |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1VFEHl-0006cB-HO; Fri, 30 Aug 2013 04:18:05 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-6) with esmtp id 1VFEHj-0007f4-4z; Fri, 30 Aug 2013 04:18:05 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755416Ab3H3CRx (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Thu, 29 Aug 2013 22:17:53 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:41453 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754297Ab3H3CRw (ORCPT <rfc822;linux-media@vger.kernel.org>); Thu, 29 Aug 2013 22:17:52 -0400 Received: by mail-pa0-f54.google.com with SMTP id kx10so1703112pab.13 for <linux-media@vger.kernel.org>; Thu, 29 Aug 2013 19:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4J1FTQpCbCkI5ycu2kTStEs3p5zBc9sCMepnEey1WCs=; b=FnBg2XW4vvJWJYoGInfSyg6qcmpn0sKQ+0dgT0BFANDDjQz7ROGraGDgFj0iAEYHwD k8DTsgUXEh0J98qRsuEPay/cUzwPrRBg5hRnl64giSsfU2O//yNdY2nKEZgr2sQkH9wt 22VW1EpbWbsoEdXWY5UbszCV6hp6DPNjOzJ2w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4J1FTQpCbCkI5ycu2kTStEs3p5zBc9sCMepnEey1WCs=; b=IuRK02RDuLgKqkjQpN4C6cW2+jQsM89lpj2QA0lz9CDByzqfqbGDgk5InR3+u+BFgt tzkqElI3ei4Ys0Q94AU/1j9IFytUsjrwWWX5Ck6GAEEvViAFKSs/k7ihah0h5ZJ0a7t6 wZuMELkrX/D6YumGzal3lan1W9tKVqq1Uy1pivy95XbUv5ss9wqZ8lqxL64ygJuwWILW +tFXkeNsSXZQEGyH8Hm6f5tI6AvpoWyCcu7Br+A4mhV6LDZah4fjqdznEzBH1tddE59O IF+QkWyhXR9A3KWWehA9J8oBPSjzIVFE9PWFnnsjV43+6CfWrdRAViMM+a9HSfBd9Fwv b0VQ== X-Gm-Message-State: ALoCoQnRWr5eFTus+snT1PGJeWS7IxvbJwgLGjWvRKqXzYtq0DNlUYWJLUbHhOwLSzSstM6/umrf X-Received: by 10.66.161.229 with SMTP id xv5mr7783601pab.87.1377829071364; Thu, 29 Aug 2013 19:17:51 -0700 (PDT) Received: from kawagoe.tok.corp.google.com (kawagoe.tok.corp.google.com [172.30.88.114]) by mx.google.com with ESMTPSA id ye1sm27935254pab.19.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 19:17:50 -0700 (PDT) From: Pawel Osciak <posciak@chromium.org> To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, Pawel Osciak <posciak@chromium.org> Subject: [PATCH v1 14/19] v4l: Add v4l2_buffer flags for VP8-specific special frames. Date: Fri, 30 Aug 2013 11:17:13 +0900 Message-Id: <1377829038-4726-15-git-send-email-posciak@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1377829038-4726-1-git-send-email-posciak@chromium.org> References: <1377829038-4726-1-git-send-email-posciak@chromium.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.8.30.20624 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_1099 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' |
Commit Message
Pawel Osciak
Aug. 30, 2013, 2:17 a.m. UTC
Add bits for previous, golden and altref frame types.
Signed-off-by: Pawel Osciak <posciak@chromium.org>
---
include/uapi/linux/videodev2.h | 4 ++++
1 file changed, 4 insertions(+)
Comments
On 08/30/2013 04:17 AM, Pawel Osciak wrote: > Add bits for previous, golden and altref frame types. > > Signed-off-by: Pawel Osciak <posciak@chromium.org> Kamil, is this something that applies as well to your MFC driver? > --- > include/uapi/linux/videodev2.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 437f1b0..c011ee0 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -687,6 +687,10 @@ struct v4l2_buffer { > #define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000 > #define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000 > #define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000 > +/* VP8 special frames */ > +#define V4L2_BUF_FLAG_PREV_FRAME 0x10000 /* VP8 prev frame */ > +#define V4L2_BUF_FLAG_GOLDEN_FRAME 0x20000 /* VP8 golden frame */ > +#define V4L2_BUF_FLAG_ALTREF_FRAME 0x40000 /* VP8 altref frame */ Would it be an idea to use the same bit values as for KEYFRAME/PFRAME/BFRAME? After all, these can never be used at the same time. I'm a bit worried that the bits in this field are eventually all used up by different encoder flags. Regards, Hans > > /** > * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri 30 August 2013 09:28:36 Pawel Osciak wrote: > On Fri, Aug 30, 2013 at 3:42 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote: > > > On 08/30/2013 04:17 AM, Pawel Osciak wrote: > > > Add bits for previous, golden and altref frame types. > > > > > > Signed-off-by: Pawel Osciak <posciak@chromium.org> > > > > Kamil, is this something that applies as well to your MFC driver? > > > > > --- > > > include/uapi/linux/videodev2.h | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/include/uapi/linux/videodev2.h > > b/include/uapi/linux/videodev2.h > > > index 437f1b0..c011ee0 100644 > > > --- a/include/uapi/linux/videodev2.h > > > +++ b/include/uapi/linux/videodev2.h > > > @@ -687,6 +687,10 @@ struct v4l2_buffer { > > > #define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000 > > > #define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000 > > > #define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000 > > > +/* VP8 special frames */ > > > +#define V4L2_BUF_FLAG_PREV_FRAME 0x10000 /* VP8 prev frame > > */ > > > +#define V4L2_BUF_FLAG_GOLDEN_FRAME 0x20000 /* VP8 golden > > frame */ > > > +#define V4L2_BUF_FLAG_ALTREF_FRAME 0x40000 /* VP8 altref > > frame */ > > > > Would it be an idea to use the same bit values as for > > KEYFRAME/PFRAME/BFRAME? > > After all, these can never be used at the same time. I'm a bit worried > > that the > > bits in this field are eventually all used up by different encoder flags. > > > > VP8 also has a concept of I and P frames and they are orthogonal to the > concept of Prev, Golden and Alt. There is no relationship at all, i.e. we > can't infer I P from Prev Golden Alt and vice versa. Ah, OK. Me no VP8 expert :-) > For the I, P > dimension, we need one bit, but same could be said about H264, we need 2 > bits, not 3 there (if it's not I or P, it's B), and we have 3 bits > nevertheless. > For Prev Golden Alt dimension, we do need 3 bits. > Now, technically, in VP8, the first bit of the frame header indicates if > the frame is I or P, so we could technically use that in userspace and > overload I P B to mean Prev Golden Alt for VP8. But while I understand the > problem with running out of bits very well, as I and P exist in VP8 as > well, it would be pretty confusing, so it's a trade-off that should be > carefully weighted. Are prev/golden/altref frames mutually exclusive? If so, then perhaps we should use a two-bit mask instead of three bits. And those two-bits can later be expanded to more to support codecs that have more than four different frame types. Regards, Hans > > Regards, > Pawel > > > > Regards, > > > > Hans > > > > > > > > /** > > > * struct v4l2_exportbuffer - export of video buffer as DMABUF file > > descriptor > > > > > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Hans and Pawel,
On Fri, Aug 30, 2013 at 10:12:45AM +0200, Hans Verkuil wrote:
> Are prev/golden/altref frames mutually exclusive? If so, then perhaps we
Does that apply to other types of frames as well (key, p and b)? If yes, the
existing frame bits could be used for VP8 frame flags while the existing
codecs could keep using the old definitions, i.e. same bits, but different
macros.
Just my five euro cents.
Hi Pawel, On Fri, Aug 30, 2013 at 11:17:13AM +0900, Pawel Osciak wrote: > Add bits for previous, golden and altref frame types. > > Signed-off-by: Pawel Osciak <posciak@chromium.org> > --- > include/uapi/linux/videodev2.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 437f1b0..c011ee0 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -687,6 +687,10 @@ struct v4l2_buffer { > #define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000 > #define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000 > #define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000 > +/* VP8 special frames */ > +#define V4L2_BUF_FLAG_PREV_FRAME 0x10000 /* VP8 prev frame */ > +#define V4L2_BUF_FLAG_GOLDEN_FRAME 0x20000 /* VP8 golden frame */ > +#define V4L2_BUF_FLAG_ALTREF_FRAME 0x40000 /* VP8 altref frame */ Whichever way this patch is changed, could you rebased it on "v4l: Use full 32 bits for buffer flags"? It changes the definitions of the flags use 32-bit values.
Hi Pawel, Thank you for the patch. On Friday 30 August 2013 11:17:13 Pawel Osciak wrote: > Add bits for previous, golden and altref frame types. > > Signed-off-by: Pawel Osciak <posciak@chromium.org> > --- > include/uapi/linux/videodev2.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 437f1b0..c011ee0 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -687,6 +687,10 @@ struct v4l2_buffer { > #define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000 > #define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000 > #define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000 > +/* VP8 special frames */ > +#define V4L2_BUF_FLAG_PREV_FRAME 0x10000 /* VP8 prev frame */ > +#define V4L2_BUF_FLAG_GOLDEN_FRAME 0x20000 /* VP8 golden frame */ > +#define V4L2_BUF_FLAG_ALTREF_FRAME 0x40000 /* VP8 altref frame */ This required documentation in Documentation/DocBook/media/ :-) > /** > * struct v4l2_exportbuffer - export of video buffer as DMABUF file > descriptor
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 437f1b0..c011ee0 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -687,6 +687,10 @@ struct v4l2_buffer { #define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000 #define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000 #define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000 +/* VP8 special frames */ +#define V4L2_BUF_FLAG_PREV_FRAME 0x10000 /* VP8 prev frame */ +#define V4L2_BUF_FLAG_GOLDEN_FRAME 0x20000 /* VP8 golden frame */ +#define V4L2_BUF_FLAG_ALTREF_FRAME 0x40000 /* VP8 altref frame */ /** * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor