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>

評価なし
バージョン履歴
最終更新日:
‎09-10-2020 02:17 AM
更新者: