public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
@ 2011-02-25 12:46 Kim, HeungJun
  0 siblings, 0 replies; 10+ messages in thread
From: Kim, HeungJun @ 2011-02-25 12:46 UTC (permalink / raw)
  To: linux-media@vger.kernel.org
  Cc: Hans Verkuil, Laurent Pinchart, Sylwester Nawrocki,
	kyungmin.park@samsung.com

Document about the type changes and the enumeration of the auto focus control.

Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 Documentation/DocBook/v4l/controls.xml    |   31 +++++++++++++++++++++++++---
 Documentation/DocBook/v4l/videodev2.h.xml |    6 +++++
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml
index 2fae3e8..889fa84 100644
--- a/Documentation/DocBook/v4l/controls.xml
+++ b/Documentation/DocBook/v4l/controls.xml
@@ -1801,12 +1801,35 @@ negative values towards infinity. This is a write-only control.</entry>
 	  </row>
 	  <row><entry></entry></row>
 
-	  <row>
+	  <row id="v4l2-focus-auto-type">
 	    <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry>
-	    <entry>boolean</entry>
+	    <entry>enum&nbsp;v4l2_focus_auto_type</entry>
 	  </row><row><entry spanname="descr">Enables automatic focus
-adjustments. The effect of manual focus adjustments while this feature
-is enabled is undefined, drivers should ignore such requests.</entry>
+adjustments of the normal or macro or continuous(CAF) mode. The effect of
+manual focus adjustments while this feature is enabled is undefined,
+drivers should ignore such requests. Possible values are:</entry>
+	  </row>
+	  <row>
+	    <entrytbl spanname="descr" cols="2">
+	      <tbody valign="top">
+		<row>
+		  <entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
+		  <entry>Manual focus mode.</entry>
+		</row>
+		<row>
+		  <entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
+		  <entry>Auto focus mode with normal operation.</entry>
+		</row>
+		<row>
+		  <entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
+		  <entry>Auto focus mode with macro operation.</entry>
+		</row>
+		<row>
+		  <entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
+		  <entry>Auto focus mode with continuous(CAF) operation.</entry>
+		</row>
+	      </tbody>
+	    </entrytbl>
 	  </row>
 	  <row><entry></entry></row>
 
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index 325b23b..ccf6c2b 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -1291,6 +1291,12 @@ enum  <link linkend="v4l2-exposure-auto-type">v4l2_exposure_auto_type</link> {
 #define V4L2_CID_FOCUS_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+10)
 #define V4L2_CID_FOCUS_RELATIVE                 (V4L2_CID_CAMERA_CLASS_BASE+11)
 #define V4L2_CID_FOCUS_AUTO                     (V4L2_CID_CAMERA_CLASS_BASE+12)
+enum  <link linkend="v4l2-focus-auto-type">v4l2_exposure_auto_type</link> {
+	V4L2_FOCUS_MANUAL = 0,
+	V4L2_FOCUS_AUTO = 1,
+	V4L2_FOCUS_MACRO = 2,
+	V4L2_FOCUS_CONTINUOUS = 3
+};
 
 #define V4L2_CID_ZOOM_ABSOLUTE                  (V4L2_CID_CAMERA_CLASS_BASE+13)
 #define V4L2_CID_ZOOM_RELATIVE                  (V4L2_CID_CAMERA_CLASS_BASE+14)
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
@ 2011-03-03  2:16 Kim, HeungJun
  2011-03-03 10:08 ` Laurent Pinchart
  0 siblings, 1 reply; 10+ messages in thread
From: Kim, HeungJun @ 2011-03-03  2:16 UTC (permalink / raw)
  To: linux-media@vger.kernel.org, Hans Verkuil, Laurent Pinchart,
	Sylwester Nawrocki, ???/Mobile S/W Platform Lab(DMC?)/E4(??)/????,
	kyungmin.park@samsung.com

Document about the type changes and the enumeration of the auto focus control.

Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 Documentation/DocBook/v4l/controls.xml    |   31 +++++++++++++++++++++++++---
 Documentation/DocBook/v4l/videodev2.h.xml |    6 +++++
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml
index 2fae3e8..889fa84 100644
--- a/Documentation/DocBook/v4l/controls.xml
+++ b/Documentation/DocBook/v4l/controls.xml
@@ -1801,12 +1801,35 @@ negative values towards infinity. This is a write-only control.</entry>
 	  </row>
 	  <row><entry></entry></row>
 
-	  <row>
+	  <row id="v4l2-focus-auto-type">
 	    <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry>
-	    <entry>boolean</entry>
+	    <entry>enum&nbsp;v4l2_focus_auto_type</entry>
 	  </row><row><entry spanname="descr">Enables automatic focus
-adjustments. The effect of manual focus adjustments while this feature
-is enabled is undefined, drivers should ignore such requests.</entry>
+adjustments of the normal or macro or continuous(CAF) mode. The effect of
+manual focus adjustments while this feature is enabled is undefined,
+drivers should ignore such requests. Possible values are:</entry>
+	  </row>
+	  <row>
+	    <entrytbl spanname="descr" cols="2">
+	      <tbody valign="top">
+		<row>
+		  <entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
+		  <entry>Manual focus mode.</entry>
+		</row>
+		<row>
+		  <entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
+		  <entry>Auto focus mode with normal operation.</entry>
+		</row>
+		<row>
+		  <entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
+		  <entry>Auto focus mode with macro operation.</entry>
+		</row>
+		<row>
+		  <entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
+		  <entry>Auto focus mode with continuous(CAF) operation.</entry>
+		</row>
+	      </tbody>
+	    </entrytbl>
 	  </row>
 	  <row><entry></entry></row>
 
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index 325b23b..ccf6c2b 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -1291,6 +1291,12 @@ enum  <link linkend="v4l2-exposure-auto-type">v4l2_exposure_auto_type</link> {
 #define V4L2_CID_FOCUS_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+10)
 #define V4L2_CID_FOCUS_RELATIVE                 (V4L2_CID_CAMERA_CLASS_BASE+11)
 #define V4L2_CID_FOCUS_AUTO                     (V4L2_CID_CAMERA_CLASS_BASE+12)
+enum  <link linkend="v4l2-focus-auto-type">v4l2_exposure_auto_type</link> {
+	V4L2_FOCUS_MANUAL = 0,
+	V4L2_FOCUS_AUTO = 1,
+	V4L2_FOCUS_MACRO = 2,
+	V4L2_FOCUS_CONTINUOUS = 3
+};
 
 #define V4L2_CID_ZOOM_ABSOLUTE                  (V4L2_CID_CAMERA_CLASS_BASE+13)
 #define V4L2_CID_ZOOM_RELATIVE                  (V4L2_CID_CAMERA_CLASS_BASE+14)
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
  2011-03-03  2:16 [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode Kim, HeungJun
@ 2011-03-03 10:08 ` Laurent Pinchart
  2011-03-03 13:17   ` Kim HeungJun
  0 siblings, 1 reply; 10+ messages in thread
From: Laurent Pinchart @ 2011-03-03 10:08 UTC (permalink / raw)
  To: riverful.kim
  Cc: linux-media@vger.kernel.org, Hans Verkuil, Sylwester Nawrocki,
	???/Mobile S/W Platform Lab(DMC?)/E4(??)/????,
	kyungmin.park@samsung.com

Hi,

On Thursday 03 March 2011 03:16:34 Kim, HeungJun wrote:
> Document about the type changes and the enumeration of the auto focus
> control.
> 
> Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  Documentation/DocBook/v4l/controls.xml    |   31
> +++++++++++++++++++++++++--- Documentation/DocBook/v4l/videodev2.h.xml |  
>  6 +++++
>  2 files changed, 33 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/DocBook/v4l/controls.xml
> b/Documentation/DocBook/v4l/controls.xml index 2fae3e8..889fa84 100644
> --- a/Documentation/DocBook/v4l/controls.xml
> +++ b/Documentation/DocBook/v4l/controls.xml
> @@ -1801,12 +1801,35 @@ negative values towards infinity. This is a
> write-only control.</entry> </row>
>  	  <row><entry></entry></row>
> 
> -	  <row>
> +	  <row id="v4l2-focus-auto-type">
>  	    <entry
> spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry> -	   
> <entry>boolean</entry>
> +	    <entry>enum&nbsp;v4l2_focus_auto_type</entry>
>  	  </row><row><entry spanname="descr">Enables automatic focus
> -adjustments. The effect of manual focus adjustments while this feature
> -is enabled is undefined, drivers should ignore such requests.</entry>
> +adjustments of the normal or macro or continuous(CAF) mode. The effect of
> +manual focus adjustments while this feature is enabled is undefined,
> +drivers should ignore such requests. Possible values are:</entry>
> +	  </row>
> +	  <row>
> +	    <entrytbl spanname="descr" cols="2">
> +	      <tbody valign="top">
> +		<row>
> +		  <entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
> +		  <entry>Manual focus mode.</entry>
> +		</row>
> +		<row>
> +		  <entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
> +		  <entry>Auto focus mode with normal operation.</entry>
> +		</row>
> +		<row>
> +		  <entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
> +		  <entry>Auto focus mode with macro operation.</entry>
> +		</row>
> +		<row>
> +		  <entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
> +		  <entry>Auto focus mode with continuous(CAF) operation.</entry>

I should have asked this sooner, but what's the difference between normal AF 
and continuous AF ?

> +		</row>
> +	      </tbody>
> +	    </entrytbl>
>  	  </row>
>  	  <row><entry></entry></row>
> 
> diff --git a/Documentation/DocBook/v4l/videodev2.h.xml
> b/Documentation/DocBook/v4l/videodev2.h.xml index 325b23b..ccf6c2b 100644
> --- a/Documentation/DocBook/v4l/videodev2.h.xml
> +++ b/Documentation/DocBook/v4l/videodev2.h.xml
> @@ -1291,6 +1291,12 @@ enum  <link
> linkend="v4l2-exposure-auto-type">v4l2_exposure_auto_type</link> { #define
> V4L2_CID_FOCUS_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+10)
> #define V4L2_CID_FOCUS_RELATIVE                
> (V4L2_CID_CAMERA_CLASS_BASE+11) #define V4L2_CID_FOCUS_AUTO               
>      (V4L2_CID_CAMERA_CLASS_BASE+12) +enum  <link
> linkend="v4l2-focus-auto-type">v4l2_exposure_auto_type</link> {
> +	V4L2_FOCUS_MANUAL = 0,
> +	V4L2_FOCUS_AUTO = 1,
> +	V4L2_FOCUS_MACRO = 2,
> +	V4L2_FOCUS_CONTINUOUS = 3
> +};
> 
>  #define V4L2_CID_ZOOM_ABSOLUTE                 
> (V4L2_CID_CAMERA_CLASS_BASE+13) #define V4L2_CID_ZOOM_RELATIVE            
>      (V4L2_CID_CAMERA_CLASS_BASE+14)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
  2011-03-03 10:08 ` Laurent Pinchart
@ 2011-03-03 13:17   ` Kim HeungJun
  2011-03-03 13:24     ` Laurent Pinchart
  0 siblings, 1 reply; 10+ messages in thread
From: Kim HeungJun @ 2011-03-03 13:17 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Kim HeungJun, riverful.kim, linux-media@vger.kernel.org,
	Hans Verkuil, Sylwester Nawrocki,
	???/Mobile S/W Platform Lab(DMC?)/E4(??)/????,
	kyungmin.park@samsung.com

Hi, 

2011. 3. 3., 오후 7:08, Laurent Pinchart 작성:

> Hi,
> 
> On Thursday 03 March 2011 03:16:34 Kim, HeungJun wrote:
>> Document about the type changes and the enumeration of the auto focus
>> control.
>> 
>> Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> ---
>> Documentation/DocBook/v4l/controls.xml    |   31
>> +++++++++++++++++++++++++--- Documentation/DocBook/v4l/videodev2.h.xml |  
>> 6 +++++
>> 2 files changed, 33 insertions(+), 4 deletions(-)
>> 
>> diff --git a/Documentation/DocBook/v4l/controls.xml
>> b/Documentation/DocBook/v4l/controls.xml index 2fae3e8..889fa84 100644
>> --- a/Documentation/DocBook/v4l/controls.xml
>> +++ b/Documentation/DocBook/v4l/controls.xml
>> @@ -1801,12 +1801,35 @@ negative values towards infinity. This is a
>> write-only control.</entry> </row>
>> 	  <row><entry></entry></row>
>> 
>> -	  <row>
>> +	  <row id="v4l2-focus-auto-type">
>> 	    <entry
>> spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry> -	   
>> <entry>boolean</entry>
>> +	    <entry>enum&nbsp;v4l2_focus_auto_type</entry>
>> 	  </row><row><entry spanname="descr">Enables automatic focus
>> -adjustments. The effect of manual focus adjustments while this feature
>> -is enabled is undefined, drivers should ignore such requests.</entry>
>> +adjustments of the normal or macro or continuous(CAF) mode. The effect of
>> +manual focus adjustments while this feature is enabled is undefined,
>> +drivers should ignore such requests. Possible values are:</entry>
>> +	  </row>
>> +	  <row>
>> +	    <entrytbl spanname="descr" cols="2">
>> +	      <tbody valign="top">
>> +		<row>
>> +		  <entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
>> +		  <entry>Manual focus mode.</entry>
>> +		</row>
>> +		<row>
>> +		  <entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
>> +		  <entry>Auto focus mode with normal operation.</entry>
>> +		</row>
>> +		<row>
>> +		  <entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
>> +		  <entry>Auto focus mode with macro operation.</entry>
>> +		</row>
>> +		<row>
>> +		  <entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
>> +		  <entry>Auto focus mode with continuous(CAF) operation.</entry>
> 
> I should have asked this sooner, but what's the difference between normal AF 
> and continuous AF ?

Let's assume that the whole focus process(of course the sensor-internal process automatically) is below : 
1) pointing the object focussed
    : mostly this is possible to be a middle spot, or pre-given orient x & y set from register.
    (The mode using given orient x & y, may be defined V4L2_FOCUS_TOUCH or whatever,
     but I know touch auto focus suggestion is determined nothing so far,
     because of that, after this I will suggest to discuss about it one more.) 
