Re: [RFC/PATCH v7 1/5] Changes in include/linux/videodev2.h for MFC 5.1

2011-03-05 Thread Hans Verkuil
On Friday, March 04, 2011 19:56:35 Kamil Debski wrote:
> Hi,
> 
> > -Original Message-
> > From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com]
> > Sent: 04 March 2011 17:39
> > To: Kamil Debski
> > Cc: linux-me...@vger.kernel.org; linux-samsung-soc@vger.kernel.org;
> > m.szyprow...@samsung.com; kyungmin.p...@samsung.com;
> > jaeryul...@samsung.com; kgene....@samsung.com
> > Subject: Re: [RFC/PATCH v7 1/5] Changes in include/linux/videodev2.h
> > for MFC 5.1
> > 
> > On Friday 04 March 2011 12:26:18 Kamil Debski wrote:
> > > This patch adds fourcc values for compressed video stream formats and
> > > V4L2_CTRL_CLASS_CODEC. Also adds controls used by MFC 5.1 driver.
> > >
> > > Signed-off-by: Kamil Debski 
> > > Signed-off-by: Kyungmin Park 
> > > ---
> > >  include/linux/videodev2.h |   39
> > +++
> > >  1 files changed, 39 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > > index a94c4d5..a48a42e 100644
> > > --- a/include/linux/videodev2.h
> > > +++ b/include/linux/videodev2.h
> > > @@ -369,6 +369,19 @@ struct v4l2_pix_format {
> > >  #define V4L2_PIX_FMT_DV   v4l2_fourcc('d', 'v', 's', 'd') /*
> > 1394 */
> > >  #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /*
> > MPEG-1/2/4 */
> > >
> > > +#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /*
> > H264 */
> > > +#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /*
> > H263 */
> > > +#define V4L2_PIX_FMT_MPEG12   v4l2_fourcc('M', 'P', '1', '2') /*
> > MPEG-1/2  */
> > > +#define V4L2_PIX_FMT_MPEG4v4l2_fourcc('M', 'P', 'G', '4') /*
> > MPEG-4  */
> > > +#define V4L2_PIX_FMT_DIVX v4l2_fourcc('D', 'I', 'V', 'X') /*
> > DivX  */
> > > +#define V4L2_PIX_FMT_DIVX3v4l2_fourcc('D', 'I', 'V', '3') /*
> > DivX 3.11 */
> > > +#define V4L2_PIX_FMT_DIVX4v4l2_fourcc('D', 'I', 'V', '4') /*
> > DivX 4.12 */
> > > +#define V4L2_PIX_FMT_DIVX500  v4l2_fourcc('D', 'X', '5', '2') /*
> > DivX 5.00 - 5.02 */
> > > +#define V4L2_PIX_FMT_DIVX503  v4l2_fourcc('D', 'X', '5', '3') /*
> > DivX 5.03 - x */
> > > +#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /*
> > Xvid */
> > > +#define V4L2_PIX_FMT_VC1  v4l2_fourcc('V', 'C', '1', 'A') /* VC-
> > 1 */
> > > +#define V4L2_PIX_FMT_VC1_RCV  v4l2_fourcc('V', 'C', '1', 'R') /* VC-
> > 1 RCV */
> > > +
> > 
> > Hans, you mentioned some time ago that you were against ading H.264 or
> > MPEG4
> > fourccs, and that drivers should use the MPEG controls instead. Could
> > you
> > clarify your current position on this ?
> 
> If I remember correct there was no clear conclusion on this. I hope we can
> discuss this
> during the upcoming meeting. 

Yes, we need to discuss this.

> Have you got an alternative suggestion to using fourccs?
> 
> The existing MPEG controls won't cover all the functions and parameters that
> are
> used by video codecs. The controls that are in this patch are the ones
> related to
> decoding, there is even more for encoding.
> 
> Yesterday I have been talking with Hans on the IRC channel about the control
> for
> quantization parameters and he has suggested to use different for MPEG4,
> H263 and H264.
> Personally I'd like to have a common one, as the QP meaning is the same in
> those 3
> cases, the difference is the range of the value.
> So I think that this still is a subject that could use more discussion as
> there are
> a few ideas.

When I made the MPEG API originally I did design it to be usable for other
compression schemes as well. But we need to review that API in light of the
current developments and see if it can be used unchanged, needs tweaking or
perhaps should be abandoned altogether.

Regards,

Hans

-- 
Hans Verkuil - video4linux developer - sponsored by Cisco
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [RFC/PATCH v7 1/5] Changes in include/linux/videodev2.h for MFC 5.1

2011-03-05 Thread Jaeryul Oh
Hi, I commented as below.

> -Original Message-
> From: Kamil Debski [mailto:k.deb...@samsung.com]
> Sent: Saturday, March 05, 2011 3:57 AM
> To: 'Laurent Pinchart'
> Cc: linux-me...@vger.kernel.org; linux-samsung-soc@vger.kernel.org; Marek
> Szyprowski; kyungmin.p...@samsung.com; jaeryul...@samsung.com;
> kgene....@samsung.com
> Subject: RE: [RFC/PATCH v7 1/5] Changes in include/linux/videodev2.h for
> MFC 5.1
> 
> Hi,
> 
> > -Original Message-
> > From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com]
> > Sent: 04 March 2011 17:39
> > To: Kamil Debski
> > Cc: linux-me...@vger.kernel.org; linux-samsung-soc@vger.kernel.org;
> > m.szyprow...@samsung.com; kyungmin.p...@samsung.com;
> > jaeryul...@samsung.com; kgene....@samsung.com
> > Subject: Re: [RFC/PATCH v7 1/5] Changes in include/linux/videodev2.h
> > for MFC 5.1
> >
> > On Friday 04 March 2011 12:26:18 Kamil Debski wrote:
> > > This patch adds fourcc values for compressed video stream formats and
> > > V4L2_CTRL_CLASS_CODEC. Also adds controls used by MFC 5.1 driver.
> > >
> > > Signed-off-by: Kamil Debski 
> > > Signed-off-by: Kyungmin Park 
> > > ---
> > >  include/linux/videodev2.h |   39
> > +++
> > >  1 files changed, 39 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > > index a94c4d5..a48a42e 100644
> > > --- a/include/linux/videodev2.h
> > > +++ b/include/linux/videodev2.h
> > > @@ -369,6 +369,19 @@ struct v4l2_pix_format {
> > >  #define V4L2_PIX_FMT_DV   v4l2_fourcc('d', 'v', 's', 'd') /*
> > 1394 */
> > >  #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /*
> > MPEG-1/2/4 */
> > >
> > > +#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /*
> > H264 */
> > > +#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /*
> > H263 */
> > > +#define V4L2_PIX_FMT_MPEG12   v4l2_fourcc('M', 'P', '1', '2') /*
> > MPEG-1/2  */
> > > +#define V4L2_PIX_FMT_MPEG4v4l2_fourcc('M', 'P', 'G', '4') /*
> > MPEG-4  */
> > > +#define V4L2_PIX_FMT_DIVX v4l2_fourcc('D', 'I', 'V', 'X') /*
> > DivX  */
> > > +#define V4L2_PIX_FMT_DIVX3v4l2_fourcc('D', 'I', 'V', '3') /*
> > DivX 3.11 */
> > > +#define V4L2_PIX_FMT_DIVX4v4l2_fourcc('D', 'I', 'V', '4') /*
> > DivX 4.12 */
> > > +#define V4L2_PIX_FMT_DIVX500  v4l2_fourcc('D', 'X', '5', '2') /*
> > DivX 5.00 - 5.02 */
> > > +#define V4L2_PIX_FMT_DIVX503  v4l2_fourcc('D', 'X', '5', '3') /*
> > DivX 5.03 - x */
> > > +#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /*
> > Xvid */
> > > +#define V4L2_PIX_FMT_VC1  v4l2_fourcc('V', 'C', '1', 'A') /* VC-
> > 1 */
> > > +#define V4L2_PIX_FMT_VC1_RCV  v4l2_fourcc('V', 'C', '1', 'R') /* VC-
> > 1 RCV */
> > > +
> >
> > Hans, you mentioned some time ago that you were against ading H.264 or
> > MPEG4
> > fourccs, and that drivers should use the MPEG controls instead. Could
> > you
> > clarify your current position on this ?
> 
> If I remember correct there was no clear conclusion on this. I hope we can
> discuss this
> during the upcoming meeting.
> 
> Have you got an alternative suggestion to using fourccs?
> 
> The existing MPEG controls won't cover all the functions and parameters
> that
> are
> used by video codecs. The controls that are in this patch are the ones
> related to
> decoding, there is even more for encoding.
> 
> Yesterday I have been talking with Hans on the IRC channel about the
> control
> for
> quantization parameters and he has suggested to use different for MPEG4,
> H263 and H264.
> Personally I'd like to have a common one, as the QP meaning is the same in
> those 3
> cases, the difference is the range of the value.
> So I think that this still is a subject that could use more discussion as
> there are
> a few ideas.
According to the fource.org, and if fourcc definition here has been made
from fourcc.org,
We need to have a discussion about new types that Kamil added not only h264
but divx_xxx.
QP might be a same topic. So let's discuss more at Poland meeting.
> 
> Best regards,
> 
> --
> Kamil Debski
> Linux Platform Group
> Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [RFC/PATCH v7 1/5] Changes in include/linux/videodev2.h for MFC 5.1

2011-03-04 Thread Kamil Debski
Hi,

> -Original Message-
> From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com]
> Sent: 04 March 2011 17:39
> To: Kamil Debski
> Cc: linux-me...@vger.kernel.org; linux-samsung-soc@vger.kernel.org;
> m.szyprow...@samsung.com; kyungmin.p...@samsung.com;
> jaeryul...@samsung.com; kgene@samsung.com
> Subject: Re: [RFC/PATCH v7 1/5] Changes in include/linux/videodev2.h
> for MFC 5.1
> 
> On Friday 04 March 2011 12:26:18 Kamil Debski wrote:
> > This patch adds fourcc values for compressed video stream formats and
> > V4L2_CTRL_CLASS_CODEC. Also adds controls used by MFC 5.1 driver.
> >
> > Signed-off-by: Kamil Debski 
> > Signed-off-by: Kyungmin Park 
> > ---
> >  include/linux/videodev2.h |   39
> +++
> >  1 files changed, 39 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > index a94c4d5..a48a42e 100644
> > --- a/include/linux/videodev2.h
> > +++ b/include/linux/videodev2.h
> > @@ -369,6 +369,19 @@ struct v4l2_pix_format {
> >  #define V4L2_PIX_FMT_DV   v4l2_fourcc('d', 'v', 's', 'd') /*
> 1394 */
> >  #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /*
> MPEG-1/2/4 */
> >
> > +#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /*
> H264 */
> > +#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /*
> H263 */
> > +#define V4L2_PIX_FMT_MPEG12   v4l2_fourcc('M', 'P', '1', '2') /*
> MPEG-1/2  */
> > +#define V4L2_PIX_FMT_MPEG4v4l2_fourcc('M', 'P', 'G', '4') /*
> MPEG-4  */
> > +#define V4L2_PIX_FMT_DIVX v4l2_fourcc('D', 'I', 'V', 'X') /*
> DivX  */
> > +#define V4L2_PIX_FMT_DIVX3v4l2_fourcc('D', 'I', 'V', '3') /*
> DivX 3.11 */
> > +#define V4L2_PIX_FMT_DIVX4v4l2_fourcc('D', 'I', 'V', '4') /*
> DivX 4.12 */
> > +#define V4L2_PIX_FMT_DIVX500  v4l2_fourcc('D', 'X', '5', '2') /*
> DivX 5.00 - 5.02 */
> > +#define V4L2_PIX_FMT_DIVX503  v4l2_fourcc('D', 'X', '5', '3') /*
> DivX 5.03 - x */
> > +#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /*
> Xvid */
> > +#define V4L2_PIX_FMT_VC1  v4l2_fourcc('V', 'C', '1', 'A') /* VC-
> 1 */
> > +#define V4L2_PIX_FMT_VC1_RCV  v4l2_fourcc('V', 'C', '1', 'R') /* VC-
> 1 RCV */
> > +
> 
> Hans, you mentioned some time ago that you were against ading H.264 or
> MPEG4
> fourccs, and that drivers should use the MPEG controls instead. Could
> you
> clarify your current position on this ?

If I remember correct there was no clear conclusion on this. I hope we can
discuss this
during the upcoming meeting. 

Have you got an alternative suggestion to using fourccs?

The existing MPEG controls won't cover all the functions and parameters that
are
used by video codecs. The controls that are in this patch are the ones
related to
decoding, there is even more for encoding.

Yesterday I have been talking with Hans on the IRC channel about the control
for
quantization parameters and he has suggested to use different for MPEG4,
H263 and H264.
Personally I'd like to have a common one, as the QP meaning is the same in
those 3
cases, the difference is the range of the value.
So I think that this still is a subject that could use more discussion as
there are
a few ideas.

Best regards,

-- 
Kamil Debski
Linux Platform Group
Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC/PATCH v7 1/5] Changes in include/linux/videodev2.h for MFC 5.1

