CN1270273C - Adaptive memory allocation - Google Patents
Adaptive memory allocation Download PDFInfo
- Publication number
- CN1270273C CN1270273C CN 02808484 CN02808484A CN1270273C CN 1270273 C CN1270273 C CN 1270273C CN 02808484 CN02808484 CN 02808484 CN 02808484 A CN02808484 A CN 02808484A CN 1270273 C CN1270273 C CN 1270273C
- Authority
- CN
- China
- Prior art keywords
- data
- internal memory
- processed
- processor
- external memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/60—Memory management
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method of processing data in a device having a processor with an internal memory, an external memory containing data to be processed, and a bus interconnecting the processor and the external memory. First, the size of the actually available free memory is determined and compared to the amount of data to be processed. If the amount of data to be processed does not exceed the size of the free processor memory then all data is transferred to the processor memory. If the amount of data to be processed exceeds the size of the free processor memory then portions of data each not exceeding the free internal memory are transferred one at a time to the internal processor memory for processing. After processing, the processed data are returned, and a new portion of data is transferred to the internal processor memory for processing.
Description
Technical field
The present invention relates to effectively to use the free memory in the processor of equipment with limited memory capacity.
Background technology
Digital picture is wide-spread, and exchanges and send digital picture continually by for example internet.Along with for example appearance of digital subscriber camera, the user can write down his or she image.High-resolution digital picture requires big memory capacity, and therefore frequent compressed digital video, can require less storer thus.Depend on compression algorithm, the desired storage of digital picture can by one typically 5 and 50 or bigger between the factor reduce.Usually, the compression and decompression algorithm with high compression factor requires more to many by the performed calculating of processor than the algorithm with low compression factor.
Processor has the internal memory of a limited capacity and the bigger external memory storage that processor can pass through bus access usually in digital device.For example the Flame Image Process of the compression and decompression of view data is thereby that requirement is handled a lot of data and given processor and the operation of internal memory loading.In a lot of digital devices, optimized processor and internal memory thereof for special task for example are the voice of management between mobile phone and base station and the business optimized processor of other data in mobile phone.Image file is usually stored with the compressed format that requires less storage space.
New Joint Photographic Experts Group JPEG2000 is based on discrete wavelet transform (DWT) and contrary discrete wavelet transform (IDWT).As everyone knows, the discrete wavelet transform that uses in JPEG is than the conversion consumption of other discrete cosine transform of for example using in JPEG or take more storer.Therefore, especially in environment, wish the use of optimize storage as the storage key (memory critical) of DSP and portable terminal.Current, as not design on market JPEG2000 encoder/decoder for DSP.
In the portable terminal of for example mobile phone, the data that input to the DWT/IDWT routine are stored in the external memory storage of flash memory for example.In DSP, carry out DWT/IDWT.When the digital picture of compression is had to processed and be displayed on the display of mobile phone, must handle the file of whole compression.Quick internal memory for processor, digital image file may be too big, therefore and the some parts of file must be sent to from external memory storage that internal memory is handled and these parts are turned back to external memory storage, another part of file is sent to processor and handles subsequently.This requirement is provided with bus for each transfer operation, and this is time taking with some transmission.Can use Several Methods to come the transmission and the processing thereof of managing image data.
A possible method is to transmit the internal memory of all data to processor.This has provided the fastest conversion, but this depends on the size of image and require that big internal memory is arranged in processor.
Another possible method is only for example sub-fraction corresponding to the view data of the delegation (line) of image to be sent to the internal memory of processor, and carries out map function subsequently and the data after the conversion are sent back external memory storage.The method only requires less internal processor storer, but the transmission of the data between internal storage and external memory storage will be very consuming time.
The internal processor storer can have certain storage space of reserving for these purposes, but when the storer that does not utilize reservation carried out image transformation, the storage space of reservation can be advantageously used in other application.Because what limited memory capacity and free memory capacity depended on for example speech coder and MP3 player in DSP may be the movable effectively fact of other application, image transformation only can be operated with little, predetermined memory capacity.At other times, may not utilize the internal processor storer fully.
Like this, in the storage critical environmental of for example DSP and portable terminal, DWT/IDWT and other algorithms existing problems.If the data of all inputs are sent to the internal memory of processor simultaneously, realized the fastest conversion as cost to use storer.On the other hand, if a spot of data are sent to internal memory, storer can be carried out other tasks simultaneously thus, and processing will spend for a long time.Therefore, existing method does not allow to optimize use internal processor storer.
Prior art
WO 97/06512 discloses a kind of method that is used to implement display image.The tiled display (tiler) that is used to implement from the instruction of sharing storage system is disclosed.Described how storage pixel data in buffer of tiled display, and dynamically adjusted data quantity stored according to available memory capacity and overflow to avoid storer.See also that the 15th page of 20-22 is capable, the 65th page of the 32nd row to the 66th page of the 7th row, the 73rd page of the 20th row to the 76th page of the 29th row, Fig. 4 A and 4B.The Duan Jie of the back of this document is particularly related to the problem of avoiding storer to overflow.
EP 825 777 discloses the method and apparatus that is used for the data volume of the data of calculating compressed encoding before the record code image.It has discussed (interleave) unit that interweaves that effectively is set to have can the designated store capacity time less than the size of memory capacity.See also the 19th page of the 48th row to the 20th page and Figure 70-74, this more or less is equal to the method for describing among the above-cited WO 97/06512.
WO 00/02319 has described the method for the data of for example image being carried out adaptive coding and decoding according to the DWT method.
WO 98/07278 has described the method that is used for coding image signal.Allow cache capacity to change according to the different qualities of image.See also the 28-29 page or leaf.
US 5 267 334 has described the method that is used for according to DCT method Code And Decode image.See also summary.
From two parts of file WO 97/06512 and EP 825 777, we know in the processing of coding/decoding and display image, adjust image data amount according to available memory.Problem in WO 97/06512 is how to avoid storer to overflow, and this problem and solution thereof seem to be very trifling all.Problem in EP825 777 and solution thereof relate to multimedia messages are transformed into light readable code mode image data.
Summary of the invention
The present invention proposes the mixing between these two kinds of methods, thereby the image transformation routine is based in the processor actual free storage and with processed data volume, for example, the size of image file.Therefore, not only optimize and used processor and internal memory thereof, use data bus, and always carry out image transformation as quickly as possible and can not disturb other routine but also optimize.The invention is not restricted to the conversion or the DWT/IDWT routine of view data.
Particularly, the invention provides a kind of in equipment the method for deal with data, described equipment has:
-have a processor of internal memory,
-comprise the external memory storage of data to be processed, and
-be used between described external memory storage and described internal memory transmitting the transmission path of data,
Described method comprises:
-determine the size of data to be processed,
-definite in fact capacity of idle internal memory, and
If the size of data to be processed is less than or equal in the described processor capacity of in fact idle internal memory,
-the data that will handle are sent to the internal memory of described processor from described external memory storage, and
The described data to be processed of-processing,
-the data that will handle are sent to described external memory storage,
Perhaps, if the size of data to be processed greater than the capacity of internal memory in fact idle in the described processor,
-reserve the part of described internal memory, the part of described internal memory is corresponding with in fact idle internal memory and be no more than the in fact internal memory of free time,
-part of described data to be processed is sent to the reserved part of described internal memory from external memory storage, the size of the data that transmitted is no more than the reserved part of described internal memory,
-processing has been sent to the data of described internal memory,
-transmit the data of having handled to arrive external memory storage, and
If-untreated data still are retained in the described external memory storage, then repeat to transmit the part of data, the data that processing has transmitted and the step that transmits the data of having handled.
The present invention also provides a kind of equipment, has:
-have a processor of internal memory,
-be used to comprise the external memory storage of data to be processed, and
-be used between described external memory storage and described internal memory transmitting the transmission path of data,
It is characterized in that use a kind of method to come deal with data, described method comprises:
-determine the size of data to be processed,
-definite in fact capacity of idle internal memory, and
If the size of data to be processed is less than or equal in the described processor capacity of in fact idle internal memory,
-the data that will handle are sent to the internal memory of described processor from described external memory storage, and
The described data to be processed of-processing,
-the data that will handle are sent to described external memory storage,
Perhaps, if the size of data to be processed greater than the capacity of internal memory in fact idle in the described processor,
-reserve the part of described internal memory, the part of described internal memory is corresponding with in fact idle internal memory and be no more than the in fact internal memory of free time,
-part of described data to be processed is sent to the reserved part of described internal memory from external memory storage, the size of the data that transmitted is no more than the reserved part of described internal memory,
-processing has been sent to the data of described internal memory,
-transmit the data of having handled to arrive external memory storage, and
If-untreated data still are retained in the described external memory storage, then repeat to transmit the part of data, the data that processing has transmitted and the step that transmits the data of having handled.
Description of drawings
Fig. 1 has shown the schematic representation intention of using mobile communication equipment of the present invention; With
Fig. 2 is the process flow diagram of explanation the inventive method.
Embodiment
Fig. 1 has shown a mobile communication equipment, and it is the mobile communication equipment of mobile phone for example preferably.Mobile communication equipment has for example conventional processors of digital signal processor DSP, and this handles the conventional memory that utensil has DARAM for example or SARAM.By number bus, processor is communicated by letter with keyboard with the external memory storage of for example FLASH ROM and with display.Display is can the display digit image or the traditional type of picture and alphanumeric character.Other required assemblies of phone operation also are represented as and are connected to bus.These assemblies comprise radio frequency receiver and transmitter, microphone and receiver transducer etc.External memory storage will typically comprise and relevant data and the user-dependent data of communication facilities operation, for example Ge Ren phone directory.For example other data of view data also can be stored in the external memory storage.Usually the view data of being stored is used and is compressed such as the JPEG2000 standard.Whether no matter be compressed, view data all can take the storer of quite a few.
Fig. 2 has illustrated method of the present invention.The compressed image file that will decompress in processor must at first be sent to the internal memory in the processor so that handle.Image file is often greater than free storage available in the processor, and before the view data of compression is sent to processor, determines in fact to have in processor how many free storages to use.
If processor almost is in the idle pulley, promptly do not taken by heavy task, correspondingly will have big relatively free memory to use, and have corresponding to big relatively free memory capacity will be processed the part of view data be sent to internal memory from external memory storage and handled.After handling, data processed is returned to external memory storage or turns back to any other equipment, display for example, so that show, and the new big relatively part of view data is sent to internal memory from external memory storage, so that handle.In the case, only use less data consuming time to send and handle entire image relatively soon.
On the other hand, if processor is taken by other tasks heavyly, its internal memory will be correspondingly occupied, and few relatively free storage can be used, and has a part of wanting processed view data corresponding to relatively little free memory capacity and will be sent to internal memory from external memory storage and handle.After handling, return data processed, and the new relatively little part of view data is sent to internal memory from external memory storage and is handled.In the case, owing to use many data consuming time to transmit, so handle entire image relatively slowly.
Data that will be processed are view data not necessarily, and described method can be used on any data that will handle in processor, wherein this handles utensil internal memory, but the free memory capacity that described internal memory has will be for will processed data volume being not enough.
For example, can will will download to communication facilities from telephone network by processed file such as the music file of the image of JPEG 2000 forms or MP3 format.
Fig. 1 has also shown the bluetooth near field communication device of using standardized Bluetooth communication protocol.The digital subscriber camera comes memory image with for example compressed format of JPEG2000 form.Use Bluetooth communication equipment, the image of compression can download to mobile communication equipment from digital camera.The compressed image of such storage can use method of the present invention to come decompress(ion) to contract and be presented on the display of mobile phone.
Handling continuously and showing under the situation of a series of images as a series of moving images, be used for each treatment of picture time as far as possible weak point be important so that image can get up as far as possible apace continuously.Method of the present invention is guaranteed to utilize by the determined speed of free memory available in the processor and is come for example view data of fast processing.
List of references
Can find Bluetooth specification by the Official Bluetooth Website (official bluetooth website) on following internet address:
http://www.bluetooth.com/developer/specification/core.asp
Can find information about JPEG 2000 standards at following internet address:
http://www.jpeg.org/jpeg2000.htm。
Claims (9)
1. the method for a deal with data in equipment, described equipment has:
-have a processor of internal memory,
-comprise the external memory storage of data to be processed, and
-be used between described external memory storage and described internal memory transmitting the transmission path of data,
Described method comprises:
-determine the size of data to be processed,
-definite in fact capacity of idle internal memory, and
If the size of data to be processed is less than or equal in the described processor capacity of in fact idle internal memory,
-the data that will handle are sent to the internal memory of described processor from described external memory storage, and
The described data to be processed of-processing,
-the data that will handle are sent to described external memory storage,
Perhaps, if the size of data to be processed greater than the capacity of internal memory in fact idle in the described processor,
-reserve the part of described internal memory, the part of described internal memory is corresponding with in fact idle internal memory and be no more than the in fact internal memory of free time,
-part of described data to be processed is sent to the reserved part of described internal memory from external memory storage, the size of the data that transmitted is no more than the reserved part of described internal memory,
-processing has been sent to the data of described internal memory,
-transmit the data of having handled to arrive external memory storage, and
If-untreated data still are retained in the described external memory storage, then repeat to transmit the part of data, the data that processing has transmitted and the step that transmits the data of having handled.
2. according to the method for claim 1, it is characterized in that described data representation image to be processed.
3. according to the method for claim 2, it is characterized in that described image is represented with JPEG 2000 forms.
4. according to the method for claim 3, it is characterized in that, utilize discrete wavelet transform to come deal with data.
5. according to the method for claim 3, it is characterized in that, utilize contrary discrete wavelet transform to come deal with data.
6. equipment has:
-have a processor of internal memory,
-be used to comprise the external memory storage of data to be processed, and
-be used between described external memory storage and described internal memory transmitting the transmission path of data,
It is characterized in that use a kind of force method to come deal with data, described method comprises:
-determine the size of data to be processed,
-definite in fact capacity of idle internal memory, and
If the size of data to be processed is less than or equal in the described processor capacity of in fact idle internal memory,
-the data that will handle are sent to the internal memory of described processor from described external memory storage, and
The described data to be processed of-processing,
-the data that will handle are sent to described external memory storage,
Perhaps, if the size of data to be processed greater than the capacity of internal memory in fact idle in the described processor,
-reserve the part of described internal memory, the part of described internal memory is corresponding with in fact idle internal memory and be no more than the in fact internal memory of free time,
-part of described data to be processed is sent to the reserved part of described internal memory from external memory storage, the size of the data that transmitted is no more than the reserved part of described internal memory,
-processing has been sent to the data of described internal memory,
-transmit the data of having handled to arrive external memory storage, and
If-untreated data still are retained in the described external memory storage, then repeat to transmit the part of data, the data that processing has transmitted and the step that transmits the data of having handled.
7. according to the equipment of claim 6, it is characterized in that described equipment has the display that is used for display image.
8. according to the equipment of claim 7, it is characterized in that described equipment is mobile radio communication apparatus.
9. equipment according to Claim 8 is characterized in that, described equipment has the near field communication device of using Bluetooth communication protocol.
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP01610043.0 | 2001-04-19 | ||
EP01610043A EP1251460A1 (en) | 2001-04-19 | 2001-04-19 | Adaptive method for allocation of random access memory |
US28704201P | 2001-04-26 | 2001-04-26 | |
US60/287,042 | 2001-04-26 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1503958A CN1503958A (en) | 2004-06-09 |
CN1270273C true CN1270273C (en) | 2006-08-16 |
Family
ID=26077307
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 02808484 Expired - Fee Related CN1270273C (en) | 2001-04-19 | 2002-03-22 | Adaptive memory allocation |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN1270273C (en) |
WO (1) | WO2002086817A1 (en) |
Families Citing this family (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060239194A1 (en) * | 2005-04-20 | 2006-10-26 | Chapell Christopher L | Monitoring a queue for a communication link |
CN103970781A (en) * | 2013-01-30 | 2014-08-06 | 深圳市同洲电子股份有限公司 | Embedded browser picture decoding device and method |
CN106528278B (en) * | 2015-09-14 | 2019-06-25 | 纬创资通(上海)有限公司 | Hardware load method of adjustment and electronic device |
US11437032B2 (en) | 2017-09-29 | 2022-09-06 | Shanghai Cambricon Information Technology Co., Ltd | Image processing apparatus and method |
KR102354720B1 (en) | 2018-02-13 | 2022-01-21 | 상하이 캠브리콘 인포메이션 테크놀로지 컴퍼니 리미티드 | Computing device and method |
US11663002B2 (en) | 2018-02-13 | 2023-05-30 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11630666B2 (en) | 2018-02-13 | 2023-04-18 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
CN110162162B (en) | 2018-02-14 | 2023-08-18 | 上海寒武纪信息科技有限公司 | Control device, method and equipment of processor |
WO2019218896A1 (en) | 2018-05-18 | 2019-11-21 | 上海寒武纪信息科技有限公司 | Computing method and related product |
KR102470893B1 (en) | 2018-06-27 | 2022-11-25 | 상하이 캠브리콘 인포메이션 테크놀로지 컴퍼니 리미티드 | Debug method by breakpoint of on-chip code, chip debug system by on-chip processor and breakpoint |
EP3757896B1 (en) * | 2018-08-28 | 2023-01-11 | Cambricon Technologies Corporation Limited | Method and device for pre-processing data in a neural network |
CN112732601B (en) * | 2018-08-28 | 2024-06-18 | 中科寒武纪科技股份有限公司 | Data preprocessing method, device, computer equipment and storage medium |
CN110865792B (en) * | 2018-08-28 | 2021-03-19 | 中科寒武纪科技股份有限公司 | Data preprocessing method and device, computer equipment and storage medium |
EP3859488A4 (en) | 2018-09-28 | 2022-06-29 | Shanghai Cambricon Information Technology Co., Ltd | Signal processing device, signal processing method and related product |
CN111385462A (en) | 2018-12-28 | 2020-07-07 | 上海寒武纪信息科技有限公司 | Signal processing device, signal processing method and related product |
CN111832738B (en) | 2019-04-18 | 2024-01-09 | 中科寒武纪科技股份有限公司 | Data processing method and related product |
US11847554B2 (en) | 2019-04-18 | 2023-12-19 | Cambricon Technologies Corporation Limited | Data processing method and related products |
US11676029B2 (en) | 2019-06-12 | 2023-06-13 | Shanghai Cambricon Information Technology Co., Ltd | Neural network quantization parameter determination method and related products |
CN112085189B (en) | 2019-06-12 | 2024-03-29 | 上海寒武纪信息科技有限公司 | Method for determining quantization parameter of neural network and related product |
WO2021036904A1 (en) | 2019-08-23 | 2021-03-04 | 安徽寒武纪信息科技有限公司 | Data processing method, apparatus, computer device, and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5574952A (en) * | 1994-05-11 | 1996-11-12 | International Business Machines Corporation | Data storage system and method for operating a disk controller including allocating disk space for compressed data |
JPH09218808A (en) * | 1996-02-13 | 1997-08-19 | Matsushita Electric Ind Co Ltd | File storage |
GB9606927D0 (en) * | 1996-04-02 | 1996-06-05 | Memory Corp Plc | Data storage devices |
-
2002
- 2002-03-22 CN CN 02808484 patent/CN1270273C/en not_active Expired - Fee Related
- 2002-03-22 WO PCT/EP2002/003714 patent/WO2002086817A1/en not_active Application Discontinuation
Also Published As
Publication number | Publication date |
---|---|
WO2002086817A1 (en) | 2002-10-31 |
CN1503958A (en) | 2004-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1270273C (en) | Adaptive memory allocation | |
EP1901544B1 (en) | Encoding device and method, decoding device and method, and transmission system | |
CN100511282C (en) | Data compression | |
CN1447285A (en) | System and method for progressively changing and coding digital data | |
CN1671103A (en) | Data compression | |
CN1848946A (en) | Contents conversion apparatus and transcode system | |
CN1791219A (en) | Dual layer bus architecture for system-on-a-chip | |
CN1695382A (en) | A method and device for transcoding images | |
US20040141650A1 (en) | Adaptive memory allocation | |
CN1825964A (en) | Method and system for processing video frequency data on chip | |
CN1829316A (en) | Method for transmitting moving picture data to mobile terminal using pseudo-streaming technology | |
CN1822666A (en) | Image processing in portable video communication devices | |
CN1285217C (en) | Compressor arrangement for moving images and video taking device using the same | |
US20050031216A1 (en) | Compressed moving image decompression device and image display device using the same | |
CN1570904A (en) | Mobile remote computer access and control system and method thereof | |
CN1554190A (en) | System and method for compressing data | |
CN1913384A (en) | Audio source play system utilizing head-on earphone and audio-source play method | |
US20040141655A1 (en) | Method and apparatus for image processing | |
CN1758760A (en) | Pipelined coefficient variable length coding | |
CN1474289A (en) | Method for displaying synchronously content of host on client machine | |
CN101056321A (en) | A method for improving the performance of the radio application protocol gateway | |
CN200953634Y (en) | Multiple digital data flow outputting device | |
CN1547851A (en) | Cache method | |
CN101052972A (en) | Multiple technique entropy coding system and method | |
CN1671165A (en) | Modem sharing device in a PDA phone and its method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20060816 Termination date: 20190322 |