2) starting and completing the move of the motor to control lens, using the focusing internal algorithm
3) check whether the lens position is proper or not, using the focusing internal algorithm, too.
     (If the position is not proper, the image may looks defocused)

In the Normal AF mode, the sensor do the whole focusing process once, and after completing to move lens,
even though the sensor failed focusing process. On the other hand, the sensor repeats 1~3 in the Continuous
AF mode periodically, regardless of success of failure.

Regards,
Heungjun Kim


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
  2011-03-03 13:17   ` Kim HeungJun
@ 2011-03-03 13:24     ` Laurent Pinchart
  2011-03-03 14:34       ` Kim HeungJun
  0 siblings, 1 reply; 10+ messages in thread
From: Laurent Pinchart @ 2011-03-03 13:24 UTC (permalink / raw)
  To: Kim HeungJun
  Cc: riverful.kim, linux-media@vger.kernel.org, Hans Verkuil,
	Sylwester Nawrocki, ???/Mobile S/W Platform Lab(DMC?)/E4(??)/????,
	kyungmin.park@samsung.com

Hi,

On Thursday 03 March 2011 14:17:10 Kim HeungJun wrote:
> 2011. 3. 3., 오후 7:08, Laurent Pinchart 작성:
> > On Thursday 03 March 2011 03:16:34 Kim, HeungJun wrote:
> >> Document about the type changes and the enumeration of the auto focus
> >> control.
> >> 
> >> Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
> >> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> >> ---
> >> Documentation/DocBook/v4l/controls.xml    |   31
> >> +++++++++++++++++++++++++--- Documentation/DocBook/v4l/videodev2.h.xml |
> >> 6 +++++
> >> 2 files changed, 33 insertions(+), 4 deletions(-)
> >> 
> >> diff --git a/Documentation/DocBook/v4l/controls.xml
> >> b/Documentation/DocBook/v4l/controls.xml index 2fae3e8..889fa84 100644
> >> --- a/Documentation/DocBook/v4l/controls.xml
> >> +++ b/Documentation/DocBook/v4l/controls.xml
> >> @@ -1801,12 +1801,35 @@ negative values towards infinity. This is a
> >> write-only control.</entry> </row>
> >> 
> >> 	  <row><entry></entry></row>
> >> 
> >> -	  <row>
> >> +	  <row id="v4l2-focus-auto-type">
> >> 
> >> 	    <entry
> >> 
> >> spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry> -
> >> <entry>boolean</entry>
> >> +	    <entry>enum&nbsp;v4l2_focus_auto_type</entry>
> >> 
> >> 	  </row><row><entry spanname="descr">Enables automatic focus
> >> 
> >> -adjustments. The effect of manual focus adjustments while this feature
> >> -is enabled is undefined, drivers should ignore such requests.</entry>
> >> +adjustments of the normal or macro or continuous(CAF) mode. The effect
> >> of +manual focus adjustments while this feature is enabled is
> >> undefined, +drivers should ignore such requests. Possible values
> >> are:</entry> +	  </row>
> >> +	  <row>
> >> +	    <entrytbl spanname="descr" cols="2">
> >> +	      <tbody valign="top">
> >> +		<row>
> >> +		  <entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
> >> +		  <entry>Manual focus mode.</entry>
> >> +		</row>
> >> +		<row>
> >> +		  <entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
> >> +		  <entry>Auto focus mode with normal operation.</entry>
> >> +		</row>
> >> +		<row>
> >> +		  <entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
> >> +		  <entry>Auto focus mode with macro operation.</entry>
> >> +		</row>
> >> +		<row>
> >> +		  <entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
> >> +		  <entry>Auto focus mode with continuous(CAF) operation.</entry>
> > 
> > I should have asked this sooner, but what's the difference between normal
> > AF and continuous AF ?
> 
> Let's assume that the whole focus process(of course the sensor-internal
> process automatically) is below : 1) pointing the object focussed
> 
>     : mostly this is possible to be a middle spot, or pre-given orient x &
>     : y set from register.
> 
>     (The mode using given orient x & y, may be defined V4L2_FOCUS_TOUCH or
> whatever, but I know touch auto focus suggestion is determined nothing so
> far, because of that, after this I will suggest to discuss about it one
> more.) 2) starting and completing the move of the motor to control lens,
> using the focusing internal algorithm 3) check whether the lens position
> is proper or not, using the focusing internal algorithm, too. (If the
> position is not proper, the image may looks defocused)
> 
> In the Normal AF mode, the sensor do the whole focusing process once, and
> after completing to move lens, even though the sensor failed focusing
> process. On the other hand, the sensor repeats 1~3 in the Continuous AF
> mode periodically, regardless of success of failure.

OK, that was my understanding as well. How will that work with the proposed 
focus menu control ? Don't you need a button control for normal auto-focus ?

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
  2011-03-03 13:24     ` Laurent Pinchart