2011-03-04 Thread Laurent Pinchart
On Friday 04 March 2011 12:26:18 Kamil Debski wrote:
> This patch adds fourcc values for compressed video stream formats and
> V4L2_CTRL_CLASS_CODEC. Also adds controls used by MFC 5.1 driver.
> 
> Signed-off-by: Kamil Debski 
> Signed-off-by: Kyungmin Park 
> ---
>  include/linux/videodev2.h |   39 +++
>  1 files changed, 39 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index a94c4d5..a48a42e 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -369,6 +369,19 @@ struct v4l2_pix_format {
>  #define V4L2_PIX_FMT_DV   v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */
>  #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 
> */
> 
> +#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 */
> +#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */
> +#define V4L2_PIX_FMT_MPEG12   v4l2_fourcc('M', 'P', '1', '2') /* MPEG-1/2  */
> +#define V4L2_PIX_FMT_MPEG4v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4  */
> +#define V4L2_PIX_FMT_DIVX v4l2_fourcc('D', 'I', 'V', 'X') /* DivX  */
> +#define V4L2_PIX_FMT_DIVX3v4l2_fourcc('D', 'I', 'V', '3') /* DivX 3.11 */
> +#define V4L2_PIX_FMT_DIVX4v4l2_fourcc('D', 'I', 'V', '4') /* DivX 4.12 */
> +#define V4L2_PIX_FMT_DIVX500  v4l2_fourcc('D', 'X', '5', '2') /* DivX 5.00 - 
> 5.02 */
> +#define V4L2_PIX_FMT_DIVX503  v4l2_fourcc('D', 'X', '5', '3') /* DivX 5.03 - 
> x */
> +#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
> +#define V4L2_PIX_FMT_VC1  v4l2_fourcc('V', 'C', '1', 'A') /* VC-1 */
> +#define V4L2_PIX_FMT_VC1_RCV  v4l2_fourcc('V', 'C', '1', 'R') /* VC-1 RCV */
> +

Hans, you mentioned some time ago that you were against ading H.264 or MPEG4
fourccs, and that drivers should use the MPEG controls instead. Could you
clarify your current position on this ?

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC/PATCH v7 1/5] Changes in include/linux/videodev2.h for MFC 5.1

