Re: [PATCH RFC 1/2] V4L: Add auto focus selection targets
Hi Andzej, On Wed, Dec 12, 2012 at 02:59:32PM +0100, Andrzej Hajda wrote: On 11.12.2012 22:04, Sakari Ailus wrote: Hi Andrzej, Many thanks for the patch! On Mon, Dec 10, 2012 at 02:43:38PM +0100, Andrzej Hajda wrote: From: Sylwester Nawrocki s.nawro...@samsung.com The camera automatic focus algorithms may require setting up a spot or rectangle coordinates. The automatic focus selection targets are introduced in order to allow applications to query and set such coordinates. Those selections are intended to be used together with the automatic focus controls available in the camera control class. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Andrzej Hajda a.ha...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- Documentation/DocBook/media/v4l/selection-api.xml | 32 - .../DocBook/media/v4l/selections-common.xml| 37 .../media/v4l/vidioc-subdev-g-selection.xml|4 +-- include/uapi/linux/v4l2-common.h |5 +++ 4 files changed, 75 insertions(+), 3 deletions(-) diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml index 4c238ce..8caf67b 100644 --- a/Documentation/DocBook/media/v4l/selection-api.xml +++ b/Documentation/DocBook/media/v4l/selection-api.xml @@ -1,6 +1,6 @@ section id=selection-api - titleExperimental API for cropping, composing and scaling/title + titleExperimental selections API/title Hmm. I wonder if it'd be enough to call this just Selection API. There's a note just below telling it's experimental. note titleExperimental/title @@ -9,6 +9,10 @@ interface and may change in the future./para /note + section + + titleImage cropping, composing and scaling/title + section titleIntroduction/title @@ -321,5 +325,31 @@ V4L2_BUF_TYPE_VIDEO_OUTPUT /constant for other devices/para /example /section + /section + + section + titleAutomatic focus regions of interest/title + +paraThe camera automatic focus algorithms may require configuration of +regions of interest in form of rectangle or spot coordinates. The automatic +focus selection targets allow applications to query and set such coordinates. +Those selections are intended to be used together with the +constantV4L2_CID_AUTO_FOCUS_AREA/constant link linkend=camera-controls +camera class/link control. The constantV4L2_SEL_TGT_AUTO_FOCUS/constant +target is used for querying or setting actual spot or rectangle coordinates, +while constantV4L2_SEL_TGT_AUTO_FOCUS_BOUNDS/constant target determines +bounds for a single spot or rectangle. +These selections are only effective when the constantV4L2_CID_AUTO_FOCUS_AREA +/constantcontrol is set to +constantV4L2_AUTO_FOCUS_AREA_RECTANGLE/constant. The new coordinates shall +be accepted and applied to hardware when the focus area control value is +changed and also during a VIDIOC-S-SELECTION; ioctl call, only when the focus +area control is already set to required value./para + +paraWhen the structfieldwidth/structfield and +structfieldheight/structfield of the selection rectangle are set to 0 the +selection determines spot coordinates, rather than a rectangle./para + + /section /section diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml index 7502f78..9f0c477 100644 --- a/Documentation/DocBook/media/v4l/selections-common.xml +++ b/Documentation/DocBook/media/v4l/selections-common.xml @@ -93,6 +93,22 @@ entryYes/entry entryNo/entry /row + row + entryconstantV4L2_SEL_TGT_AUTO_FOCUS/constant/entry + entry0x1001/entry + entryActual automatic focus rectangle./entry + entryYes/entry + entryYes/entry + /row + row + entryconstantV4L2_SEL_TGT_AUTO_FOCUS_BOUNDS/constant/entry + entry0x1002/entry + entryBounds of the automatic focus region of interest. All valid + automatic focus rectangles fit inside the automatic focus bounds + rectangle./entry + entryYes/entry + entryYes/entry + /row /tbody /tgroup /table @@ -158,7 +174,28 @@ /tbody /tgroup /table + /section + + section + titleAutomatic focus regions of interest/title + + paraThe camera automatic focus algorithms may require configuration + of a region or multiple regions of interest in form of rectangle or spot + coordinates./para + + paraA single rectangle of interest is represented in v4l2-rect; + by the coordinates of the top left corner and the rectangle size. Both + the coordinates and sizes are expressed in pixels. When the structfield + width/structfield and structfieldheight/structfield fields of +
Re: [PATCH RFC 1/2] V4L: Add auto focus selection targets
Hi Sakari, Thank You for the review. On 11.12.2012 22:04, Sakari Ailus wrote: Hi Andrzej, Many thanks for the patch! On Mon, Dec 10, 2012 at 02:43:38PM +0100, Andrzej Hajda wrote: From: Sylwester Nawrocki s.nawro...@samsung.com The camera automatic focus algorithms may require setting up a spot or rectangle coordinates. The automatic focus selection targets are introduced in order to allow applications to query and set such coordinates. Those selections are intended to be used together with the automatic focus controls available in the camera control class. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Andrzej Hajda a.ha...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- Documentation/DocBook/media/v4l/selection-api.xml | 32 - .../DocBook/media/v4l/selections-common.xml| 37 .../media/v4l/vidioc-subdev-g-selection.xml|4 +-- include/uapi/linux/v4l2-common.h |5 +++ 4 files changed, 75 insertions(+), 3 deletions(-) diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml index 4c238ce..8caf67b 100644 --- a/Documentation/DocBook/media/v4l/selection-api.xml +++ b/Documentation/DocBook/media/v4l/selection-api.xml @@ -1,6 +1,6 @@ section id=selection-api - titleExperimental API for cropping, composing and scaling/title + titleExperimental selections API/title Hmm. I wonder if it'd be enough to call this just Selection API. There's a note just below telling it's experimental. note titleExperimental/title @@ -9,6 +9,10 @@ interface and may change in the future./para /note + section + + titleImage cropping, composing and scaling/title + section titleIntroduction/title @@ -321,5 +325,31 @@ V4L2_BUF_TYPE_VIDEO_OUTPUT /constant for other devices/para /example /section + /section + + section + titleAutomatic focus regions of interest/title + +paraThe camera automatic focus algorithms may require configuration of +regions of interest in form of rectangle or spot coordinates. The automatic +focus selection targets allow applications to query and set such coordinates. +Those selections are intended to be used together with the +constantV4L2_CID_AUTO_FOCUS_AREA/constant link linkend=camera-controls +camera class/link control. The constantV4L2_SEL_TGT_AUTO_FOCUS/constant +target is used for querying or setting actual spot or rectangle coordinates, +while constantV4L2_SEL_TGT_AUTO_FOCUS_BOUNDS/constant target determines +bounds for a single spot or rectangle. +These selections are only effective when the constantV4L2_CID_AUTO_FOCUS_AREA +/constantcontrol is set to +constantV4L2_AUTO_FOCUS_AREA_RECTANGLE/constant. The new coordinates shall +be accepted and applied to hardware when the focus area control value is +changed and also during a VIDIOC-S-SELECTION; ioctl call, only when the focus +area control is already set to required value./para + +paraWhen the structfieldwidth/structfield and +structfieldheight/structfield of the selection rectangle are set to 0 the +selection determines spot coordinates, rather than a rectangle./para + + /section /section diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml index 7502f78..9f0c477 100644 --- a/Documentation/DocBook/media/v4l/selections-common.xml +++ b/Documentation/DocBook/media/v4l/selections-common.xml @@ -93,6 +93,22 @@ entryYes/entry entryNo/entry /row + row + entryconstantV4L2_SEL_TGT_AUTO_FOCUS/constant/entry + entry0x1001/entry + entryActual automatic focus rectangle./entry + entryYes/entry + entryYes/entry + /row + row + entryconstantV4L2_SEL_TGT_AUTO_FOCUS_BOUNDS/constant/entry + entry0x1002/entry + entryBounds of the automatic focus region of interest. All valid + automatic focus rectangles fit inside the automatic focus bounds + rectangle./entry + entryYes/entry + entryYes/entry + /row /tbody /tgroup /table @@ -158,7 +174,28 @@ /tbody /tgroup /table + /section + + section + titleAutomatic focus regions of interest/title + + paraThe camera automatic focus algorithms may require configuration + of a region or multiple regions of interest in form of rectangle or spot + coordinates./para + + paraA single rectangle of interest is represented in v4l2-rect; + by the coordinates of the top left corner and the rectangle size. Both + the coordinates and sizes are expressed in pixels. When the structfield + width/structfield and structfieldheight/structfield fields of + v4l2-rect; are set to 0 the selection determines spot coordinates, +
Re: [PATCH RFC 1/2] V4L: Add auto focus selection targets
Hi Andrzej, Many thanks for the patch! On Mon, Dec 10, 2012 at 02:43:38PM +0100, Andrzej Hajda wrote: From: Sylwester Nawrocki s.nawro...@samsung.com The camera automatic focus algorithms may require setting up a spot or rectangle coordinates. The automatic focus selection targets are introduced in order to allow applications to query and set such coordinates. Those selections are intended to be used together with the automatic focus controls available in the camera control class. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Andrzej Hajda a.ha...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- Documentation/DocBook/media/v4l/selection-api.xml | 32 - .../DocBook/media/v4l/selections-common.xml| 37 .../media/v4l/vidioc-subdev-g-selection.xml|4 +-- include/uapi/linux/v4l2-common.h |5 +++ 4 files changed, 75 insertions(+), 3 deletions(-) diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml index 4c238ce..8caf67b 100644 --- a/Documentation/DocBook/media/v4l/selection-api.xml +++ b/Documentation/DocBook/media/v4l/selection-api.xml @@ -1,6 +1,6 @@ section id=selection-api - titleExperimental API for cropping, composing and scaling/title + titleExperimental selections API/title Hmm. I wonder if it'd be enough to call this just Selection API. There's a note just below telling it's experimental. note titleExperimental/title @@ -9,6 +9,10 @@ interface and may change in the future./para /note + section + + titleImage cropping, composing and scaling/title + section titleIntroduction/title @@ -321,5 +325,31 @@ V4L2_BUF_TYPE_VIDEO_OUTPUT /constant for other devices/para /example /section + /section + + section + titleAutomatic focus regions of interest/title + +paraThe camera automatic focus algorithms may require configuration of +regions of interest in form of rectangle or spot coordinates. The automatic +focus selection targets allow applications to query and set such coordinates. +Those selections are intended to be used together with the +constantV4L2_CID_AUTO_FOCUS_AREA/constant link linkend=camera-controls +camera class/link control. The constantV4L2_SEL_TGT_AUTO_FOCUS/constant +target is used for querying or setting actual spot or rectangle coordinates, +while constantV4L2_SEL_TGT_AUTO_FOCUS_BOUNDS/constant target determines +bounds for a single spot or rectangle. +These selections are only effective when the constantV4L2_CID_AUTO_FOCUS_AREA +/constantcontrol is set to +constantV4L2_AUTO_FOCUS_AREA_RECTANGLE/constant. The new coordinates shall +be accepted and applied to hardware when the focus area control value is +changed and also during a VIDIOC-S-SELECTION; ioctl call, only when the focus +area control is already set to required value./para + +paraWhen the structfieldwidth/structfield and +structfieldheight/structfield of the selection rectangle are set to 0 the +selection determines spot coordinates, rather than a rectangle./para + + /section /section diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml index 7502f78..9f0c477 100644 --- a/Documentation/DocBook/media/v4l/selections-common.xml +++ b/Documentation/DocBook/media/v4l/selections-common.xml @@ -93,6 +93,22 @@ entryYes/entry entryNo/entry /row + row + entryconstantV4L2_SEL_TGT_AUTO_FOCUS/constant/entry + entry0x1001/entry + entryActual automatic focus rectangle./entry + entryYes/entry + entryYes/entry + /row + row + entryconstantV4L2_SEL_TGT_AUTO_FOCUS_BOUNDS/constant/entry + entry0x1002/entry + entryBounds of the automatic focus region of interest. All valid + automatic focus rectangles fit inside the automatic focus bounds + rectangle./entry + entryYes/entry + entryYes/entry + /row /tbody /tgroup /table @@ -158,7 +174,28 @@ /tbody /tgroup /table + /section + + section + titleAutomatic focus regions of interest/title + + paraThe camera automatic focus algorithms may require configuration + of a region or multiple regions of interest in form of rectangle or spot + coordinates./para + + paraA single rectangle of interest is represented in v4l2-rect; + by the coordinates of the top left corner and the rectangle size. Both + the coordinates and sizes are expressed in pixels. When the structfield + width/structfield and structfieldheight/structfield fields of + v4l2-rect; are set to 0 the selection determines spot coordinates, + rather than a