@ 2011-03-03 14:34       ` Kim HeungJun
  2011-03-03 15:22         ` Laurent Pinchart
  0 siblings, 1 reply; 10+ messages in thread
From: Kim HeungJun @ 2011-03-03 14:34 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Kim HeungJun, riverful.kim, linux-media@vger.kernel.org,
	Hans Verkuil, Sylwester Nawrocki,
	???/Mobile S/W Platform Lab(DMC?)/E4(??)/????,
	kyungmin.park@samsung.com

Hi, 

2011. 3. 3., 오후 10:24, Laurent Pinchart 작성:

> Hi,
> 
> On Thursday 03 March 2011 14:17:10 Kim HeungJun wrote:
>> 2011. 3. 3., 오후 7:08, Laurent Pinchart 작성:
>>> On Thursday 03 March 2011 03:16:34 Kim, HeungJun wrote:
>>>> Document about the type changes and the enumeration of the auto focus
>>>> control.
>>>> 
>>>> Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
>>>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>>>> ---
>>>> Documentation/DocBook/v4l/controls.xml    |   31
>>>> +++++++++++++++++++++++++--- Documentation/DocBook/v4l/videodev2.h.xml |
>>>> 6 +++++
>>>> 2 files changed, 33 insertions(+), 4 deletions(-)
>>>> 
>>>> diff --git a/Documentation/DocBook/v4l/controls.xml
>>>> b/Documentation/DocBook/v4l/controls.xml index 2fae3e8..889fa84 100644
>>>> --- a/Documentation/DocBook/v4l/controls.xml
>>>> +++ b/Documentation/DocBook/v4l/controls.xml
>>>> @@ -1801,12 +1801,35 @@ negative values towards infinity. This is a
>>>> write-only control.</entry> </row>
>>>> 
>>>> 	  <row><entry></entry></row>
>>>> 
>>>> -	  <row>
>>>> +	  <row id="v4l2-focus-auto-type">
>>>> 
>>>> 	    <entry
>>>> 
>>>> spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry> -
>>>> <entry>boolean</entry>
>>>> +	    <entry>enum&nbsp;v4l2_focus_auto_type</entry>
>>>> 
>>>> 	  </row><row><entry spanname="descr">Enables automatic focus
>>>> 
>>>> -adjustments. The effect of manual focus adjustments while this feature
>>>> -is enabled is undefined, drivers should ignore such requests.</entry>
>>>> +adjustments of the normal or macro or continuous(CAF) mode. The effect
>>>> of +manual focus adjustments while this feature is enabled is
>>>> undefined, +drivers should ignore such requests. Possible values
>>>> are:</entry> +	  </row>
>>>> +	  <row>
>>>> +	    <entrytbl spanname="descr" cols="2">
>>>> +	      <tbody valign="top">
>>>> +		<row>
>>>> +		  <entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
>>>> +		  <entry>Manual focus mode.</entry>
>>>> +		</row>
>>>> +		<row>
>>>> +		  <entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
>>>> +		  <entry>Auto focus mode with normal operation.</entry>
>>>> +		</row>
>>>> +		<row>
>>>> +		  <entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
>>>> +		  <entry>Auto focus mode with macro operation.</entry>
>>>> +		</row>
>>>> +		<row>
>>>> +		  <entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
>>>> +		  <entry>Auto focus mode with continuous(CAF) operation.</entry>
>>> 
>>> I should have asked this sooner, but what's the difference between normal
>>> AF and continuous AF ?
>> 
>> Let's assume that the whole focus process(of course the sensor-internal
>> process automatically) is below : 1) pointing the object focussed
>> 
>>    : mostly this is possible to be a middle spot, or pre-given orient x &
>>    : y set from register.
>> 
>>    (The mode using given orient x & y, may be defined V4L2_FOCUS_TOUCH or
>> whatever, but I know touch auto focus suggestion is determined nothing so
>> far, because of that, after this I will suggest to discuss about it one
>> more.) 2) starting and completing the move of the motor to control lens,
>> using the focusing internal algorithm 3) check whether the lens position
>> is proper or not, using the focusing internal algorithm, too. (If the
>> position is not proper, the image may looks defocused)
>> 
>> In the Normal AF mode, the sensor do the whole focusing process once, and
>> after completing to move lens, even though the sensor failed focusing
>> process. On the other hand, the sensor repeats 1~3 in the Continuous AF
>> mode periodically, regardless of success of failure.
> 
> OK, that was my understanding as well. How will that work with the proposed 
> focus menu control ? Don't you need a button control for normal auto-focus ?

