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

📄 jdsample.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
📖 第 1 页 / 共 3 页
字号:
0000d2  dc9f              BGT      |L4.20|
;;;398      }
;;;399    }
0000d4  e8bd8fff          POP      {r0-r11,pc}
;;;400    
                          ENDP


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

                  h2v2_upsample PROC
;;;267    METHODDEF(void)
;;;268    h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
000000  e92d41fc          PUSH     {r2-r8,lr}
;;;269    	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
;;;270    {
;;;271      JSAMPARRAY output_data = *output_data_ptr;
;;;272      register JSAMPROW inptr, outptr;
;;;273      register JSAMPLE invalue;
;;;274      JSAMPROW outend;
;;;275      int inrow, outrow;
;;;276    
;;;277      GUI_USE_PARA(compptr);
;;;278      inrow = outrow = 0;
000004  2400              MOVS     r4,#0
000006  4606              MOV      r6,r0                 ;270
000008  4690              MOV      r8,r2                 ;270
00000a  4625              MOV      r5,r4
;;;279      while (outrow < cinfo->max_v_samp_factor) {
00000c  681f              LDR      r7,[r3,#0]
00000e  e01b              B        |L5.72|
                  |L5.16|
;;;280        inptr = input_data[inrow];
;;;281        outptr = output_data[outrow];
000010  f8570024          LDR      r0,[r7,r4,LSL #2]
;;;282        outend = outptr + cinfo->output_width;
000014  6f32              LDR      r2,[r6,#0x70]
000016  f8581025          LDR      r1,[r8,r5,LSL #2]     ;280
00001a  1813              ADDS     r3,r2,r0
;;;283        while (outptr < outend) {
00001c  e006              B        |L5.44|
;;;284          invalue = *inptr++;	/* don't need GETJSAMPLE() here */
00001e  bf00              NOP      
                  |L5.32|
000020  f8112b01          LDRB     r2,[r1],#1
;;;285          *outptr++ = invalue;
000024  7002              STRB     r2,[r0,#0]
;;;286          *outptr++ = invalue;
000026  f8002f01          STRB     r2,[r0,#1]!
00002a  1c40              ADDS     r0,r0,#1
                  |L5.44|
00002c  4298              CMP      r0,r3                 ;283
00002e  d3f7              BCC      |L5.32|
;;;287        }
;;;288        jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
000030  6f33              LDR      r3,[r6,#0x70]
000032  2201              MOVS     r2,#1
000034  e9cd2300          STRD     r2,r3,[sp,#0]
000038  1c63              ADDS     r3,r4,#1
00003a  463a              MOV      r2,r7
00003c  4621              MOV      r1,r4
00003e  4638              MOV      r0,r7
000040  f7fffffe          BL       jcopy_sample_rows
;;;289    		      1, cinfo->output_width);
;;;290        inrow++;
000044  1c6d              ADDS     r5,r5,#1
;;;291        outrow += 2;
000046  1ca4              ADDS     r4,r4,#2
                  |L5.72|
000048  f8d60138          LDR      r0,[r6,#0x138]        ;279
00004c  42a0              CMP      r0,r4                 ;279
00004e  dcdf              BGT      |L5.16|
;;;292      }
;;;293    }
000050  e8bd81fc          POP      {r2-r8,pc}
;;;294    
                          ENDP


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

                  int_upsample PROC
;;;194    METHODDEF(void)
;;;195    int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
000000  e92d47fc          PUSH     {r2-r10,lr}
;;;196    	      JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
;;;197    {
000004  4607              MOV      r7,r0
;;;198      my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
000006  f8d001c4          LDR      r0,[r0,#0x1c4]
00000a  4692              MOV      r10,r2                ;197
;;;199      JSAMPARRAY output_data = *output_data_ptr;
;;;200      register JSAMPROW inptr, outptr;
;;;201      register JSAMPLE invalue;
;;;202      register int h;
;;;203      JSAMPROW outend;
;;;204      int h_expand, v_expand;
;;;205      int inrow, outrow;
;;;206    
;;;207      h_expand = upsample->h_expand[compptr->component_index];
00000c  f1000244          ADD      r2,r0,#0x44
000010  6849              LDR      r1,[r1,#4]
;;;208      v_expand = upsample->v_expand[compptr->component_index];
000012  3048              ADDS     r0,r0,#0x48
;;;209    
;;;210      inrow = outrow = 0;
000014  2400              MOVS     r4,#0
000016  f8d39000          LDR      r9,[r3,#0]            ;207
00001a  f8118002          LDRB     r8,[r1,r2]            ;207
00001e  5c0d              LDRB     r5,[r1,r0]            ;208
000020  4626              MOV      r6,r4
;;;211      while (outrow < cinfo->max_v_samp_factor) {
000022  e020              B        |L6.102|
                  |L6.36|
;;;212        /* Generate one output row with proper horizontal expansion */
;;;213        inptr = input_data[inrow];
;;;214        outptr = output_data[outrow];
000024  f8590024          LDR      r0,[r9,r4,LSL #2]
;;;215        outend = outptr + cinfo->output_width;
000028  6f39              LDR      r1,[r7,#0x70]
00002a  f85a2026          LDR      r2,[r10,r6,LSL #2]    ;213
00002e  eb010c00          ADD      r12,r1,r0
;;;216        while (outptr < outend) {
000032  e008              B        |L6.70|
                  |L6.52|
;;;217          invalue = *inptr++;	/* don't need GETJSAMPLE() here */
000034  f8123b01          LDRB     r3,[r2],#1
;;;218          for (h = h_expand; h > 0; h--) {
000038  4641              MOV      r1,r8
00003a  e002              B        |L6.66|
                  |L6.60|
;;;219    	*outptr++ = invalue;
00003c  f8003b01          STRB     r3,[r0],#1
000040  1e49              SUBS     r1,r1,#1              ;218
                  |L6.66|
000042  2900              CMP      r1,#0                 ;218
000044  dcfa              BGT      |L6.60|
                  |L6.70|
000046  4560              CMP      r0,r12                ;216
000048  d3f4              BCC      |L6.52|
;;;220          }
;;;221        }
;;;222        /* Generate any additional output rows by duplicating the first one */
;;;223        if (v_expand > 1) {
00004a  2d01              CMP      r5,#1
00004c  dd09              BLE      |L6.98|
;;;224          jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
00004e  6f3b              LDR      r3,[r7,#0x70]
000050  1e6a              SUBS     r2,r5,#1
000052  e9cd2300          STRD     r2,r3,[sp,#0]
000056  1c63              ADDS     r3,r4,#1
000058  464a              MOV      r2,r9
00005a  4621              MOV      r1,r4
00005c  4648              MOV      r0,r9
00005e  f7fffffe          BL       jcopy_sample_rows
                  |L6.98|
;;;225    			v_expand-1, cinfo->output_width);
;;;226        }
;;;227        inrow++;
000062  1c76              ADDS     r6,r6,#1
;;;228        outrow += v_expand;
000064  442c              ADD      r4,r4,r5
                  |L6.102|
000066  f8d70138          LDR      r0,[r7,#0x138]        ;211
00006a  42a0              CMP      r0,r4                 ;211
00006c  dcda              BGT      |L6.36|
;;;229      }
;;;230    }
00006e  e8bd87fc          POP      {r2-r10,pc}
;;;231    
                          ENDP


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

                  jinit_upsampler PROC
;;;406    GLOBAL(void)
;;;407    jinit_upsampler (j_decompress_ptr cinfo)
000000  e92d5ff0          PUSH     {r4-r12,lr}
;;;408    {
000004  4604              MOV      r4,r0
;;;409      my_upsample_ptr upsample;
;;;410      int ci;
;;;411      jpeg_component_info * compptr;
;;;412      boolean need_buffer, do_fancy;
;;;413      int h_in_group, v_in_group, h_out_group, v_out_group;
;;;414    
;;;415      upsample = (my_upsample_ptr)
000006  6840              LDR      r0,[r0,#4]
000008  224c              MOVS     r2,#0x4c
00000a  6803              LDR      r3,[r0,#0]
00000c  2101              MOVS     r1,#1
00000e  4620              MOV      r0,r4
000010  4798              BLX      r3
;;;416        (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
;;;417    				SIZEOF(my_upsampler));
;;;418      cinfo->upsample = (struct jpeg_upsampler *) upsample;
;;;419      upsample->pub.start_pass = start_pass_upsample;
000012  494a              LDR      r1,|L7.316|
000014  f8c401c4          STR      r0,[r4,#0x1c4]
;;;420      upsample->pub.upsample = sep_upsample;
000018  6001              STR      r1,[r0,#0]
00001a  4949              LDR      r1,|L7.320|
;;;421      upsample->pub.need_context_rows = FALSE; /* until we find out differently */
00001c  2500              MOVS     r5,#0
;;;422    
;;;423      if (cinfo->CCIR601_sampling)	/* this isn't supported */
00001e  e9c01501          STRD     r1,r5,[r0,#4]
000022  4681              MOV      r9,r0                 ;415
000024  f8d4012c          LDR      r0,[r4,#0x12c]
000028  b130              CBZ      r0,|L7.56|
;;;424        ERREXIT(cinfo, JERR_CCIR601_NOTIMPL);
00002a  6821              LDR      r1,[r4,#0]
00002c  2019              MOVS     r0,#0x19
00002e  6148              STR      r0,[r1,#0x14]
000030  6820              LDR      r0,[r4,#0]
000032  6801              LDR      r1,[r0,#0]
000034  4620              MOV      r0,r4
000036  4788              BLX      r1
                  |L7.56|
;;;425    
;;;426      /* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1,
;;;427       * so don't ask for it.
;;;428       */
;;;429      do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1;
000038  6ce0              LDR      r0,[r4,#0x4c]
00003a  b120              CBZ      r0,|L7.70|
00003c  f8d4013c          LDR      r0,[r4,#0x13c]
000040  2801              CMP      r0,#1
000042  dd00              BLE      |L7.70|
000044  2501              MOVS     r5,#1
                  |L7.70|
000046  46ab              MOV      r11,r5
;;;430    
;;;431      /* Verify we can handle the sampling factors, select per-component methods,
;;;432       * and create storage as needed.
;;;433       */
;;;434      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
000048  f04f0a00          MOV      r10,#0
00004c  f8d450d8          LDR      r5,[r4,#0xd8]
000050  e06f              B        |L7.306|
                  |L7.82|
;;;435           ci++, compptr++) {
;;;436        /* Compute size of an "input group" after IDCT scaling.  This many samples
;;;437         * are to be converted to max_h_samp_factor * max_v_samp_factor pixels.
;;;438         */
;;;439        h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) /
000052  6a6b              LDR      r3,[r5,#0x24]
000054  68a9              LDR      r1,[r5,#8]
;;;440    		 cinfo->min_DCT_scaled_size;
;;;441        v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
000056  f8d4013c          LDR      r0,[r4,#0x13c]
00005a  4359              MULS     r1,r3,r1              ;439
00005c  fb91fcf0          SDIV     r12,r1,r0             ;439
;;;442    		 cinfo->min_DCT_scaled_size;
;;;443        h_out_group = cinfo->max_h_samp_factor;
000060  68ea              LDR      r2,[r5,#0xc]
;;;444        v_out_group = cinfo->max_v_samp_factor;
;;;445        upsample->rowgroup_height[ci] = v_in_group; /* save for use later */
000062  f504769a          ADD      r6,r4,#0x134
000066  435a              MULS     r2,r3,r2              ;441
000068  fb92f0f0          SDIV     r0,r2,r0              ;441
00006c  cec0              LDM      r6,{r6,r7}
00006e  eb09088a          ADD      r8,r9,r10,LSL #2
;;;446        need_buffer = TRUE;
;;;447        if (! compptr->component_needed) {
000072  f8c80034          STR      r0,[r8,#0x34]
000076  6b29              LDR      r1,[r5,#0x30]
000078  b909              CBNZ     r1,|L7.126|
;;;448          /* Don't bother to upsample an uninteresting component. */
;;;449          upsample->methods[ci] = noop_upsample;
00007a  4832              LDR      r0,|L7.324|
;;;450          need_buffer = FALSE;
00007c  e004              B        |L7.136|
                  |L7.126|
;;;451        } else if (h_in_group == h_out_group && v_in_group == v_out_group) {
00007e  45b4              CMP      r12,r6
000080  d105              BNE      |L7.142|
000082  42b8              CMP      r0,r7
000084  d103              BNE      |L7.142|
;;;452          /* Fullsize components can be processed without any work. */
;;;453          upsample->methods[ci] = fullsize_upsample;
000086  4830              LDR      r0,|L7.328|
                  |L7.136|
000088  f8c8001c          STR      r0,[r8,#0x1c]         ;449
00008c  e04e              B        |L7.300|
                  |L7.142|
;;;454          need_buffer = FALSE;
;;;455        } else if (h_in_group * 2 == h_out_group &&
00008e  ebb60f4c          CMP      r6,r12,LSL #1
000092  d10d              BNE      |L7.176|
;;;456    	       v_in_group == v_out_group) {
000094  42b8              CMP      r0,r7
000096  d10b              BNE      |L7.176|
;;;457          /* Special cases for 2h1v upsampling */
;;;458          if (do_fancy && compptr->downsampled_width > 2)
000098  f1bb0f00          CMP      r11,#0
00009c  d004              BEQ      |L7.168|

⌨️ 快捷键说明

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