Graphics framework for GR-PEACH. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Dependents:   ImageZoomInout_Sample ImageRotaion_Sample ImageScroll_Sample GR-PEACH_LCD_4_3inch_Save_to_USB ... more

License

When you use this library, we judge you have agreed to the following contents.

https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Note

If you import the GraphicsFramework library, please import GR-PEACH_video library and R_BSP library together.



JPEG Converter

The JPEG Converter driver implements encode and decode functionality which uses the JCU of the RZ/A Series.

Hello World!

Import programJCU_HelloWorld

Hello World for JCU(JPEG Codec Unit). JCU is JPEG codec unit of RZ/A1. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

API

Import library

Data Structures

struct bitmap_buff_info_t
Bitmap data setting struct. More...
struct encode_options_t
Encode option setting. More...

Public Types

enum jpeg_conv_error_t {
JPEG_CONV_OK = 0, JPEG_CONV_JCU_ERR = -1, JPEG_CONV_FORMA_ERR = -2, JPEG_CONV_PARAM_ERR = -3,
JPEG_CONV_BUSY = -4, JPEG_CONV_PARAM_RANGE_ERR = -7
}

Error codes.

More...
enum wr_rd_swa_t {
WR_RD_WRSWA_NON = 0, WR_RD_WRSWA_8BIT = 1, WR_RD_WRSWA_16BIT = 2, WR_RD_WRSWA_16_8BIT = 3,
WR_RD_WRSWA_32BIT = 4, WR_RD_WRSWA_32_8BIT = 5, WR_RD_WRSWA_32_16BIT = 6, WR_RD_WRSWA_32_16_8BIT = 7
}

Write/Read image pixcel frame buffer swap setting.

More...
enum wr_rd_format_t { WR_RD_YCbCr422 = 0x00, WR_RD_ARGB8888 = 0x01, WR_RD_RGB565 = 0x02 }

Write/Read image pixcel format selects.

More...
enum sub_sampling_t { SUB_SAMPLING_1_1 = 0x00, SUB_SAMPLING_1_2 = 0x01, SUB_SAMPLING_1_4 = 0x02, SUB_SAMPLING_1_8 = 0x03 }

Thinning output image selects.

More...
enum cbcr_offset_t { CBCR_OFFSET_0 = 0x00, CBCR_OFFSET_128 = 0x01 }

Cb/Cr range selects for decode.

More...

Public Member Functions

JPEG_Converter ()
Constructor method of JPEG converter(encode/decode)
virtual ~JPEG_Converter ()
Destructor method of JPEG converter(encode/decode)
JPEG_Converter::jpeg_conv_error_t decode (void *pJpegBuff, bitmap_buff_info_t *psOutputBuff)
Decode JPEG to rinear data.
JPEG_Converter::jpeg_conv_error_t decode (void *pJpegBuff, bitmap_buff_info_t *psOutputBuff, decode_options_t *pOptions)
JPEG data decode to bitmap.
JPEG_Converter::jpeg_conv_error_t encode ( bitmap_buff_info_t *psInputBuff, void *pJpegBuff, size_t *pEncodeSize)
Encode rinear data to JPEG.
JPEG_Converter::jpeg_conv_error_t encode ( bitmap_buff_info_t *psInputBuff, void *pJpegBuff, size_t *pEncodeSize, encode_options_t *pOptions)
Bitmap data encode to JPEG.
JPEG_Converter::jpeg_conv_error_t SetQuality (const uint8_t qual)
Set encode quality.

Correspondence file

A correspondence file of JPEG Converter is as the following table.

JPEGCorrespondence
Width>0(greater than 0)
Height>0(greater than 0)
Color formatYCbCr444, YCbCr422, YCbCr420, YCbCr411
BitmapCorrespondence
Width>0(greater than 0)
Height>0(greater than 0)
Color formatYCbCr422

Notice

You run JPEG converter once destruction each time.

You set whether these JPEG files aren't input, or it check error setting decode(set in "flag" = true). The JPEG file which becomes correspondence outside will be the following condition.

  • File besides the above-mentioned correspondence file.
  • As information in the JPEG file, WIDTH or HEIGHT is larger than output buffer setting.