You mean that the normal auto-focus control type should be a button, right?
For now, in our case the user application assumes that such modes(normal, MACRO, CAF,
TOUCH or oriented mode, or something) are already ready in the driver.
So, I did't need the normal auto-focus is a button type.

But, IMHO, the focus control of camera is right to follow the next procedure, 
1) choosing the modes as I said upper. (because, the camera dose not have one more focus mode.)
2) adjusting the value of the mode set right before.
3) doing the action of the mode.

1) is the same call the control V4L2_AUTO_FOCUS of menu type.
2), 3) is the same call the control dedicated focus control. Currently, the focus control excepting manual
is not needed another control. If touch mode are needed, we can add another enum value, e.g. V4L2_FOCUS_ORIENT.
and add another dedicated control, e.g., V4L2_CID_FOCUS_ORIENT_X, V4L2_CID_FOCUS_ORIENT_Y.

I think this as I use digital camera. We normally follow such procedure, using the digital camera.

If I get your words wrongly, give me some clue :)

Thanks,
Heungjun Kim



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
  2011-03-03 14:34       ` Kim HeungJun
@ 2011-03-03 15:22         ` Laurent Pinchart
  2011-03-03 15:53           ` Kim HeungJun
  2011-03-08 23:08           ` Sylwester Nawrocki
  0 siblings, 2 replies; 10+ messages in thread
From: Laurent Pinchart @ 2011-03-03 15:22 UTC (permalink / raw)
  To: Kim HeungJun
  Cc: riverful.kim, linux-media@vger.kernel.org, Hans Verkuil,
	Sylwester Nawrocki, ???/Mobile S/W Platform Lab(DMC?)/E4(??)/????,
	kyungmin.park@samsung.com

Hi,

On Thursday 03 March 2011 15:34:36 Kim HeungJun wrote:
> 2011. 3. 3., 오후 10:24, Laurent Pinchart 작성:
> > On Thursday 03 March 2011 14:17:10 Kim HeungJun wrote:
> >> 2011. 3. 3., 오후 7:08, Laurent Pinchart 작성:
> >>> On Thursday 03 March 2011 03:16:34 Kim, HeungJun wrote:
> >>>> Document about the type changes and the enumeration of the auto focus
> >>>> control.
> >>>> 
> >>>> Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
> >>>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> >>>> ---
> >>>> Documentation/DocBook/v4l/controls.xml    |   31
> >>>> +++++++++++++++++++++++++--- Documentation/DocBook/v4l/videodev2.h.xml
> >>>> | 6 +++++
> >>>> 2 files changed, 33 insertions(+), 4 deletions(-)
> >>>> 
> >>>> diff --git a/Documentation/DocBook/v4l/controls.xml
> >>>> b/Documentation/DocBook/v4l/controls.xml index 2fae3e8..889fa84 100644
> >>>> --- a/Documentation/DocBook/v4l/controls.xml
> >>>> +++ b/Documentation/DocBook/v4l/controls.xml
> >>>> @@ -1801,12 +1801,35 @@ negative values towards infinity. This is a
> >>>> write-only control.</entry> </row>
> >>>> 
> >>>> 	  <row><entry></entry></row>
> >>>> 
> >>>> -	  <row>
> >>>> +	  <row id="v4l2-focus-auto-type">
> >>>> 
> >>>> 	    <entry
> >>>> 
> >>>> spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry> -
> >>>> <entry>boolean</entry>
> >>>> +	    <entry>enum&nbsp;v4l2_focus_auto_type</entry>
> >>>> 
> >>>> 	  </row><row><entry spanname="descr">Enables automatic focus
> >>>> 
> >>>> -adjustments. The effect of manual focus adjustments while this
> >>>> feature -is enabled is undefined, drivers should ignore such
> >>>> requests.</entry> +adjustments of the normal or macro or
> >>>> continuous(CAF) mode. The effect of +manual focus adjustments while
> >>>> this feature is enabled is undefined, +drivers should ignore such
> >>>> requests. Possible values are:</entry> +	  </row>
> >>>> +	  <row>
> >>>> +	    <entrytbl spanname="descr" cols="2">
> >>>> +	      <tbody valign="top">
> >>>> +		<row>
> >>>> +		  <entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
> >>>> +		  <entry>Manual focus mode.</entry>
> >>>> +		</row>
> >>>> +		<row>
> >>>> +		  <entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
> >>>> +		  <entry>Auto focus mode with normal operation.</entry>
> >>>> +		</row>
> >>>> +		<row>
> >>>> +		  <entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
> >>>> +		  <entry>Auto focus mode with macro operation.</entry>
> >>>> +		</row>
> >>>> +		<row>
> >>>> +		  <entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
> >>>> +		  <entry>Auto focus mode with continuous(CAF) operation.</entry>
> >>> 
> >>> I should have asked this sooner, but what's the difference between
> >>> normal AF and continuous AF ?
> >> 
> >> Let's assume that the whole focus process(of course the sensor-internal
> >> process automatically) is below : 1) pointing the object focussed
> >> 
> >>    : mostly this is possible to be a middle spot, or pre-given orient x
> >>    : & y set from register.
> >>    
> >>    (The mode using given orient x & y, may be defined V4L2_FOCUS_TOUCH
> >>    or
> >> 
> >> whatever, but I know touch auto focus suggestion is determined nothing
> >> so far, because of that, after this I will suggest to discuss about it
> >> one more.) 2) starting and completing the move of the motor to control
> >> lens, using the focusing internal algorithm 3) check whether the lens
> >> position is proper or not, using the focusing internal algorithm, too.
> >> (If the position is not proper, the image may looks defocused)
> >> 
> >> In the Normal AF mode, the sensor do the whole focusing process once,
> >> and after completing to move lens, even though the sensor failed
> >> focusing process. On the other hand, the sensor repeats 1~3 in the
> >> Continuous AF mode periodically, regardless of success of failure.
> > 
> > OK, that was my understanding as well. How will that work with the
> > proposed focus menu control ? Don't you need a button control for normal
> > auto-focus ?
> 
> You mean that the normal auto-focus control type should be a button, right?
> For now, in our case the user application assumes that such modes(normal,
> MACRO, CAF, TOUCH or oriented mode, or something) are already ready in the
> driver. So, I did't need the normal auto-focus is a button type.
> 
> But, IMHO, the focus control of camera is right to follow the next
> procedure, 1) choosing the modes as I said upper. (because, the camera
> dose not have one more focus mode.) 2) adjusting the value of the mode set
> right before.
> 3) doing the action of the mode.
> 
> 1) is the same call the control V4L2_AUTO_FOCUS of menu type.
> 2), 3) is the same call the control dedicated focus control. Currently, the
> focus control excepting manual is not needed another control. If touch
> mode are needed, we can add another enum value, e.g. V4L2_FOCUS_ORIENT.
> and add another dedicated control, e.g., V4L2_CID_FOCUS_ORIENT_X,
> V4L2_CID_FOCUS_ORIENT_Y.
> 
> I think this as I use digital camera. We normally follow such procedure,
> using the digital camera.
> 
> If I get your words wrongly, give me some clue :)

What happens when the user selects the V4L2_FOCUS_AUTO menu entry ? Will the 
camera start a one-shot auto-focus algorithm ? In that case, if the user is 
not happy with the result and wants to perform a new auto-focus, how will that 
be possible ? The V4L2_CID_FOCUS_AUTO control will already be in 
V4L2_FOCUS_AUTO mode.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
  2011-03-03 15:22         ` Laurent Pinchart
@ 2011-03-03 15:53           ` Kim HeungJun
  2011-03-08 23:08           ` Sylwester Nawrocki
  1 sibling, 0 replies; 10+ messages in thread
From: Kim HeungJun @ 2011-03-03 15:53 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Kim HeungJun, riverful.kim, linux-media@vger.kernel.org,
	Hans Verkuil, Sylwester Nawrocki,
	???/Mobile S/W Platform Lab(DMC?)/E4(??)/????,
	kyungmin.park@samsung.com


2011. 3. 4., 오전 12:22, Laurent Pinchart 작성:

> Hi,
> 
> On Thursday 03 March 2011 15:34:36 Kim HeungJun wrote:
>> 2011. 3. 3., 오후 10:24, Laurent Pinchart 작성:
>>> On Thursday 03 March 2011 14:17:10 Kim HeungJun wrote:
>>>> 2011. 3. 3., 오후 7:08, Laurent Pinchart 작성:
>>>>> On Thursday 03 March 2011 03:16:34 Kim, HeungJun wrote:
>>>>>> Document about the type changes and the enumeration of the auto focus
>>>>>> control.
>>>>>> 
>>>>>> Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
>>>>>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>>>>>> ---
>>>>>> Documentation/DocBook/v4l/controls.xml    |   31
>>>>>> +++++++++++++++++++++++++--- Documentation/DocBook/v4l/videodev2.h.xml
>>>>>> | 6 +++++
>>>>>> 2 files changed, 33 insertions(+), 4 deletions(-)
>>>>>> 
>>>>>> diff --git a/Documentation/DocBook/v4l/controls.xml
>>>>>> b/Documentation/DocBook/v4l/controls.xml index 2fae3e8..889fa84 100644
>>>>>> --- a/Documentation/DocBook/v4l/controls.xml
>>>>>> +++ b/Documentation/DocBook/v4l/controls.xml
>>>>>> @@ -1801,12 +1801,35 @@ negative values towards infinity. This is a
>>>>>> write-only control.</entry> </row>
>>>>>> 
>>>>>> 	  <row><entry></entry></row>
>>>>>> 
>>>>>> -	  <row>
>>>>>> +	  <row id="v4l2-focus-auto-type">
>>>>>> 
>>>>>> 	    <entry
>>>>>> 
>>>>>> spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry> -
>>>>>> <entry>boolean</entry>
>>>>>> +	    <entry>enum&nbsp;v4l2_focus_auto_type</entry>
>>>>>> 
>>>>>> 	  </row><row><entry spanname="descr">Enables automatic focus
>>>>>> 
>>>>>> -adjustments. The effect of manual focus adjustments while this
>>>>>> feature -is enabled is undefined, drivers should ignore such
>>>>>> requests.</entry> +adjustments of the normal or macro or
>>>>>> continuous(CAF) mode. The effect of +manual focus adjustments while
>>>>>> this feature is enabled is undefined, +drivers should ignore such
>>>>>> requests. Possible values are:</entry> +	  </row>
>>>>>> +	  <row>
>>>>>> +	    <entrytbl spanname="descr" cols="2">
>>>>>> +	      <tbody valign="top">
>>>>>> +		<row>
>>>>>> +		  <entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
>>>>>> +		  <entry>Manual focus mode.</entry>
>>>>>> +		</row>
>>>>>> +		<row>
>>>>>> +		  <entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
>>>>>> +		  <entry>Auto focus mode with normal operation.</entry>
>>>>>> +		</row>
>>>>>> +		<row>
>>>>>> +		  <entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
>>>>>> +		  <entry>Auto focus mode with macro operation.</entry>
>>>>>> +		</row>
>>>>>> +		<row>
>>>>>> +		  <entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
>>>>>> +		  <entry>Auto focus mode with continuous(CAF) operation.</entry>
>>>>> 
>>>>> I should have asked this sooner, but what's the difference between
>>>>> normal AF and continuous AF ?
>>>> 
>>>> Let's assume that the whole focus process(of course the sensor-internal
>>>> process automatically) is below : 1) pointing the object focussed
>>>> 
>>>>   : mostly this is possible to be a middle spot, or pre-given orient x
>>>>   : & y set from register.
>>>> 
>>>>   (The mode using given orient x & y, may be defined V4L2_FOCUS_TOUCH
>>>>   or
>>>> 
>>>> whatever, but I know touch auto focus suggestion is determined nothing
>>>> so far, because of that, after this I will suggest to discuss about it
>>>> one more.) 2) starting and completing the move of the motor to control
>>>> lens, using the focusing internal algorithm 3) check whether the lens
>>>> position is proper or not, using the focusing internal algorithm, too.
>>>> (If the position is not proper, the image may looks defocused)
>>>> 
>>>> In the Normal AF mode, the sensor do the whole focusing process once,
>>>> and after completing to move lens, even though the sensor failed
>>>> focusing process. On the other hand, the sensor repeats 1~3 in the
>>>> Continuous AF mode periodically, regardless of success of failure.
>>> 
>>> OK, that was my understanding as well. How will that work with the
>>> proposed focus menu control ? Don't you need a button control for normal
>>> auto-focus ?
>> 
>> You mean that the normal auto-focus control type should be a button, right?
>> For now, in our case the user application assumes that such modes(normal,
>> MACRO, CAF, TOUCH or oriented mode, or something) are already ready in the
>> driver. So, I did't need the normal auto-focus is a button type.
>> 
>> But, IMHO, the focus control of camera is right to follow the next
>> procedure, 1) choosing the modes as I said upper. (because, the camera
>> dose not have one more focus mode.) 2) adjusting the value of the mode set
>> right before.
>> 3) doing the action of the mode.
>> 
>> 1) is the same call the control V4L2_AUTO_FOCUS of menu type.
>> 2), 3) is the same call the control dedicated focus control. Currently, the
>> focus control excepting manual is not needed another control. If touch
>> mode are needed, we can add another enum value, e.g. V4L2_FOCUS_ORIENT.
>> and add another dedicated control, e.g., V4L2_CID_FOCUS_ORIENT_X,
>> V4L2_CID_FOCUS_ORIENT_Y.
>> 
>> I think this as I use digital camera. We normally follow such procedure,
>> using the digital camera.
>> 
>> If I get your words wrongly, give me some clue :)
> 
> What happens when the user selects the V4L2_FOCUS_AUTO menu entry ? Will the 
> camera start a one-shot auto-focus algorithm ? In that case, if the user is 
> not happy with the result and wants to perform a new auto-focus, how will that 
> be possible ? The V4L2_CID_FOCUS_AUTO control will already be in 
> V4L2_FOCUS_AUTO mode.

You're right. I confused the orders and contents. So, I'm going to explain my thought again.

The 1), 2), 3) is just the action unit for focus. Just ignore the order in the case of human thought. 
On the other hand, 2) should be done in the driver first. And 1), 3) are happened at the same time in the driver.

I intend to say, the each focus action unit is the same with human thought and driver,
even though the procedure order is different between the human and driver.

Sorry to confuse you.


Regards,
Heungjun Kim


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
  2011-03-03 15:22         ` Laurent Pinchart
  2011-03-03 15:53           ` Kim HeungJun
@ 2011-03-08 23:08           ` Sylwester Nawrocki
  2011-03-09  5:23             ` Kim, HeungJun
  1 sibling, 1 reply; 10+ messages in thread
From: Sylwester Nawrocki @ 2011-03-08 23:08 UTC (permalink / raw)
  To: Kim HeungJun
  Cc: Laurent Pinchart, riverful.kim, linux-media@vger.kernel.org,
	Hans Verkuil, Sylwester Nawrocki,
	???/Mobile S/W Platform Lab(DMC?)/E4(??)/????,
	kyungmin.park@samsung.com

Hi HeungJun,

On 03/03/2011 04:22 PM, Laurent Pinchart wrote:
> Hi,
> 
> On Thursday 03 March 2011 15:34:36 Kim HeungJun wrote:
>> 2011. 3. 3., 오후 10:24, Laurent Pinchart 작성:
>>> On Thursday 03 March 2011 14:17:10 Kim HeungJun wrote:
>>>> 2011. 3. 3., 오후 7:08, Laurent Pinchart 작성:
>>>>> On Thursday 03 March 2011 03:16:34 Kim, HeungJun wrote:
>>>>>> Document about the type changes and the enumeration of the auto focus
>>>>>> control.
>>>>>>
>>>>>> Signed-off-by: Heungjun Kim<riverful.kim@samsung.com>
>>>>>> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
>>>>>> ---
>>>>>> Documentation/DocBook/v4l/controls.xml    |   31
>>>>>> +++++++++++++++++++++++++--- Documentation/DocBook/v4l/videodev2.h.xml
>>>>>> | 6 +++++
>>>>>> 2 files changed, 33 insertions(+), 4 deletions(-)
>>>>>>
>>>>>> diff --git a/Documentation/DocBook/v4l/controls.xml
>>>>>> b/Documentation/DocBook/v4l/controls.xml index 2fae3e8..889fa84 100644
>>>>>> --- a/Documentation/DocBook/v4l/controls.xml
>>>>>> +++ b/Documentation/DocBook/v4l/controls.xml
>>>>>> @@ -1801,12 +1801,35 @@ negative values towards infinity. This is a
>>>>>> write-only control.</entry>  </row>
>>>>>>
>>>>>> 	<row><entry></entry></row>
>>>>>>
>>>>>> -	<row>
>>>>>> +	<row id="v4l2-focus-auto-type">
>>>>>>
>>>>>> 	<entry
>>>>>>
>>>>>> spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry>  -
>>>>>> <entry>boolean</entry>
>>>>>> +	<entry>enum&nbsp;v4l2_focus_auto_type</entry>
>>>>>>
>>>>>> 	</row><row><entry spanname="descr">Enables automatic focus
>>>>>>
>>>>>> -adjustments. The effect of manual focus adjustments while this
>>>>>> feature -is enabled is undefined, drivers should ignore such
>>>>>> requests.</entry>  +adjustments of the normal or macro or
>>>>>> continuous(CAF) mode. The effect of +manual focus adjustments while
>>>>>> this feature is enabled is undefined, +drivers should ignore such
>>>>>> requests. Possible values are:</entry>  +	</row>
>>>>>> +	<row>
>>>>>> +	<entrytbl spanname="descr" cols="2">
>>>>>> +	<tbody valign="top">
>>>>>> +		<row>
>>>>>> +		<entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
>>>>>> +		<entry>Manual focus mode.</entry>
>>>>>> +		</row>
>>>>>> +		<row>
>>>>>> +		<entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
>>>>>> +		<entry>Auto focus mode with normal operation.</entry>
>>>>>> +		</row>
>>>>>> +		<row>
>>>>>> +		<entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
>>>>>> +		<entry>Auto focus mode with macro operation.</entry>
>>>>>> +		</row>
>>>>>> +		<row>
>>>>>> +		<entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
>>>>>> +		<entry>Auto focus mode with continuous(CAF) operation.</entry>
>>>>>
>>>>> I should have asked this sooner, but what's the difference between
>>>>> normal AF and continuous AF ?
>>>>
>>>> Let's assume that the whole focus process(of course the sensor-internal
>>>> process automatically) is below : 1) pointing the object focussed
>>>>
>>>>     : mostly this is possible to be a middle spot, or pre-given orient x
>>>>     :&  y set from register.
>>>>
>>>>     (The mode using given orient x&  y, may be defined V4L2_FOCUS_TOUCH
>>>>     or
>>>>
>>>> whatever, but I know touch auto focus suggestion is determined nothing
>>>> so far, because of that, after this I will suggest to discuss about it
>>>> one more.) 2) starting and completing the move of the motor to control
>>>> lens, using the focusing internal algorithm 3) check whether the lens
>>>> position is proper or not, using the focusing internal algorithm, too.
>>>> (If the position is not proper, the image may looks defocused)
>>>>
>>>> In the Normal AF mode, the sensor do the whole focusing process once,
>>>> and after completing to move lens, even though the sensor failed
>>>> focusing process. On the other hand, the sensor repeats 1~3 in the
>>>> Continuous AF mode periodically, regardless of success of failure.
>>>
>>> OK, that was my understanding as well. How will that work with the
>>> proposed focus menu control ? Don't you need a button control for normal
>>> auto-focus ?
>>
>> You mean that the normal auto-focus control type should be a button, right?
>> For now, in our case the user application assumes that such modes(normal,
>> MACRO, CAF, TOUCH or oriented mode, or something) are already ready in the
>> driver. So, I did't need the normal auto-focus is a button type.
>>
>> But, IMHO, the focus control of camera is right to follow the next
>> procedure, 1) choosing the modes as I said upper. (because, the camera
>> dose not have one more focus mode.) 2) adjusting the value of the mode set
>> right before.
>> 3) doing the action of the mode.
>>
>> 1) is the same call the control V4L2_AUTO_FOCUS of menu type.
>> 2), 3) is the same call the control dedicated focus control. Currently, the
>> focus control excepting manual is not needed another control. If touch
>> mode are needed, we can add another enum value, e.g. V4L2_FOCUS_ORIENT.
>> and add another dedicated control, e.g., V4L2_CID_FOCUS_ORIENT_X,
>> V4L2_CID_FOCUS_ORIENT_Y.
>>
>> I think this as I use digital camera. We normally follow such procedure,
>> using the digital camera.
>>
>> If I get your words wrongly, give me some clue :)
> 
> What happens when the user selects the V4L2_FOCUS_AUTO menu entry ? Will the
> camera start a one-shot auto-focus algorithm ? In that case, if the user is
> not happy with the result and wants to perform a new auto-focus, how will that
> be possible ? The V4L2_CID_FOCUS_AUTO control will already be in
> V4L2_FOCUS_AUTO mode.
> 

IIUC normally in digital cameras the shutter button is being pressed half way
to start operation in the selected focus mode. Having only your new menu control
I'm not sure how we do re-focus on a new object after V4L2_FOCUS_AUTO menu entry
is selected. 
Do we need to switch to V4L2_FOCUS_MANUAL and then back to V4L2_FOCUS_AUTO 
to achieve this? Could you explain again please?

--
Regards, 
Sylwester Nawrocki


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode
  2011-03-08 23:08           ` Sylwester Nawrocki
