00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef MMSFBCONV_H_
00034 #define MMSFBCONV_H_
00035
00036 #include "mmsgui/fb/mmsfbbase.h"
00037 #include "mmsgui/fb/mmsfbfont.h"
00038
00039
00040 #ifndef __HAVE_PF_ALL__
00041 #ifndef __HAVE_PF_ARGB__
00042 #ifndef __HAVE_PF_AiRGB__
00043 #ifndef __HAVE_PF_ARGB4444__
00044 #ifndef __HAVE_PF_ARGB3565__
00045 #ifndef __HAVE_PF_RGB16__
00046 #ifndef __HAVE_PF_RGB24__
00047 #ifndef __HAVE_PF_RGB32__
00048 #ifndef __HAVE_PF_BGR24__
00049 #ifndef __HAVE_PF_BGR555__
00050 #ifndef __HAVE_PF_AYUV__
00051 #ifndef __HAVE_PF_YV12__
00052 #ifndef __HAVE_PF_I420__
00053 #ifndef __HAVE_PF_YUY2__
00054
00055 #ifndef __HAVE_PF_NONE__
00056 #define __HAVE_PF_NONE__
00057 #endif
00058 #endif
00059 #endif
00060 #endif
00061 #endif
00062 #endif
00063 #endif
00064 #endif
00065 #endif
00066 #endif
00067 #endif
00068 #endif
00069 #endif
00070 #endif
00071 #endif
00072
00073 #ifdef __HAVE_PF_ALL__
00074
00075 #ifndef __HAVE_PF_ARGB__
00076 #define __HAVE_PF_ARGB__
00077 #endif
00078 #ifndef __HAVE_PF_AiRGB__
00079 #define __HAVE_PF_AiRGB__
00080 #endif
00081 #ifndef __HAVE_PF_ARGB4444__
00082 #define __HAVE_PF_ARGB4444__
00083 #endif
00084 #ifndef __HAVE_PF_ARGB3565__
00085 #define __HAVE_PF_ARGB3565__
00086 #endif
00087 #ifndef __HAVE_PF_RGB16__
00088 #define __HAVE_PF_RGB16__
00089 #endif
00090 #ifndef __HAVE_PF_RGB24__
00091 #define __HAVE_PF_RGB24__
00092 #endif
00093 #ifndef __HAVE_PF_RGB32__
00094 #define __HAVE_PF_RGB32__
00095 #endif
00096 #ifndef __HAVE_PF_BGR24__
00097 #define __HAVE_PF_BGR24__
00098 #endif
00099 #ifndef __HAVE_PF_BGR555__
00100 #define __HAVE_PF_BGR555__
00101 #endif
00102 #ifndef __HAVE_PF_AYUV__
00103 #define __HAVE_PF_AYUV__
00104 #endif
00105 #ifndef __HAVE_PF_YV12__
00106 #define __HAVE_PF_YV12__
00107 #endif
00108 #ifndef __HAVE_PF_I420__
00109 #define __HAVE_PF_I420__
00110 #endif
00111 #ifndef __HAVE_PF_YUY2__
00112 #define __HAVE_PF_YUY2__
00113 #endif
00114 #endif
00115
00116
00117 #ifndef __HAVE_PF_ARGB__
00118 #define __HAVE_PF_ARGB__
00119 #endif
00120
00121
00122 #ifdef __HAVE_PF_I420__
00123 #ifndef __HAVE_PF_YV12__
00124 #define __HAVE_PF_YV12__
00125 #endif
00126 #endif
00127
00128
00129
00130
00131
00132 #define MMSFB_CONV_RGB2Y(r,g,b) (((66*r+129*g+25*b+128)>>8)+16)
00133 #define MMSFB_CONV_RGB2U(r,g,b) (((-38*r-74*g+112*b+128)>>8)+128)
00134 #define MMSFB_CONV_RGB2V(r,g,b) (((112*r-94*g-18*b+128)>>8)+128)
00135
00136 #define MMSFB_CONV_PREPARE_YUV2RGB(y,u,v) y=(int)y-16;u=(int)u-128;v=(int)v-128;
00137 #define MMSFB_CONV_PREPARE_YUVBLEND(y,u,v) y=(int)y-16;u=(int)u-128;v=(int)v-128;
00138 #define MMSFB_CONV_RESET_YUVBLEND(y,u,v) y=(int)y+16;u=(int)u+128;v=(int)v+128;
00139
00140
00141
00142
00143 #define MMSFB_CONV_YUV2R(y,u,v,r) if ((r=(298*(int)y+409*(int)v+128+0x200)>>8)<0)r=0;else if(r>0xff)r=0xff;
00144 #define MMSFB_CONV_YUV2G(y,u,v,g) if ((g=(298*(int)y-100*(int)u-208*(int)v+128+0x200)>>8)<0)g=0;else if(g>0xff)g=0xff;
00145 #define MMSFB_CONV_YUV2B(y,u,v,b) if ((b=(298*(int)y+516*(int)u+128+0x200)>>8)<0)b=0;else if(b>0xff)b=0xff;
00146
00147 #define MMSFB_CONV_YUV2RX(y,u,v,r) if ((r=298*(int)y+409*(int)v+128+0x200)>>16) r=0xff00;
00148 #define MMSFB_CONV_YUV2GX(y,u,v,g) if ((g=298*(int)y-100*(int)u-208*(int)v+128+0x200)>>16) g=0xff00;
00149 #define MMSFB_CONV_YUV2BX(y,u,v,b) if ((b=298*(int)y+516*(int)u+128+0x200)>>16) b=0xff00;
00150
00151
00152 #define MMSFB_CONV_RGB24_TO_YV12_PUSHPTR \
00153 unsigned char *saved_src = src; \
00154 unsigned char *saved_dst_y = dst_y; \
00155 unsigned char *saved_dst_u = dst_u; \
00156 unsigned char *saved_dst_v = dst_v;
00157
00158 #define MMSFB_CONV_RGB24_TO_YV12_POPPTR \
00159 src = saved_src; \
00160 dst_y = saved_dst_y; \
00161 dst_u = saved_dst_u; \
00162 dst_v = saved_dst_v;
00163
00164 #define MMSFB_CONV_RGB24_TO_YV12_PIXEL(src, dst_y, dst_u, dst_v, d_u, d_v) \
00165 { register int r = *(src); \
00166 register int g = *(src+1); \
00167 register int b = *(src+2); \
00168 dst_y = MMSFB_CONV_RGB2Y(r,g,b); \
00169 d_u MMSFB_CONV_RGB2U(r,g,b); \
00170 d_v MMSFB_CONV_RGB2V(r,g,b); }
00171
00172
00173
00174 #define MMSFB_CONV_ARGB_TO_YV12_PUSHPTR \
00175 unsigned int *saved_src = src; \
00176 unsigned char *saved_dst_y = dst_y; \
00177 unsigned char *saved_dst_u = dst_u; \
00178 unsigned char *saved_dst_v = dst_v;
00179
00180 #define MMSFB_CONV_ARGB_TO_YV12_POPPTR \
00181 src = saved_src; \
00182 dst_y = saved_dst_y; \
00183 dst_u = saved_dst_u; \
00184 dst_v = saved_dst_v;
00185
00186 #define MMSFB_CONV_ARGB_TO_YV12_PIXEL(src, dst_y, dst_u, dst_v, d_u, d_v) \
00187 SRC = src; \
00188 A = SRC >> 24; \
00189 \
00190 if (A == 0xff) { \
00191 if (SRC!=OLDSRC) { \
00192 int r = (SRC >> 16) & 0xff; \
00193 int g = (SRC >> 8) & 0xff; \
00194 int b = SRC & 0xff; \
00195 old_y = MMSFB_CONV_RGB2Y(r,g,b); \
00196 old_u = MMSFB_CONV_RGB2U(r,g,b); \
00197 old_v = MMSFB_CONV_RGB2V(r,g,b); \
00198 OLDSRC = SRC; \
00199 } \
00200 dst_y = old_y; \
00201 d_u old_u; \
00202 d_v old_v; \
00203 } \
00204 else \
00205 if (!A) { \
00206 dst_y = 0; \
00207 d_u 128; \
00208 d_v 128; \
00209 } \
00210 else \
00211 { \
00212 if (SRC!=OLDSRC) { \
00213 int r = (SRC >> 16) & 0xff; \
00214 int g = (SRC >> 8) & 0xff; \
00215 int b = SRC & 0xff; \
00216 old_y = MMSFB_CONV_RGB2Y(r,g,b); \
00217 old_u = MMSFB_CONV_RGB2U(r,g,b); \
00218 old_v = MMSFB_CONV_RGB2V(r,g,b); \
00219 MMSFB_CONV_PREPARE_YUVBLEND(old_y, old_u, old_v); \
00220 old_y = (A * old_y) >> 8; \
00221 old_u = (A * old_u) >> 8; \
00222 old_v = (A * old_v) >> 8; \
00223 MMSFB_CONV_RESET_YUVBLEND(old_y, old_u, old_v); \
00224 OLDSRC = SRC; \
00225 } \
00226 \
00227 dst_y = old_y; \
00228 d_u old_u; \
00229 d_v old_v; \
00230 }
00231
00232
00233 #define MMSFB_CONV_YV12_TO_RGB32_PIXEL(src_y, src_u, src_v, dst) \
00234 { int y, u, v, r, g, b; \
00235 y = src_y; u = src_u; v = src_v; \
00236 MMSFB_CONV_PREPARE_YUV2RGB(y,u,v); \
00237 MMSFB_CONV_YUV2R(y, u, v, r); \
00238 MMSFB_CONV_YUV2G(y, u, v, g); \
00239 MMSFB_CONV_YUV2B(y, u, v, b); \
00240 dst = 0xff000000 | (r << 16) | (g << 8) | b; }
00241
00242
00243
00244 #define MMSFB_CONV_BLEND_ARGB_TO_YV12_PUSHPTR \
00245 unsigned int *saved_src = src; \
00246 unsigned char *saved_dst_y = dst_y; \
00247 unsigned char *saved_dst_u = dst_u; \
00248 unsigned char *saved_dst_v = dst_v;
00249
00250 #define MMSFB_CONV_BLEND_ARGB_TO_YV12_POPPTR \
00251 src = saved_src; \
00252 dst_y = saved_dst_y; \
00253 dst_u = saved_dst_u; \
00254 dst_v = saved_dst_v;
00255
00256
00257
00258 #define MMSFB_CONV_BLEND_ARGB_TO_YV12_PIXEL(src, dst_y, dst_u, dst_v, d_u, d_v) \
00259 SRC = src; \
00260 A = SRC >> 24; \
00261 \
00262 if (A == 0xff) { \
00263 if (SRC!=OLDSRC) { \
00264 int r = (SRC >> 16) & 0xff; \
00265 int g = (SRC >> 8) & 0xff; \
00266 int b = SRC & 0xff; \
00267 old_y = MMSFB_CONV_RGB2Y(r,g,b); \
00268 old_u = MMSFB_CONV_RGB2U(r,g,b); \
00269 old_v = MMSFB_CONV_RGB2V(r,g,b); \
00270 OLDSRC = SRC; \
00271 } \
00272 dst_y = old_y; \
00273 d_u old_u; \
00274 d_v old_v; \
00275 } \
00276 else \
00277 if (!A) { \
00278 d_u dst_u; \
00279 d_v dst_v; \
00280 } \
00281 else \
00282 { \
00283 if (SRC!=OLDSRC) { \
00284 int r = (SRC >> 16) & 0xff; \
00285 int g = (SRC >> 8) & 0xff; \
00286 int b = SRC & 0xff; \
00287 old_y = A * MMSFB_CONV_RGB2Y(r,g,b); \
00288 old_u = A * MMSFB_CONV_RGB2U(r,g,b); \
00289 old_v = A * MMSFB_CONV_RGB2V(r,g,b); \
00290 OLDSRC = SRC; \
00291 } \
00292 \
00293 register unsigned int SA = 0x100 - A; \
00294 unsigned int y = dst_y; \
00295 unsigned int u = dst_u; \
00296 unsigned int v = dst_v; \
00297 \
00298 y = SA * y + old_y; \
00299 u = SA * u + old_u; \
00300 v = SA * v + old_v; \
00301 \
00302 dst_y = y >> 8; \
00303 d_u u >> 8; \
00304 d_v v >> 8; \
00305 }
00306
00307
00308
00309
00310
00311
00312
00313
00314 #define MMSFB_CONV_YUY2_TO_YV12_PUSHPTR \
00315 unsigned short int *saved_src = src; \
00316 unsigned char *saved_dst_y = dst_y; \
00317 unsigned char *saved_dst_u = dst_u; \
00318 unsigned char *saved_dst_v = dst_v;
00319
00320 #define MMSFB_CONV_YUY2_TO_YV12_POPPTR \
00321 src = saved_src; \
00322 dst_y = saved_dst_y; \
00323 dst_u = saved_dst_u; \
00324 dst_v = saved_dst_v;
00325
00326
00327 #if __BYTE_ORDER == __BIG_ENDIAN
00328
00329 #define MMSFB_CONV_YUY2_TO_YV12_PIXEL(src, dst_y, d_uv) \
00330 SRC = src; \
00331 dst_y = SRC >> 8; \
00332 d_uv SRC & 0xff;
00333
00334 #define MMSFB_CONV_YUY2_TO_YV12_PIXEL_2(src, dst_y, d_uv) \
00335 SRC = src; \
00336 dst_y = SRC >> 8; \
00337 d_uv (SRC & 0xff) << 1;
00338
00339 #else
00340
00341 #define MMSFB_CONV_YUY2_TO_YV12_PIXEL(src, dst_y, d_uv) \
00342 SRC = src; \
00343 dst_y = SRC & 0xff; \
00344 d_uv SRC >> 8;
00345
00346 #define MMSFB_CONV_YUY2_TO_YV12_PIXEL_2(src, dst_y, d_uv) \
00347 SRC = src; \
00348 dst_y = SRC & 0xff; \
00349 d_uv (SRC >> 8) << 1;
00350 #endif
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373 #ifdef __HAVE_SSE__
00374
00375 typedef int v4si[2];
00376 typedef short int v4six[4];
00377 typedef signed char v4siy[8];
00378
00379 typedef union
00380 {
00381 v4si v;
00382 v4six vv;
00383 v4siy vvv;
00384 short s[4];
00385 int i[2];
00386 unsigned char c[8];
00387 } _v4si;
00388
00389 #endif
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827 #define MMSFB_CONV_BLEND_COLORALPHA_ARGB_TO_YV12_PIXEL(src, dst_y, dst_u, dst_v, d_u, d_v) \
00828 SRC = src; \
00829 A = SRC >> 24; \
00830 \
00831 if (!A) { \
00832 d_u dst_u; \
00833 d_v dst_v; \
00834 } \
00835 else \
00836 { \
00837 if (SRC!=OLDSRC) { \
00838 int r = (ALPHA * (SRC & 0xff0000)) >> 24; \
00839 int g = (ALPHA * (SRC & 0xff00)) >> 16; \
00840 int b = (ALPHA * (SRC & 0xff)) >> 8; \
00841 old_y = A * MMSFB_CONV_RGB2Y(r,g,b); \
00842 A = (ALPHA * A) >> 8; \
00843 old_u = A * MMSFB_CONV_RGB2U(r,g,b); \
00844 old_v = A * MMSFB_CONV_RGB2V(r,g,b); \
00845 OLDSRC = SRC; \
00846 } \
00847 else \
00848 A = (ALPHA * A) >> 8; \
00849 \
00850 register unsigned int SA = 0x100 - A; \
00851 unsigned int y = dst_y; \
00852 unsigned int u = dst_u; \
00853 unsigned int v = dst_v; \
00854 \
00855 y = SA * y + old_y; \
00856 u = SA * u + old_u; \
00857 v = SA * v + old_v; \
00858 \
00859 dst_y = y >> 8; \
00860 d_u u >> 8; \
00861 d_v v >> 8; \
00862 }
00863
00864
00865
00866
00867
00868
00869 #define MMSFB_CONV_BLEND_AYUV_TO_YV12_PIXEL(src, dst_y, dst_u, dst_v, d_u, d_v) \
00870 SRC = src; \
00871 A = SRC >> 24; \
00872 \
00873 if (A == 0xff) { \
00874 if (SRC!=OLDSRC) { \
00875 old_y = (SRC >> 16) & 0xff; \
00876 old_u = (SRC >> 8) & 0xff; \
00877 old_v = SRC & 0xff; \
00878 OLDSRC = SRC; \
00879 } \
00880 dst_y = old_y; \
00881 d_u old_u; \
00882 d_v old_v; \
00883 } \
00884 else \
00885 if (!A) { \
00886 d_u dst_u; \
00887 d_v dst_v; \
00888 } \
00889 else \
00890 { \
00891 if (SRC!=OLDSRC) { \
00892 old_y = A * ((SRC >> 16) & 0xff); \
00893 old_u = A * ((SRC >> 8) & 0xff); \
00894 old_v = A * (SRC & 0xff); \
00895 OLDSRC = SRC; \
00896 } \
00897 \
00898 register unsigned int SA = 0x100 - A; \
00899 unsigned int y = dst_y; \
00900 unsigned int u = dst_u; \
00901 unsigned int v = dst_v; \
00902 \
00903 y = SA * y + old_y; \
00904 u = SA * u + old_u; \
00905 v = SA * v + old_v; \
00906 \
00907 dst_y = y >> 8; \
00908 d_u u >> 8; \
00909 d_v v >> 8; \
00910 }
00911
00912
00913 #define MMSFB_CONV_BLEND_COLORALPHA_AYUV_TO_YV12_PIXEL(src, dst_y, dst_u, dst_v, d_u, d_v) \
00914 SRC = src; \
00915 A = SRC >> 24; \
00916 \
00917 if (!A) { \
00918 d_u dst_u; \
00919 d_v dst_v; \
00920 } \
00921 else \
00922 { \
00923 if (SRC!=OLDSRC) { \
00924 int sy = (SRC << 8) >> 24; \
00925 int su = (SRC << 16) >> 24; \
00926 int sv = SRC & 0xff; \
00927 MMSFB_CONV_PREPARE_YUVBLEND(sy,su,sv); \
00928 sy = (ALPHA * sy) >> 8; \
00929 su = (ALPHA * su) >> 8; \
00930 sv = (ALPHA * sv) >> 8; \
00931 MMSFB_CONV_RESET_YUVBLEND(sy,su,sv); \
00932 old_y = A * sy; \
00933 A = (ALPHA * A) >> 8; \
00934 old_u = A * su; \
00935 old_v = A * sv; \
00936 OLDSRC = SRC; \
00937 } \
00938 else \
00939 A = (ALPHA * A) >> 8; \
00940 \
00941 register unsigned int SA = 0x100 - A; \
00942 unsigned int y = dst_y; \
00943 unsigned int u = dst_u; \
00944 unsigned int v = dst_v; \
00945 \
00946 y = SA * y + old_y; \
00947 u = SA * u + old_u; \
00948 v = SA * v + old_v; \
00949 \
00950 dst_y = y >> 8; \
00951 d_u u >> 8; \
00952 d_v v >> 8; \
00953 }
00954
00955
00956
00957
00958
00959
00960 #define MMSFB_DRAWLINE_BRESENHAM(putpixel) { \
00961 int x = x1; int y = y1; \
00962 int dx = x2 - x1; int dy = y2 - y1; \
00963 int ix = (dx > 0) ? 1 : (dx < 0) ? -1 : 0; int iy = (dy > 0) ? 1 : (dy < 0) ? -1 : 0; \
00964 if (!dx && !dy) { putpixel; } else { \
00965 if (dx < 0) dx = -dx; if (dy < 0) dy = -dy; \
00966 int pdx, pdy, ddx, ddy, es, el; \
00967 if (dx > dy) { pdx=ix; pdy=0; ddx=ix; ddy=iy; es=dy; el=dx; } else { pdx=0; pdy=iy; ddx=ix; ddy=iy; es=dx; el=dy; } \
00968 int err = el >> 1; putpixel; \
00969 for(int i = 0; i < el; ++i) { err-=es; if (err < 0) { err+=el; x+=ddx; y+=ddy; } else { x+=pdx; y+=pdy; } putpixel; } } }
00970
00971
00972 #define MMSFB_DRAWLINE_PUT_PIXEL \
00973 if ((x >= clipreg.x1)&&(x <= clipreg.x2)&&(y >= clipreg.y1)&&(y <= clipreg.y2)) \
00974 dst[x+y*dst_pitch_pix]=SRC;
00975
00976
00977
00978 #define MMSFBSURFACE_BLIT_TEXT_INIT(pw) \
00979 int FH = 0; font->getHeight(&FH); \
00980 int desc = 0; font->getDescender(&desc); \
00981 int DY = FH - (desc + 1); \
00982 int dst_pitch_pix = dst_pitch >> pw;
00983
00984
00985 #define MMSFBSURFACE_BLIT_TEXT_LOAD_GLYPH(font, character) \
00986 int src_pitch_pix; \
00987 int src_w; \
00988 int src_h; \
00989 unsigned char *src; \
00990 MMSFBFont_Glyph glyph; \
00991 bool glyph_loaded = font->getGlyph(character, &glyph); \
00992 if (glyph_loaded) { \
00993 src_pitch_pix = glyph.pitch; \
00994 src_w = glyph.width; \
00995 src_h = glyph.height; \
00996 src = glyph.buffer; \
00997 }
00998
00999
01000 #define MMSFBSURFACE_BLIT_TEXT_START_RENDER(pt) \
01001 if (glyph_loaded) { \
01002 int dx, dy; \
01003 if (!MMSFBBase_rotate180) { \
01004 dx = x + glyph.left; \
01005 dy = y + DY - glyph.top; \
01006 } else { \
01007 dx = x - glyph.left - glyph.width + 1; \
01008 dy = y - (DY - glyph.top) - glyph.height + 1; \
01009 } \
01010 if (dx < clipreg.x1) { \
01011 src_w -= clipreg.x1 - dx; \
01012 src += clipreg.x1 - dx; \
01013 dx = clipreg.x1; } \
01014 if (dx + src_w - 1 > clipreg.x2) src_w = clipreg.x2 - dx + 1; \
01015 if (dy < clipreg.y1) { \
01016 src_h -= clipreg.y1 - dy; \
01017 src +=(clipreg.y1 - dy) * src_pitch_pix; \
01018 dy = clipreg.y1; } \
01019 if (dy + src_h - 1 > clipreg.y2) src_h = clipreg.y2 - dy + 1; \
01020 unsigned char *src_end = src + src_h * src_pitch_pix; \
01021 unsigned char *line_end = src + src_w; \
01022 int src_pitch_pix_diff = src_pitch_pix - src_w; \
01023 int dst_pitch_pix_diff = dst_pitch_pix - src_w; \
01024 pt *dst = ((pt *)dst_ptr) + dx + dy * dst_pitch_pix;
01025
01026
01027 #define MMSFBSURFACE_BLIT_TEXT_END_RENDER \
01028 if (!MMSFBBase_rotate180) \
01029 x+=glyph.advanceX; \
01030 else \
01031 x-=glyph.advanceX; }
01032
01033
01034
01035 #define MMSFB_ROTATE_180_REGION(SURFACE, X1, Y1, X2, Y2) \
01036 if (MMSFBBase_rotate180) { \
01037 int tmp; \
01038 tmp = X2; \
01039 X2 = ((!(SURFACE)->root_parent)?(SURFACE)->config.w:(SURFACE)->root_parent->config.w) - X1 - 1; \
01040 X1 = ((!(SURFACE)->root_parent)?(SURFACE)->config.w:(SURFACE)->root_parent->config.w) - tmp - 1; \
01041 tmp = Y2; \
01042 Y2 = ((!(SURFACE)->root_parent)?(SURFACE)->config.h:(SURFACE)->root_parent->config.h) - Y1 - 1; \
01043 Y1 = ((!(SURFACE)->root_parent)?(SURFACE)->config.h:(SURFACE)->root_parent->config.h) - tmp - 1; \
01044 }
01045
01046
01047 #define MMSFB_ROTATE_180_RECT(SURFACE, X, Y, W, H) \
01048 if (MMSFBBase_rotate180) { \
01049 X = ((!(SURFACE)->root_parent)?(SURFACE)->config.w:(SURFACE)->root_parent->config.w) - X - (W); \
01050 Y = ((!(SURFACE)->root_parent)?(SURFACE)->config.h:(SURFACE)->root_parent->config.h) - Y - (H); \
01051 }
01052
01053
01054 #define MMSFB_ROTATE_180_RECT_WH(WIDTH, HEIGHT, X, Y, W, H) \
01055 if (MMSFBBase_rotate180) { \
01056 X = WIDTH - X - (W); \
01057 Y = HEIGHT - Y - (H); \
01058 }
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068 void stretch_byte_buffer(bool h_antialiasing, bool v_antialiasing,
01069 unsigned char *src, int src_pitch, int src_pitch_pix, int src_height, int sw, int sh,
01070 unsigned char *dst, int dst_pitch, int dst_pitch_pix, int dst_height, int dw, int dh);
01071
01072
01073
01074
01075
01076
01077 void compress_2x2_matrix(unsigned char *src, int src_pitch, int src_pitch_pix, int src_height, int sw, int sh,
01078 unsigned char *dst, int dst_pitch, int dst_pitch_pix, int dst_height, int dw, int dh);
01079
01080
01081
01082
01083
01084
01085
01086 void stretch_uint_buffer(bool h_antialiasing, bool v_antialiasing,
01087 unsigned int *src, int src_pitch, int src_pitch_pix, int src_height,
01088 int sx, int sy, int sw, int sh,
01089 unsigned int *dst, int dst_pitch, int dst_pitch_pix, int dst_height,
01090 int dx, int dy, int dw, int dh);
01091
01092
01093
01094
01095
01096 void stretch_usint_buffer(bool h_antialiasing, bool v_antialiasing,
01097 unsigned short int *src, int src_pitch, int src_pitch_pix,
01098 int src_height, int sx, int sy, int sw, int sh,
01099 unsigned short int *dst, int dst_pitch, int dst_pitch_pix,
01100 int dst_height, int dx, int dy, int dw, int dh);
01101
01102
01103
01104
01105
01106 void stretch_324byte_buffer(bool h_antialiasing, bool v_antialiasing,
01107 unsigned char *src, int src_pitch, int src_pitch_pix,
01108 int src_height, int sx, int sy, int sw, int sh,
01109 unsigned int *dst, int dst_pitch, int dst_pitch_pix,
01110 int dst_height, int dx, int dy, int dw, int dh);
01111
01112
01113
01114
01115
01116 void mmsfb_blit_uint(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01117 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01118
01119
01120
01121
01122
01123 void mmsfb_blit_usint(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01124 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01125
01126
01127
01128
01129
01130
01131
01132
01133
01134
01135 void mmsfb_blit_argb_to_argb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01136 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01137
01138
01139
01140
01141
01142
01143 void mmsfb_blit_rgb32_to_argb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01144 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01145
01146
01147
01148
01149
01150
01151 void mmsfb_blit_airgb_to_argb(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01152 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy);
01153
01154
01155
01156
01157
01158
01159 void mmsfb_blit_blend_argb_to_argb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01160 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01161
01162
01163
01164
01165
01166
01167 void mmsfb_blit_blend_airgb_to_argb(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01168 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy);
01169
01170
01171
01172
01173
01174
01175 void mmsfb_blit_blend_coloralpha_argb_to_argb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01176 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy,
01177 unsigned char alpha);
01178
01179
01180
01181
01182
01183 void mmsfb_blit_rgb16_to_argb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01184 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01185
01186
01187
01188
01189
01190 void mmsfb_blit_rgb24_to_argb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01191 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01192
01193
01194
01195
01196
01197
01198
01199
01200
01201
01202
01203
01204 void mmsfb_blit_rgb32_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01205 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01206
01207
01208
01209
01210
01211 void mmsfb_blit_argb_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01212 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01213
01214
01215
01216
01217
01218
01219 void mmsfb_blit_blend_argb_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01220 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01221
01222
01223
01224
01225
01226
01227 void mmsfb_blit_blend_coloralpha_argb_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01228 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy,
01229 unsigned char alpha);
01230
01231
01232
01233
01234
01235
01236 void mmsfb_blit_coloralpha_argb_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01237 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy,
01238 unsigned char alpha);
01239
01240
01241
01242
01243
01244 void mmsfb_blit_coloralpha_rgb32_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01245 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy,
01246 unsigned char alpha);
01247
01248
01249
01250
01251
01252 void mmsfb_blit_rgb16_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01253 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01254
01255
01256
01257
01258
01259 void mmsfb_blit_rgb24_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01260 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01261
01262
01263
01264
01265
01266
01267 void mmsfb_blit_yv12_to_rgb32(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01268 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy);
01269
01270
01271
01272
01273
01274
01275 void mmsfb_blit_blend_argb4444_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01276 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01277
01278
01279
01280
01281
01282
01283 void mmsfb_blit_blend_coloralpha_argb4444_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01284 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy,
01285 unsigned char alpha);
01286
01287
01288
01289
01290
01291
01292
01293
01294
01295
01296
01297
01298 void mmsfb_blit_airgb_to_airgb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01299 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01300
01301
01302
01303
01304
01305
01306 void mmsfb_blit_blend_airgb_to_airgb(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01307 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy);
01308
01309
01310
01311
01312
01313
01314 void mmsfb_blit_blend_coloralpha_airgb_to_airgb(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01315 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy,
01316 unsigned char alpha);
01317
01318
01319
01320
01321
01322
01323 void mmsfb_blit_blend_argb_to_airgb(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01324 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy);
01325
01326
01327
01328
01329
01330
01331
01332
01333
01334
01335
01336
01337
01338
01339
01340 void mmsfb_blit_rgb24_to_rgb24(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01341 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01342
01343
01344
01345
01346
01347
01348
01349 void mmsfb_blit_blend_argb_to_rgb24(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01350 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01351
01352
01353
01354
01355
01356
01357 void mmsfb_blit_argb_to_rgb24(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01358 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01359
01360
01361
01362
01363
01364
01365
01366
01367
01368
01369
01370
01371
01372 void mmsfb_blit_bgr24_to_bgr24(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01373 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01374
01375
01376
01377
01378
01379
01380
01381 void mmsfb_blit_blend_argb_to_bgr24(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01382 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01383
01384
01385
01386
01387
01388
01389 void mmsfb_blit_blend_coloralpha_argb_to_bgr24(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01390 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy,
01391 unsigned char alpha);
01392
01393
01394
01395
01396
01397
01398 void mmsfb_blit_coloralpha_bgr24_to_bgr24(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01399 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy,
01400 unsigned char alpha);
01401
01402
01403
01404
01405
01406
01407
01408
01409
01410
01411
01412
01413 void mmsfb_blit_rgb16_to_rgb16(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01414 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01415
01416
01417
01418
01419
01420
01421 void mmsfb_blit_argb_to_rgb16(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01422 unsigned short int *dst, int dst_pitch, int dst_height, int dx, int dy);
01423
01424
01425
01426
01427
01428
01429 void mmsfb_blit_blend_argb_to_rgb16(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01430 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01431
01432
01433
01434
01435
01436
01437 void mmsfb_blit_airgb_to_rgb16(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01438 unsigned short int *dst, int dst_pitch, int dst_height, int dx, int dy);
01439
01440
01441
01442
01443
01444
01445 void mmsfb_blit_blend_airgb_to_rgb16(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01446 unsigned short int *dst, int dst_pitch, int dst_height, int dx, int dy);
01447
01448
01449
01450
01451
01452
01453 void mmsfb_blit_ayuv_to_rgb16(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01454 unsigned short int *dst, int dst_pitch, int dst_height, int dx, int dy);
01455
01456
01457
01458
01459
01460
01461 void mmsfb_blit_blend_ayuv_to_rgb16(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01462 unsigned short int *dst, int dst_pitch, int dst_height, int dx, int dy);
01463
01464
01465
01466
01467
01468
01469
01470
01471
01472
01473
01474
01475 void mmsfb_blit_ayuv_to_ayuv(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01476 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01477
01478
01479
01480
01481
01482
01483 void mmsfb_blit_blend_ayuv_to_ayuv(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01484 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy);
01485
01486
01487
01488
01489
01490
01491 void mmsfb_blit_blend_coloralpha_ayuv_to_ayuv(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01492 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy,
01493 unsigned char alpha);
01494
01495
01496
01497
01498
01499
01500
01501
01502
01503
01504
01505
01506 void mmsfb_blit_yv12_to_yv12(MMSFBSurfacePlanes *extbuf, int src_height, int sx, int sy, int sw, int sh,
01507 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01508
01509
01510
01511
01512
01513
01514 void mmsfb_blit_i420_to_yv12(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01515 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01516
01517
01518
01519
01520
01521
01522 void mmsfb_blit_yuy2_to_yv12(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01523 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01524
01525
01526
01527
01528
01529
01530 void mmsfb_blit_rgb24_to_yv12(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01531 unsigned char *dst, int dst_pitch, int dst_height, int dx, int dy);
01532
01533
01534
01535
01536
01537
01538 void mmsfb_blit_argb_to_yv12(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01539 unsigned char *dst, int dst_pitch, int dst_height, int dx, int dy);
01540
01541
01542
01543
01544
01545
01546 void mmsfb_blit_blend_argb_to_yv12(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01547 unsigned char *dst, int dst_pitch, int dst_height, int dx, int dy);
01548
01549
01550
01551
01552
01553
01554 void mmsfb_blit_blend_coloralpha_argb_to_yv12(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01555 unsigned char *dst, int dst_pitch, int dst_height, int dx, int dy,
01556 unsigned char alpha);
01557
01558
01559
01560
01561
01562
01563 void mmsfb_blit_blend_ayuv_to_yv12(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01564 unsigned char *dst, int dst_pitch, int dst_height, int dx, int dy);
01565
01566
01567
01568
01569
01570
01571 void mmsfb_blit_blend_coloralpha_ayuv_to_yv12(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01572 unsigned char *dst, int dst_pitch, int dst_height, int dx, int dy,
01573 unsigned char alpha);
01574
01575
01576
01577
01578
01579
01580
01581
01582
01583
01584
01585
01586 void mmsfb_blit_i420_to_i420(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01587 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01588
01589
01590
01591
01592
01593
01594
01595
01596
01597
01598
01599
01600 void mmsfb_blit_yuy2_to_yuy2(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01601 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01602
01603
01604
01605
01606
01607
01608
01609
01610
01611
01612
01613
01614
01615 void mmsfb_blit_argb3565_to_argb3565(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01616 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01617
01618
01619
01620
01621
01622
01623 void mmsfb_blit_argb_to_argb3565(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01624 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01625
01626
01627
01628
01629
01630
01631 void mmsfb_blit_blend_argb_to_argb3565(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01632 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01633
01634
01635
01636
01637
01638
01639
01640
01641
01642
01643
01644
01645 void mmsfb_blit_argb4444_to_argb4444(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01646 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01647
01648
01649
01650
01651
01652
01653 void mmsfb_blit_blend_argb4444_to_argb4444(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01654 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01655
01656
01657
01658
01659
01660
01661 void mmsfb_blit_blend_coloralpha_argb4444_to_argb4444(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01662 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy,
01663 unsigned char alpha);
01664
01665
01666
01667
01668
01669
01670
01671
01672
01673
01674
01675
01676 void mmsfb_blit_bgr555_to_bgr555(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01677 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01678
01679
01680
01681
01682
01683 void mmsfb_blit_blend_argb_to_bgr555(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01684 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy);
01685
01686
01687
01688
01689
01690
01691
01692
01693
01694
01695
01696
01697
01698 void mmsfb_stretchblit_argb_to_argb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01699 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01700 bool antialiasing);
01701
01702
01703
01704
01705
01706
01707 void mmsfb_stretchblit_blend_argb_to_argb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01708 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh);
01709
01710
01711
01712
01713
01714
01715 void mmsfb_stretchblit_blend_coloralpha_argb_to_argb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01716 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01717 unsigned char alpha);
01718
01719
01720
01721
01722
01723
01724 void mmsfb_stretchblit_rgb24_to_argb(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01725 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy, int dw, int dh,
01726 bool antialiasing);
01727
01728
01729
01730
01731
01732
01733
01734
01735
01736
01737
01738
01739 void mmsfb_stretchblit_blend_argb_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01740 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh);
01741
01742
01743
01744
01745
01746 void mmsfb_stretchblit_rgb32_to_rgb32(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01747 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01748 bool antialiasing);
01749
01750
01751
01752
01753
01754 void mmsfb_stretchblit_rgb24_to_rgb32(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01755 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy, int dw, int dh,
01756 bool antialiasing);
01757
01758
01759
01760
01761
01762
01763
01764
01765
01766
01767
01768
01769 void mmsfb_stretchblit_airgb_to_airgb(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01770 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01771 bool antialiasing);
01772
01773
01774
01775
01776
01777
01778 void mmsfb_stretchblit_blend_airgb_to_airgb(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01779 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy, int dw, int dh);
01780
01781
01782
01783
01784
01785
01786 void mmsfb_stretchblit_blend_coloralpha_airgb_to_airgb(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01787 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy, int dw, int dh,
01788 unsigned char alpha);
01789
01790
01791
01792
01793
01794
01795
01796
01797
01798
01799
01800
01801 void mmsfb_stretchblit_ayuv_to_ayuv(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01802 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01803 bool antialiasing);
01804
01805
01806
01807
01808
01809
01810 void mmsfb_stretchblit_blend_ayuv_to_ayuv(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01811 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy, int dw, int dh);
01812
01813
01814
01815
01816
01817
01818 void mmsfb_stretchblit_blend_coloralpha_ayuv_to_ayuv(MMSFBExternalSurfaceBuffer *extbuf, int src_height, int sx, int sy, int sw, int sh,
01819 unsigned int *dst, int dst_pitch, int dst_height, int dx, int dy, int dw, int dh,
01820 unsigned char alpha);
01821
01822
01823
01824
01825
01826
01827
01828
01829
01830
01831
01832
01833 void mmsfb_stretchblit_yv12_to_yv12(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01834 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01835 bool antialiasing);
01836
01837
01838
01839
01840
01841
01842 void mmsfb_stretchblit_i420_to_yv12(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01843 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01844 bool antialiasing);
01845
01846
01847
01848
01849
01850 void mmsfb_stretchblit_yuy2_to_yv12(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01851 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01852 bool antialiasing);
01853
01854
01855
01856
01857
01858
01859
01860
01861
01862
01863
01864
01865 void mmsfb_stretchblit_blend_argb4444_to_argb4444(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01866 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh);
01867
01868
01869
01870
01871
01872
01873 void mmsfb_stretchblit_blend_coloralpha_argb4444_to_argb4444(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01874 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01875 unsigned char alpha);
01876
01877
01878
01879
01880
01881
01882
01883
01884
01885
01886
01887
01888 void mmsfb_stretchblit_rgb16_to_rgb16(MMSFBSurfacePlanes *src_planes, int src_height, int sx, int sy, int sw, int sh,
01889 MMSFBSurfacePlanes *dst_planes, int dst_height, int dx, int dy, int dw, int dh,
01890 bool antialiasing);
01891
01892
01893
01894
01895
01896
01897
01898
01899
01900
01901
01902
01903 void mmsfb_fillrectangle_argb(MMSFBSurfacePlanes *dst_planes, int dst_height,
01904 int dx, int dy, int dw, int dh, MMSFBColor color);
01905
01906
01907
01908
01909
01910
01911 void mmsfb_fillrectangle_blend_argb(MMSFBSurfacePlanes *dst_planes, int dst_height,
01912 int dx, int dy, int dw, int dh, MMSFBColor color);
01913
01914
01915
01916
01917
01918
01919
01920
01921
01922
01923
01924
01925 void mmsfb_fillrectangle_rgb32(MMSFBSurfacePlanes *dst_planes, int dst_height,
01926 int dx, int dy, int dw, int dh, MMSFBColor color);
01927
01928
01929
01930
01931
01932
01933
01934
01935
01936
01937
01938
01939
01940 void mmsfb_fillrectangle_rgb24(MMSFBSurfacePlanes *dst_planes, int dst_height,
01941 int dx, int dy, int dw, int dh, MMSFBColor color);
01942
01943
01944
01945
01946
01947
01948
01949
01950
01951
01952
01953
01954 void mmsfb_fillrectangle_rgb16(MMSFBSurfacePlanes *dst_planes, int dst_height,
01955 int dx, int dy, int dw, int dh, MMSFBColor color);
01956
01957
01958
01959
01960
01961 void mmsfb_fillrectangle_blend_rgb16(MMSFBSurfacePlanes *dst_planes, int dst_height,
01962 int dx, int dy, int dw, int dh, MMSFBColor color);
01963
01964
01965
01966
01967
01968
01969
01970
01971
01972
01973
01974
01975 void mmsfb_fillrectangle_ayuv(MMSFBSurfacePlanes *dst_planes, int dst_height,
01976 int dx, int dy, int dw, int dh, MMSFBColor color);
01977
01978
01979
01980
01981
01982
01983 void mmsfb_fillrectangle_blend_ayuv(MMSFBSurfacePlanes *dst_planes, int dst_height,
01984 int dx, int dy, int dw, int dh, MMSFBColor color);
01985
01986
01987
01988
01989
01990
01991
01992
01993
01994
01995
01996
01997 void mmsfb_fillrectangle_yv12(MMSFBSurfacePlanes *dst_planes, int dst_height,
01998 int dx, int dy, int dw, int dh, MMSFBColor color);
01999
02000
02001
02002
02003
02004
02005
02006
02007
02008
02009
02010
02011 void mmsfb_fillrectangle_i420(MMSFBSurfacePlanes *dst_planes, int dst_height,
02012 int dx, int dy, int dw, int dh, MMSFBColor color);
02013
02014
02015
02016
02017
02018
02019
02020
02021
02022
02023
02024
02025 void mmsfb_fillrectangle_yuy2(MMSFBSurfacePlanes *dst_planes, int dst_height,
02026 int dx, int dy, int dw, int dh, MMSFBColor color);
02027
02028
02029
02030
02031
02032
02033
02034
02035
02036
02037
02038
02039 void mmsfb_fillrectangle_argb3565(MMSFBSurfacePlanes *dst_planes, int dst_height,
02040 int dx, int dy, int dw, int dh, MMSFBColor color);
02041
02042
02043
02044
02045
02046
02047
02048
02049
02050
02051
02052
02053 void mmsfb_fillrectangle_argb4444(MMSFBSurfacePlanes *dst_planes, int dst_height,
02054 int dx, int dy, int dw, int dh, MMSFBColor color);
02055
02056
02057
02058
02059
02060
02061 void mmsfb_fillrectangle_blend_argb4444(MMSFBSurfacePlanes *dst_planes, int dst_height,
02062 int dx, int dy, int dw, int dh, MMSFBColor color);
02063
02064
02065
02066
02067
02068
02069
02070
02071
02072
02073
02074
02075
02076 void mmsfb_fillrectangle_bgr24(MMSFBSurfacePlanes *dst_planes, int dst_height,
02077 int dx, int dy, int dw, int dh, MMSFBColor color);
02078
02079
02080
02081
02082
02083
02084
02085
02086
02087
02088
02089
02090 void mmsfb_fillrectangle_bgr555(MMSFBSurfacePlanes *dst_planes, int dst_height,
02091 int dx, int dy, int dw, int dh, MMSFBColor color);
02092
02093
02094
02095
02096
02097
02098
02099
02100
02101
02102
02103
02104 void mmsfb_drawline_argb(MMSFBSurfacePlanes *dst_planes, int dst_height,
02105 MMSFBRegion &clipreg, int x1, int y1, int x2, int y2, MMSFBColor &color);
02106
02107
02108
02109
02110
02111
02112 void mmsfb_drawline_blend_argb(MMSFBSurfacePlanes *dst_planes, int dst_height,
02113 MMSFBRegion &clipreg, int x1, int y1, int x2, int y2, MMSFBColor &color);
02114
02115
02116
02117
02118
02119
02120
02121
02122
02123
02124
02125
02126 void mmsfb_drawline_argb4444(MMSFBSurfacePlanes *dst_planes, int dst_height,
02127 MMSFBRegion &clipreg, int x1, int y1, int x2, int y2, MMSFBColor &color);
02128
02129
02130
02131
02132
02133
02134
02135
02136
02137
02138
02139
02140 void mmsfb_drawstring_blend_argb(MMSFBSurfacePlanes *dst_planes, MMSFBFont *font,
02141 MMSFBRegion &clipreg, string &text, int len, int x, int y, MMSFBColor &color);
02142
02143
02144
02145
02146
02147
02148 void mmsfb_drawstring_blend_coloralpha_argb(MMSFBSurfacePlanes *dst_planes, MMSFBFont *font,
02149 MMSFBRegion &clipreg, string &text, int len, int x, int y, MMSFBColor &color);
02150
02151
02152
02153
02154
02155
02156
02157
02158
02159
02160
02161
02162 void mmsfb_drawstring_blend_rgb32(MMSFBSurfacePlanes *dst_planes, MMSFBFont *font,
02163 MMSFBRegion &clipreg, string &text, int len, int x, int y, MMSFBColor &color);
02164
02165
02166
02167
02168
02169
02170 void mmsfb_drawstring_blend_coloralpha_rgb32(MMSFBSurfacePlanes *dst_planes, MMSFBFont *font,
02171 MMSFBRegion &clipreg, string &text, int len, int x, int y, MMSFBColor &color);
02172
02173
02174
02175
02176
02177
02178
02179
02180
02181
02182
02183
02184 void mmsfb_drawstring_blend_argb4444(MMSFBSurfacePlanes *dst_planes, MMSFBFont *font,
02185 MMSFBRegion &clipreg, string &text, int len, int x, int y, MMSFBColor &color);
02186
02187
02188
02189
02190
02191
02192
02193
02194
02195
02196
02197
02198 void mmsfb_drawstring_blend_rgb16(MMSFBSurfacePlanes *dst_planes, MMSFBFont *font,
02199 MMSFBRegion &clipreg, string &text, int len, int x, int y, MMSFBColor &color);
02200
02201
02202
02203
02204
02205 void mmsfb_drawstring_blend_coloralpha_rgb16(MMSFBSurfacePlanes *dst_planes, MMSFBFont *font,
02206 MMSFBRegion &clipreg, string &text, int len, int x, int y, MMSFBColor &color);
02207
02208
02209
02210
02211
02212 #endif
02213