Buffer area is used encode/decode, set 8 bytes align and non-cash memory area. The output buffer when decoding, is made beyond the size decided in the size of the JPEG file, the format, setting of thinning out. You make output buffer for decode/encode to enough big size in order to stock this result. JPEG Converter, if you do not particularly perform specified, does not check size against the output data at the time of encoding and decoding. You set the output buffer so that there is no effect of corruption by the output data.

Color format

Color format in case to be converted from Bitmap to JPEG is either ARGB8888 or RGB555, YCbCr422. Color format of the If you want to convert from JPEG file to Bitmap file is YCbCr422. You correct "alpha(member of decode_options_t)" of setting and "output_cb_cr_offset(member of decode_options_t)" according to color format when decoding.

  • example
    decode to ARGB8888(WR_RD_ARGB8888 set in format member of bitmap_buff_info_t)
    alpha = 0x01-0xFF
    output_cb_cr_offset = CBCR_OFFSET_0

    decode to YCbCr422(WR_RD_YCbCr422 set in format member of bitmap_buff_info_t)
    alpha = 0
    output_cb_cr_offset = CBCR_OFFSET_0 or CBCR_OFFSET_128

    decode to RGB565(WR_RD_RGB565 set in format member of bitmap_buff_info_t)
    alpha = 0
    output_cb_cr_offset = CBCR_OFFSET_0

Decode/encode settings are optional

If omitted encode/decode settings, it will work with the following settings.
[Decode option setting (member of decode_options_t)]

  • Vertical sub sampling is thinning output image to 1/1.
  • Horizontal sub sampling is thinning output image to 1/1.
  • Output data of Cb/Cr range is -128 to 127.
  • Output data of swap in 8-bit units: 2-1-4-3-6-5-8-7.
  • Alpha value of 0.
  • JPEG format correspondence outside error check.
  • It decode in a synchronous function.

[Encode option setting (member of encode_options_t)]

  • DRI value is 0.
  • Encoding JPEG file start width offset is 0.
  • Encoding JPEG file start height offset is 0.
  • Input data of Cb/Cr range of input data is -128 to 127.
  • Input data swap in 8-bit units: 2-1-4-3-6-5-8-7.
  • It don't check encode size.
  • Quantization Y use default table(Quality75).
  • Quantization C use default table(Quality75).
  • Huffman Y DC use default table.
  • Huffman C DC use default table.
  • Huffman Y AC use default table.
  • Huffman C AC use default table.
  • It encode in a synchronous function.

Synchronous/asynchronous switching

Decoding and encoding setting to operate asynchronously by setting a callback function(decode_options_t and encode_options_t).

Quality

Quality changes are possible. If you want to change the Quality, please specify the table made of Quality you want to change the address of the setting. If you do not want to change the Quality, it will operate at Quality75.

RGA

The RGA library implements fast drawing functionality which uses the RGA of the RZ/A Series.
Supporting compiler is ARMCC, GCC ARM and IAR.

Hello World!

Import programRGA_HelloWorld

Hello World for RGA(Renesas Graphics Architecture). RGA is the Graphics Library of RZ/A1. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

RGA/LICENSE.txt

Committer:
dkato
Date:
2017-04-24
Revision:
13:1ee2176ef13f
Parent:
5:9a05caaee29a

File content as of revision 13:1ee2176ef13f:

END USER LICENSE AGREEMENT

This End User License Agreement (this "EULA") is between you, on behalf of yourself and the company or other entity on whose behalf you are acting (together, "you" and "your") and Renesas Electronics Corporation, a Japanese corporation, with a principal place of business at 2-24 Toyosu 3-chome, koutou-Ku, Tokyo, Japan ("Renesas") and is effective from the date on which you download or import. In consideration of the mutual promises and covenants herein, you and Renesas hereby agree as follows: 


1. Definitions.


1.1."Open Source Code" means certain free or open source software and other components incorporated into or bundled with the Software which is subject to the Open Source Terms. 
1.2."Open Source Terms" means the terms and conditions that are applicable to a given piece of Open Source Code. 
1.3."Software" means, collectively, the software in source code, binary or library form, including all contents thereof, downloaded by you in connection with this EULA, including all upgrades, modifications and updates provided to you, if any, and all derivative works of software ("Derivatives"), and any materials, related to the Software made available by Renesas or its affiliates, in all cases, other than the Open Source Code. 