@ 2011-03-09  5:23             ` Kim, HeungJun
  0 siblings, 0 replies; 10+ messages in thread
From: Kim, HeungJun @ 2011-03-09  5:23 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Kim HeungJun, Laurent Pinchart, linux-media@vger.kernel.org,
	Hans Verkuil, Sylwester Nawrocki,
	???/Mobile S/W Platform Lab(DMC?)/E4(??)/????,
	kyungmin.park@samsung.com

Hi Sylwester, 

2011-03-09 오전 8:08, Sylwester Nawrocki 쓴 글:
> Hi HeungJun,
> 
> On 03/03/2011 04:22 PM, Laurent Pinchart wrote:
>> Hi,
>>
>> On Thursday 03 March 2011 15:34:36 Kim HeungJun wrote:
>>> 2011. 3. 3., 오후 10:24, Laurent Pinchart 작성:
>>>> On Thursday 03 March 2011 14:17:10 Kim HeungJun wrote:
>>>>> 2011. 3. 3., 오후 7:08, Laurent Pinchart 작성:
>>>>>> On Thursday 03 March 2011 03:16:34 Kim, HeungJun wrote:
>>>>>>> Document about the type changes and the enumeration of the auto focus
>>>>>>> control.
>>>>>>>
>>>>>>> Signed-off-by: Heungjun Kim<riverful.kim@samsung.com>
>>>>>>> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
>>>>>>> ---
>>>>>>> Documentation/DocBook/v4l/controls.xml    |   31
>>>>>>> +++++++++++++++++++++++++--- Documentation/DocBook/v4l/videodev2.h.xml
>>>>>>> | 6 +++++
>>>>>>> 2 files changed, 33 insertions(+), 4 deletions(-)
>>>>>>>
>>>>>>> diff --git a/Documentation/DocBook/v4l/controls.xml
>>>>>>> b/Documentation/DocBook/v4l/controls.xml index 2fae3e8..889fa84 100644
>>>>>>> --- a/Documentation/DocBook/v4l/controls.xml
>>>>>>> +++ b/Documentation/DocBook/v4l/controls.xml
>>>>>>> @@ -1801,12 +1801,35 @@ negative values towards infinity. This is a
>>>>>>> write-only control.</entry>  </row>
>>>>>>>
>>>>>>> 	<row><entry></entry></row>
>>>>>>>
>>>>>>> -	<row>
>>>>>>> +	<row id="v4l2-focus-auto-type">
>>>>>>>
>>>>>>> 	<entry
>>>>>>>
>>>>>>> spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry>  -
>>>>>>> <entry>boolean</entry>
>>>>>>> +	<entry>enum&nbsp;v4l2_focus_auto_type</entry>
>>>>>>>
>>>>>>> 	</row><row><entry spanname="descr">Enables automatic focus
>>>>>>>
>>>>>>> -adjustments. The effect of manual focus adjustments while this
>>>>>>> feature -is enabled is undefined, drivers should ignore such
>>>>>>> requests.</entry>  +adjustments of the normal or macro or
>>>>>>> continuous(CAF) mode. The effect of +manual focus adjustments while
>>>>>>> this feature is enabled is undefined, +drivers should ignore such
>>>>>>> requests. Possible values are:</entry>  +	</row>
>>>>>>> +	<row>
>>>>>>> +	<entrytbl spanname="descr" cols="2">
>>>>>>> +	<tbody valign="top">
>>>>>>> +		<row>
>>>>>>> +		<entry><constant>V4L2_FOCUS_MANUAL</constant>&nbsp;</entry>
>>>>>>> +		<entry>Manual focus mode.</entry>
>>>>>>> +		</row>
>>>>>>> +		<row>
>>>>>>> +		<entry><constant>V4L2_FOCUS_AUTO</constant>&nbsp;</entry>
>>>>>>> +		<entry>Auto focus mode with normal operation.</entry>
>>>>>>> +		</row>
>>>>>>> +		<row>
>>>>>>> +		<entry><constant>V4L2_FOCUS_MACRO</constant>&nbsp;</entry>
>>>>>>> +		<entry>Auto focus mode with macro operation.</entry>
>>>>>>> +		</row>
>>>>>>> +		<row>
>>>>>>> +		<entry><constant>V4L2_FOCUS_CONTINUOUS</constant>&nbsp;</entry>
>>>>>>> +		<entry>Auto focus mode with continuous(CAF) operation.</entry>
>>>>>>
>>>>>> I should have asked this sooner, but what's the difference between
>>>>>> normal AF and continuous AF ?
>>>>>
>>>>> Let's assume that the whole focus process(of course the sensor-internal
>>>>> process automatically) is below : 1) pointing the object focussed
>>>>>
>>>>>     : mostly this is possible to be a middle spot, or pre-given orient x
>>>>>     :&  y set from register.
>>>>>
>>>>>     (The mode using given orient x&  y, may be defined V4L2_FOCUS_TOUCH
>>>>>     or
>>>>>
>>>>> whatever, but I know touch auto focus suggestion is determined nothing
>>>>> so far, because of that, after this I will suggest to discuss about it
>>>>> one more.) 2) starting and completing the move of the motor to control
>>>>> lens, using the focusing internal algorithm 3) check whether the lens
>>>>> position is proper or not, using the focusing internal algorithm, too.
>>>>> (If the position is not proper, the image may looks defocused)
>>>>>
>>>>> In the Normal AF mode, the sensor do the whole focusing process once,
>>>>> and after completing to move lens, even though the sensor failed
>>>>> focusing process. On the other hand, the sensor repeats 1~3 in the
>>>>> Continuous AF mode periodically, regardless of success of failure.
>>>>
>>>> OK, that was my understanding as well. How will that work with the
>>>> proposed focus menu control ? Don't you need a button control for normal
>>>> auto-focus ?
>>>
>>> You mean that the normal auto-focus control type should be a button, right?
>>> For now, in our case the user application assumes that such modes(normal,
>>> MACRO, CAF, TOUCH or oriented mode, or something) are already ready in the
>>> driver. So, I did't need the normal auto-focus is a button type.
>>>
>>> But, IMHO, the focus control of camera is right to follow the next
>>> procedure, 1) choosing the modes as I said upper. (because, the camera
>>> dose not have one more focus mode.) 2) adjusting the value of the mode set
>>> right before.
>>> 3) doing the action of the mode.
>>>
>>> 1) is the same call the control V4L2_AUTO_FOCUS of menu type.
>>> 2), 3) is the same call the control dedicated focus control. Currently, the
>>> focus control excepting manual is not needed another control. If touch
>>> mode are needed, we can add another enum value, e.g. V4L2_FOCUS_ORIENT.
>>> and add another dedicated control, e.g., V4L2_CID_FOCUS_ORIENT_X,
>>> V4L2_CID_FOCUS_ORIENT_Y.
>>>
>>> I think this as I use digital camera. We normally follow such procedure,
>>> using the digital camera.
>>>
>>> If I get your words wrongly, give me some clue :)
>>
>> What happens when the user selects the V4L2_FOCUS_AUTO menu entry ? Will the
>> camera start a one-shot auto-focus algorithm ? In that case, if the user is
>> not happy with the result and wants to perform a new auto-focus, how will that
>> be possible ? The V4L2_CID_FOCUS_AUTO control will already be in
>> V4L2_FOCUS_AUTO mode.
>>
> 
> IIUC normally in digital cameras the shutter button is being pressed half way
> to start operation in the selected focus mode. Having only your new menu control
> I'm not sure how we do re-focus on a new object after V4L2_FOCUS_AUTO menu entry
> is selected.
> Do we need to switch to V4L2_FOCUS_MANUAL and then back to V4L2_FOCUS_AUTO 
> to achieve this? Could you explain again please?
There is a gap using the type of GUI button on screen or real button, especially when
we're discussing about digital camera. The managing real button implies more having
possibility than dealing with GUI button. The real button makes the cpu recognize
event using interrupt or polling whatever, and then, if it's ok, the userapplication
let the v4l2-framework handle this event how to control camera. But, it can be changed.
Another input methods exist possibly. 

In other words, the real user press/re-press the *real* button is input event side,
not v4l2 side, I think.

If the users(real camera user, not user application) press the button, and then 
the camera do the focus. When the users see unfocused images, they press the butten
one more time for another re-focusing, at that time they must detach the button,
and the camera(device) can check this event.
If detaching recognized, digital camera userland can do V4L2_FOCUS_MANUAL or
some stuff as the camera needed.

For doing this more precisely, the userapp can get the feedback of the focus
status, because the full focusing time goes about 3~4 seconds, and the focus
status depends on how to determine the next control and preparing for user
application. But, I have not find proper things yet, and IMHO, for doing as
your words, we can get the feedback first. For now, we can call control just
twice to do the focus, although it's not a perfect focusing job.

If we start to think the focus feedback, we must check more thing we expected.
For examples, preventing the stop or being slow while focusing in the preview,
and the methods getting the status for generic API, and when the sensor notifies
the status of focus, etc. But, sooner, this will be need I think.

Let me know another opinions. :)

> 
> --
> Regards, 
> Sylwester Nawrocki
> 
> 

Thanks,
Heungjun Kim

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-09  5:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-03  2:16 [RFC PATCH RESEND v2 3/3] v4l2-ctrls: document the changes about auto focus mode Kim, HeungJun
2011-03-03 10:08 ` Laurent Pinchart
2011-03-03 13:17   ` Kim HeungJun
2011-03-03 13:24     ` Laurent Pinchart
2011-03-03 14:34       ` Kim HeungJun
2011-03-03 15:22         ` Laurent Pinchart
2011-03-03 15:53           ` Kim HeungJun
2011-03-08 23:08           ` Sylwester Nawrocki
2011-03-09  5:23             ` Kim, HeungJun
  -- strict thread matches above, loose matches on Subject: below --
2011-02-25 12:46 Kim, HeungJun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox