i.MX31 PDK Board Alpha Blending

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX31 PDK Board Alpha Blending

i.MX31 PDK Board Alpha Blending

Enter inside ~/ltibdir/rpm/BUILD and create a directory 'alpha':

$ cd ltib/rpm/BUILD 
$ mkdir alpha 

Enter in 'alpha' dir and create setalpha.c file:

$ cd alpha
#include <stdio.h> 
#include <stdlib.h> 
#include <sys/types.h>
 #include <sys/stat.h> 
#include <fcntl.h> 
#include <sys/ioctl.h> 
#include <unistd.h> 
#include <asm/arch/mxcfb.h>  

int main(int argc, char **argv) 
{ 
             int fb_fd; 
             struct mxcfb_gbl_alpha gbl_alpha;  

             if(argc != 2){ 
                      printf("Usage: %s alpha_val[0-255]\n",argv[0]); 
                      return -1; 
             }  

             fb_fd = open("/dev/fb0",O_RDWR,0); 
             gbl_alpha.enable = 1; 
             gbl_alpha.alpha = atoi(argv[1]); 
             ioctl(fb_fd, MXCFB_SET_GBL_ALPHA, &gbl_alpha); 
             close(fb_fd); 
             return 0; 
} 

Compile it using this command:

./ltib -m shell 
LTIB> cd rpm/BUILD/alpha 
LTIB> gcc -I../linux/include setalpha.c -o setalpha

In your board execute it:

root@freescale /home$ /unit_tests/mxc_v4l2_output.out -iw 320 -ih 240 -ow 480 -oh 640 -d 3 -r 4 -fr 5 qvga.yuv & 

While it is playing execute:

root@freescale /home$ setalpha 128 
root@freescale /home$ cat screen.raw > /dev/fb0

We used frame rate at 5 fps to have more time to execute next two commands.


コメント

Thanks jesseg, I tried this app on iMX6 and worked.

Leo

Yes it works indeed.

I only modified the last include path asm/arch/mxcfb.h with include/linux/mxcfb.h

-  #include <asm/arch/mxcfb.h>

+ #include <include/linux/mxcfb.h>

%3CLINGO-SUB%20id%3D%22lingo-sub-1112226%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX31%20PDK%E3%83%9C%E3%83%BC%E3%83%89%20%E3%82%A2%E3%83%AB%E3%83%95%E3%82%A1%E3%83%96%E3%83%AC%E3%83%B3%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1112226%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CP%3E~%2Fltibdir%2Frpm%2FBUILD%20%E3%81%AE%E4%B8%AD%E3%81%AB%E5%85%A5%E3%82%8A%E3%80%81%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%20'alpha'%20%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%24%20cd%20ltib%2Frpm%2FBUILD%0A%24%20mkdir%20%E3%82%A2%E3%83%AB%E3%83%95%E3%82%A1%20%3C%2FPRE%3E%3CP%3E'alpha'%20%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E5%85%A5%E5%8A%9B%E3%81%97%E3%80%81setalpha.c%20%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3CA%20href%3D%22http%3A%2F%2Fwww.imxdev.org%2Fwiki%2Findex.php%3Ftitle%3DI.MX31_PDK_Board_Alpha_Blending%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20style%3D%22text-decoration%3A%20underline%3B%22%20title%3D%22Powered%20by%20Text-Enhance%22%20target%3D%22_blank%22%3E%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%3C%2FA%3E%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%24%20cd%E3%82%A2%E3%83%AB%E3%83%95%E3%82%A1%3C%2FPRE%3E%3CPRE%20class%3D%22jive-pre%22%3E%23include%20%3CSTDIO.H%3E%23include%20%3CSTDLIB.H%3E%23include%20%26lt%3B%20sys%2Ftypes.h%26gt%3B%23include%20%26lt%3B%20sys%2Fstat.h%26gt%3B%23include%20%3CFCNTL.H%3E%23include%20%26lt%3B%20sys%2Fioctl.h%26gt%3B%23include%20%3CUNISTD.H%3E%23include%20%26lt%3B%20asm%2Farch%2Fmxcfb.h%26gt%3Bint%20main(int%20argc%2C%20char%20**argv)%0A%7B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20int%20fb_fd%3B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%E6%A7%8B%E9%80%A0%E4%BD%93mxcfb_gbl_alpha%20gbl_alpha%3B%20%0A%0Aif(argc%20!%3D%202)%7B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20printf(%22%E4%BD%BF%E7%94%A8%E9%87%8F%3A%20%25s%20alpha_val%5B0-255%5D%5Cn%22%2Cargv%5B0%5D)%3B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-1%20%E3%82%92%E8%BF%94%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%0A%0Afb_fd%20%3D%20open(%22%2Fdev%2Ffb0%22%2CO_RDWR%2C0)%3B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20gbl_alpha.enable%20%3D%201%3B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20gbl_alpha.alpha%20%3D%20atoi(argv%5B1%5D)%3B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ioctl(fb_fd%2C%20MXCFB_SET_GBL_ALPHA%2C%20%26amp%3Bgbl_alpha)%3B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%E9%96%89%E3%81%98%E3%82%8B(fb_fd)%3B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200%E3%82%92%E8%BF%94%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%0A%7D%20%0A%3C%2FUNISTD.H%3E%3C%2FFCNTL.H%3E%3C%2FSTDLIB.H%3E%3C%2FSTDIO.H%3E%3C%2FPRE%3E%3CP%3E%E6%AC%A1%E3%81%AE%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E.%2Fltib%20-m%20%E3%82%B7%E3%82%A7%E3%83%AB%0ALTIB%26gt%3B%20cd%20rpm%2FBUILD%2Falpha%0ALTIB%26gt%3B%20gcc%20-I..%2Flinux%2Finclude%20setalpha.c-O%20setalpha%0A%3C%2FPRE%3E%3CP%3E%E3%83%9C%E3%83%BC%E3%83%89%E3%81%A7%E3%81%9D%E3%82%8C%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3Eroot%40freescale%20%2Fhome%24%20%2Funit_tests%2Fmxc_v4l2_output.out%20-iw%20320%20-ih%20240%20-ow%20480%20-OH%20640%20-d%203%20-r%204%20-fr%205%20qvga.yuv%20%26amp%3B%20%3C%2FPRE%3E%3CP%3E%E5%86%8D%E7%94%9F%E4%B8%AD%E3%81%AB%E4%BB%A5%E4%B8%8B%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3Eroot%40freescale%20%2Fhome%24%20setalpha%20128%0Aroot%40freescale%20%2Fhome%24%20%E7%8C%AB%20screen.raw%20%26gt%3B%20%2Fdev%2Ffb0%0A%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CDIV%20style%3D%22background-color%3A%20%23eeeeff%3B%20padding-left%3A%2030px%3B%20width%3A%2060%25%3B%20margin-left%3A%2020%25%3B%22%3E%3CP%20class%3D%22note%22%3E5%20fps%20%E3%81%AE%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AC%E3%83%BC%E3%83%88%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%80%81%E6%AC%A1%E3%81%AE%202%20%E3%81%A4%E3%81%AE%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E6%99%82%E9%96%93%E3%82%92%E5%A2%97%E3%82%84%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3C%2FDIV%3E%3CP%3E%3CSPAN%20class%3D%22mce_paste_marker%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1112228%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E6%97%A5%E6%99%82%3Ai.MX31%20PDK%E3%83%9C%E3%83%BC%E3%83%89%E3%82%A2%E3%83%AB%E3%83%95%E3%82%A1%E3%83%96%E3%83%AC%E3%83%B3%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1112228%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CP%3E%E3%81%AF%E3%81%84%E3%80%81%E7%A2%BA%E3%81%8B%E3%81%AB%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%E6%9C%80%E5%BE%8C%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%AF%E3%83%AB%E3%83%BC%E3%83%89%E3%83%91%E3%82%B9asm%20%2F%20arch%20%2F%20mxcfb.h%E3%81%AE%E3%81%BF%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%97%E3%81%BE%E3%81%97%E3%81%9Finclude%2Flinux%2Fmxcfb.h%20%E3%82%92%E4%BD%BF%E7%94%A8%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E-%20%23include%20%26lt%3B%20asm%2Farch%2Fmxcfb.h%26gt%3B%20%3C%2FP%3E%3CP%3E%2B%20%23include%20%26lt%3B%20include%2Flinux%2Fmxcfb.h%26gt%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
評価なし
バージョン履歴
最終更新日:
‎09-10-2020 02:17 AM
更新者: