Home

EMMA Mobile1 Application Note IPU

image

Contents

1. 2 About the explanation of all the ASMU registers mentioned in this document please refer to EMMA Mobile 1 SMU GIO Interface User s Manual Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 18 67 2 5 Detail of IPU IMG Normal Procedure 2 5 1 IPU IMG Initialization When do IMG initialization cancel reset IPU clock by setting ASMU registers as below Related Register AHBCLKCTRLO APBCLKCTRLO GCLKCTRLOENA GCLKCTRLO RESETREQOENA RESETREQO Note The operations of this step are same with 2 3 1 IPU Rotator Initialization 2 5 2 Get Source Image Data For each sample the related YUV or RGB image will be read as the source data 2 5 3 Configure Image Processor Registers Before start image processor some registers need to be configured such as source data address destination address function mode image data format etc The following registers need to be set as necessary in random sequence Related Registers IMG_DUAL FF IMG_MODE IMG_FORMAT IMG SRCSIZE B F IMG DSTSIZE IMG SRCYRGBADR B F IMG SRCUVADR DIr IMG SRCVADR B F IMG DSTYRGBADR IMG DSTUVADR IMG DSTVADR IMG SRCHSIZE B F IMG SRCVSIZE B F IMG DSTHSIZE IMG DSTVSIZE IMG OFFSETX Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT IMG OFFSETY IMG MASKCOLOR IMG ALPHA IMG HSTEP IMG VSTEP IMG HFOLD IMG VFOLD IMG PEL ENDIAN IMG RGBYUV CONF
2. 960 480x2 IMG SRCHSIZE F 0x0000 0140 320 IMG DSTYRGBADR 0x3200 0000 0x3200_0000 IMG_DSTHSIZE 0x0000_01E0 480 IMG DSTVSIZE 0x0000 0168 IMG OFFSETX 0x0000 0000 0 Horizontal offset IMG HSTEP 0x0000 0140 IMG OFFSETY 0x0000 0000 IMG VSTEP 0x0000 011C O Vertical offset 320 284 256 480 600 256 360 400 IMG HFOLD 0x0000 0033 51 480 600 x 64 IMG VFOLD 0x0000 0039 57 360 400 x 64 Application Note 819898EJ 1VOANOO IMG SRCVADR F x3121 7700 0x3121_2C00 320x240 4 CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 42 67 IMG FORMAT 0x0000 0224 DSTFMT 0010b RGB565 SRCFMT_B 0010b RGB565 SRCFMT_F 0100b YUV420 Planar IMG INDATABYTE 0x0000_00E4 default IMG_OUTDATABYTE 0x0000_00E4 default IMG_PEL_ENDIAN 0x0000 0003 OUT_ENDI 1 Little Endian IN_ENDI 1 Little Endian 0x0000_0000 default default default IMG_ENSET 0x0000_0001 IMG ENSETFLT Ob IMG ENSETSTOP Ob IMG ENSETERROR Ob IMG ENSETSTAT 1b enable processing end interrupt IMG FFCLR 0x0000 0001 IMG FFCLRFLT Ob IMG FFCLRSTOP Ob IMG FFCLRERROR Ob IMG FFCLRSTAT 1b clear processing end interrupt source Note 1 Setting of the other registers which not listed in the upper table should use the default ne AR a ee default default default default AU AN A eS value 2 There are several kinds of ari
3. IMG YUVRGB CONF IMG RGBYUVOO IMG YUVRGBOO IMG RGBYUVO IMG YUVRGBO IMG RGBYUVO 2 IMG YUVRGBO2 IMG RGBYUV10 IMG YUVRGB10 IMG RGBYUV11 IMG YUVRGB11 IMG RGBYUV12 IMG YUVRGB12 IMG RGBYUV20 IMG YUVRGB20 IMG RGBYUV 1 IMG YUVRGB 1 IMG RGBYUV22 IMG YUVRGB22 IMG ENSEFT IMG INDATABYTE B IMG INDATABYTE F IMG OUTDATABYTE IMG R BRITNESS IMG G BRITNESS IMG B BRITNESS EN Om Am A DSN A Note Some registers are unnecessary to be set under different operation modes Application Note 819898EJ 1VOANOO 19 67 CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 20 67 2 5 4 Start IMG Processing Issue the processing request to start image processor Related Register IMG REQ 2 5 5 Image Processing The source data will be processed according the IPU IMG registers configuration The processed image data will be store in the specified destination address When processing is completed the value of register IMG ACHT will cleared 1 gt O And a processing end interrupt is issued Gets the image processing result by checking the processing status and the interrupt status 2 5 6 Display the Destination Image Check the operation result by display the destination image in LCD panel Note The operation of this step is similar with 2 3 6 Display the Rotated Image 2 5 7 Reset IPU Image Processor Before exit from image process operation reset IPU
4. Related Registers AHBCLKCTRLO APBCLKCTRLO GCLKCTRLOENA GCLKCTRLO RESETREQOENA RESETREQO Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 21 67 2 6 Normal Procedure of IPU Graphics DMA 4 START gt Y IPU Graphics DMA Initialization Y Get the Source Image Data Y Configure IPU GDMA Registers Y Start Processing GDMA Processing Display the Destination Image in LCD Panel Reset IPU Graphics DMA y u gt Figure 2 3 Normal Procedure of IPU GDMA Note 1 About the explanation of all the IPU GDMA registers mentioned in this document please refer to EMMA Mobile 1 IPU User s Manual 2 About the explanation of all the ASMU registers mentioned in this document please refer to EMMA Mobile 1 SMU GIO Interface User s Manual Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 22 67 2 7 Detail of IPU GDMA Normal Procedure 2 7 1 IPU GDMA Initialization When do GDMA initialization cancel reset IPU clock by setting ASMU registers as below Related Register AHBCLKCTRLO APBCLKCTRLO GCLKCTRLOENA GCLKCTRLO RESETREQOENA RESETREQO Note The operation of this step is same with 2 3 1 IPU Rotator Initialization 2 7 2 Get Source Image Data For each sample the related YUV or RGB image will be read
5. More detail please refer EMMA Mobile 1 IPU User s Manual 3 image color space converter YUV lt gt RGB Table 2 3 IPU IMG Converter Function item O Valuable Setting Max 8188 pixels x 8188 pixels Input data format YUVA22 420 RGB565 888 Output data format YUV422 420 RGB565 888 RGB666 with pixel packing Brightness setting Enable for YUV gt RGB conversion Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 12 67 4 color dithering Table 2 4 IPU IMG Color Dithering Function ltem Valuable Setting Max 8188 pixels x 8188 pixels Input data format RGB565 888 YUV422 420 only when use YUV gt RGB conversion Output data format RGB565 RGB666 with pixel packing Brightness setting Enable for YUV gt RGB conversion 5 pixel packing RGB565 888 gt RGB666 Table 2 5 IPU IMG Pixel Packing Function ltem O Valuable Setting Max 8188 pixels x 8188 pixels Input data format RGB565 888 YUV422 420 only when use YUV gt RGB conversion Output data format RGB666 6 overlay Overlay the front image and back image can be used with the other functions of IPU Support color mask and transparency 7 Vertical horizontal mirror flip 8 Endian switch 9 Byte lane switch Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 13 67 10 Graphics DMA function This function can improve the image processing speed Supports the below o
6. 11 Setting IPU IMG Registers for IPU IMG Sample 1 41 Table 3 12 Setting IPU IMG Registers for IPU IMG Sample 2 43 Table 3 13 Setting IPU GDMA Registers for IPU GDMA Sample 49 Table A 1 IPU Driver Funcion EISU 2 ciuisieo ted goi o ove E ea eiae poetis 51 Table A 2 Structure LISt niet Lettre oto inaua edecanes 51 Application Note 819898EJ 1VOANOO INDEX 8 67 LIST OF FIGURES Figure 2 1 Normal Procedure of IPU ROT sees nnn 14 Figure 2 2 Normal Procedure of IPU IMG ococcccocccccccccnccnccccnocconccononncnnonononcnnnnnonanennnos 17 Figure 2 3 Normal Procedure of DU GIDMA nnn 21 Figure 3 1 Data Flow Chart of IPU Examples nn 26 Figure 3 2 Operation Flow of IPU Initialization and Heset 27 Figure 3 3 Operation Flow of IPU Rotator Sample sssssssssssennnnnnnneensssssrnnnnnnnnrrrrreeeesssnen 29 Figure 3 4 Operation Flow of IPU Image Processor Sample 39 Figure 3 5 Operation Flow of IPU Graphics DMA Gample sse 47 Figure Add PU Ia E e MN ri E 53 FOUS piod gola aii ios 54 Figure A 3 Enable Disable ROT Register Update Funchon 55 Figure A 4 ROT Configure Function reaa a a 56 Figure A S Star BOT Processing uenit ice eei ti ibid ae ete elei po awe ec edet ese oet bte ee 57 Figure A O CIBEROT E EE 58 Figure A 7 Enable Disable IMG Register Update Functio
7. 27 En e ere e 28 Application Note 819898EJ 1VOANOO INDEX 5 67 3 2 1 Operation Eo ee E RS 29 g2 2 Operation Deal EE 30 A e M REDEEM Es 30 3 2 2 2 Mittalizo ECO and IM Oso 30 Ce elt 30 3 2 2 4 Display the Source Image EE 30 3 2 2 5 Configure ROT Registers for Hotaton 31 3 2 2 6 Start Rotator PROCESSING id 37 32 2 Ao x 37 3 2 2 8 Display the rotated image in LCD poanel 37 AA A HR A 37 3 2 2 10 Release Be RK ie AE of 3 3 IPU Sample Image Processor Funchon 38 suom OPS ion FOW wi raat o a ahs ean nee eae 39 30 2 Operation NEIN 40 302 WNP TMM ZEN ON E 40 332 AMAIE LCCBD And IMO erora 40 39 209 Read OUNCE ates a a E Mera Edid 40 3 9 2 4 e e CH e GE 41 3 9 2 5 Olan IMAGE PIOCESS ING lisis 45 3 39 20 IMG POCOS e ME HO 45 3 3 2 7 Display the processed magemlCDpoanel nnt 45 OPE O RESETE 45 3 0 2 9 Release LOD and IMO m 45 3 4 IPU Sample GDMA ROP Funchon 46 Sm A OPA IO FOW em c 47 2942 Operation Dellanos nico 48 SA2 MPU Mala ni dit tina 48 3422 Initialize ECD ari EE 48 34 203 head SOC Dada aa 48 34 24 COMIGQUIE GOMA T 49 93 4 2 5 Start DMA Process Iii 50 34 2 6 ODMA Prce SSiN EE 50 3 4 2 7 Display the processed magemlCDpoanel 50 Sm MINE M
8. ENDI 1 Little Endian IN ENDI 1 Little Endian default 0x0000_0856 default mm A default mm A default ne A default default mm default mm A default ne A A ne IMG_ENSET 0x0000 0001 IMG ENSETFLT Ob IMG ENSETSTOP Ob IMG ENSETERROR Ob IMG ENSETSTAT 1b enable processing end interrupt IMG FFCLR 0x0000 0001 IMG FFCLRFLT Ob IMG FFCLRSTOP Ob IMG FFCLRERROR Ob IMG FFCLRSTAT 1b clear processing end interrupt source Note 1 Setting of the other registers which not listed in the upper table should use the default value 2 There are several kinds of arithmetic algorithms for YUV gt RGB converter About the implementation and the typical setting values please refer EMMA Mobile 1 IPU User s Manual Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 45 67 3 3 2 5 Start Image Processing Issue the processing request to start IPU IMG by set IMG REQY to 1 3 3 2 6 IMG Processing The source image data will be processed according to the setting of IPU IMG registers When image processing is completed the value of register IMG ACK will become 0 Checks the value for ensure the processing is completed 3 3 2 7 Display the processed image in LCD panel Call IMC interface to display the processed image 3 3 2 8 Reset IPU Reset IPU as description in 3 1 2 IPU Initializ
9. START gt Y Release Rotator Y Release Image Processor Y Release GDMA Y Release IPU AHB Check IPU Status ROT amp IMG amp GDMA Yes Status Processing Return DRV_ERR_STATE Disable IPU Interrupt ROT amp IMG amp GDMA Return mu OK Figure A 1 IPU Initialization Note None Application Note 819898EJ 1VOANOO 53 67 APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION A 3 2 Reset IPU Function Function Name em ipu release Format void em1 ipu release void Argument None Function Return None Function Flow C START Y Reset Rotator Y Reset Image Processor Y Reset GDMA Y Reset IPU AHB Y uL Figure A 2 IPU Reset Note None Application Note 819898EJ 1VOANOO 54 67 APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 55 67 A 3 3 Enable Disable ROT Register Update Function Function Name em ipu rot dual off Format void em1 ipu rot dual off uchar flag Argument Parameter Type WO Dem feg uchar _ Enable or disable flag Function Return None Function Flow START D Y Set Register ROT DUAL FF y WER Figure A 3 Enable Disable ROT Register Update Function Note Call this function first time only Ap
10. ano e deseas euren adeste estu a 15 2 9 9 Gonfigure Rotator Register os cob res nme EO I enka Tu t ioc E I hee 15 29 4 DIANE ROAU ri eevee E 16 23 90 ROAN FFOCCSSING sss nace vente cedat dta unico Soda d udi Eabb dubi cu ened teasers 16 2 3 6 Display the Rotated Image iii eie rfe Av veia ed eg riae at Pussy Box dex Vaga c Ope Vela ER 16 237 RESELIP UROTI ai AA AAA 16 2 4 Normal Procedure of IPU Image Processor oooccccccccocccnccccoccconcconancnonononancnnncononconnnnnnnncnnnns 17 2 5 Detail of IPU IMG Normal brocedure 18 E DIS EA ER e UE El EE 18 2 5 2 Get 5ource Image Dalaus c cda 18 2 5 3 Configure Image Processor Registers ooocccccccocccnncccnoncnnnononancnnnnnnnnncnnnonannnnnnnnnanennnns 18 ARS ola nt IMG POESIA 20 25 9 Image FrocessiNO sia A 20 2 5 6 Display the Destination nn a s er autc ouv A dia 20 2 5 7 Reset IPU Image Processo ita veo v ca Po Tp Y cus aV YO De EO YE EE ERE Te EET e P up 20 2 6 Normal Procedure of IPU Graphics DMA 21 27 Detail EENEG 22 22v Be Brest m T 22 2 12 Get 5ource Image RE ii 22 2 9 Gonfig re GDMA EE erer ee dees 22 2 1 4 Sart GDMA elen Le DEE 23 2 5 GDMAJTEIOCOSSIPDU E 23 2 7 6 Display the Destination Image AE 23 2 14 Resewle WU GDMA T TT 24 Chapter 3 Example of IPU Operation ccceeeeeeseceesseeeeeeeeeeeesneeeeeeeeeeoenssseeseseooensnseeeeesseoes 25 oT Outline or PU elegant 25 3 1 1 Data Flow Chart of IPU Examples 26 Silica HU Initlallzattorkarid TCS CN sciant tos oa
11. products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics ENESAS Application Note Multimedia Processor for Mobile Applications Image Processor Unit IPU EMMA Mobile 1 Document No 19898EJ1VOANOO Date Published Aug 2009 NEC Electronics Corporation 2009 Printed in Japan PREFACE PREFACE Purpose The purpose of this document is to introduce the usage of EMMA Mobile 1 Image Processor Unit Organization This document includes the following Chapter 1 Overview Chapter 2 Usage of Image Processor Unit Chapter 3 Example of Image Processor Unit Operation Appendix Image Processor Unit Driver Function Notation Here explains the meaning of following words in text Note Explanation of item indicated in the text Caution Information to which user should afford special attention Remark Supplementary information Related document The following tables list related documents Reference Document Version date S19268EJ1V0UMOO 1chip pdf NECEL S19265EJ1VOUM00_ASMUGIO pdf 1 edition NECEL S19264EJ1VOUMO0_IPU paf NECEL S19907EJ1VOANOO_GD pdf f NECEL GD Spec S19899EJ1VOANO0_LCD pdf NECEL Application Note S19906EJ1 VOANOO_IMC pdf 1 edition NECEL Applic
12. 2 1 11b Y Operation of IPU Sample Y Reset IPU 1 disable auto clock control AHBCLKCTRLO 11 7 00000b APBCLKCTRLO 16 0b APBCLKCTRLO 2 1 00b 2 reset device RESETREQOENA 11 8 11115 RESETREQO 11 8 0000b RESETREQOENA 11 8 0000b 3 Close clockgate GCLKCTRLOENA 17 10 111111115 GCLKCTRLO 17 10 00000000b GCLKCTRLOENA 1 7 10 00000000b y CTO Figure 3 2 Operation Flow of IPU Initialization and Reset Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 28 67 3 2 IPU Sample Rotator In this sample IPU Rotator function is checked The below samples are performed Detail of this sample Sample 1 Input image Output image Sample 2 Input image Output image Sample 3 Input image Output image Note 100x100 YUVA22 Interleave 100x100 YUVA22 with rotate angle 90 180 and 270 320x240 YUV420 Planar 320x240 YUV420 with rotate angle 90 180 and 270 320x240 RGB565 320x240 RGB565 with rotate angle 90 180 and 270 Between each rotation operation there is 1s delay for image displaying in LCD panel Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 29 67 3 2 1 Operation Flow START gt Y IPU Rotator Initialization Y Init LCD and IMC for Display Y Read source image data Y Display the s
13. AME 0x0000 000D SRCSEL 01b A frame default TT TT a 480 240 x 2 0x3220_0000 Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 37 67 3 2 2 6 Start Rotator Processing Issue the processing request to start IPU ROT by set ROT REQ to 1 3 2 2 7 Rotator Processing The source image data will be rotated according to the setting of IPU ROT registers When rotation is completed the value of register HOT STATUS will become 0 Checks the value for ensure the rotation is completed 3 2 2 8 Display the rotated image in LCD panel Call IMC interface to display the rotated image 3 2 2 9 Reset IPU Reset IPU as description in 3 1 2 IPU Initialization and Reset 3 2 2 10 Release LCD and IMC Release LCD and IMC resource used by the ROT samples Actually needn t to do anything for IMC Only need to stop and power off LCD Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 38 67 3 3 IPU Sample Image Processor Function In this chapter there are two samples to evaluate image processor functions such as resize converter dithering overlay etc Detail of this sample Sample 1 Show how to use resizer combine with color space converter function Back image 600x400 RGB565 Will be reduced to 480x360 Front image 320x240 YUV420 Planar Will be converter to 320x240 RGB565 Output image 480x360 RGB565 Sample 2 Show how to us
14. M V5 10a Kyoto Microcomputer Co Ltd Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 10 67 Chapter 2 Usage of Image Processor Unit 2 1 Image Processor Unit Function EMMA Mobile 1 Image Processor Unit IPU supports the below functions 1 image rotation Table 2 1 IPU ROT Function Item Valuable Setting Rotate angle 0 90 180 or 270 Image size Max 4092 pixels x 4092 pixels Input data format YUV422 Semi Planar Interleave YUV420 Semi Planar Planar RGB565 RGB888 Output data format YUV422 Semi Planar Interleave YUV420 Semi Planar Planar RGB565 RGB888 32bit data endian switch Little Endian and Big Endian Byte lane switch 32 bit units U V or Y UV order Note About input data format and output data format relation and limitation please refer EMMA Mobile 1 IPU User s Manual Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 11 67 2 image resize enlarge or reduce Table 2 2 IPU IMG Resizer Function item O Valuable Setting Max 8188 pixels x 8188 pixels Input data format YUV422 Semi Planar Planar Interleave YUV420 Semi Planar Planar RGB565 RGB888 Output data format YUV422 Semi Planar Planar Interleave YUV420 Semi Planar Planar RGB565 RGB666 RGB888 Resize range Horizontal 1 40 x4 Vertical 1 40 x4 Note For each data format such as YUV420 YUV422 RGB565 RGB888 etc the size limitation is different
15. MG Resizer Function cccccccccsssseeecceeeseceecceeuseesceeaseeeesssaaseeeesssaseees 11 Table 2 3 IPU IMG Converter Function ooccccccccccccooonccnnncnnccnnnnncnnnononononannnnnnnnnnnnananennos 11 Table 2 4 IPU IMG Color Dithering Function cccccccocccnnccccocnnnncccconnnnnnoconnnnnononnncnnnnnnancnos 12 Table 2 5 IPU IMG Pixel Packing Function ccccocccnccccccncccncnnccconnnnonononnnnnnnnnnnnanonononcnncnnos 12 Table 2 6 IPU CIDMACELUFOHOT etas ad etae atlas 13 Table 3 1 EiSEor JEU Examples eus erui oet t E Ree 25 Table 3 2 IPU ROT Register Setting for YUV422 90 Rotation n nn0annnnonnnnnnnnnnnnnnnnnna 31 Table 3 3 IPU ROT Register Setting for YUVA22 180 Rotation 32 Table 3 4 IPU ROT Register Setting for YUVA22 270 Rotation 32 Table 3 5 IPU ROT Register Setting for YUV420 90 Rotation nn0annnnnnnnnnnnaannnnnnanna 33 Table 3 6 IPU ROT Register Setting for YUV420 180 Rotation 34 Table 3 7 IPU ROT Register Setting for YUV420 270 Rotation 34 Table 3 8 IPU ROT Register Setting for RGB565 90 Rotation 35 Table 3 9 IPU ROT Register Setting for RGB565 180 Rotation 36 Table 3 10 IPU ROT Register Setting for RGB565 270 Rotation 36 Table 3
16. Ob Big Endian default SRCENDIAN Ob Big Endian default NEWEN 1b use additional function SRCSEL 01b A frame default rU 01b A frame default EECH DSTFMT 0010b RGB565 ROT INTENSET 0x0000 0001 DMASTOPEN Ob not enable default DMAERREN Ob not enable default ROTENDEN 1b enable rotation end interrupt Note 1 During the rotation processing set register ROT DUAL FF at the first time only 2 Setting of the other registers which not listed in the upper table should use the default value Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 36 67 e Setting for 180 rotation Only list difference setting with 90 rotation Table 3 9 IPU ROT Register Setting for RGB565 180 Rotation Wen 1 Setting Explanation ROT MODE 0x0000 0022 ROT MOD 10b rotate 180 SRCYUV Ob not care default DSTENDIAN Ob Big Endian default SRCENDIAN Ob Big Endian default NEWEN 1b use additional function ROT FRAME SRCSEL 01b A frame default e Setting for 270 rotation Only list difference setting with 90 rotation Table 3 10 IPU ROT Register Setting for RGB565 270 Rotation Wem Setting Explanation ROT MODE 0x0000 0023 ROT MOD 11b rotate 270 SRCYUV Ob not care default DSTENDIAN Ob Big Endian default SRCENDIAN Ob Big Endian default NEWEN 1b use additional function ROT FR
17. S will cleared 1 gt O And a processing end interrupt is issued Gets the rotation processing result by checking the processing status and the interrupt status 2 3 6 Display the Rotated Image Check the operation result by display the rotated image in LCD panel EMMA Mobile 1 LCD controller only supports RGB565 and RGB666 format data input Remark In this step some IMC and LCDC modules interface will be called for the displaying More detail about these two modules please refer to EMMA Mobile 1 IMC Application Note and EMMA Mobile 1 LCDC Application Note 2 3 Reset IPU Rotator Before exit from rotation operation reset IPU module Related Registers AHBCLKCTRLO APBCLKCTRLO GCLKCTRLOENA GCLKCTRLO RESETREQOENA RESETREQO Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 17 67 2 4 Normal Procedure of IPU Image Processor 4 START gt Y IPU Image Processor Initialization Y Get the Source Image Data Y Configure IPU IMG Registers Y Start Processing IMG Processing Display the Destination Image in LCD Panel Reset IPU Image Processor y u gt Figure 2 2 Normal Procedure of IPU IMG Note 1 About the explanation of all the IPU IMG registers mentioned in this document please refer to EMMA Mobile 1 IPU User s Manual
18. TART Y Get Register Value ROT STATUS Return the Value Figure A 6 Get ROT Status Note None Application Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 59 67 A 3 7 Enable Disable IMG Register Update Function Function Name em ipu img dual off Format void em1 ipu img dual off uchar flag Argument Parameter Type WO Dem feg uchar _ Enable or disable flag Function Return None Function Flow 4 START D Y Set Register IMG DUAL FF y u Figure A 7 Enable Disable IMG Register Update Function Note Call this function first time only Application Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 60 67 A 3 8 Configure IMG Registers Function Name em ipu img Clg Format DRV RESULT em1 ipu img cfg IMGIO CONVERT img Argument Parameter Type WO Dep IMGIO CONVERT d All necessary setting for image processing Function Return DRV ERR CONFIG DRV OK Function Flow 4 START D Y Check the register setting value Check Items Image format Mode OP mode mask dither etc Convert setting Frame selection Address Image size Additional address Offset Bytelane No All setting values are OK Yes Return DRV ERR CONFIG Set IMG Register with the input v
19. To our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry 24 NE S AS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is gra
20. alues Retur DRV OK Figure A 8 IMG Configure Function Note None Application Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 61 67 A 3 9 Start IMG Processing Function Name em ipu img do Format void em1 ipu img do void Argument None Function Return None Function Flow START Y Set Register IMG_REQ 1 y WER Figure A 9 Start IMG Processing Note None Application Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION A 3 10 Get IMG Status Function Name em1 ipu img get status Format void em1 ipu img get status void Argument None Function Return None Function Flow START Y Get Register Value IMG ACK Return the Value Figure A 10 Get IMG Status Note None Application Note 819898EJ 1VOANOO 62 67 APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 63 67 A 3 11 Enable Disable GDMA Register Update Function Function Name em ipu gdma dual off Format void em1 ipu gdma dual off uchar flag Argument Parameter Type WO Dem feg uchar _ Enable or disable flag Function Return None Function Flow START D Y Set Register DMA_DUAL_FF y u Figure A 11 Enable Disable GDMA Register Update Function Note Call this function first time only Appli
21. as the source data 2 7 3 Configure GDMA Registers Before start GDMA processing some registers need to be configured such as source data address destination address function mode image data format etc The following registers need to be set as necessary in random sequence Related Registers DMA DUAL FF DMA MODE DMA FORMAT DMA SRCSIZE 1 DMA SRCSIZE 2 DMA DSTSIZE DMA SRCYRGBADR 1 DMA SRCYRGBADR 2 DMA_DSTYRGBADR DMA SRCUVADR 1 DMA SRCUVADR 2 DMA DSTUVADR DMA SRCVADR 1 DMA SRCVADR 2 DMA_DSTVADR DMA_HSIZE Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 23 67 DMA VSIZE DMA MASKCOLOR DMA FILLDATA DMA SRCBYTE 1 DMA SRCBYTE 2 DMA DSTBYTE DMA AUTO SCAN DMA_ENSET Note Some registers are unnecessary to be set under different operation modes 2 7 4 Start GDMA Processing Issue the processing request to start GDMA Related Register DMA_REQ 2 7 5 GDMA Processing The source data will be processed according the IPU GDMA registers configuration The processed image data will be store in the specified destination address When processing is completed the value of register DMA_ACK will cleared 1 gt 0 And a transfer end interrupt is issued Gets the GDMA processing result by checking the processing status and the interrupt status 2 7 6 Display the Destination Image Check the operation result by display the destination image i
22. ation Note Application Note 819898EJ 1VOANOO PREFACE Disclaimers The information contained in this document is subject to change without prior notice in the future Refer to the latest applicable data sheet s and User s Manual when designing a product for mass production No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Electronics NEC Electronics assumes no responsibility for any errors that may appear in this document NEC Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of NEC Electronics products listed in this documents or any other liability arising from the use of such products No license express implied or otherwise is granted under any patents copyrights or other intellectual property rights of NEC Electronics or others Descriptions of circuits software and other related information in this document are provided for illustrative purposes in semiconductor product operation and application examples The incorporation of these circuits software and information in the design of a customers equipment shall be done under the full responsibility of the customer NEC Electronics assume no responsibility for any losses incurred by customers or third parties arising from the use of these circuits software and information While NEC Electronics endeavo
23. ation and Reset 3 3 2 9 Release LCD and IMC Release LCD and IMC resource used by the ROT samples Actually needn t to do anything for IMC Only need to stop and power off LCD Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 46 67 3 4 IPU Sample GDMA ROP Function This sample will show how to use the ROP function of IPU GDMA Detail of this sample Source image 1 320x240 RGB565 Source image 2 600x400 RGB565 Destination image 320x240 RGB565 Source image 1 and 2 do overlay with mask color Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 47 67 3 4 1 Operation Flow START d Y IPU GDMA Initialization Y Init LCD and IMC for Display Y Read source image data image 1 and 2 Y Config GDMA register Y Start to processing Y GDMA Processin Y Display the processed image Y Reset IPU GDMA Y Release LCD and IMC Y uL Figure 3 5 Operation Flow of IPU Graphics DMA Sample Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 48 67 3 4 2 Operation Detail 3 4 2 1 IPU Initialization Initialize IPU modules for GDMA operation Refer to 3 1 2 IPU Initialization and Reset 3 4 2 2 Initialize LCD and IMC In this sample LCD and IMC modul
24. cation Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 64 67 A 3 12 Configure ROT Registers Function Name em ipu rot cfg Format DRV RESULT emt ipu gdma cfg _IPU_GDMA cfg Argument Parameter Type WO Detail _IPU_GDMA i All necessary setting for GDMA operation Function Return DRV_ERR_CONFIG DRV_OK Function Flow START gt Y Check the register setting value Check Items DMA mode data format Image size Additional address Bytelane No All setting values are OK Yes Return DRV ERR CONFIG Set GDMA Register with the input values Return DRV OK Figure A 12 GDMA Configure Function Note None Application Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION A 3 13 Start GDMA Processing Function Name em ipu gdma do Format void em1 ipu gdma do void Argument None Function Return None Function Flow START D Y Set Register DMA_REQ 1 y WER Figure A 13 Start GDMA Processing Note None Application Note 819898EJ 1VOANOO 65 67 APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION A 3 14 Get GDMA Status Function Name em ipu gdma get status Format void em1 ipu gdma get status void Argument None Function Return None Function Flow START D Y Get Reg
25. described in the following chapters Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 26 67 3 1 1 Data Flow Chart of IPU Examples In the IPU examples the data is transmitted as below Memos Input Buffer for source image SICH Rotator Image Processor GraphcisDMA LCD Output Buffer for destination image Figure 3 1 Data Flow Chart of IPU Examples As shown in the figure the source image data is read out from external memory and stored into the input buffer s then set the IPU ROT IPU IMG IPU GDMA as necessary and start to perform the processing The processed image data is stored into the output buffer then display in LCD panel Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 27 67 3 1 2 IPU Initialization and Reset For all samples of IPU ROT IPU IMG and IPU GDMA the process of IPU initialization reset is same Process flow is below START E Y IPU Initialization 1 disable auto clock control AHBCLKCTRLO 1 1 7 00000b APBCLKCTRLO 16 Ob APBCLKCTRLO 2 1 00b 2 Open clockgate GCLKCTRLOENA 17 10 111111115 GCLKCTRLO 17 10 111111115 GCLKCTRLOENA 1 7 10 00000000b 3 cancel reset device RESETREQOENA 11 8 1111b RESETREQO 11 8 1111b RESETREQOENA 11 8 0000b 4 enable auto clock control AHBCLKCTRLO 11 7 2 111115 APBCLKCTRLO 16 1b APBCLKCTRLO
26. e ROT DSTYADR A 0x3210 0000 0x3210 0000 0000000000000 0000 e Setting for 270 rotation Only list difference setting with 90 rotation Table 3 4 IPU ROT Register Setting for YUV422 270 Rotation Wem Setting Explanation ROT MODE 0x0000 003B ROT MOD 11b rotate 270 SRCYUV Ob not care default DSTENDIAN 1b Little Endian SRCENDIAN 1b Little Endian NEWEN 1b use additional function ROT FRAME 0x0000 000D SRCSEL 01b A frame default Co 11b C frame ROT DSTYADR A 0x3220 0000 0x3220 0000 0000000 0000 Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 33 67 Sample 2 YUV420 Planar image rotation e Setting for 90 rotation Table 3 5 IPU ROT Register Setting for YUV420 90 Rotation Wen Setting Explanation ROT DUAL FF Fere 0x0000 0000 REG EN Ob disable register update reserve function default ROT MODE 0x0000 0031 ROT MOD 01b rotate 90 SRCYUV Ob not care DSTENDIAN Ob Big Endian default SRCENDIAN 1b Little Endian NEWEN 1b use additional function 01b dame ims EN DSTFMT 0100b YUV420 Planar ROT_INTENSET 0x0000_0001 DMASTOPEN Ob not enable default DMAERREN 0b not enable default ROTENDEN 1b enable rotation end interrupt Note 1 During the rotation processing set register ROT DUAL FF at the first time only 2 Setting of the other registers which not listed i
27. e overlay combine with resizer color space converter and pixels packing function Back image 100x100 YUV422 Interleave Will be enlarged and converted to 256x192 RGB666 Front image 320x240 RGB888 image Output image 320x240 RGB666 data When do overlay pixel packing color mask and transparency function are used Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 39 67 3 3 1 Operation Flow START d Y IPU IMG Initialization Y Init LCD and IMC for Display Y Read source image data back and front Y Config IMG register Y Start to processing Y IMG Processing Y Display the processed image Y Reset IPU IMG Y Release LCD and IMC Y uL Figure 3 4 Operation Flow of IPU Image Processor Sample Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 40 67 3 3 2 Operation Detail 3 3 2 1 IPU Initialization Initialize IPU modules for image process operation Refer to 3 1 2 IPU Initialization and Reset 3 3 2 2 Initialize LCD and IMC In this sample LCD and IMC module will be called to display the processed image So need to initialize LCD and IMC module Note This operation is same with 3 2 2 2 Initialize LCD and IMC 3 3 2 3 Read Source Data The specified image data are r
28. e will be called to display the processed image So need to initialize LCD and IMC module Note This operation is same with 3 2 2 2 Initialize LCD and IMC 3 4 2 3 Read Source Data The specified image data are read out as the source image data In this sample RGB565 600x400 image and RGB565 320x240 image are used as source image 1 and source image 2 Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 49 67 3 4 2 4 Configure GDMA GDMA register configurations of this sample are listed as below Table 3 13 Setting IPU GDMA Registers for IPU GDMA Sample mem Setting Explanation DMA DUAL FF 0x0000 0000 REG EN Ob disable register update reserve function default DMA MODE 0x0000 0068 MASKOBJ Ob source image 1 KEY 1b enable mask color OP 10b ROP ROP 1000b SRC1 and SRC2 1200 600x2 default DMA_ENSET 0x0000 0001 DMA_ENSETAHBERR 0b end interrupt DMA FFCLR 0x0000 0001 DMA FFCLRAHBERR 0b paman I DMA_FFCLRSTAT 1b clear DMA processing end interrupt Note 1 Setting of the other registers which not listed in the upper table should use the default value Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 50 67 3 4 2 5 Start GDMA Processing Issue the processing request to start IPU GDMA by set DMA REQY to 1 3 4 2 6 GDMA Processing The source Image and source image 2 will be m
29. ead out as the source image data In IPU IMG sample 1 RGB565 data back image and YUV420 Planar data front image are used In IPU IMG sample 2 YUV422 Interleave data back image and RGB888 data front image are used Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 3 3 2 4 Configure IMG 41 67 IMG register configurations of these samples are listed as below Sample 1 Table 3 11 Setting IPU IMG Registers for IPU IMG Sample 1 mem Setting Explanation HEG EN function default IMG DUAL FF 0x0000 0000 IMG MODE 0x0011 2700 IMG SRCSIZE B 0x0000 04BO IMG SRCYRGBADR B 0x3100 0000 IMG SRCHSIZE B 0x0000 0258 Ob disable register update reserve SRCFMT F Ob not care default SRCFMT B Ob not care default DSTFMT Ob not care default DITHER F Ob not care default DITHER B Ob not care default PELPACK Ob disable pixel packing default RFILTER_F Ob not care default RFILTER B Ob not care default OP MODE 127H OP13 UDINV Ob don t flip default RLINV Ob don t flip default MSK COL Ob not care default NEWEN 1b use additional function 1200 2 600x2 0x3100 0000 IMG SRCVSIZE B x0000 0190 400 IMG SRCUVADR F 0x3121 2C00 0x3120 0000 320x240 E 0 IMG SRCSIZE F 0x0000 0280 320 IMG SRCYRGBADR F 0x3120 0000 0x3120 0000 0 IMG SRCVSIZE F 0x0000 OOFO0 240 IMG DSTSIZE 0x0000 03CO
30. in use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics
31. ister Value DMA_ACK Return the Value Figure A 14 Get GDMA Status Note None Application Note 819898EJ 1VOANOO 66 67 ANNEX MODIFICATION HISTORY 67 67 ANNEX Modification History Application Note 819898EJ 1VOANOO
32. ixed according to the setting of IPU GDMA registers When processing is completed the value of register DMA ACK will become 0 Checks the value for ensure the processing is completed 3 4 2 7 Display the processed image in LCD panel Call IMC interface to display the processed image 3 4 2 8 Reset IPU Reset IPU as description in 3 1 2 IPU Initialization and Reset 3 4 2 9 Release LCD and IMC Release LCD and IMC resource used by the ROT samples Actually needn t to do anything for IMC Only need to stop and power off LCD Application Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 51 67 Appendix A Image Processor Unit Driver Function A 1 IPU API function list The following table shows the IPU functions Table A 1 IPU Driver Function List Driver Function emt ipu gdma get status A 2 Type Define A 2 1 Naming rule and coding rule About naming rule and coding rule please refer to GBD SPEC EM1 ANG amp TP pdf A 2 2 Structure Table A 2 Structure List StructureName 1 Defi Application Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION A 3 Function Detail A 3 1 Initialization Function Function Name em1_ipu_init Format DRV RESULT em ipu init void Argument None Function Return DRV ERR STATE DRV OK Application Note 819898EJ 1VOANOO 52 67 APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION Function Flow
33. low Sample 1 YUV422 Interleave image rotation e Setting for 90 rotation Table 3 2 IPU ROT Register Setting for YUV422 90 Rotation Wen Setting Explanation ROT DUAL Fr Fere 0x0000 0000 REG EN Ob disable register update reserve function default ROT MODE 0x0000 0039 ROT MOD 01b rotate 90 SRCYUV Ob not care default DSTENDIAN 1b Little Endian SRCENDIAN 1b Little Endian NEWEN 1b use additional function FC 01b Ee Geen 800 10039 o 200 100x2 ROLSRCUVADRA 000 o ROT DSTUNADR A l oaa pg A AAA 1010b YUV422 SEET eat ROT INTENSET 0x0000 0001 eg Ob not enable default DMAERREN Ob not enable default ROTENDEN 1b enable rotation end interrupt Note 1 During the rotation processing set register ROT DUAL FF at the first time only 2 Setting of the other registers which not listed in the upper table should use the default value Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 32 67 e Setting for 180 rotation Only list difference setting with 90 rotation Table 3 3 IPU ROT Register Setting for YUV422 180 Rotation Wem Setting Explanation ROT MODE 0x0000 003A ROT MOD 10b rotate 180 SRCYUV Ob not care default DSTENDIAN 1b Little Endian SRCENDIAN 1b Little Endian NEWEN 1b use additional function ROT FRAME 0x0000 0009 SRCSEL 01b A frame default y 10b B fram
34. n LCD panel Note The operation of this step is similar with 2 3 6 Display the Rotated Image Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 24 67 2 7 7 Reset IPU GDMA Before exit from graphics DMA process operation reset IPU Related Registers AHBCLKCTRLO APBCLKCTRLO GCLKCTRLOENA GCLKCTRLO RESETREQOENA RESETREQO Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 25 67 Chapter 3 Example of IPU Operation 3 1 Outline of IPU Operation Example EMMA Mobile 1 IPU supports image rotator image process and graphics DMA function oo in this chapter the below examples of these functions will be described Table 3 1 List of IPU Examples No Example detail Rotator YUV420 Planar 0 90 180 270 RGB565 0 90 180 270 Image Processor Example 1 Reducing 600x400 RGB565 image to 480x360 gt back image Converting 320x240 YUV420 Planar image to 320x240 RGB565 image front image Then overlay resize color space conversion YUV RGB overlay Example 2 Enlarging and converting 100x100 YUV422 to 256x192 RGB666 gt back image Overlay with 320x240 RGB888 image with color masking and pixel packing front image resize color space conversion YUV RGB overlay pixel packing Graphics DMA ROP function Mix source image 1 RGB565 320x240 and source image 2 RGB565 600x400 The detail of the examples will be
35. n sess 59 Figure A 8 IMG Configure FUNCION acc tendre ic Bean tot ica 60 Figure A 9 Start IMG Processing ice Evae ee eek 61 Figure A 10 Get IMG SIaLlUS descente aeu deese id 62 Figure A 11 Enable Disable GDMA Register Update Function 63 Figure A 12 GDMA Configure Function cccccccccccccconnccnnnoconononcnnnnnnnonnnnanncnnnnononnnnncnnnnonns 64 Figure A 13 Start GDMA Processing eee leir elann pese ma sana daa edin 65 miele D EC RCB Seri 66 Application Note 819898EJ 1VOANOO CHAPTER 1 OVERVIEW 9 67 Chapter 1 Overview 1 1 Introduction In this document the below contents of EMMA Mobile 1 Image Processor Unit IPU will be described 1 the normal process procedure of Image Processor Unit 2 usage sample of Image Processor Unit As additional the EMMA Mobile 1 Image Processor Unit driver interface of EMMA Mobile 1 evaluation program will be explained in Appendix About detail of Image Processor Unit please refer to EMMA Mobile 1 IPU User s Manual 1 2 Development Environment e Hardware environment of this project is listed as below Table 1 1 Hardware Environment Version EMMA Mobile 1 evaluation board NEC Electronics PSKCH2Y S 001 6 01 PARTNER Jet ICE ARM Kyoto Microcomputer Co Ltd e Software used in this project is listed as below Table 1 2 Software Environment GNUARM Toolchain V4 3 2 GNU WJETSET AR
36. n the upper table should use the default value Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 34 67 e Setting for 180 rotation Only list difference setting with 90 rotation Table 3 6 IPU ROT Register Setting for YUV420 180 Rotation Wen Setting Explanation ROT MODE 0x0000 0032 ROT MOD 10b rotate 180 SRCYUV Ob not care DSTENDIAN Ob Big Endian default SRCENDIAN 1b Little Endian NEWEN 1b use additional function ROT FRAME SRCSEL 01b A frame default e Setting for 270 rotation Only list difference setting with 90 rotation Table 3 7 IPU ROT Register Setting for YUV420 270 Rotation Wem Setting Explanation ROT MODE 0x0000 0033 ROT MOD 11b rotate 270 SRCYUV Ob not care DSTENDIAN Ob Big Endian default SRCENDIAN 1b Little Endian NEWEN 1b use additional function SRCSEL 01b A frame default DSTSEL 11b C frame ROT DSTSIZE 0x0000_00F0 mmm o 240 S Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 35 67 Sample 3 RGB565 image rotation e Setting for 90 rotation Table 3 8 IPU ROT Register Setting for RGB565 90 Rotation Wen Setting Explanation ROT DUAL FF F 0x0000_0000 REG EN Ob disable register update reserve function default ROT MODE 0x0000 0021 ROT MOD 01b rotate 90 SRCYUV Ob not care default DSTENDIAN
37. nted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document bu
38. ock by setting ASMU registers as below Related Register AHBCLKCTRLO APBCLKCTRLO GCLKCTRLOENA GCLKCTRLO RESETREQOENA RESETREQO Caution For EMMA Mobile 1 IPU interface the clock should be supplied to the whole interface at the same time So when supply clock for Rotator the clock of Image Processor and Graphics DMA are supplied also 2 3 2 Get Source Image Data For each sample the related YUV or RGB image will be read as the source data 2 3 3 Configure Rotator Registers Before start rotation rotator registers need to be configured such as source data address destination address rotator mode image data format etc The following registers need to be set as necessary in random sequence Related Registers ROT DUAL FF ROT MODE ROT FRAME HOT SRCSIZE ROT DSTSIZE ROT SRCYADR A B C ROT SRCUVADR A B C ROT SRCVADR_A B C ROT DSTYADR A B C ROT DSTUVADR A B C ROT DSTVADR A B C ROT SRCHSIZE ROT SROCVSIZE ROT ENGET Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 16 67 ROT FORMAT ROT SRCBYTE ROT DSTBYTE 2 3 4 Start Rotation Issue the rotation processing request to start rotator Related Register ROT REQ 2 3 5 Rotation Processing The source data will be rotated according the IPU ROT registers configuration The rotated image data will be store in the specified destination address When rotation is completed the value of register ROT STATU
39. ource image Y Config ROT register for x rotation x 902 1802 2709 Y Start to rotate Y ROTATION Processing Y Display the rotated image Y Reset IPU Rotator Y Release LCD and IMC y uL Figure 3 3 Operation Flow of IPU Rotator Sample Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 30 67 3 2 2 Operation Detail 3 2 2 1 IPU Initialization Initialize IPU modules for rotation operation Refer to 3 1 2 IPU Initialization and Reset 3 2 2 2 Initialize LCD and IMC In this sample LCD and IMC module will be called to display the rotated image So need to initialize LCD and IMC module More detail about these two modules please refer to EMMA Mobile 1 IMC Application Note and EMMA Mobile 1 LCDC Application Note 3 2 2 3 Read Source Data The specified image data are read out as the source image data In IPU ROT samples YUV422 Interleave data YUV420 Planar data and RGB565 data are used 3 2 2 4 Display the Source Image In order to compare with the rotated image the original image is displayed before rotation Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 31 67 3 2 2 5 Configure ROT Registers for Rotation ROT register configurations of these samples are listed as be
40. perations Memory to memory M2M copy and rectangle fill function Raster operation Color mask function Byte lane switch function Table 2 6 IPU GDMA Function Mem 0 Valuable Setting Max 8188 pixels x 8188 pixels Input data format RGB565 666 888 YUV422 Semi Planar Planar Interleave YUV420 Semi Planar Planar Output data format RGB565 666 888 YUV422 Semi Planar Planar Interleave YUV420 Semi Planar Planar Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 14 67 2 2 Normal Procedure of IPU Rotator 4 START D Y IPU Rotator Initialization Y Get the Source Image Data Y Configure the Rotator Registers Y otart Rotate Processing ROTATION Processing Display the Rotated Image in LCD Panel Reset IPU Rotator y u gt Figure 2 1 Normal Procedure of IPU ROT Note 1 About the explanation of all the Rotator registers mentioned in this document please refer to EMMA Mobile 1 IPU User s Manual 2 About the explanation of all the ASMU registers mentioned in this document please refer to EMMA Mobile 1 SMU GIO Interface User s Manual Application Note 819898EJ 1VOANOO CHAPTER 2 USAGE OF IMAGE PROCESSOR UNIT 15 67 2 3 Detail of IPU ROT Normal Procedure 2 3 1 IPU Rotator Initialization When do rotator initialization cancel reset IPU cl
41. plication Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 56 67 A 3 4 Configure ROT Registers Function Name em ipu rot cfg Format DRV RESULT emt ipu rot cfg ROTIO ROTATION rot Argument Parameter Type WO Det _ROTIO_ROTATION All necessary setting for rotation Function Return DRV ERR CONFIG DRV OK Function Flow 4 START D Y Check the register setting value Check Items Image format Frame selection Address Image size Rotation mode Additional address Bytelane No All setting values are OK Yes Return DRV ERR CONFIG Set ROT Register with the input values Retur DRV_OK Figure A 4 ROT Configure Function Note None Application Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 57 67 A 3 5 Start ROT Processing Function Name em ipu rot do Format void em1 ipu rot do void Argument None Function Return None Function Flow START Y Set Register ROT_REQ 1 y WER Figure A 5 Start ROT Processing Note None Application Note 819898EJ 1VOANOO APPENDIX A IMAGE PROCESSOR UNIT DRIVER FUNCTION 58 67 A 3 6 Get ROT Status Function Name em ipu rot get status Format void em1 ipu rot get status void Argument None Function Return None Function Flow S
42. rs to enhance the quality reliability and safety of NEC Electronics products customers agree and acknowledge that possibility of defects thereof cannot be eliminated entirely To minimize risks of damage to property or injury including death to persons arising from defects in NEC Electronics products customers must incorporate sufficient safety measures in their design such as redundanoy fire containment and anti failure features Note 1 NEC Electronics as used in this document means NEC Electronics Corporation and also includes its majority owned subsidiaries NEC Electronics products means any product developed or manufactured by or for NEC Electronics as defined above All trademarks or registered trademarks are the property of their respective owners Registered trademarks 6 and trademarks M are not noted in this document Application Note 819898EJ 1VOANOO INDEX 4 67 CONTENTS Chapter T OVOerVIOW ee 9 WEA att de ie ee ERE T RE RM a ML UM LECT DERE beeen 9 1 2 Development Environmental a 9 Chapter 2 Usage of Image Processor Unit 11 1 1 lleeeeee eee eec eeeeeee nnne nennen nnne 10 2 Image Processor Unit FUNCION EE 10 2 2 Normal Procedure of IPU Rotator AAA 14 2 3 Detail of IPU ROT Normal Procedure oooocccccccocccnccccconcconcnononccnnononoronnononancnnnnonnnncnnnnnnennnennos 15 2 3 IP Rotator IIIS EZ e os eder radere i va qz A AAA a EY raras A 15 2 9 2 Get Source Image RE e
43. s EE 50 3 4 2 9 Release LOD and IMG ise rebua ids eal ee cos d ra RCM EM dem 50 Appendix A Image Processor Unit Driver Function esee sseeeeeess 51 PT RE BE Leide ME 51 ALI DS DEINO rara irradia dada 51 A 271 Naming tule and coding Ulead ii an 51 2 8 SU UC DT E 51 ASS We INC HO na Ici ER ER m T T T TT 52 Application Note 819898EJ 1VOANOO INDEX 6 67 A 3 1 Initialization Funchon nnne nnn nnne 52 AGS 2 Heset TP ER FUNCION ras 54 A 3 3 Enable Disable ROT Register Update Function oocccccccccnccconcnccconcnnonononnnnonnnncnnnnnnos 55 A 3 4 Configure ROT Hegosiers 56 AGS Slade ROT POCOS MT EEN 57 Axio Geb HR clica 58 A 3 7 Enable Disable IMG Register Update Function oocccncccccnonnnncccnncccnnonoccnnnncnononannnnnnnnnos 59 KSS Gontigure IMIG RES bonitas oot eerta ciment itunes ese Ea Deae 60 ASS Start IMG Geen Te EE 61 A310 Get eR UU 62 A 3 11 Enable Disable GDMA Register Update Function sees 63 Add2 Configure HOT EE 64 A 3 13 Start GDMA Processing cccooccccnncccccccnoonccnnnnnnnononanncnnnnnonononnnnnnnnonnnnnnrnnnnnnnnnnnnnnnennnnnnns 65 ASA DIMAS mere 66 ANNEX Mogitication bie Tt see 67 Application Note 819898EJ 1VOANOO INDEX 7 67 LIST OF TABLES Table 11 Hardware EnvirontTiell oessa EE 9 Table 1 2 Software Environment 9 Table 2 1 IPU ROT Function nennen nnn nnns 10 Table 2 2 IPU I
44. t Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office eq
45. thmetic algorithms for YUV gt RGB converter About the implementation and the typical setting values please refer EMMA Mobile 1 IPU User s Manual Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 43 67 Sample 2 Table 3 12 Setting IPU IMG Registers for IPU IMG Sample 2 mem Setting Explanation IMG_DUAL_FF 0x0000 0000 REG EN Ob disable register update reserve function default IMG_MODE 0x0011 5038 SRCFMT F Ob not care default SRCFMT B Ob not care default DSTFMT Ob not care default DITHER F 1b enable color dithering DITHER B 1b enable color dithering PELPACK 1b enable pixel packing RFILTER_F Ob not care default RFILTER B Ob not care default OP MODE 150H OP18 UDINV Ob don t flip default RLINV Ob don t flip default MSK_COL Ob enable color masking default NEWEN 1b use additional function 100 256 256 100 0x0000 0085 133 256 192 100 0x0000_00A3 0x0000_007A 122 192 100 x 64 IMG_MASKCOLR 0x0000 0033 51 IMG ALPHA 0x0000 0014 20 IMG FORMAT 0x0000 01A0 DSTFMT 0001b RGB666 SRCFMT B 1010b YUV422 Interleave SRCFMT F 0000b RGB888 Application Note 819898EJ 1VOANOO CHAPTER 3 EXAMPLE OF IMAGE PROCESSOR UNIT OPERATION 44 67 IMG INDATABYTE 0x0000_00E4 default IMG OUTDATABYTE 0x0000_00E4 default IMG PEL ENDIAN 0x0000 00083 OUT
46. uipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certa

Download Pdf Manuals

image

Related Search

Related Contents

  HookClamp UserManual  MVP Ver.3.23 の新機能と機能  JM-1450 Electric Jet Operating Instructions  Speakman S-3229 Instructions / Assembly  BoConcept Nago Assembly Instruction  Spirit 200 1  Frigorífico یخچال Hladilnik  Hot Shot HG-64490-4 Instructions / Assembly    

Copyright © All rights reserved.
Failed to retrieve file