2. License.
 Subject to the terms and conditions hereof, Renesas, on behalf of itself and its subsidiaries, hereby grants to you a personal, non-exclusive, non-transferable, revocable license (without the right to sublicense) during the term hereof under Renesas' and its subsidiaries' intellectual property rights (excluding patent rights) in and to the Software to (1) use the Software for the purpose of internally evaluating and testing Renesas products ("Renesas Products"), (2) copy and modify the Software for the purpose of developing your system-level products that incorporate Renesas Products ("Customer Product"), (3) compile a binary version of the Software (including, for clarity, Software modified in accordance with the foregoing subsection (2)) and make (or have its contract manufacturer that is bound in writing by confidentiality and use restrictions no less restrictive than those set forth herein make) copies of such binary version solely as necessary to incorporate such binary version into a Renesas Product or Customer Product, and (4) distribute binary versions of such Software only as incorporated into Customer Products or Renesas Products. You acknowledge and agree that the Software may be bundled with or incorporate Open Source Code. This Open Source Code must be used in accordance with the applicable Open Source Terms in additional to the terms and conditions set forth in this EULA related to the Open Source Code. You hereby agree to fully comply with all such Open Source Terms. After downloading the Software, you may be required to agree to additional terms or conditions prior to accessing all or a portion of the Software ("Additional Terms"). To the extent the Software includes such Additional Terms, such Additional Terms shall supersede this EULA and the license terms set forth in this Section 2 shall not have any force or effect with respect to the applicable portion of the Software.


3.Intellectual Property Ownership, Copyright Protection.
 The Software and any authorized copies are the intellectual property of owned by Renesas. The structure, organization and code of the Software are the valuable copyrights, trade secrets and confidential information of Renesas. The Software that may be developed or created by you are protected by law, including without limitation, the copyright laws of Japan and other countries and by international treaty provisions. Renesas will retain all right, title and interest in and to all intellectual property rights related to the Software. If any intellectual property rights related to the Derivatives do not automatically inure to Renesas, you hereby irrevocably assign to Renesas, without additional consideration, all right, title and interest in and to all Derivatives, whether currently existing or created or developed later. Except as expressly stated herein, this EULA does not grant you any intellectual property rights related to the Software, and all rights not expressly granted are reserved by Renesas.

4.Restrictions. 
 You acknowledge that the Software is a valuable proprietary asset of Renesas. You will not: (a) disclose the Software, directly or indirectly, to any other person or entity that is not a party to this EULA except for those employees, contractors, and representatives of you on a strictly need-to-know basis who are subject to confidentiality obligations (and you will maintain the confidentiality of the Software with at least the same degree of care you use to protect your own confidential information, and no less than reasonable care); (b) make use of the Software except as expressly permitted hereunder; (c) decompile, decipher, disassemble, reverse engineer, or otherwise determine the source code contained in any non-source code versions (e.g., object code or binary versions) of the Software; or (d) except with the express prior written consent of Renesas, use the Software together with any open source code or otherwise take any action or fail to take any action that would cause the Software to be subject to any open source or other third party software terms or conditions.

5.NO WARRANTY.
 THE SOFTWARE IS DELIVERED TO YOU "AS IS," WHERE IS, AND WITH ALL FAULTS AND RENESAS, ITS SUBSIDIARIES, AND AFFILIATES, AND ITS AND THEIR EMPLOYEES, DIRECTORS, OFFICERS, CONSULTANTS, CUSTOMERS, SUPPLIERS, AND REPRESENTATIVES (COLLECTIVELY, THE "RENESAS PARTIES"), WHETHER EXPLICITLY OR IMPLICITLY, MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE SOFTWARE, INCLUDING AS TO THEIR USE AND PERFORMANCE. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THE RENESAS PARTIES HEREBY EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND, EXPLICIT OR IMPLIED, WITH RESPECT TO THE SOFTWARE, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, SATISFACTORY QUALITY, ACCURACY, TITLE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS, INTEGRATION, AND ANY WARRANTIES THAT MAY ARISE BY LAW OR OUT OF COURSE OF PERFORMANCE, COURSE OF DEALING OR USAGE OF TRADE. RENESAS DOES NOT WARRANT THAT THE SOFTWARE WILL MEET ANY REQUIREMENTS OR THAT THE USE THEREOF WILL BE ERROR FREE.