2011-03-04 Thread Kamil Debski
This patch adds fourcc values for compressed video stream formats and
V4L2_CTRL_CLASS_CODEC. Also adds controls used by MFC 5.1 driver.

Signed-off-by: Kamil Debski 
Signed-off-by: Kyungmin Park 
---
 include/linux/videodev2.h |   39 +++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index a94c4d5..a48a42e 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -369,6 +369,19 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_DV   v4l2_fourcc('d', 'v', 's', 'd') /* 1394  
*/
 #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4
*/
 
+#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264*/
+#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263*/
+#define V4L2_PIX_FMT_MPEG12   v4l2_fourcc('M', 'P', '1', '2') /* MPEG-1/2  */
+#define V4L2_PIX_FMT_MPEG4v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4  */
+#define V4L2_PIX_FMT_DIVX v4l2_fourcc('D', 'I', 'V', 'X') /* DivX  */
+#define V4L2_PIX_FMT_DIVX3v4l2_fourcc('D', 'I', 'V', '3') /* DivX 3.11  */
+#define V4L2_PIX_FMT_DIVX4v4l2_fourcc('D', 'I', 'V', '4') /* DivX 4.12  */
+#define V4L2_PIX_FMT_DIVX500v4l2_fourcc('D', 'X', '5', '2') /* DivX 5.00 - 
5.02  */
+#define V4L2_PIX_FMT_DIVX503v4l2_fourcc('D', 'X', '5', '3') /* DivX 5.03 - 
x  */
+#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
+#define V4L2_PIX_FMT_VC1  v4l2_fourcc('V', 'C', '1', 'A') /* VC-1 */
+#define V4L2_PIX_FMT_VC1_RCV  v4l2_fourcc('V', 'C', '1', 'R') /* VC-1 RCV 
*/
+
 /*  Vendor-specific formats   */
 #define V4L2_PIX_FMT_CPIA1v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
 #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw 
compress */
@@ -1016,6 +1029,7 @@ struct v4l2_ext_controls {
 #define V4L2_CTRL_CLASS_MPEG 0x0099/* MPEG-compression controls */
 #define V4L2_CTRL_CLASS_CAMERA 0x009a  /* Camera class controls */
 #define V4L2_CTRL_CLASS_FM_TX 0x009b   /* FM Modulator control class */
+#define V4L2_CTRL_CLASS_CODEC 0x009c   /* Codec control class */
 
 #define V4L2_CTRL_ID_MASK(0x0fff)
 #define V4L2_CTRL_ID2CLASS(id)((id) & 0x0fffUL)
@@ -1349,6 +1363,31 @@ enum v4l2_mpeg_cx2341x_video_median_filter_type {
 #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP   
(V4L2_CID_MPEG_CX2341X_BASE+10)
 #define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS
(V4L2_CID_MPEG_CX2341X_BASE+11)
 
+/* For codecs */
+
+#define V4L2_CID_CODEC_BASE(V4L2_CTRL_CLASS_CODEC | 0x900)
+#define V4L2_CID_CODEC_CLASS   (V4L2_CTRL_CLASS_CODEC | 1)
+
+/* For both decoding and encoding */
+
+/* For encoding */
+#define V4L2_CID_CODEC_LOOP_FILTER_H264(V4L2_CID_CODEC_BASE + 
1)
+enum v4l2_cid_codec_loop_filter_h264 {
+   V4L2_CID_CODEC_LOOP_FILTER_H264_ENABLE = 0,
+   V4L2_CID_CODEC_LOOP_FILTER_H264_DISABLE = 1,
+   V4L2_CID_CODEC_LOOP_FILTER_H264_DISABLE_AT_BOUNDARY = 2,
+};
+
+/* For decoding */
+
+#define V4L2_CID_CODEC_LOOP_FILTER_MPEG4_ENABLE(V4L2_CID_CODEC_BASE + 
2)
+#define V4L2_CID_CODEC_DISPLAY_DELAY   (V4L2_CID_CODEC_BASE + 3)
+#define V4L2_CID_CODEC_DISPLAY_DELAY_ENABLE(V4L2_CID_CODEC_BASE + 4)
+#define V4L2_CID_CODEC_MIN_REQ_BUFS_OUT(V4L2_CID_CODEC_BASE + 
5)
+#define V4L2_CID_CODEC_MIN_REQ_BUFS_CAP(V4L2_CID_CODEC_BASE + 
6)
+#define V4L2_CID_CODEC_SLICE_INTERFACE (V4L2_CID_CODEC_BASE + 7)
+#define V4L2_CID_CODEC_PACKED_PB   (V4L2_CID_CODEC_BASE + 8)
+
 /*  Camera class control IDs */
 #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900)
 #define V4L2_CID_CAMERA_CLASS  (V4L2_CTRL_CLASS_CAMERA | 1)
-- 
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html