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

📄 jdmaster.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\jdmaster.o --depend=.\Obj\jdmaster.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\jdmaster.c]
                          THUMB

                          AREA ||i.finish_output_pass||, CODE, READONLY, ALIGN=1

                  finish_output_pass PROC
;;;497    METHODDEF(void)
;;;498    finish_output_pass (j_decompress_ptr cinfo)
000000  b510              PUSH     {r4,lr}
;;;499    {
;;;500      my_master_ptr master = (my_master_ptr) cinfo->master;
;;;501    
;;;502      if (cinfo->quantize_colors)
000002  f8d041a4          LDR      r4,[r0,#0x1a4]
000006  6d41              LDR      r1,[r0,#0x54]
000008  b119              CBZ      r1,|L1.18|
;;;503        (*cinfo->cquantize->finish_pass) (cinfo);
00000a  f8d011cc          LDR      r1,[r0,#0x1cc]
00000e  6889              LDR      r1,[r1,#8]
000010  4788              BLX      r1
                  |L1.18|
;;;504      master->pass_number++;
000012  68e0              LDR      r0,[r4,#0xc]
000014  1c40              ADDS     r0,r0,#1
;;;505    }
000016  60e0              STR      r0,[r4,#0xc]
000018  bd10              POP      {r4,pc}
;;;506    
                          ENDP


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

                  jinit_master_decompress PROC
;;;542    GLOBAL(void)
;;;543    jinit_master_decompress (j_decompress_ptr cinfo)
000000  b510              PUSH     {r4,lr}
;;;544    {
000002  4604              MOV      r4,r0
;;;545      my_master_ptr master;
;;;546    
;;;547      master = (my_master_ptr)
000004  6840              LDR      r0,[r0,#4]
000006  221c              MOVS     r2,#0x1c
000008  6803              LDR      r3,[r0,#0]
00000a  2101              MOVS     r1,#1
00000c  4620              MOV      r0,r4
00000e  4798              BLX      r3
;;;548          (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
;;;549    				  SIZEOF(my_decomp_master));
;;;550      cinfo->master = (struct jpeg_decomp_master *) master;
;;;551      master->pub.prepare_for_output_pass = prepare_for_output_pass;
000010  4906              LDR      r1,|L2.44|
000012  f8c401a4          STR      r0,[r4,#0x1a4]
;;;552      master->pub.finish_output_pass = finish_output_pass;
000016  6001              STR      r1,[r0,#0]
000018  4905              LDR      r1,|L2.48|
;;;553    
;;;554      master->pub.is_dummy_pass = FALSE;
00001a  6041              STR      r1,[r0,#4]
00001c  2100              MOVS     r1,#0
;;;555    
;;;556      master_selection(cinfo);
00001e  6081              STR      r1,[r0,#8]
000020  4620              MOV      r0,r4
000022  e8bd4010          POP      {r4,lr}
000026  f7ffbffe          B.W      master_selection
;;;557    }
                          ENDP

00002a  0000              DCW      0x0000
                  |L2.44|
                          DCD      prepare_for_output_pass
                  |L2.48|
                          DCD      finish_output_pass

                          AREA ||i.jpeg_calc_output_dimensions||, CODE, READONLY, ALIGN=1

                  jpeg_calc_output_dimensions PROC
;;;83     GLOBAL(void)
;;;84     jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
000000  b570              PUSH     {r4-r6,lr}
;;;85     /* Do computations that are needed before master selection phase */
;;;86     {
000002  4604              MOV      r4,r0
;;;87     #ifdef IDCT_SCALING_SUPPORTED
;;;88       int ci;
;;;89       jpeg_component_info *compptr;
;;;90     #endif
;;;91     
;;;92       /* Prevent application from calling me at wrong times */
;;;93       if (cinfo->global_state != DSTATE_READY)
000004  6940              LDR      r0,[r0,#0x14]
000006  28ca              CMP      r0,#0xca
000008  d009              BEQ      |L3.30|
;;;94         ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
00000a  6821              LDR      r1,[r4,#0]
00000c  2014              MOVS     r0,#0x14
00000e  6148              STR      r0,[r1,#0x14]
000010  6821              LDR      r1,[r4,#0]
000012  6960              LDR      r0,[r4,#0x14]
000014  6188              STR      r0,[r1,#0x18]
000016  6820              LDR      r0,[r4,#0]
000018  6801              LDR      r1,[r0,#0]
00001a  4620              MOV      r0,r4
00001c  4788              BLX      r1
                  |L3.30|
;;;95     
;;;96     #ifdef IDCT_SCALING_SUPPORTED
;;;97     
;;;98       /* Compute actual output image dimensions and DCT scaling choices. */
;;;99       if (cinfo->scale_num * 8 <= cinfo->scale_denom) {
;;;100        /* Provide 1/8 scaling */
;;;101        cinfo->output_width = (JDIMENSION)
;;;102          jdiv_round_up((long) cinfo->image_width, 8L);
;;;103        cinfo->output_height = (JDIMENSION)
;;;104          jdiv_round_up((long) cinfo->image_height, 8L);
;;;105        cinfo->min_DCT_scaled_size = 1;
;;;106      } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) {
;;;107        /* Provide 1/4 scaling */
;;;108        cinfo->output_width = (JDIMENSION)
;;;109          jdiv_round_up((long) cinfo->image_width, 4L);
;;;110        cinfo->output_height = (JDIMENSION)
;;;111          jdiv_round_up((long) cinfo->image_height, 4L);
;;;112        cinfo->min_DCT_scaled_size = 2;
;;;113      } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) {
;;;114        /* Provide 1/2 scaling */
;;;115        cinfo->output_width = (JDIMENSION)
;;;116          jdiv_round_up((long) cinfo->image_width, 2L);
;;;117        cinfo->output_height = (JDIMENSION)
;;;118          jdiv_round_up((long) cinfo->image_height, 2L);
;;;119        cinfo->min_DCT_scaled_size = 4;
;;;120      } else {
;;;121        /* Provide 1/1 scaling */
;;;122        cinfo->output_width = cinfo->image_width;
;;;123        cinfo->output_height = cinfo->image_height;
;;;124        cinfo->min_DCT_scaled_size = DCTSIZE;
;;;125      }
;;;126      /* In selecting the actual DCT scaling for each component, we try to
;;;127       * scale up the chroma components via IDCT scaling rather than upsampling.
;;;128       * This saves time if the upsampler gets to use 1:1 scaling.
;;;129       * Note this code assumes that the supported DCT scalings are powers of 2.
;;;130       */
;;;131      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
;;;132           ci++, compptr++) {
;;;133        int ssize = cinfo->min_DCT_scaled_size;
;;;134        while (ssize < DCTSIZE &&
;;;135    	   (compptr->h_samp_factor * ssize * 2 <=
;;;136    	    cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) &&
;;;137    	   (compptr->v_samp_factor * ssize * 2 <=
;;;138    	    cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) {
;;;139          ssize = ssize * 2;
;;;140        }
;;;141        compptr->DCT_scaled_size = ssize;
;;;142      }
;;;143    
;;;144      /* Recompute downsampled dimensions of components;
;;;145       * application needs to know these if using raw downsampled data.
;;;146       */
;;;147      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
;;;148           ci++, compptr++) {
;;;149        /* Size in samples, after IDCT scaling */
;;;150        compptr->downsampled_width = (JDIMENSION)
;;;151          jdiv_round_up((long) cinfo->image_width *
;;;152    		    (long) (compptr->h_samp_factor * compptr->DCT_scaled_size),
;;;153    		    (long) (cinfo->max_h_samp_factor * DCTSIZE));
;;;154        compptr->downsampled_height = (JDIMENSION)
;;;155          jdiv_round_up((long) cinfo->image_height *
;;;156    		    (long) (compptr->v_samp_factor * compptr->DCT_scaled_size),
;;;157    		    (long) (cinfo->max_v_samp_factor * DCTSIZE));
;;;158      }
;;;159    
;;;160    #else /* !IDCT_SCALING_SUPPORTED */
;;;161    
;;;162      /* Hardwire it to "no scaling" */
;;;163      cinfo->output_width = cinfo->image_width;
00001e  69e0              LDR      r0,[r4,#0x1c]
;;;164      cinfo->output_height = cinfo->image_height;
000020  6720              STR      r0,[r4,#0x70]
000022  6a20              LDR      r0,[r4,#0x20]
;;;165      /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE,
;;;166       * and has computed unscaled downsampled_width and downsampled_height.
;;;167       */
;;;168    
;;;169    #endif /* IDCT_SCALING_SUPPORTED */
;;;170    
;;;171      /* Report number of components in selected colorspace. */
;;;172      /* Probably this should be in the color conversion module... */
;;;173      switch (cinfo->out_color_space) {
000024  6760              STR      r0,[r4,#0x74]
000026  f8940029          LDRB     r0,[r4,#0x29]
00002a  2501              MOVS     r5,#1
00002c  2806              CMP      r0,#6
00002e  d218              BCS      |L3.98|
000030  e8dff000          TBB      [pc,r0]
000034  17030505          DCB      0x17,0x03,0x05,0x05
000038  0707              DCB      0x07,0x07
;;;174      case JCS_GRAYSCALE:
;;;175        cinfo->out_color_components = 1;
;;;176        break;
00003a  67a5              STR      r5,[r4,#0x78]
00003c  e003              B        |L3.70|
;;;177      case JCS_RGB:
;;;178    #if RGB_PIXELSIZE != 3
;;;179        cinfo->out_color_components = RGB_PIXELSIZE;
;;;180        break;
;;;181    #endif /* else share code with YCbCr */
;;;182      case JCS_YCbCr:
;;;183        cinfo->out_color_components = 3;
00003e  2003              MOVS     r0,#3
;;;184        break;
000040  e000              B        |L3.68|
;;;185      case JCS_CMYK:
;;;186      case JCS_YCCK:
;;;187        cinfo->out_color_components = 4;
000042  2004              MOVS     r0,#4
                  |L3.68|
000044  67a0              STR      r0,[r4,#0x78]         ;183
                  |L3.70|
;;;188        break;
;;;189      default:			/* else must be same colorspace as in file */
;;;190        cinfo->out_color_components = cinfo->num_components;
;;;191        break;
;;;192      }
;;;193      cinfo->output_components = (cinfo->quantize_colors ? 1 :
000046  6d61              LDR      r1,[r4,#0x54]
000048  4628              MOV      r0,r5
00004a  b901              CBNZ     r1,|L3.78|
;;;194    			      cinfo->out_color_components);
00004c  6fa0              LDR      r0,[r4,#0x78]
                  |L3.78|
;;;195    
;;;196      /* See if upsampler will want to emit more than one row at a time */
;;;197      if (use_merged_upsample(cinfo))
00004e  67e0              STR      r0,[r4,#0x7c]
000050  4620              MOV      r0,r4
000052  f7fffffe          BL       use_merged_upsample
000056  b130              CBZ      r0,|L3.102|
;;;198        cinfo->rec_outbuf_height = cinfo->max_v_samp_factor;
000058  f8d40138          LDR      r0,[r4,#0x138]
00005c  f8c40080          STR      r0,[r4,#0x80]
;;;199      else
;;;200        cinfo->rec_outbuf_height = 1;
;;;201    }
000060  bd70              POP      {r4-r6,pc}
                  |L3.98|
000062  6a60              LDR      r0,[r4,#0x24]         ;191
000064  e7ee              B        |L3.68|
                  |L3.102|
000066  f8c45080          STR      r5,[r4,#0x80]         ;200
00006a  bd70              POP      {r4-r6,pc}
;;;202    
                          ENDP


                          AREA ||i.jpeg_new_colormap||, CODE, READONLY, ALIGN=1

                  jpeg_new_colormap PROC
;;;514    GLOBAL(void)
;;;515    jpeg_new_colormap (j_decompress_ptr cinfo)
000000  b570              PUSH     {r4-r6,lr}
;;;516    {
000002  4604              MOV      r4,r0
;;;517      my_master_ptr master = (my_master_ptr) cinfo->master;
;;;518    
;;;519      /* Prevent application from calling me at wrong times */
;;;520      if (cinfo->global_state != DSTATE_BUFIMAGE)
000004  f8d051a4          LDR      r5,[r0,#0x1a4]
000008  6940              LDR      r0,[r0,#0x14]
00000a  28cf              CMP      r0,#0xcf
00000c  d009              BEQ      |L4.34|
;;;521        ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
00000e  6821              LDR      r1,[r4,#0]
000010  2014              MOVS     r0,#0x14
000012  6148              STR      r0,[r1,#0x14]
000014  6821              LDR      r1,[r4,#0]
000016  6960              LDR      r0,[r4,#0x14]
000018  6188              STR      r0,[r1,#0x18]
00001a  6820              LDR      r0,[r4,#0]
00001c  6801              LDR      r1,[r0,#0]
00001e  4620              MOV      r0,r4
000020  4788              BLX      r1
                  |L4.34|
;;;522    
;;;523      if (cinfo->quantize_colors && cinfo->enable_external_quant &&
000022  6d60              LDR      r0,[r4,#0x54]
000024  b168              CBZ      r0,|L4.66|
000026  6ea0              LDR      r0,[r4,#0x68]
000028  b158              CBZ      r0,|L4.66|
;;;524          cinfo->colormap != NULL) {
00002a  f8d40088          LDR      r0,[r4,#0x88]
00002e  b140              CBZ      r0,|L4.66|
;;;525        /* Select 2-pass quantizer for external colormap use */
;;;526        cinfo->cquantize = master->quantizer_2pass;
000030  69a8              LDR      r0,[r5,#0x18]
;;;527        /* Notify quantizer of colormap change */
;;;528        (*cinfo->cquantize->new_color_map) (cinfo);
000032  f8c401cc          STR      r0,[r4,#0x1cc]
000036  68c1              LDR      r1,[r0,#0xc]
000038  4620              MOV      r0,r4
00003a  4788              BLX      r1
;;;529        master->pub.is_dummy_pass = FALSE; /* just in case */
00003c  2000              MOVS     r0,#0
00003e  60a8              STR      r0,[r5,#8]
;;;530      } else
;;;531        ERREXIT(cinfo, JERR_MODE_CHANGE);
;;;532    }
000040  bd70              POP      {r4-r6,pc}
                  |L4.66|
000042  6821              LDR      r1,[r4,#0]            ;531
000044  202e              MOVS     r0,#0x2e              ;531
000046  6148              STR      r0,[r1,#0x14]         ;531
000048  6820              LDR      r0,[r4,#0]            ;531
00004a  6801              LDR      r1,[r0,#0]            ;531

⌨️ 快捷键说明

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