6.LIMITATION OF LIABILITY AND INDEMNITY.
 TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL ANY RENESAS PARTY BE LIABLE TO YOU UNDER OR IN CONNECTION WITH THIS EULA OR THE SOFTWARE (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU OR UNDER THIS EULA) FOR ANY LOSS, DAMAGES, CLAIMS OR COSTS WHATSOEVER, INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY LOST PROFITS, REVENUE, BUSINESS, SAVINGS, DATA, OR USE; OR ANY COST OF SUBSTITUTE PROCUREMENT, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY AS A RESULT OF BREACH OF ANY TERM OF THIS EULA, IN EACH CASE, WHETHER IN AN ACTION IN CONTRACT OR TORT, AND EVEN IF SUCH RENESAS PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF, HAD OTHER REASON TO KNOW, OR IN FACT KNEW OF THE POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS. You shall indemnify, defend and hold the Renesas Parties harmless from and against any and all claims, actions, damages, demands, liabilities, costs and expenses, including without limitation reasonable attorneys' fees and expenses, resulting from the use of the Software by you or any other party acting, directly or indirectly, from or through you or resulting from any breach, default or other violation hereof by you.

7.Export Control.
 You hereby represent and warrant that you shall not use the Software for the purpose of disturbing international peace and security, including (i) the design, development, production, stockpiling or use of weapons of mass destruction such as nuclear, chemical or biological weapons or missiles, (ii) other military activities, or (iii) any use supporting these activities. You also hereby represent and warrant that you shall not sell, export, dispose of, license, rent, transfer, disclose or otherwise provide the Software to any third party, whether directly or indirectly, with knowledge or reason to know that the third party or any other party will engage in the activities described above. Furthermore, you hereby represent and warrant that you shall not directly or indirectly, export, re-export, transship or otherwise transfer the Software in violation of any applicable export control laws or regulations promulgated and administered by the governments of the countries asserting jurisdiction over the parties or their transactions.

8.Term and Termination.
 This EULA is effective until it is terminated. This EULA will terminate automatically if you fail to comply with any terms and conditions provided herein. You may also terminate this EULA at any time by uninstalling and destroying the Software (including, for clarity, the Derivatives) and any copies thereof. Upon termination hereof, you shall stop all use of the Software (including, for clarity, the Derivatives) and any copies thereof and destroy the Software (including, for clarity, the Derivatives) and any copies thereof , and the rights and licensed granted to you hereunder shall terminate. Section 1 and Sections 3 through 10 hereof shall survive any termination or expiration hereof. 

9.Governing Law and Venue.
 This EULA will be governed by and construed in accordance with the laws of Japan without regard to conflicts of laws rules. The Tokyo District Court in Japan shall have exclusive jurisdiction over all disputes relating to this EULA. Each of the parties hereby irrevocably waives any objection they may now or hereafter have as to the venue of any such action or proceeding brought in such court including but not limited to any objection that such court is an inconvenient forum. If any action at law or in equity is brought to enforce or interpret the provisions hereof, the prevailing party shall be entitled to recover all costs of litigation, including actual attorneys' fees, related incidental expenses, and court costs.

10.General Provisions. 
 If any part hereof is found void or unenforceable, it will not affect the validity of the balance hereof, which shall remain valid and enforceable according to its terms. This EULA may only be modified by a writing signed by an authorized officer of you and Renesas. Updates may be licensed to you by Renesas with additional or different terms. The failure of a party to enforce any provision hereof shall not constitute a waiver of such provision or the right of such party to enforce such provision or any other provision. This is the entire agreement between Renesas and you relating to the Software and the Derivatives and it supersedes any prior or contemporaneous representations, discussions, undertakings, communications or advertising relating to the Software, and the Derivatives. In the event of any conflict between any term or condition of this EULA and any term or condition of any applicable Additional Terms, the applicable term or condition of the Additional Terms shall apply and take precedence. With respect to the Open Source Code, in the event of any conflict between any term or condition of this EULA and any term or condition of any applicable Open Source Terms, the applicable term or condition of the Open Source Terms shall apply and take precedence. You may not assign this EULA or your rights or obligations hereunder to a third party without the consent of Renesas. Renesas may assign this EULA or any rights or obligations hereunder to a third party without your consent.