⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jdmerge.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
📖 第 1 页 / 共 3 页
字号:
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\jdmerge.o --depend=.\Obj\jdmerge.d --device=DARMSTM --apcs=interwork -O3 -I..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\Config -I..\..\GUI\Core -I..\..\GUI\Font -I..\..\GUI\ConvertColor -I..\..\GUI\AntiAlias -I..\..\GUI\ConvertMono -I..\..\GUI\JPEG -I..\..\GUI\MemDev -I..\..\GUI\MultiLayer -I..\..\GUI\Widget -I..\..\GUI\WM -IC:\Keil\ARM\INC\ST\STM32F10x ..\..\GUI\JPEG\jdmerge.c]
                          THUMB

                          AREA ||i.build_ycc_rgb_table||, CODE, READONLY, ALIGN=2

                  build_ycc_rgb_table PROC
;;;82     LOCAL(void)
;;;83     build_ycc_rgb_table (j_decompress_ptr cinfo)
000000  b570              PUSH     {r4-r6,lr}
;;;84     {
000002  4605              MOV      r5,r0
;;;85       my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
;;;86       int i;
;;;87       INT32 x;
;;;88       SHIFT_TEMPS
;;;89     
;;;90       upsample->Cr_r_tab = (int *)
000004  f8d041c4          LDR      r4,[r0,#0x1c4]
000008  6840              LDR      r0,[r0,#4]
00000a  f44f6680          MOV      r6,#0x400
00000e  6803              LDR      r3,[r0,#0]
000010  4632              MOV      r2,r6
000012  2101              MOVS     r1,#1
000014  4628              MOV      r0,r5
000016  4798              BLX      r3
;;;91         (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
;;;92     				(MAXJSAMPLE+1) * SIZEOF(int));
;;;93       upsample->Cb_b_tab = (int *)
000018  6120              STR      r0,[r4,#0x10]
00001a  6868              LDR      r0,[r5,#4]
00001c  4632              MOV      r2,r6
00001e  6803              LDR      r3,[r0,#0]
000020  2101              MOVS     r1,#1
000022  4628              MOV      r0,r5
000024  4798              BLX      r3
;;;94         (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
;;;95     				(MAXJSAMPLE+1) * SIZEOF(int));
;;;96       upsample->Cr_g_tab = (INT32 *)
000026  6160              STR      r0,[r4,#0x14]
000028  6868              LDR      r0,[r5,#4]
00002a  4632              MOV      r2,r6
00002c  6803              LDR      r3,[r0,#0]
00002e  2101              MOVS     r1,#1
000030  4628              MOV      r0,r5
000032  4798              BLX      r3
;;;97         (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
;;;98     				(MAXJSAMPLE+1) * SIZEOF(INT32));
;;;99       upsample->Cb_g_tab = (INT32 *)
000034  61a0              STR      r0,[r4,#0x18]
000036  6868              LDR      r0,[r5,#4]
000038  4632              MOV      r2,r6
00003a  6803              LDR      r3,[r0,#0]
00003c  2101              MOVS     r1,#1
00003e  4628              MOV      r0,r5
000040  4798              BLX      r3
;;;100        (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
;;;101    				(MAXJSAMPLE+1) * SIZEOF(INT32));
;;;102    
;;;103      for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
000042  61e0              STR      r0,[r4,#0x1c]
000044  2000              MOVS     r0,#0
000046  f06f017f          MVN      r1,#0x7f
;;;104        /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */
;;;105        /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */
;;;106        /* Cr=>R value is nearest int to 1.40200 * x */
;;;107        upsample->Cr_r_tab[i] = (int)
;;;108    		    RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS);
;;;109        /* Cb=>B value is nearest int to 1.77200 * x */
;;;110        upsample->Cb_b_tab[i] = (int)
00004a  0176              LSLS     r6,r6,#5
                  |L1.76|
00004c  4a11              LDR      r2,|L1.148|
00004e  6923              LDR      r3,[r4,#0x10]         ;107
000050  434a              MULS     r2,r1,r2              ;107
000052  f5024200          ADD      r2,r2,#0x8000         ;107
000056  1412              ASRS     r2,r2,#16             ;107
000058  f8432020          STR      r2,[r3,r0,LSL #2]     ;107
00005c  f24e25d1          MOV      r5,#0xe2d1
000060  fb01f205          MUL      r2,r1,r5
000064  eb060242          ADD      r2,r6,r2,LSL #1
000068  6963              LDR      r3,[r4,#0x14]
00006a  1412              ASRS     r2,r2,#16
00006c  f8432020          STR      r2,[r3,r0,LSL #2]
;;;111    		    RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS);
;;;112        /* Cr=>G value is scaled-up -0.71414 * x */
;;;113        upsample->Cr_g_tab[i] = (- FIX(0.71414)) * x;
000070  4d09              LDR      r5,|L1.152|
000072  69a2              LDR      r2,[r4,#0x18]
000074  434d              MULS     r5,r1,r5
;;;114        /* Cb=>G value is scaled-up -0.34414 * x */
;;;115        /* We also add in ONE_HALF so that need not do it in inner loop */
;;;116        upsample->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF;
000076  4b09              LDR      r3,|L1.156|
000078  f8425020          STR      r5,[r2,r0,LSL #2]     ;113
00007c  434b              MULS     r3,r1,r3
00007e  eb060243          ADD      r2,r6,r3,LSL #1
000082  4605              MOV      r5,r0
000084  69e3              LDR      r3,[r4,#0x1c]
000086  1c40              ADDS     r0,r0,#1              ;103
000088  1c49              ADDS     r1,r1,#1              ;103
00008a  f8432025          STR      r2,[r3,r5,LSL #2]
00008e  28ff              CMP      r0,#0xff              ;103
000090  dddc              BLE      |L1.76|
;;;117      }
;;;118    }
000092  bd70              POP      {r4-r6,pc}
;;;119    
                          ENDP

                  |L1.148|
                          DCD      0x000166e9
                  |L1.152|
                          DCD      0xffff492e
                  |L1.156|
                          DCD      0xffffd3f3

                          AREA ||i.h2v1_merged_upsample||, CODE, READONLY, ALIGN=2

                  h2v1_merged_upsample PROC
;;;228    METHODDEF(void)
;;;229    h2v1_merged_upsample (j_decompress_ptr cinfo,
000000  e92d4ffc          PUSH     {r2-r11,lr}
;;;230    		      JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
;;;231    		      JSAMPARRAY output_buf)
;;;232    {
;;;233      my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
;;;234      register int y, cred, cgreen, cblue;
;;;235      int cb, cr;
;;;236      register JSAMPROW outptr;
;;;237      JSAMPROW inptr0, inptr1, inptr2;
;;;238      JDIMENSION col;
;;;239      /* copy these pointers into registers if possible */
;;;240      register JSAMPLE * range_limit = cinfo->sample_range_limit;
000004  f8d041c4          LDR      r4,[r0,#0x1c4]
000008  4681              MOV      r9,r0                 ;232
;;;241      int * Crrtab = upsample->Cr_r_tab;
;;;242      int * Cbbtab = upsample->Cb_b_tab;
;;;243      INT32 * Crgtab = upsample->Cr_g_tab;
;;;244      INT32 * Cbgtab = upsample->Cb_g_tab;
00000a  e9d4b604          LDRD     r11,r6,[r4,#0x10]
00000e  e9d47a06          LDRD     r7,r10,[r4,#0x18]     ;242
000012  f8d00144          LDR      r0,[r0,#0x144]        ;240
;;;245      SHIFT_TEMPS
;;;246    
;;;247      inptr0 = input_buf[0][in_row_group_ctr];
000016  9601              STR      r6,[sp,#4]
000018  680e              LDR      r6,[r1,#0]            ;243
;;;248      inptr1 = input_buf[1][in_row_group_ctr];
00001a  9700              STR      r7,[sp,#0]
00001c  f856c022          LDR      r12,[r6,r2,LSL #2]    ;247
000020  e9d14501          LDRD     r4,r5,[r1,#4]
;;;249      inptr2 = input_buf[2][in_row_group_ctr];
;;;250      outptr = output_buf[0];
;;;251      /* Loop for each pair of output pixels */
;;;252      for (col = cinfo->output_width >> 1; col > 0; col--) {
000024  6819              LDR      r1,[r3,#0]
000026  f8544022          LDR      r4,[r4,r2,LSL #2]     ;248
00002a  f8d93070          LDR      r3,[r9,#0x70]
00002e  f8552022          LDR      r2,[r5,r2,LSL #2]     ;249
000032  085b              LSRS     r3,r3,#1
000034  d030              BEQ      |L2.152|
;;;253        /* Do the chroma part of the calculation */
;;;254        cb = GETJSAMPLE(*inptr1++);
000036  bf00              NOP      
                  |L2.56|
000038  f814eb01          LDRB     lr,[r4],#1
;;;255        cr = GETJSAMPLE(*inptr2++);
00003c  f8127b01          LDRB     r7,[r2],#1
;;;256        cred = Crrtab[cr];
;;;257        cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
000040  9e00              LDR      r6,[sp,#0]
000042  f85a502e          LDR      r5,[r10,lr,LSL #2]
000046  f8566027          LDR      r6,[r6,r7,LSL #2]
00004a  f85b8027          LDR      r8,[r11,r7,LSL #2]    ;256
00004e  4435              ADD      r5,r5,r6
000050  142f              ASRS     r7,r5,#16
;;;258        cblue = Cbbtab[cb];
000052  9d01              LDR      r5,[sp,#4]
;;;259        /* Fetch 2 Y values and emit 2 pixels */
;;;260        y  = GETJSAMPLE(*inptr0++);
000054  f89c6000          LDRB     r6,[r12,#0]
000058  f855e02e          LDR      lr,[r5,lr,LSL #2]     ;258
;;;261        outptr[RGB_RED] =   range_limit[y + cred];
00005c  eb060508          ADD      r5,r6,r8
000060  5d45              LDRB     r5,[r0,r5]
000062  700d              STRB     r5,[r1,#0]
;;;262        outptr[RGB_GREEN] = range_limit[y + cgreen];
000064  19f5              ADDS     r5,r6,r7
000066  5d45              LDRB     r5,[r0,r5]
000068  704d              STRB     r5,[r1,#1]
;;;263        outptr[RGB_BLUE] =  range_limit[y + cblue];
00006a  eb06050e          ADD      r5,r6,lr
00006e  5d45              LDRB     r5,[r0,r5]
000070  708d              STRB     r5,[r1,#2]
;;;264        outptr += RGB_PIXELSIZE;
;;;265        y  = GETJSAMPLE(*inptr0++);
000072  f81c6f01          LDRB     r6,[r12,#1]!
000076  f10c0c01          ADD      r12,r12,#1
;;;266        outptr[RGB_RED] =   range_limit[y + cred];
00007a  eb060508          ADD      r5,r6,r8
00007e  5d45              LDRB     r5,[r0,r5]
000080  f8015f03          STRB     r5,[r1,#3]!
;;;267        outptr[RGB_GREEN] = range_limit[y + cgreen];
000084  19f5              ADDS     r5,r6,r7
000086  5d45              LDRB     r5,[r0,r5]
000088  704d              STRB     r5,[r1,#1]
;;;268        outptr[RGB_BLUE] =  range_limit[y + cblue];
00008a  eb06050e          ADD      r5,r6,lr
00008e  5d45              LDRB     r5,[r0,r5]
000090  708d              STRB     r5,[r1,#2]
;;;269        outptr += RGB_PIXELSIZE;
000092  1cc9              ADDS     r1,r1,#3
000094  1e5b              SUBS     r3,r3,#1              ;252
000096  d1cf              BNE      |L2.56|
                  |L2.152|
;;;270      }
;;;271      /* If image width is odd, do the last output column separately */
;;;272      if (cinfo->output_width & 1) {
000098  f8d93070          LDR      r3,[r9,#0x70]
00009c  07db              LSLS     r3,r3,#31
00009e  d018              BEQ      |L2.210|
;;;273        cb = GETJSAMPLE(*inptr1);
0000a0  7823              LDRB     r3,[r4,#0]
;;;274        cr = GETJSAMPLE(*inptr2);
0000a2  7812              LDRB     r2,[r2,#0]
;;;275        cred = Crrtab[cr];
;;;276        cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
0000a4  9e00              LDR      r6,[sp,#0]
0000a6  f85b4022          LDR      r4,[r11,r2,LSL #2]    ;275
0000aa  f85a5023          LDR      r5,[r10,r3,LSL #2]
0000ae  f8562022          LDR      r2,[r6,r2,LSL #2]
0000b2  442a              ADD      r2,r2,r5
;;;277        cblue = Cbbtab[cb];
0000b4  9d01              LDR      r5,[sp,#4]
0000b6  f8555023          LDR      r5,[r5,r3,LSL #2]
;;;278        y  = GETJSAMPLE(*inptr0);
0000ba  f89c3000          LDRB     r3,[r12,#0]
;;;279        outptr[RGB_RED] =   range_limit[y + cred];
0000be  441c              ADD      r4,r4,r3
0000c0  5d04              LDRB     r4,[r0,r4]
0000c2  700c              STRB     r4,[r1,#0]
;;;280        outptr[RGB_GREEN] = range_limit[y + cgreen];
0000c4  eb034222          ADD      r2,r3,r2,ASR #16
0000c8  5c82              LDRB     r2,[r0,r2]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -