Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-11-04 Thread Sylwester Nawrocki
Hi Hans, On 11/04/2013 01:07 PM, Hans Verkuil wrote: Let me be precise as to what should happen, and you can check whether that's what is actually done in the fimc and g2d drivers. For V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: Say that the mem2mem hardware creates a 640x480 picture. If VIDIOC_S_CROP

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-11-04 Thread Hans Verkuil
On 11/04/2013 12:29 PM, Sylwester Nawrocki wrote: > Sorry, I missed to reply to this e-mail. > > On 04/11/13 11:57, Hans Verkuil wrote: >> Hi John, >> >> On 10/18/2013 02:03 AM, John Sheu wrote: >>> On Thu, Oct 17, 2013 at 3:54 PM, Sylwester Nawrocki >>> wrote: On 10/18/2013 12:25 AM, John S

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-11-04 Thread Sylwester Nawrocki
Sorry, I missed to reply to this e-mail. On 04/11/13 11:57, Hans Verkuil wrote: > Hi John, > > On 10/18/2013 02:03 AM, John Sheu wrote: >> On Thu, Oct 17, 2013 at 3:54 PM, Sylwester Nawrocki >> wrote: >>> On 10/18/2013 12:25 AM, John Sheu wrote: On Thu, Oct 17, 2013 at 2:46 PM, John Sheu w

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-11-04 Thread Hans Verkuil
Hi John, On 10/18/2013 02:03 AM, John Sheu wrote: > On Thu, Oct 17, 2013 at 3:54 PM, Sylwester Nawrocki > wrote: >> On 10/18/2013 12:25 AM, John Sheu wrote: >>> On Thu, Oct 17, 2013 at 2:46 PM, John Sheu wrote: > Sweet. Thanks for spelling things out explicitly like this. The fact >

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-17 Thread John Sheu
On Thu, Oct 17, 2013 at 3:54 PM, Sylwester Nawrocki wrote: > On 10/18/2013 12:25 AM, John Sheu wrote: >> On Thu, Oct 17, 2013 at 2:46 PM, John Sheu wrote: >>> > Sweet. Thanks for spelling things out explicitly like this. The fact >>> > that the CAPTURE and OUTPUT queues "invert" their sense o

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-17 Thread Sylwester Nawrocki
On 10/18/2013 12:25 AM, John Sheu wrote: On Thu, Oct 17, 2013 at 2:46 PM, John Sheu wrote: > Sweet. Thanks for spelling things out explicitly like this. The fact > that the CAPTURE and OUTPUT queues "invert" their sense of "crop-ness" > when used in a m2m device is definitely all sorts of

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-17 Thread John Sheu
On Thu, Oct 17, 2013 at 2:46 PM, John Sheu wrote: > Sweet. Thanks for spelling things out explicitly like this. The fact > that the CAPTURE and OUTPUT queues "invert" their sense of "crop-ness" > when used in a m2m device is definitely all sorts of confusing. Just to double-check: this means th

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-17 Thread John Sheu
On Thu, Oct 17, 2013 at 8:27 AM, Tomasz Stanislawski wrote: > > Hello John, > > I am a designer of original selection API. Maybe I could clarify what > does what in VIDIOC_S_CROP ioctl. > > > Sweet. Thanks for spelling things out explicitly like this. The fact that the CAPTURE and OUTPUT queue

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-17 Thread Tomasz Stanislawski
Hello John, I am a designer of original selection API. Maybe I could clarify what does what in VIDIOC_S_CROP ioctl. > I thought you were not making sense for a bit. Then I walked away, > came back, and I think you're making sense now. So: > > * Crop always refers to the source image > * Compose

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-12 Thread John Sheu
I thought you were not making sense for a bit. Then I walked away, came back, and I think you're making sense now. So: * Crop always refers to the source image * Compose always refers to the destination image On Sat, Oct 12, 2013 at 1:00 AM, Hans Verkuil wrote: > On 10/12/2013 01:48 AM, John S

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-12 Thread Hans Verkuil
On 10/12/2013 01:48 AM, John Sheu wrote: > On Wed, Oct 9, 2013 at 11:49 PM, Hans Verkuil wrote: >> The main problem is that you use the wrong API: you need to use >> G/S_SELECTION instead >> of G/S_CROP. S_CROP on an output video node doesn't crop, it composes. And >> if your >> reaction is 'Huh

Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-11 Thread John Sheu
On Wed, Oct 9, 2013 at 11:49 PM, Hans Verkuil wrote: > The main problem is that you use the wrong API: you need to use G/S_SELECTION > instead > of G/S_CROP. S_CROP on an output video node doesn't crop, it composes. And if > your > reaction is 'Huh?', then you're not alone. Which is why the sele

Re: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-09 Thread Hans Verkuil
Hi John, Thanks for the patches! It's nice to see fixes/improvements like this being upstreamed. Unfortunately I have to NACK this patch, but fortunately it is not difficult to fix. The main problem is that you use the wrong API: you need to use G/S_SELECTION instead of G/S_CROP. S_CROP on an

[PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-09 Thread John Sheu
Allow userspace to set the crop rect of the input image buffer to encode. Signed-off-by: John Sheu --- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 6 ++- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c| 7 ++-- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c| 54 +++