Plays MJPEG Video using the RGA. THe RGA allows resize of the JPEG file.
Dependencies: GR-PEACH_video GraphicsFramework LCD_shield_config R_BSP SDBlockDevice_GR_PEACH TLV320_RBSP USBHost_custom
Fork of RGA_HelloWorld by
Overview
This demo shows how play a MJPEG and WAV file video using the RZA1 hardware RGA, JCU and SSIF. The JCU decodes each MJPEG frame. The SSIF plays the raw WAV file, and the RGA supplies the GUI and resize of the JPEG image.
MJPEG Creation
Requirements
- Python 3.1
- FFMPEG https://ffmpeg.org/download.html
Python Script
SD Card
- Rename the jpg file to Renesas.jpg and audio file Renesas.wav
- Download this image file and rename is Background.jpg
Diff: main.cpp
- Revision:
- 6:6a8ce6f7767b
- Parent:
- 4:ce438477eddb
- Child:
- 7:8fd684e60d66
--- a/main.cpp Mon Aug 08 07:28:29 2016 +0000 +++ b/main.cpp Thu Nov 10 01:50:51 2016 +0000 @@ -215,6 +215,7 @@ switch (func_name) { case RGA_FUNC_DRAW_RECTANGLE: + { bool key_on = false; int cnt; int color_cnt = 0; @@ -275,8 +276,10 @@ RGA_Func_DrawRectangle(frmbuf_info, pos_tbl, DRAW_RECTANGLE_CNT_MAX); Update_LCD_Display(frmbuf_info); } - break; + } + break; case RGA_FUNC_DRAW_IMAGE: + { int center_pos_x = 320; int center_pos_y = 110; while (1) { @@ -294,8 +297,10 @@ RGA_Func_DrawImage(frmbuf_info, center_pos_x, center_pos_y); Update_LCD_Display(frmbuf_info); } - break; + } + break; case RGA_FUNC_DISSOLVE: + { float32_t work_alpha = 0.0f; while (1) { /* Get coordinates */ @@ -311,8 +316,10 @@ RGA_Func_Dissolve(frmbuf_info, work_alpha); Update_LCD_Display(frmbuf_info); } - break; + } + break; case RGA_FUNC_SCROLL: + { int work_width_pos = 0; while (1) { /* Get coordinates */ @@ -328,8 +335,10 @@ RGA_Func_Scroll(frmbuf_info, work_width_pos); Update_LCD_Display(frmbuf_info); } - break; + } + break; case RGA_FUNC_ZOOM: + { int work_height_pos = ZOOM_MAX_NUM; while (1) { /* Get coordinates */ @@ -345,8 +354,10 @@ RGA_Func_Zoom(frmbuf_info, work_height_pos); Update_LCD_Display(frmbuf_info); } - break; + } + break; case RGA_FUNC_ROTATION: + { graphics_matrix_float_t work_angle = 0; while (1) { /* Get coordinates */ @@ -362,8 +373,10 @@ RGA_Func_Rotation(frmbuf_info, work_angle); Update_LCD_Display(frmbuf_info); } - break; + } + break; case RGA_FUNC_ACCELERATE: + { int acce_frame_num = 0; int animation_timing = 0; float32_t work_relative_pos; @@ -413,7 +426,8 @@ RGA_Func_Accelerate(frmbuf_info, animation_timing, work_relative_pos); Update_LCD_Display(frmbuf_info); } - break; + } + break; default : /* Do nothing */ break;