linux/Documentation/video4linux/sh_mobile_ceu_camera.txt
<<
.40" /spapti /formti a .40" href="../linux+v3.7.5/Documenta.40" img src="../.sta.4 /spapti.4 spap class="lxr_search">.40".40" input typvalhidden" name="navtarget" ion val">.40" input typvaltext" name="search" id="search">.40" buttopttypvalsubmit">Search.40" Prefsi /a>.4 /spapti0" /divti0" form ac.4 input typvalhidden" name="ajax_lookup" id="ajax_lookup" ion val">.0" /formti.0" div class="headingbottom"> 1 /a> Cropping and Scaling algorithm, used iptthe sh_mobile_ceu_camera driver 2 /a> ======================================================================= 3 /a>. 4" naTe9minology. 5" na-----------. 6 /a>. 7 /a>sensor scales: horizontal and ver 8 /a>host scales: -"- host driver 9 /a>combined scales: sensor_scale * host_scale 3.8.a>. 118.a>. 12 /a>Generic scaling / cropping scheme 13" na--------------------------------- 148.a>. 15" na-1-- 16 /a>| 17 /a>-2-- -\ 18 /a>| --\ 19 /a>| --\ 2.8.a>+-5-- . -- -3-- -\ 21 /a>| `... -\ 22 /a>| `... -4-- . - -7.. 23 /a>| `. 24 /a>| `. .6-- 25 /a>| 26 /a>| . .6'- 27 /a>| .´ 28 /a>| ... -4'- .´ 29 /a>| ...´ - -7'. 3.8.a>+-5'- .´ -/ 31 /a>| -- -3'- -/ 32 /a>| --/ 33 /a>| --/ 34 /a>-2'- -/ 35 /a>| 36 /a>| 37 /a>-1'- 388.a>. 39 /a>Iptthe above chart minuses and slashes represent "real" data amounts, points and. 4.8.a>accents represent "useful" data, bas/cally, CEU scaled and cropped output,. 41 /a>mapped back ontotthe client's source plane. 42 /a>. 43 /a>Such a configura 448.a>. 45 /a>S_CROP(left / top = (5) - (1), width / height = (5') - (5)). 46 /a>S_FMT(width / height = (6') - (6)). 478.a>. 488.a>Here:. 498.a>. 5.8.a>(1) to (1') - whole max width or height. 518.a>(1) to (2) - sensor cropped left or top. 52 /a>(2) to (2') - sensor cropped width or height. 53 /a>(3) to (3') - sensor scale 54 /a>(3) to (4) - CEU cropped left or top. 55 /a>(4) to (4') - CEU cropped width or height. 56 /a>(5) to (5') - reverse sensor scale applied to CEU cropped width or height. 57 /a>(2) to (5) - reverse sensor scale applied to CEU cropped left or top. 588.a>(6) to (6') - CEU scale -tuser window. 598.a>. 6.8.a>. 61 /a>S_FMT. 62" na-----. 63 /a>. 64 /a>Do not touch input rectangle -tit is already 12 65 /a>. 66 /a>1. C-6cul9tienurrent sensor scales:. 678.a>. 68 /a> scale_s = ((2') - (2)) / ((3') - (3)). 698.a>. 7.8.a>2. C-6cul9tie"effective" input crop (sensor subwindow) - CEU crop scaled back at. 71 /a>nurrent sensor scales ontotinput window - this is user S_CROP:. 72 /a>. 73 /a> width_u = (5') - (5) = ((4') - (4)) * scale_s. 748.a>. 75 /a>3. C-6cul9tienew combined scales frome"effective" input window totrequested user. 76 /a>window:. 778.a>. 78 /a> scale_comb = width_u / ((6') - (6)). 798.a>. 8.8.a>4. C-6cul9tiesensor output window by applying combined scales totreal input. 81 /a>window:. 82 /a>. 83 /a> width_s_out = ((7') - (7)) = ((2') - (2)) / scale_comb. 848.a>. 85 /a>5. Applytitera 86 /a>. 87 /a> subdev->video_ops->s_fmt(.width = width_s_out). 888.a>. 898.a>6. Retrieviesensor output window (g_fmt). 9.8.a>. 91 /a>7. C-6cul9tienew sensor scales:. 92 /a>. 93 /a> scale_s_new = ((3')_new - (3)_new) / ((2') - (2)). 948.a>. v2.6.33.3 91> a-1-- 01 91> clas9. Use" name="L5ass="> L81" ass="li na" /a>. a> scale_s_new = ((3')_new - (3)_new) / ((2') - (2))10ux/sh_mob0ile_ceu_camera.txt#L14" 03 91> obile_ceu_cam((2Q"name="L88"> 888((2, . 588=e 58ea ha href="Documenta04 91> na-1-- 76 /a>win" /a>. a> subdev->video_ops->s_fmt(.width = width_s_out). 7t#L79" id="L79" cla h" iu_camea h"/iu_cam subdev->video_ops->s_fmt(.width = width_s_out). a>6. Retrieviesensor output window (g_fmt).> 111.a>.. 1 91>/a>Gen.a>..40" Phttp://v4l2spec.bytesex.org/spec/x1904.htm ">http://v4l2spec.bytesex.org/spec/x1904.htm o4linay> 151 na-1-- 1 16 /a" clas...specific44" cldoL81#L65deflin an origin or units. How.txt="L8convmen" c- 11 /a>-2combins shouldceu_camera.="lc"L40 un1"> 71sampl.txt#lid="L8ass0H." clas- WinuxoosL8assfollme="videdviseme="Linterpretme="L5ass=units asine" na/a>window:. 76 exactlL66"> 44ss="lineera.t8"> 8 /aa href="Documenta 21 /a>| 2. If sma.=> -L86" ide=until a li r oin is obtae" n90" 7ccc:s="line" name="- 9, ti L81" 5 : 5"> 9, u_cameraame="L9lts"at;9"> 7 -L6a href="Documenta scale_comb = width_u / ((6') - (6)). 8 /a>hasiclasd1"> pre"> "L8its ame="L9lr" i as scale_comb = width_u / ((6') - (6)). 3 : "L94" . Sne" nme="L42"="L59is 96"> 9 -L2me="L3"> 9 -L3)t window t#- . 9 -L4" id="L74" -L5 74L3"> 9 -L3)e="L6"> 9 -L2m- Do not touch input rectangle -tit is already 12 678.a>. 8 /a>hasiclasd1"uot;real&1quot; data amounts, poin1ts an1. 14.8.a1accentAut/sh: Guennadi Liakhovetski <g.liakhovetski@gmx.de id=5"> 15" na-1-- 41 /a>1mappe1 back specra.txtal LXR software_ceu_camhtm o4linayLXR commLL20yack ,class=exL93i- lx/@enta<.noack . ne" nam="L1" name="subfooa lx/.enta<.no klin"era.txlass="htm o4linayRedpill Litrao ASack ,crao"Docamef Lituxlinemobi========ope.txt#Lle_xt#ic" isince 1995. ne" name=/bodyam=/htmla