TW201839714A - Method and system for storing an image - Google Patents

Method and system for storing an image Download PDF

Info

Publication number
TW201839714A
TW201839714A TW107113191A TW107113191A TW201839714A TW 201839714 A TW201839714 A TW 201839714A TW 107113191 A TW107113191 A TW 107113191A TW 107113191 A TW107113191 A TW 107113191A TW 201839714 A TW201839714 A TW 201839714A
Authority
TW
Taiwan
Prior art keywords
memory
size
sub
input image
bytes
Prior art date
Application number
TW107113191A
Other languages
Chinese (zh)
Inventor
趙屏
楊志文
王智鳴
Original Assignee
聯發科技股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Priority claimed from US15/786,908 external-priority patent/US20180107616A1/en
Application filed by 聯發科技股份有限公司 filed Critical 聯發科技股份有限公司
Publication of TW201839714A publication Critical patent/TW201839714A/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements

Abstract

Aspects of the disclosure provide a method and device for storing an input image into a memory. The disclosure describes allocating one or more frame buffers in the memory. The disclosure further describes dividing the input image into access units corresponding to subsets of the input image and allocating a main portion and a secondary portion in the frame buffer for each of the access units, wherein at least one of the secondary portions is not sequentially located after its respective main portion within the frame buffer. The disclosure also describes compressing the access units into compressed access units and storing each of the compressed access units into its respective main portion, and if a size of the compressed access unit exceeds a size of the main portion, then storing a remainder of the compressed access unit into its respective secondary portion.

Description

一種存儲輸入圖像的方法及系統    Method and system for storing input image    【相關申請的交叉引用】[Cross-reference to related applications]

本申請主張如下申請的優先權:於2017年04月25日提出名稱為“Memory Access Efficiency Optimization for Frame Buffer Compression”的第62/489,588號的美國臨時專利申請以及於2017年10月18日提出的名稱為“Distributed Access Unit for Frame Buffer Compression”的第15/786,908號的美國專利申請,其整體以引用方式併入本文中。 This application claims the priority of the following applications: US Provisional Patent Application No. 62 / 489,588 entitled "Memory Access Efficiency Optimization for Frame Buffer Compression" filed on April 25, 2017, and filed on October 18, 2017 US Patent Application No. 15 / 786,908 entitled "Distributed Access Unit for Frame Buffer Compression", which is incorporated herein by reference in its entirety.

本發明所公開實施例涉及存儲技術,且更具體而言,涉及一種存儲輸入圖像的方法及系統。 The disclosed embodiments of the present invention relate to storage technology, and more specifically, to a method and system for storing input images.

此處提供的先前技術描述用作一般展現本發明的內容之目的。目前署名發明人的工作內容,既包含在本先前技術部分中所描述之工作內容,也包含在申請時未被認為是現有技術的各方面,這些既不明確也不暗示地認為是本發明的現有技術。 The prior art description provided herein is used for the purpose of generally presenting the content of the invention. The contents of the current inventor's work include both the work described in this prior art section and aspects not considered prior art at the time of application. These are neither explicitly nor implicitly considered to be the invention current technology.

電子設備,例如電腦系統,可以包括一個或多個記憶體。在一個示例中,電子設備包括一元件,例如位於與記憶體不同的積體電路晶片上的中央處理單元(central processing unit,CPU),其通過記憶體控制器訪問記憶體。由 CPU訪問的記憶體會在CPU與記憶體之間產生繁重的資料傳輸量。 An electronic device, such as a computer system, may include one or more memories. In one example, the electronic device includes a component, such as a central processing unit (CPU) located on an integrated circuit chip different from the memory, which accesses the memory through a memory controller. The memory accessed by the CPU generates a heavy amount of data transfer between the CPU and the memory.

有鑑於此,本發明提供了一種存儲輸入圖像的方法及系統,以有效地完成訪問記憶體中所存儲的已壓縮訪問單元。 In view of this, the present invention provides a method and a system for storing an input image to efficiently complete a compressed access unit stored in a memory.

本發明之一實施例提供一種存儲輸入圖像的方法,輸入圖像存儲到記憶體中。存儲輸入圖像的方法包括:在記憶體中分配一個或多個幀暫存器;將輸入圖像分割成對應於輸入圖像的多個子集的多個訪問單元,並在幀暫存器中給多個訪問單元中的每個訪問單元分配主部分和副部分,其中至少一個所述副部分在幀暫存器中不順序地位於其各自的主部分之後;將多個訪問單元壓縮成多個已壓縮訪問單元;以及將每個已壓縮訪問單元中存儲到各自的主部分中,並且如果已壓縮訪問單元的尺寸超過主部分的尺寸,則將已壓縮訪問單元的剩餘部分存儲到各自的副部分中。 An embodiment of the present invention provides a method for storing an input image, and the input image is stored in a memory. A method for storing an input image includes: allocating one or more frame registers in a memory; dividing the input image into a plurality of access units corresponding to a plurality of subsets of the input image, and storing in the frame register Each access unit of a plurality of access units to assign a main portion and a sub portion, at least one of which is not sequentially located behind its respective main portion in a frame register; compressing the plurality of access units into Multiple compressed access units; and each compressed access unit is stored in its own main section, and if the size of the compressed access unit exceeds the size of the main section, the remainder of the compressed access unit is stored in its own In the vice section.

本發明之另一實施例一種存儲輸入圖像的系統。存儲輸入圖像的系統包括:記憶體,具有一個或多個幀暫存器;記憶體分配裝置,用於接收輸入圖像,在記憶體中分配幀暫存器以存儲所述輸入圖像,將輸入圖像分割成多個對應於輸入圖像的多個子集的多個訪問單元,並在幀暫存器中給每個訪問單元分配主部分和副部分,其中至少一個副部分在幀暫存器中不順序地位於其各自的主部分之後;以及記憶體控制器,用於響應於記憶體分配裝置的多個指令,將每個已壓縮訪問單元 存儲到各自的主部分中,並且如果已壓縮訪問單元的尺寸超過所述主部分的尺寸,則將已壓縮訪問單元的剩餘部分存儲到各自的副部分中。 Another embodiment of the present invention is a system for storing an input image. A system for storing an input image includes: a memory having one or more frame registers; a memory allocation device for receiving an input image; and allocating a frame register in the memory to store the input image, The input image is divided into a plurality of access units corresponding to a plurality of subsets of the input image, and each access unit is assigned a main part and a sub part in a frame register, at least one of which is in a frame. The registers are not sequentially behind their respective main sections; and a memory controller for storing each compressed access unit in the respective main section in response to a plurality of instructions of the memory allocation device, and If the size of the compressed access unit exceeds the size of the main part, the remaining parts of the compressed access unit are stored in the respective secondary parts.

本發明之又一實施例提供一種非暫態電腦可讀介質,存儲有電腦可讀指令,在處理電路執行電腦可讀指令時,處理電路執行一方法。方法包括:在記憶體中分配一個或多個幀暫存器;將輸入圖像分割成對應於輸入圖像的多個子集的多個訪問單元,並在幀暫存器中給多個訪問單元中的每個訪問單元分配主部分和副部分,其中至少一個所述副部分在幀暫存器中不順序地位於其各自的主部分之後;將多個訪問單元壓縮成多個已壓縮訪問單元;以及將每個已壓縮訪問單元中存儲到各自的主部分中,並且如果已壓縮訪問單元的尺寸超過主部分的尺寸,則將已壓縮訪問單元的剩餘部分存儲到各自的副部分中。 Yet another embodiment of the present invention provides a non-transitory computer-readable medium storing computer-readable instructions. When the processing circuit executes the computer-readable instructions, the processing circuit executes a method. The method includes: allocating one or more frame registers in the memory; dividing the input image into multiple access units corresponding to multiple subsets of the input image, and giving multiple accesses in the frame register Each access unit in the unit is assigned a main part and a sub-part, at least one of which is not sequentially behind its respective main part in the frame register; compressing multiple access units into multiple compressed accesses Units; and each compressed access unit is stored in a respective main portion, and if the size of the compressed access unit exceeds the size of the main portion, the remaining portions of the compressed access unit are stored in respective secondary portions.

本發明通過給每個訪問單元在記憶體中分配主部分和副部分,在訪問單元被壓縮之後,將已壓縮訪問單元存儲到主部分,在主部分的尺寸小於已壓縮訪問單元的情況下,還將已壓縮訪問單元的剩餘部分存儲到副部分,使得已壓縮訪問單元可被有效地完成訪問。 The present invention allocates a main part and a sub part in the memory for each access unit. After the access unit is compressed, the compressed access unit is stored in the main part. When the size of the main part is smaller than the compressed access unit, The remainder of the compressed access unit is also stored to the secondary portion so that the compressed access unit can be efficiently accessed.

100‧‧‧記憶體系統 100‧‧‧Memory System

110‧‧‧記憶體分配裝置 110‧‧‧Memory allocation device

120‧‧‧記憶體控制器 120‧‧‧Memory Controller

130‧‧‧記憶體 130‧‧‧Memory

131‧‧‧幀暫存器 131‧‧‧Frame Register

141‧‧‧CPU 141‧‧‧CPU

142‧‧‧GPU 142‧‧‧GPU

143‧‧‧多媒體引擎 143‧‧‧Multimedia Engine

144‧‧‧顯示電路 144‧‧‧display circuit

145‧‧‧影像處理器 145‧‧‧Image Processor

146‧‧‧視訊編碼解碼器 146‧‧‧Video Codec

200‧‧‧資料結構 200‧‧‧ Data Structure

210‧‧‧輸入圖像 210‧‧‧ input image

221(1)-221(3)‧‧‧主部分 221 (1) -221 (3) ‧‧‧Main Section

231A、231B‧‧‧幀暫存器 231A, 231B‧‧‧Frame Register

241(1)-241(3)‧‧‧副部分 241 (1) -241 (3) ‧‧‧Vice part

250(1)-250(4)‧‧‧記憶體分界線 250 (1) -250 (4) ‧‧‧Memory boundary

261-263‧‧‧已壓縮訪問單元 261-263‧‧‧compressed access unit

221(1)-221(3)‧‧‧主部分 221 (1) -221 (3) ‧‧‧Main Section

331A-331C‧‧‧幀暫存器 331A-331C‧‧‧Frame Register

341A-341C‧‧‧超級塊 341A-341C‧‧‧Super Block

431A-431C‧‧‧幀暫存器 431A-431C‧‧‧Frame Register

441A-441C‧‧‧超級塊 441A-441C‧‧‧Super Block

531A-531B‧‧‧幀暫存器 531A-531B‧‧‧Frame Register

541A-541B‧‧‧超級塊 541A-541B‧‧‧Super Block

631A-631B‧‧‧幀暫存器 631A-631B‧‧‧Frame Register

700‧‧‧流程圖 700‧‧‧flow chart

S701-S799‧‧‧步驟 S701-S799‧‧‧step

通過閱讀下面詳細的說明書以及結合下面附圖的示例,本發明可以被更充分理解,其中相同的符號表示相同的元件:第1圖是根據本發明實施例之記憶體系統的示例性方框 圖。 The present invention can be more fully understood by reading the following detailed description and the examples in combination with the following drawings, wherein the same symbols represent the same elements: FIG. 1 is an exemplary block diagram of a memory system according to an embodiment of the present invention.

第2圖是根據本發明實施例之示例性資料結構。 FIG. 2 is an exemplary data structure according to an embodiment of the present invention.

第3圖是根據本發明實施例之三個幀暫存器中三個示例性超級塊。 FIG. 3 shows three exemplary superblocks in three frame registers according to an embodiment of the present invention.

第4圖是根據本發明實施例之三個幀暫存器中三個示例性超級塊。 FIG. 4 illustrates three exemplary superblocks in three frame registers according to an embodiment of the present invention.

第5圖是根據本發明實施例之兩個幀暫存器中兩個示例性超級塊。 FIG. 5 is two exemplary superblocks in two frame registers according to an embodiment of the present invention.

第6圖是根據本發明實施例之可選的幀暫存器示例。 FIG. 6 is an example of an optional frame register according to an embodiment of the present invention.

第7圖是根據本發明實施例之描述示例性流程的流程圖。 FIG. 7 is a flowchart describing an exemplary process according to an embodiment of the present invention.

第1圖顯示了根據本發明實施例的記憶體系統100的示例性方框圖。如圖所示,記憶體系統100可以包括記憶體分配裝置110、記憶體控制器120和記憶體130。記憶體130可以包括幀暫存器131。記憶體系統100用於將輸入圖像分割成一個或多個訪問單元,並將每個已壓縮訪問單元(compressed access unit)存儲到幀暫存器131中所分配的且用於各自的訪問單元的主部分(main portion)和副部分(secondary portion)。 FIG. 1 shows an exemplary block diagram of a memory system 100 according to an embodiment of the present invention. As shown, the memory system 100 may include a memory allocation device 110, a memory controller 120, and a memory 130. The memory 130 may include a frame register 131. The memory system 100 is configured to divide an input image into one or more access units, and store each compressed access unit (compressed access unit) in the frame register 131 and is used for the respective access unit. Main portion and secondary portion.

記憶體系統100可以是用於存儲資料的任何合適的系統。在一個實施例中,記憶體系統100為電子設備,例如臺式電腦、平板電腦、智慧手機、穿戴設備、智慧TV、攝像機、攝像錄影機(camcorder)、媒體播放機等。在一個示例實施例中,記憶體系統100還可以包括其他元件,其訪問記憶體 130中所存儲的資料。例如,其他元件可以包括CPU 141、影像處理單元(graphics processing unit,GPU)142、多媒體引擎143、顯示電路144、影像處理器145、視訊編碼解碼器146等。 The memory system 100 may be any suitable system for storing information. In one embodiment, the memory system 100 is an electronic device, such as a desktop computer, a tablet computer, a smart phone, a wearable device, a smart TV, a video camera, a camcorder, a media player, and the like. In one example embodiment, the memory system 100 may further include other components that access data stored in the memory 130. For example, other components may include a CPU 141, a graphics processing unit (GPU) 142, a multimedia engine 143, a display circuit 144, an image processor 145, a video codec 146, and the like.

在一個實施例中,記憶體130可以具有基於頁尺寸或者通道分割而由記憶體分界線(memory boundary)所隔開的記憶體塊(memory block)序列,例如,在每隔32位元組、64位元組、128位元組、256位元組、512位元組1K位元組、2K位元組或者4K位元組處。訪問兩個相鄰分界線之間的記憶體塊內所存儲的一定數量的資料比訪問跨過記憶體分界線的兩個記憶體塊中所分開存儲的相同數量的資料更有效。因此,當資料的起始位址與記憶體分界線對齊時,記憶體130中的資料可以被記憶體系統100的另一元件有效地訪問。記憶體分界線形成於位址為記憶體塊尺寸的倍數處。在一個實施例中,記憶體塊尺寸可以容納一定數量的資料,其可以在記憶體130與其他記憶體系統100的其他元件之間以突發讀/寫命令與單個或幾個預充電命令和啟動命令的序列形式被快速傳輸。記憶體塊尺寸可以基於記憶體130以及訪問記憶體130的記憶體系統100的其他元件的特性而被選擇,例如頁尺寸和記憶體130的通道分割,以及記憶體130與訪問記憶體130的記憶體系統100的其他元件的架構和操作模式。 In one embodiment, the memory 130 may have a sequence of memory blocks separated by a memory boundary based on page size or channel division, for example, at every 32 bytes, 64-bit, 128-bit, 256-bit, 512-bit 1K-byte, 2K-byte, or 4K-byte. Accessing a certain amount of data stored in a block of memory between two adjacent boundaries is more efficient than accessing the same amount of data stored separately in two blocks of memory that cross the memory boundary. Therefore, when the starting address of the data is aligned with the memory boundary, the data in the memory 130 can be effectively accessed by another element of the memory system 100. The memory boundary is formed at an address that is a multiple of the memory block size. In one embodiment, the memory block size can accommodate a certain amount of data, which can be used in burst read / write commands with single or several precharge commands and between the memory 130 and other elements of other memory systems 100 and The serial form of the start command is transmitted quickly. The memory block size may be selected based on characteristics of the memory 130 and other components of the memory system 100 that access the memory 130, such as page size and channel division of the memory 130, and the memory of the memory 130 and the access memory 130 The architecture and operating modes of other elements of the body system 100.

記憶體分配裝置110用於接收輸入圖像並將其分割成一個或多個訪問單元。記憶體分配裝置110還用於將記憶體130的部分分配給輸入圖像,例如幀暫存器131,並在幀暫 存器131中給每個訪問單元分配兩個記憶體部分,即主部分和副部分。在一個示例中,幀暫存器131的起始位址可以與記憶體分界線對齊,例如,0位元組處。記憶體分配裝置110用於壓縮每個訪問單元,並將每個已壓縮訪問單元存儲到各自的主部分,如果已壓縮訪問單元的尺寸超過主部分的尺寸,則將已壓縮訪問單元的剩餘部分存儲到其各自的副部分。在一個實施例中,記憶體分配裝置100可以被整合在訪問記憶體130中所存儲的資料的任何元件中,例如記憶體系統100的一個或多個元件,其包括CPU 141、GPU 142、多媒體引擎143、顯示電路144、影像處理器145、視訊編碼解碼器146等。 The memory allocation device 110 is configured to receive an input image and divide it into one or more access units. The memory allocation device 110 is further configured to allocate a portion of the memory 130 to the input image, such as the frame register 131, and allocate two memory portions to each access unit in the frame register 131, that is, the main portion And vice section. In one example, the start address of the frame register 131 may be aligned with the memory boundary, for example, at 0 bytes. The memory allocation device 110 is configured to compress each access unit and store each compressed access unit to a respective main part. If the size of the compressed access unit exceeds the size of the main part, the remaining part of the compressed access unit is stored Stored into their respective side sections. In one embodiment, the memory allocation device 100 may be integrated in any element that accesses data stored in the memory 130, such as one or more elements of the memory system 100, including a CPU 141, a GPU 142, a multimedia The engine 143, the display circuit 144, the image processor 145, the video codec 146, and the like.

在一個實施例中,主部分可以具有與記憶體分界線對齊的起始位址且為記憶體塊尺寸的一倍或多倍的尺寸。因此,存儲在主部分的資料可以被有效地訪問。可選地,當主部分的尺寸小於記憶體塊尺寸時,每個主部分可以位於各自的記憶體塊內,而一個或多個主部分的起始位址可以與一個或多個記憶體分界線對齊。 In one embodiment, the main portion may have a starting address aligned with the memory boundary and be one or more times the size of the memory block. Therefore, the materials stored in the main part can be efficiently accessed. Optionally, when the size of the main part is smaller than the size of the memory block, each main part may be located in a respective memory block, and the start address of one or more main parts may be divided from one or more memories. The lines are aligned.

副部分的尺寸可以為記憶體塊尺寸的一部分。因此,兩個或者兩個以上的副部分可以被組合在一起,並獨立於其各自的主部分被存儲。當已壓縮訪問單元的尺寸小於或者等於主部分的尺寸時,已壓縮訪問單元可以完全被存儲在主部分內部,而無需使用副部分。這樣,因為主部分可以被有效地訪問,所以可以有效地完成訪問已壓縮訪問單元。 The size of the auxiliary part may be a part of the size of the memory block. Therefore, two or more secondary parts can be combined together and stored independently of their respective main parts. When the size of the compressed access unit is less than or equal to the size of the main part, the compressed access unit can be completely stored inside the main part without using the auxiliary part. In this way, because the main part can be efficiently accessed, access to the compressed access unit can be efficiently completed.

在另一實施例中,副部分中的至少一個不是連續地位於幀暫存器中其各自的主部分之後,這包括主部分具有大 於其各自副部分的位址的逆順序。 In another embodiment, at least one of the sub-sections is not consecutively located behind its respective main section in the frame register, which includes the reverse order of the main section having an address greater than its respective sub-section.

記憶體控制器120用於管理從記憶體分配裝置110到記憶體130的記憶體訪問。記憶體控制器120可以用於接收來自於記憶體分配裝置110的請求,以將已壓縮訪問單元存儲到記憶體130的幀暫存器131中各自的主部分和副部分。基於這些請求,記憶體控制器120可以用指令向記憶體130發送命令,以將已壓縮訪問單元存儲到幀暫存器131中各自的主部分和副部分。記憶體控制器120也可以用於排程並緩存這些請求等。 The memory controller 120 is configured to manage memory accesses from the memory allocation device 110 to the memory 130. The memory controller 120 may be configured to receive a request from the memory allocation device 110 to store the compressed access unit in the main and sub-parts of the frame register 131 of the memory 130. Based on these requests, the memory controller 120 may send commands to the memory 130 with instructions to store the compressed access units to the respective main and auxiliary portions in the frame register 131. The memory controller 120 may also be used to schedule and cache these requests and the like.

記憶體130可以是用於存儲資料的任何適當的設備。在一個實施例中,記憶體130包括動態隨機訪問記憶體(dynamic random access memory,DRAM)類型記憶體模組,例如,雙通道同步DRAM(double data rate synchronous DRAM,DDR SDRAM)、第二代雙通道同步DRAM(double data rate two synchronous DRAM,DDR2 SDRAM)、第三代雙通道同步DRAM(double data rate three synchronous DRAM,DDR3 SDRAM)、第四代雙通道同步DRAM(double data rate four synchronous DRAM,DDR4 SDRAM)、低功率DDR SDRAM(low power DDR SDRAM,LPDDR SDRAM)等。 The memory 130 may be any suitable device for storing information. In one embodiment, the memory 130 includes a dynamic random access memory (DRAM) type memory module, such as a double data rate synchronous DRAM (DDR SDRAM), Double data rate two synchronous DRAM (DDR2 SDRAM), double data rate three synchronous DRAM (DDR3 SDRAM), double data rate four synchronous DRAM (DDR4) SDRAM), low power DDR SDRAM (low power DDR SDRAM, LPDDR SDRAM), etc.

在一個實施例中,記憶體系統100可以是系統單晶片(system-on chip,SOC),其中所有元件位於單片積體電路(integrated circuit,IC)晶片上。此外,諸如CPU 141、GPU 142、多媒體引擎143、顯示電路144、影像處理器145和視訊轉碼器146的其他元件也可以包含在相同的單片IC晶 片上。可選地,記憶體系統100中的元件可以跨幾個IC分佈。例如,記憶體分配裝置110、記憶體控制器120、記憶體130和記憶體系統100的其他元件可以位於多個IC晶片上。另外,記憶體分配裝置110可以被整合於訪問記憶體130中所存儲的資料的任何元件中,例如記憶體系統100的一個或多個元件,其包括CPU 141、GPU 142、多媒體引擎143、顯示電路144、影像處理器145、視訊編碼解碼器146等。 In one embodiment, the memory system 100 may be a system-on-chip (SOC), where all components are located on a single-chip integrated circuit (IC) chip. In addition, other components such as the CPU 141, the GPU 142, the multimedia engine 143, the display circuit 144, the image processor 145, and the video transcoder 146 may also be included on the same monolithic IC chip. Alternatively, the elements in the memory system 100 may be distributed across several ICs. For example, the memory distribution device 110, the memory controller 120, the memory 130, and other components of the memory system 100 may be located on multiple IC chips. In addition, the memory allocation device 110 may be integrated into any element that accesses data stored in the memory 130, such as one or more elements of the memory system 100, which includes a CPU 141, a GPU 142, a multimedia engine 143, a display A circuit 144, an image processor 145, a video codec 146, and the like.

在操作期間,輸入圖像可以由記憶體分配裝置110接收。記憶體分配裝置110可以將輸入圖像分割成一個或多個訪問單元。另外,記憶體分配裝置110可以將記憶體130的部分,例如幀暫存器131,分配給輸入圖像。兩個記憶體部分,即主部分和副部分,被分配給幀暫存器131中的每個訪問單元。在記憶體分配裝置110的指令下,記憶體控制器120可以將已壓縮訪問單元存儲到其各自的主部分,以及根據尺寸情況而定的副部分。主部分可以具有與記憶體分界線對齊的起始位址和為記憶體塊尺寸的一倍或者多倍的尺寸。副部分的尺寸可以是記憶體塊尺寸的一部分。因此,兩個或者兩個以上的副部分可以被組合在一起,並獨立於其各自的主部分被存儲。當已壓縮訪問單元的尺寸小於或者等於主部分的尺寸時,已壓縮訪問單元可以完全被存儲在主部分內部,而無需使用副部分。這樣,可以有效地完成訪問已壓縮訪問單元。 During operation, the input image may be received by the memory allocation device 110. The memory allocation device 110 may divide an input image into one or more access units. In addition, the memory allocation device 110 may allocate a portion of the memory 130, such as the frame register 131, to the input image. Two memory sections, a main section and a sub section, are allocated to each access unit in the frame register 131. Under the instruction of the memory allocation device 110, the memory controller 120 may store the compressed access unit to its respective main part and a sub-part according to the size situation. The main portion may have a starting address aligned with the memory boundary and a size that is one or more times the size of the memory block. The size of the auxiliary portion may be a part of the size of the memory block. Therefore, two or more secondary parts can be combined together and stored independently of their respective main parts. When the size of the compressed access unit is less than or equal to the size of the main part, the compressed access unit can be completely stored inside the main part without using the auxiliary part. In this way, access to the compressed access unit can be efficiently completed.

第2圖是根據本發明實施例的示例性資料結構200,其示出了被分割成訪問單元的輸入圖像210、幀暫存器231A和幀暫存器231B。如圖所示,輸入圖像210可以被分割 成N×M的訪問單元陣列。在該陣列內部,訪問單元的尺寸取決於這個訪問單元中像素的數量和像素位元深度(pixel bit-depth)。像素位元深度為用於指定顏色的像素的位元數,例如10位或者12位,其分別對應於1024個顏色或者4049個顏色。在一個示例中,訪問單元中像素的數量可以取決於記憶體分配裝置110所使用的壓縮方法,例如壓縮單元的尺寸取決於用哪個壓縮方法操作。例如,壓縮單元的尺寸可以為4×4像素、8×8像素、16×4像素、16×8像素、16×16像素等。訪問單元可以具有一個或多個壓縮單元。 FIG. 2 is an exemplary data structure 200 according to an embodiment of the present invention, which shows an input image 210, a frame register 231A, and a frame register 231B that are divided into access units. As shown, the input image 210 may be divided into an array of N × M access units. Inside the array, the size of the access unit depends on the number of pixels and pixel bit-depth in the access unit. The pixel bit depth is the number of bits of a pixel for a specified color, for example, 10 bits or 12 bits, which correspond to 1024 colors or 4049 colors, respectively. In one example, the number of pixels in the access unit may depend on the compression method used by the memory allocation device 110, for example, the size of the compression unit depends on which compression method is used to operate. For example, the size of the compression unit may be 4 × 4 pixels, 8 × 8 pixels, 16 × 4 pixels, 16 × 8 pixels, 16 × 16 pixels, and the like. An access unit may have one or more compression units.

幀暫存器231A示出了用於存儲輸入圖像的示例性幀暫存器結構。幀暫存器可以為記憶體,其具有用於存儲資料的可訪問位置。記憶體內的可訪問位置可以被組合成具有記憶體塊尺寸的記憶體塊。如上所述,記憶體塊尺寸可以基於記憶體130以及訪問記憶體130的記憶體系統100的其他元件的特性而被選擇,例如頁尺寸和記憶體130的通道分割,以及記憶體130與訪問記憶體130的記憶體系統100的其他元件的架構和操作模式。在一個示例中,記憶體塊尺寸可以被選擇為32位元組、64位元組、128位元組、256位元組、512位元組、1K位元組、2K位元組、4K位元組等。例如,記憶體130可以為DDR3 SDRAM設備,且資料自記憶體130中檢索到。記憶體塊尺寸為資料量,其可以在單個讀週期中自記憶體130檢索到。具體地,當資料匯流排寬度和突發長度(burst length)分別為64位元(即8位元組)和4時,記憶體塊尺寸可以為32位元組。在另一示例中,記憶體塊尺寸可以由訪問記憶體的 CPU 141或者GPU 142高速緩衝記憶體線(cache line)來確定為64位元組或者128位元組等。在第2圖的示例中,記憶體塊尺寸為64位元組,且因此在幀暫存器231A和幀暫存器231B中,記憶體分界線250(1)-250(n)位於0位元組、64位元組、128位元組、192位元組等處。 The frame register 231A shows an exemplary frame register structure for storing an input image. The frame register may be a memory having an accessible location for storing data. The accessible locations within the memory can be combined into a memory block having a memory block size. As described above, the memory block size may be selected based on the characteristics of the memory 130 and other components of the memory system 100 that access the memory 130, such as page size and channel division of the memory 130, and the memory 130 and access memory The architecture and operation modes of other elements of the memory system 100 of the bank 130. In one example, the memory block size can be selected as 32-bit, 64-bit, 128-bit, 256-bit, 512-bit, 1K-byte, 2K-byte, 4K-bit Tuples, etc. For example, the memory 130 may be a DDR3 SDRAM device, and data is retrieved from the memory 130. The memory block size is the amount of data, which can be retrieved from the memory 130 in a single read cycle. Specifically, when the data bus width and burst length are 64 bits (that is, 8 bytes) and 4 respectively, the memory block size may be 32 bytes. In another example, the memory block size may be determined by a CPU 141 or a GPU 142 cache line that accesses the memory as a 64-bit byte, a 128-bit byte, or the like. In the example in FIG. 2, the memory block size is 64 bytes, and therefore, in the frame register 231A and the frame register 231B, the memory dividing line 250 (1) -250 (n) is located at the 0 bit Tuples, 64-bits, 128-bits, 192-bits, etc.

主部分和副部分可以被分配給每個訪問單元。在一個實施例中,主部分的尺寸可以取決於輸入圖像的可壓縮性、壓縮方法、記憶體塊尺寸等。此外,在一個實施例中,主部分的尺寸與副部分的尺寸的總和可以等於訪問單元的尺寸。同樣地,主部分的尺寸與副部分的尺寸的比例可以取決於輸入圖像的可壓縮性、壓縮方法、記憶體塊尺寸等。例如,當訪問單元可以被壓縮成更小尺寸時,更小的主部分足夠用以存儲已壓縮訪問單元,且各自的副部分可以保持為空,使得主部分的尺寸與副部分的尺寸的比例更小。例如,主部分的尺寸與副部分的尺寸的比例可以為2、4或8等。 A main part and a sub part can be assigned to each access unit. In one embodiment, the size of the main part may depend on the compressibility of the input image, the compression method, the memory block size, and the like. Furthermore, in one embodiment, the sum of the size of the main part and the size of the sub-part may be equal to the size of the access unit. Likewise, the ratio of the size of the main part to the size of the sub part may depend on the compressibility of the input image, the compression method, the size of the memory block, and the like. For example, when the access unit can be compressed to a smaller size, the smaller main part is sufficient to store the compressed access unit, and the respective sub-parts can be left empty, so that the size of the main part is proportional to the size of the sub-part smaller. For example, the ratio of the size of the main portion to the size of the sub portion may be 2, 4, or 8, and so on.

另外,主部分可以具有與記憶體分界線對齊的起始位址和為存儲塊尺寸的倍數的尺寸,使得存儲於主部分的資料可以被有效地訪問。在第2圖的示例中,主部分221(1)-221(3)的尺寸可以被選擇成具有64位元組的存儲塊尺寸,並且主部分221(1)-221(3)的起始位址分別與記憶體分界線250(1)-250(3)對齊。各自的副部分241(1)-241(3)的尺寸可以被選擇成小於64位元組,例如32位元組。 In addition, the main part may have a starting address aligned with the memory boundary and a size that is a multiple of the memory block size, so that the data stored in the main part can be efficiently accessed. In the example of Figure 2, the size of the main part 221 (1) -221 (3) can be selected to have a memory block size of 64 bytes, and the start of the main part 221 (1) -221 (3) The addresses are aligned with the memory boundary 250 (1) -250 (3), respectively. The size of the respective sub-portions 241 (1) -241 (3) may be selected to be smaller than 64 bytes, such as 32 bytes.

幀暫存器231B顯示了當具有各種尺寸的已壓縮訪問單元261-263被存儲時的示例。已壓縮訪問單元261-263可 以被存儲於各自的主部分221(1)-221(3)和副部分241(1)-241(3)。在第2圖的示例中,已壓縮訪問單元261的尺寸小於64位元組的記憶體塊尺寸。因此,已壓縮訪問單元261可以在主部分221(1)內被存儲完,而副部分241(1)保持為空。已壓縮訪問單元262的尺寸等於64位元組的記憶體塊尺寸。因此,已壓縮訪問單元262可以在主部分221(2)內被存儲完,而副部分241(2)保持為空。然而,已壓縮訪問單元263的尺寸大於64位元組的記憶體塊尺寸。因此,已壓縮訪問單元263的第一部分可以填入主部分221(3),且已壓縮訪問單元263的第二部分或者剩餘部分可以被存儲在副部分241(3)中。 The frame register 231B shows an example when the compressed access units 261-263 having various sizes are stored. The compressed access units 261-263 can be stored in the respective main sections 221 (1) -221 (3) and the sub-sections 241 (1) -241 (3). In the example of FIG. 2, the size of the compressed access unit 261 is smaller than the memory block size of a 64-bit byte. Therefore, the compressed access unit 261 can be completely stored in the main section 221 (1), while the sub-section 241 (1) remains empty. The size of the compressed access unit 262 is equal to the memory block size of a 64-bit byte. Therefore, the compressed access unit 262 can be completely stored in the main section 221 (2), while the sub-section 241 (2) remains empty. However, the size of the compressed access unit 263 is larger than the memory block size of a 64-bit byte. Therefore, the first part of the compressed access unit 263 may be filled in the main part 221 (3), and the second part or the remaining part of the compressed access unit 263 may be stored in the sub-part 241 (3).

在各種實施例中,訪問單元的尺寸、主部分的尺寸和副部分的尺寸可以被選擇,並保持為常數以用於輸入圖像。另一方面,多個輸入圖像,例如視訊的序列幀,可以由記憶體系統100來存儲。訪問單元的尺寸、主部分的尺寸和副部分的尺寸可以被選擇以用於每個單個的輸入圖像,因此,其可以動態地從一個輸入圖像到另一輸入圖像變化。 In various embodiments, the size of the access unit, the size of the main part, and the size of the sub-part may be selected and kept constant for the input image. On the other hand, multiple input images, such as video frames, can be stored by the memory system 100. The size of the access unit, the size of the main part, and the size of the sub-part can be selected for each individual input image, so it can dynamically change from one input image to another.

主部分和副部分可以根據各種佈局而被設置在幀暫存器131中。第3圖-第5圖顯示了示例佈局,其包括以週期的方式的主部分和副部分的重複模型,其中最小重複單元為超級塊。因此,幀暫存器131中的主部分和副部分可以,例如,藉由順序地放置彼此相鄰的超級塊來排列。在一個實施例中,超級塊的尺寸可以為記憶體塊尺寸的倍數。 The main portion and the sub portion may be set in the frame register 131 according to various layouts. Figures 3-5 show example layouts that include a repeating model of the primary and secondary sections in a periodic manner, with the smallest repeating unit being a superblock. Therefore, the main part and the sub-part in the frame register 131 may be arranged, for example, by sequentially placing super blocks adjacent to each other. In one embodiment, the size of the superblock may be a multiple of the size of the memory block.

第3圖是根據本發明實施例的三個幀暫存器331A-331C中三個示例性超級塊341A-341C。超級塊 341A-341C共用相同特性,其中超級塊中的所有副部分被組合成副部分組,其位於各自超級塊的中間。主部分的起始位址與記憶體分界線對齊。副部分組的尺寸為記憶體塊尺寸的一倍或者多倍,且副部分組的第一副部分與記憶體分界線對齊。 FIG. 3 is three exemplary superblocks 341A-341C in the three frame registers 331A-331C according to an embodiment of the present invention. The superblocks 341A-341C share the same characteristics, in which all the subparts in the superblock are combined into a subpart group, which is located in the middle of the respective superblock. The starting address of the main section is aligned with the memory boundary. The size of the sub-section group is one or more times the size of the memory block, and the first sub-section of the sub-section group is aligned with the memory boundary.

參考超級塊341A,訪問單元的尺寸被設置成160位元組,記憶體塊尺寸被設置成128位元組,且主部分和副部分的尺寸分別被設置成128位元組和32位元組。如圖所示,超級塊模型具有包括四個副部分(即S0-S3)的副部分組,其被插入在第一主部分組(即M0-M1)與第二主部分組(即M2-M3)之間。超級塊341A的尺寸為記憶體塊尺寸的5倍(即640位元組)。超級塊341A的記憶體分界線位於0位元組、128位元組、256位元組、384位元組、512位元組和640位元組處,所有主部分M0-M3的起始位址分別與位於0位元組、128位元組、384位元組和512位元組處的記憶體分界線對齊。副部分組具有128位元組的尺寸,第一副部分S0與位於256位元組的記憶體分界線對齊。 Referring to super block 341A, the size of the access unit is set to 160 bytes, the size of the memory block is set to 128 bytes, and the size of the main portion and the sub portion are set to 128 bytes and 32 bytes, respectively. . As shown in the figure, the superblock model has a sub-section group including four sub-sections (ie, S0-S3), which are inserted in the first main section group (ie, M0-M1) and the second main section group (ie, M2- M3). The size of the super block 341A is 5 times the size of the memory block (ie, 640 bytes). The memory boundary of super block 341A is located at 0 bytes, 128 bytes, 256 bytes, 384 bytes, 512 bytes, and 640 bytes. The starting bits of all main parts M0-M3 The addresses are aligned with the memory boundaries at 0, 128, 384, and 512 bytes, respectively. The sub-section has a size of 128 bytes, and the first sub-section S0 is aligned with the memory boundary line located at 256 bytes.

參考超級塊341B,訪問單元的尺寸被設置成192位元組,記憶體塊尺寸被設置成128位元組,且主部分和副部分的尺寸分別被設置成128位元組和64位元組。如圖所示,超級塊模型具有包括四個副部分(即S0-S3)的副部分組,其被插入在第一主部分組(即M0-M1)與第二主部分組(即M2-M3)之間。超級塊341B的尺寸為記憶體塊尺寸的6倍(即768位元組)。超級塊341B的記憶體分界線位於0位元組、128位元組、256位元組、384位元組、512位元組、640位元組和768 位元組處,所有主部分M0-M3的起始位址分別與位於0位元組、128位元組、512位元組和640位元組處的記憶體分界線對齊。副部分組具有256位元組的尺寸,第一副部分S0與位於256位元組的記憶體分界線對齊。 Referring to super block 341B, the size of the access unit is set to 192 bytes, the size of the memory block is set to 128 bytes, and the size of the main part and the subsidiary part are set to 128 bytes and 64 bytes . As shown in the figure, the superblock model has a sub-section group including four sub-sections (ie, S0-S3), which are inserted in the first main section group (ie, M0-M1) and the second main section group (ie, M2- M3). The size of the super block 341B is 6 times the size of the memory block (that is, 768 bytes). The memory boundary of super block 341B is located at 0 bytes, 128 bytes, 256 bytes, 384 bytes, 512 bytes, 640 bytes, and 768 bytes. All main parts M0- The starting address of M3 is aligned with the memory boundaries at 0 bytes, 128 bytes, 512 bytes, and 640 bytes, respectively. The sub-section has a size of 256 bytes, and the first sub-section S0 is aligned with a memory boundary line located at 256-bytes.

參考超級塊341C,訪問單元的尺寸被設置成384位元組,記憶體塊尺寸被設置成256位元組,且主部分和副部分的尺寸分別被設置成256位元組和128位元組。如圖所示,超級塊模型具有包括兩個副部分(即S0-S1)的副部分組,其被插入在第一主部分M0與第二主部分M1之間。超級塊341C的尺寸為記憶體塊尺寸的3倍(即768位元組)。超級塊341C的記憶體分界線位於0位元組、256位元組、512位元組和768位元組處,主部分M0-M1的起始位址分別與位於0位元組的記憶體分界線和位於512位元組記憶體分界線對齊。副部分組具有256位元組的尺寸,第一副部分S0與位於256位元組的記憶體分界線對齊。 Referring to super block 341C, the size of the access unit is set to 384 bytes, the size of the memory block is set to 256 bytes, and the size of the main part and the subsidiary part are set to 256 bytes and 128 bytes, respectively. . As shown, the super block model has a sub-section group including two sub-sections (ie, S0-S1), which is inserted between the first main section M0 and the second main section M1. The size of the super block 341C is three times the size of the memory block (that is, 768 bytes). The memory demarcation line of super block 341C is located at 0 bytes, 256 bytes, 512 bytes, and 768 bytes. The starting address of the main part M0-M1 and the memory located at 0 byte are respectively The demarcation line is aligned with the 512-byte memory demarcation line. The sub-section has a size of 256 bytes, and the first sub-section S0 is aligned with a memory boundary line located at 256-bytes.

第4圖是根據本發明實施例的三個幀暫存器431A-431C中三個示例性超級塊441A-441C。超級塊441A-441C共用相同特性,其中超級塊中的所有副部分被組合成副部分組,其跟隨著包含主部分的主部分組。主部分的起始位址與記憶體分界線對齊。副部分組的尺寸為記憶體塊尺寸的一倍或者多倍,且副部分組的第一副部分與記憶體分界線對齊。 FIG. 4 shows three exemplary superblocks 441A-441C in the three frame registers 431A-431C according to an embodiment of the present invention. Superblocks 441A-441C share the same characteristics, in which all the sub-parts in the super-block are combined into a sub-part group, which follows the main part group containing the main part. The starting address of the main section is aligned with the memory boundary. The size of the sub-section group is one or more times the size of the memory block, and the first sub-section of the sub-section group is aligned with the memory boundary.

參考超級塊441A,訪問單元的尺寸被設置成192位元組,記憶體塊尺寸被設置成128位元組,且主部分和副部 分的尺寸分別被設置成128位元組和64位元組。如圖所示,超級塊模型441A具有包括兩個副部分(即S0-S1)的副部分組,其跟隨著主部分組(即M0-M1)。超級塊441A的尺寸為記憶體塊尺寸的3倍(即384位元組)。超級塊441A的記憶體分界線位於0位元組、128位元組、256位元組和384位元組處,所有主部分M0-M1的起始位址分別與位於0位元組的記憶體分界線和位於128位元組的記憶體分界線對齊。副部分組具有128位元組的尺寸,第一副部分S0與位於256位元組的記憶體分界線對齊。 Referring to super block 441A, the size of the access unit is set to 192 bytes, the size of the memory block is set to 128 bytes, and the size of the main part and the subsidiary part are set to 128 bytes and 64 bytes, respectively. . As shown, the superblock model 441A has a sub-section group including two sub-sections (ie, S0-S1), which follows the main section group (ie, M0-M1). The size of the super block 441A is three times the size of the memory block (ie, 384 bytes). The memory boundary of super block 441A is located at 0 bytes, 128 bytes, 256 bytes, and 384 bytes. The starting addresses of all main parts M0-M1 and the memory located at 0 bytes are respectively The volume boundary is aligned with the memory boundary at 128 bytes. The sub-section has a size of 128 bytes, and the first sub-section S0 is aligned with the memory boundary line located at 256 bytes.

參考超級塊441B,訪問單元的尺寸被設置成160位元組,記憶體塊尺寸被設置成128位元組,且主部分和副部分的尺寸分別被設置成128位元組和32位元組。如圖所示,超級塊模型具有包括四個副部分(即S0-S3)的副部分組,其跟隨著主部分組(即M0-M3)。超級塊441B的尺寸為記憶體塊尺寸的5倍(即640位元組)。超級塊441B的記憶體分界線位於0位元組、128位元組、256位元組、384位元組、512位元組和640位元組處,所有主部分M0-M3的起始位址分別與位於0位元組、128位元組、256位元組和384位元組處的記憶體分界線對齊。副部分組具有256位元組的尺寸,第一副部分S0與位於512位元組處的記憶體分界線對齊。 Referring to super block 441B, the size of the access unit is set to 160 bytes, the size of the memory block is set to 128 bytes, and the size of the main part and the subsidiary part are set to 128 bytes and 32 bytes, respectively. . As shown, the superblock model has a sub-part group including four sub-parts (ie, S0-S3), which follows the main part group (ie, M0-M3). The size of the super block 441B is five times the size of the memory block (ie, 640 bytes). The memory boundary of super block 441B is located at 0 bytes, 128 bytes, 256 bytes, 384 bytes, 512 bytes, and 640 bytes. The starting bits of all main parts M0-M3 The addresses are aligned with the memory boundaries at 0, 128, 256, and 384 bytes, respectively. The sub-section has a size of 256 bytes, and the first sub-section S0 is aligned with the memory boundary at 512 bytes.

參考超級塊441C,訪問單元的尺寸被設置成320位元組,記憶體塊尺寸被設置成128位元組,且主部分和副部分的尺寸分別被設置成256位元組和64位元組。如圖所示,超級塊模型具有包括兩個副部分(即S0-S1)的副部分組,其跟 隨著主部分組(即M0-M1)。超級塊441C的尺寸為記憶體塊尺寸的5倍(即640位元組)。超級塊441C的記憶體分界線位於0位元組、128位元組、256位元組、512位元組和640位元組處,所有主部分M0-M1的起始位址分別與位於0位元組和256位元組處的記憶體分界線對齊。副部分組具有256位元組的尺寸,第一副部分S0與位於512位元組的記憶體分界線對齊。 Referring to super block 441C, the size of the access unit is set to 320 bytes, the size of the memory block is set to 128 bytes, and the size of the main portion and the sub portion are set to 256 bytes and 64 bytes, respectively. . As shown, the superblock model has a sub-section group including two sub-sections (i.e., S0-S1), which follows the main section group (i.e., M0-M1). The size of the super block 441C is 5 times the size of the memory block (ie, 640 bytes). The memory boundary of super block 441C is located at 0 bytes, 128 bytes, 256 bytes, 512 bytes, and 640 bytes. The starting addresses of all main parts M0-M1 are located at 0 and 0 respectively. Bytes are aligned with the memory boundary at 256 bytes. The sub-section has a size of 256 bytes, and the first sub-section S0 is aligned with the memory boundary line located at 512 bytes.

第5圖是根據本發明實施例的兩個幀暫存器531A-531B中兩個示例性超級塊541A-541B。超級塊541A-541C共用相同特性,其中主部分的尺寸(即128位元組)小於記憶體塊尺寸(即256位元組)。另外,一些已壓縮訪問單元可需要被存儲在主部分和副部分,而一些已壓縮訪問單元可以在主部分中被存儲完。為了允許有效的訪問存儲在主部分和副部分中的已壓縮訪問單元,對應於主部分的盡可能多的副部分可以被包含在相同的記憶體塊中,並且優選地,其緊跟於各自的主部分。例如,在超級塊541A中,在其各自的記憶體塊中,主部分M0被其副部分S0緊跟,主部分M3被其副部分S3緊跟。 FIG. 5 is two exemplary superblocks 541A-541B in two frame registers 531A-531B according to an embodiment of the present invention. Superblocks 541A-541C share the same characteristics, where the size of the main part (that is, 128 bytes) is smaller than the size of the memory block (that is, 256 bytes). In addition, some compressed access units may need to be stored in the main part and the secondary part, and some compressed access units may be stored in the main part. In order to allow efficient access to the compressed access units stored in the main part and the sub-part, as many sub-parts corresponding to the main part may be contained in the same memory block, and preferably, they follow each other The main part. For example, in the super block 541A, in its respective memory block, the main part M0 is followed by its sub-part S0, and the main part M3 is followed by its sub-part S3.

參考超級塊541A,訪問單元的尺寸被設置成192位元組,記憶體塊尺寸被設置成256位元組,且主部分和副部分的尺寸分別被設置成128位元組和64位元組。如圖所示,超級塊模型具有副部分S0,其跟隨著各自主部分M0,以及副部分S3,其跟隨著各自主部分M3。超級塊541A的尺寸為記憶體塊尺寸的3倍(即768位元組)。超級塊541A的記憶體分 界線位於0位元組、256位元組、512位元組和768位元組處,三個主部分M0、M1和M3的起始位址分別與位於0位元組、256位元組和512位元組處的記憶體分界線對齊。主部分M2不與記憶體分界線對齊,但是主部分M2位於256位元組與512位元組之間的單個記憶體塊內部。 Referring to super block 541A, the size of the access unit is set to 192 bytes, the size of the memory block is set to 256 bytes, and the size of the main part and the sub part are set to 128 bytes and 64 bytes, respectively. . As shown, the superblock model has a sub-section S0, which follows the respective main section M0, and a sub-section S3, which follows the respective main section M3. The size of the super block 541A is three times the size of the memory block (that is, 768 bytes). The memory boundary of super block 541A is located at 0 bytes, 256 bytes, 512 bytes, and 768 bytes. The starting addresses of the three main parts M0, M1, and M3 are respectively located at 0 bits. Memory boundaries are aligned at groups, 256 bytes, and 512 bytes. The main portion M2 is not aligned with the memory boundary, but the main portion M2 is located inside a single memory block between 256 bytes and 512 bytes.

參考超級塊541B,訪問單元的尺寸被設置成192位元組,記憶體塊尺寸被設置成256位元組,且主部分和副部分的尺寸分別被設置成128位元組和64位元組。如圖所示,超級塊模型具有跟隨著其主部分M0的副部分S0,以及跟隨著其主部分M1的副部分S1。超級塊541B的尺寸為記憶體塊尺寸的3倍(即768位元組)。超級塊541A的記憶體分界線位於0位元組、256位元組、512位元組和768位元組處,三個主部分M0、M1和M2的起始位址分別與位於0位元組、256位元組和512位元組處的記憶體分界線對齊。主部分M3不與記憶體分界線對齊,但是主部分M3位於512位元組與768位元組之間的單個記憶體塊內部。 Referring to super block 541B, the size of the access unit is set to 192 bytes, the size of the memory block is set to 256 bytes, and the size of the main part and the sub part are set to 128 bytes and 64 bytes, respectively. . As shown, the superblock model has a sub-section S0 following its main section M0, and a sub-section S1 following its main section M1. The size of the super block 541B is three times the size of the memory block (that is, 768 bytes). The memory boundary of super block 541A is located at 0 bytes, 256 bytes, 512 bytes, and 768 bytes. The starting addresses of the three main parts M0, M1, and M2 are located at 0 bits, respectively. Memory boundaries are aligned at groups, 256 bytes, and 512 bytes. The main part M3 is not aligned with the memory boundary, but the main part M3 is located inside a single memory block between 512 bytes and 768 bytes.

第6圖顯示了根據本發明實施例的可選的幀暫存器示例。通過具有兩組,即主部分組和副部分組,可以排列幀暫存器631A和幀暫存器631B的主部分和副部分,其中主部分組包括順序地放置彼此相鄰的所有主部分,且副部分組包括順序地放置彼此相鄰的所有副部分。在一個實施例中,主部分的尺寸為記憶體塊尺寸的一倍或多倍,主部分的起始位址可以與記憶體分界線對齊。主部分組可以被放置成與副部分組相鄰,或者可以與副部分分開。 Figure 6 shows an example of an optional frame register according to an embodiment of the invention. By having two groups, that is, a main part group and a sub part group, the main part and the sub part of the frame register 631A and the frame register 631B can be arranged, wherein the main part group includes all the main parts placed next to each other sequentially And the sub-section group includes all the sub-sections placed next to each other sequentially. In one embodiment, the size of the main part is one or more times the size of the memory block, and the starting address of the main part may be aligned with the memory boundary. The main part group may be placed adjacent to the sub part group or may be separated from the sub part.

如幀暫存器631A所示,訪問單元的尺寸被設置成80位元組,記憶體塊尺寸被設置成64位元組,且主部分和副部分的尺寸分別被設置成64位元組和16位元組。主部分組包括所有主部分。如圖所示,主部分被放置成相互相鄰,且具有起始位址,其與位於0位元組、64位元組、128位元組、192位元組、256位元組等處的連續的記憶體分界線對齊。副部分組包括所有副部分。第一副部分S0可以具有與記憶體分界線對齊的起始位址,例如與位於512位元組處的記憶體分界線對齊。 As shown in the frame register 631A, the size of the access unit is set to 80 bytes, the size of the memory block is set to 64 bytes, and the size of the main part and the subsidiary part are set to 64 bytes and 16 bytes. The main part group includes all main parts. As shown in the figure, the main part is placed next to each other and has a start address, which is located at 0 bytes, 64 bytes, 128 bytes, 192 bytes, 256 bytes, etc. Of continuous memory boundaries. The sub-section group includes all sub-sections. The first sub-portion S0 may have a starting address aligned with the memory boundary, for example, aligned with the memory boundary at 512 bytes.

如幀暫存器631B所示,訪問單元的尺寸被設置成160位元組,記憶體塊尺寸被設置成128位元組,且主部分和副部分的尺寸分別被設置成128位元組和32位元組。主部分組包括所有主部分。如圖所示,主部分被放置成相互相鄰,且具有起始位址,其與位於0位元組、128位元組、256位元組、384位元組、512位元組等處的連續的記憶體分界線對齊。副部分組包括所有副部分。第一副部分S0可以具有與記憶體分界線對齊的起始位址,與位於4096位元組處的記憶體分界線對齊。 As shown in the frame register 631B, the size of the access unit is set to 160 bytes, the size of the memory block is set to 128 bytes, and the size of the main portion and the sub portion are set to 128 bytes and 32 bytes. The main part group includes all main parts. As shown in the figure, the main part is placed next to each other and has a start address, which is located at 0 bytes, 128 bytes, 256 bytes, 384 bytes, 512 bytes, etc. Of continuous memory boundaries. The sub-section group includes all sub-sections. The first sub-portion S0 may have a starting address aligned with the memory boundary line and aligned with the memory boundary line at 4096 bytes.

在如第3圖-第6圖所示的超級塊和幀暫存器中,至少一個副部分不是順序位於其各自的主部分之後。 In the superblocks and frame registers shown in FIGS. 3-6, at least one of the sub-parts is not sequentially behind their respective main parts.

在一個實施例中,超級塊和幀暫存器的起始位址可以與記憶體130的記憶體分界線對齊,例如第3圖-第6圖所示的0位元組處。 In one embodiment, the starting addresses of the super block and the frame register may be aligned with the memory boundary of the memory 130, for example, at the zero byte shown in FIG. 3 to FIG. 6.

儘管示例性超級塊和幀暫存器如第3圖-第6圖所 示,應該理解的是,為了滿足不同記憶體使用情景,諸如超級塊模型的變形、幀記憶體中的超級塊的位置等的變形是可能的。 Although exemplary superblocks and frame registers are shown in Figures 3-6, it should be understood that in order to meet different memory usage scenarios, such as the deformation of the superblock model, the location of the superblock in the frame memory Other deformations are possible.

在操作期間,當主部分和副部分根據佈局被放置在幀暫存器131中時,例如如第3圖-第6圖中所示的佈局,已壓縮訪問單元可以被存儲在各自的主部分中。例如,已壓縮訪問單元可以被存儲在各自的主部分中,並且如果需要,被存儲在各自的副部分中。當已壓縮訪問單元的尺寸等於或者小於各自主部分的尺寸時,已壓縮訪問單元可以完全被存儲在各自主部分中,且相應的副部分可以保持為空。 During operation, when the main part and the sub-part are placed in the frame register 131 according to the layout, such as the layout shown in Figs. 3-6, the compressed access units can be stored in the respective main parts in. For example, the compressed access units may be stored in respective main sections and, if necessary, in respective sub-sections. When the size of the compressed access unit is equal to or smaller than the size of the respective main portion, the compressed access unit may be completely stored in the respective main portion, and the corresponding sub-portion may remain empty.

第7圖是根據本發明實施例之描述示例性流程700的流程圖。在一個示例中,流程700由第1圖中的記憶體系統100執行。流程開始於步驟S701並繼續到步驟S710。 FIG. 7 is a flowchart describing an exemplary process 700 according to an embodiment of the present invention. In one example, the process 700 is executed by the memory system 100 in FIG. 1. The flow starts at step S701 and continues to step S710.

在步驟S710中,將輸入圖像分割成一個或者多個訪問單元,例如如圖2所示的N×M陣列的訪問單元。在一個示例中,記憶體分配裝置110用於將輸入圖像分割成陣列的訪問單元。輸入圖像可以為視訊幀、攝影圖像、圖形圖像、動畫圖像等。例如視訊幀可以為視訊編碼解碼器146所使用的參考幀。隨後流程繼續到步驟S720。 In step S710, the input image is divided into one or more access units, for example, an access unit of an N × M array shown in FIG. 2. In one example, the memory allocation device 110 is configured to divide an input image into an array of access units. The input image may be a video frame, a photographed image, a graphic image, an animated image, and the like. For example, the video frame may be a reference frame used by the video codec 146. The flow then proceeds to step S720.

在步驟S720中,在記憶體中分配一幀暫存器。在一個示例中,記憶體分配裝置110用於在記憶體130中分配幀暫存器131。幀暫存器的尺寸等於或者大於輸入圖像的尺寸。在一個實施例中,幀暫存器的起始位址可以與記憶體分界線對齊,例如0位元組處的記憶體分界線。 In step S720, a frame register is allocated in the memory. In one example, the memory allocation device 110 is used to allocate the frame register 131 in the memory 130. The size of the frame register is equal to or larger than the size of the input image. In one embodiment, the starting address of the frame register may be aligned with the memory boundary, such as the memory boundary at 0 bytes.

在步驟S730中,在幀暫存器中給每個訪問單元分配兩個記憶體部分,即主部分和副部分。在一個示例中,記憶體分配裝置用於在幀暫存器131中給每個訪問單元分配主部分和副部分。在一個實施例中,主部分的尺寸與副部分的尺寸的總和可以等於訪問單元的尺寸,例如,可以為未壓縮的訪問單元的尺寸。在一個實施例中,主部分的尺寸可以取決於輸入圖像的壓縮性、壓縮方法、記憶體塊尺寸等。此外,在一個實施例中,主部分的尺寸與副部分的尺寸的比例可以取決於輸入圖像的壓縮性、壓縮方法等。例如,當訪問單元可以被壓縮成更小尺寸時,更小的主部分足夠用於存儲已壓縮訪問單元,且各自副部分可以保持為空,使得主部分的尺寸與副部分的尺寸的比例更小。 In step S730, two memory sections are allocated to each access unit in the frame register, that is, a main section and a sub-section. In one example, the memory allocation device is used to allocate a main part and a sub part to each access unit in the frame register 131. In one embodiment, the sum of the size of the main part and the size of the sub-part may be equal to the size of the access unit, for example, may be the size of the uncompressed access unit. In one embodiment, the size of the main part may depend on the compressibility, compression method, memory block size, etc. of the input image. In addition, in one embodiment, the ratio of the size of the main portion to the size of the sub portion may depend on the compressibility, compression method, and the like of the input image. For example, when the access unit can be compressed to a smaller size, the smaller main part is sufficient to store the compressed access unit, and the respective sub-parts can be left empty, so that the ratio of the size of the main part to the size of the sub-part is more small.

進一步地,在一個實施例中,主部分可以具有與記憶體分界線對齊的起始位址和為記憶體塊尺寸的一倍或者多倍的尺寸,使得主部分中所存儲的資料可以被有效地訪問。 Further, in an embodiment, the main part may have a starting address aligned with the memory boundary and a size that is one or more times the size of the memory block, so that the data stored in the main part can be effectively used. To visit.

可選地,當主部分的尺寸小於記憶體塊尺寸時,每個主部分可以位於各自的記憶體塊之內,而一個或多個主部分可以具有與一個或多個記憶體分界線對齊的起始位址。 Optionally, when the size of the main part is smaller than the size of the memory block, each main part may be located within a respective memory block, and one or more main parts may have a line aligned with one or more memory boundaries. The starting address.

在一個實施例中,副部分的尺寸可以為記憶體塊尺寸的一部分。因此,兩個或者兩個以上副部分可以被組合在一起作為一個或多個副部分組,並與其各自的主部分分開進行存儲。進一步,在一個實施例中,在每個各自的副部分組中的第一副部分可以具有與記憶體分界線對齊的起始位址。 In one embodiment, the size of the secondary portion may be a portion of the size of the memory block. Therefore, two or more sub-sections can be combined together as one or more sub-section groups and stored separately from their respective main sections. Further, in one embodiment, the first sub-portion in each respective sub-portion group may have a starting address aligned with a memory boundary.

在另一實施例中,在幀暫存器中,至少一個副部 分不是順序地位於其各自主部分之後。 In another embodiment, in the frame register, at least one sub-portion is not sequentially behind its respective main portion.

主部分和副部分可根據不同的佈局,排列於幀暫存器中,例如幀暫存器131中。在一個實施例中,佈局可以包括超級塊的重複模型,其中超級塊為幀暫存器中的最小重複單元。因此,幀暫存器中的主部分和副部分可以,例如,通過順序地放置彼此相鄰的超級塊排列。超級塊的尺寸可以被設置成記憶體塊尺寸的倍數。 The main part and the sub-part may be arranged in a frame register, such as the frame register 131 according to different layouts. In one embodiment, the layout may include a repeating model of a superblock, where the superblock is the smallest repeating unit in the frame register. Therefore, the main part and the sub-part in the frame register can be arranged, for example, by sequentially placing super blocks adjacent to each other. The size of the super block can be set to a multiple of the memory block size.

在一個實施例中,超級塊中的主部分的起始位址與記憶體分界線對齊。超級塊中的副部分可以被組合成一個或多個副部分組,其尺寸為記憶體塊尺寸的倍數。每個副部分組中的第一副部分可以與記憶體分界線對齊。具有上述特性的一些示例性超級塊如第3圖和第4圖所示。 In one embodiment, the starting address of the main part in the superblock is aligned with the memory boundary. The sub-sections in a superblock can be combined into one or more sub-section groups whose size is a multiple of the memory block size. The first sub-section in each sub-section group may be aligned with the memory boundary. Some exemplary superblocks with the above characteristics are shown in Figures 3 and 4.

在另一實施例中,超級塊可以具有一個或多個主部分,其尺寸小於記憶體塊尺寸。一些示例性超級塊如第5圖所示。例如,盡可能多的副部分緊跟各自的主部分(例如,第5圖的超級塊541A中S0跟隨著M0,且S3跟隨著M3)。又例如,每個主部分完全位於相同的記憶體塊中。 In another embodiment, the superblock may have one or more main sections that are smaller than the memory block size. Some exemplary superblocks are shown in Figure 5. For example, as many secondary sections as possible follow the respective main sections (for example, S0 follows M0 and S3 follows M3 in superblock 541A of FIG. 5). As another example, each main part is completely located in the same memory block.

在一個實施例中,佈局不包括超級塊的重複模型。相反,通過具有主部分組和副部分組,可以排列幀暫存器中的主部分和副部分,例如如第6圖所示的示例。例如,主部分組包括具有與連續的記憶體分界線對齊的起始位址的主部分。副部分組包括相互相鄰的副部分。副部分組的第一副部分可以與記憶體分界線對齊。 In one embodiment, the layout does not include a repeating model of superblocks. In contrast, by having a main part group and a sub part group, the main part and the sub part in the frame register can be arranged, for example, as shown in the example in FIG. 6. For example, the main section group includes a main section having a start address aligned with consecutive memory boundaries. The sub-section group includes sub-sections adjacent to each other. The first sub-section of the sub-section group may be aligned with the memory boundary.

在步驟S740中,可以將訪問單元壓縮成已壓縮訪 問單元,以降低記憶體與訪問記憶體的另一設備之間資料傳輸的頻寬要求。例如,在記憶體系統100中,記憶體130可以位於與記憶體分配裝置110不同的晶片上,記憶體分配裝置110用於壓縮訪問單元以降低記憶體130與記憶體分配裝置110之間資料傳輸的頻寬要求。無失真壓縮方法和失真壓縮方法均可以用於壓縮訪問單元。無失真壓縮方法可以保護原始資料的品質,而失真壓縮方法可以實現更多的壓縮。壓縮方法可以是通用的壓縮方法、圖像壓縮方法或者視訊壓縮方法等。例如,壓縮方法可以包括游程長度編碼(run-length encoding)、基於字典的演算法、Hoffman編碼、縮小化(deflation)、色度子採樣、離散余弦變換等。 In step S740, the access unit may be compressed into a compressed access unit to reduce the bandwidth requirement for data transmission between the memory and another device accessing the memory. For example, in the memory system 100, the memory 130 may be located on a different chip from the memory allocation device 110. The memory allocation device 110 is used to compress the access unit to reduce data transmission between the memory 130 and the memory allocation device 110. Bandwidth requirements. Both the distortionless compression method and the distortion compression method can be used to compress the access unit. The lossless compression method can protect the quality of the original data, while the distortion compression method can achieve more compression. The compression method may be a general compression method, an image compression method, or a video compression method. For example, the compression method may include run-length encoding, dictionary-based algorithms, Hoffman encoding, deflation, chroma subsampling, discrete cosine transform, and the like.

在步驟S750中,將已壓縮訪問單元的尺寸與主部分的尺寸進行比較。在一個示例中,記憶體分配裝置110用於比較已壓縮訪問單元的尺寸與主部分的尺寸。如果已壓縮訪問單元的尺寸大於主部分的尺寸,則流程繼續到步驟S770。否則,流程繼續到步驟S760。 In step S750, the size of the compressed access unit is compared with the size of the main portion. In one example, the memory allocation device 110 is used to compare the size of the compressed access unit with the size of the main portion. If the size of the compressed access unit is larger than the size of the main part, the flow proceeds to step S770. Otherwise, the flow proceeds to step S760.

在步驟S760中,可以將已壓縮訪問單元完全存儲在各自的主部分,是因為已壓縮訪問單元的尺寸小於或者等於主部分的尺寸。在一個示例中,記憶體控制器120用於響應於記憶體分配裝置110的指令而將已壓縮訪問單元存儲到其各自的主部分。 In step S760, the compressed access units can be completely stored in the respective main parts, because the size of the compressed access units is less than or equal to the size of the main part. In one example, the memory controller 120 is configured to store the compressed access units to their respective main sections in response to instructions from the memory allocation device 110.

當已壓縮訪問單元的尺寸大於主部分的尺寸時,流程繼續到步驟S770。在步驟S770中,可以將已壓縮訪問單元的第一部分存儲到各自主部分。已壓縮訪問單元的第一部分 的尺寸可以與主部分的尺寸相同,並填入各自主部分。在一個示例中,記憶體控制器120用於響應於記憶體分配裝置110的指令而將已壓縮訪問單元的第一部分存儲到其各自的主部分。 When the size of the compressed access unit is larger than the size of the main part, the flow proceeds to step S770. In step S770, the first part of the compressed access unit may be stored to the respective main parts. The first part of the compressed access unit can be the same size as the main part and filled in the respective main part. In one example, the memory controller 120 is configured to store the first portion of the compressed access unit to its respective main portion in response to an instruction from the memory allocation device 110.

在步驟S780中,可以將已壓縮訪問單元的第二部分或者剩餘部分存儲到各自副部分。因此,當已壓縮訪問單元的尺寸大於主部分的尺寸時,可以將已壓縮訪問單元分開存儲到各自主部分和副部分。在一個示例中,記憶體控制器120用於響應於記憶體分配裝置110的指令而將已壓縮訪問單元的剩餘部分存儲到各自副部分。 In step S780, the second part or the remaining part of the compressed access unit may be stored in the respective sub-parts. Therefore, when the size of the compressed access unit is larger than the size of the main portion, the compressed access unit can be stored separately to the respective main and secondary portions. In one example, the memory controller 120 is configured to store the remaining portions of the compressed access unit to respective secondary portions in response to instructions from the memory allocation device 110.

在流程繼續到流程結束的步驟S799之前,可以對所有的訪問單元重複執行步驟S740-步驟S780。在一個示例中,記憶體分配裝置110和記憶體控制器120用於重複執行步驟S740-步驟S780,以用於輸入圖像中的所有訪問單元。 Before the process continues to step S799 where the process ends, steps S740 to S780 may be repeatedly performed for all the access units. In one example, the memory allocation device 110 and the memory controller 120 are configured to repeatedly execute steps S740 to S780 for inputting all the access units in the image.

在各種實施例中,訪問單元的尺寸、主部分的尺寸和副部分的尺寸可以被選擇,並保持為常數以用於輸入圖像。另一方面,多個輸入圖像,例如視訊的序列幀,可以由記憶體來存儲。訪問單元的尺寸、主部分的尺寸和副部分的尺寸可以被選擇以用於每個單獨的輸入圖像,因此,其可以動態地從一個輸入圖像到另一輸入圖像變化。 In various embodiments, the size of the access unit, the size of the main part, and the size of the sub-part may be selected and kept constant for the input image. On the other hand, multiple input images, such as sequence frames of a video, can be stored in memory. The size of the access unit, the size of the main part, and the size of the sub-part can be selected for each individual input image, and therefore, it can dynamically change from one input image to another.

在各種示例中,記憶體分配裝置110或者記憶體分配裝置110的功能可以用硬體、軟體及其組合來實現。在一個示例中,記憶體分配裝置110在硬體中實現,例如處理電路,硬體可以包括離散元件、積體電路、應用專用積體電路(application-specific integrated circuit,ASIC)等中的一個或 多個。在另一示例中,記憶體分佈的功能可以用包括存儲在電腦可讀非暫態存儲介質的指令的軟體或者固件來實現,當這些指令由處理電路執行時,使得處理電路執行各自的功能。 In various examples, the memory allocation device 110 or the functions of the memory allocation device 110 may be implemented in hardware, software, and a combination thereof. In one example, the memory allocation device 110 is implemented in hardware, such as a processing circuit. The hardware may include one of discrete components, integrated circuits, application-specific integrated circuits (ASICs), or the like. Multiple. In another example, the memory distribution function may be implemented by software or firmware including instructions stored in a computer-readable non-transitory storage medium, and when these instructions are executed by a processing circuit, the processing circuits are caused to perform respective functions.

由於已經結合本發明的被提出用作示例的具體實施例描述了本發明的各個方面,可以做出這些示例的替代、修改和變形。因此,此處所說明的實施例用作示意目的,但不用於限制。在不脫離權利要求的範圍的情況下,可以做出改變。 Since the various aspects of the present invention have been described in connection with specific embodiments of the present invention that have been proposed as examples, substitutions, modifications, and variations of these examples can be made. Therefore, the embodiments described herein are used for illustrative purposes, but not for limitation. Changes may be made without departing from the scope of the claims.

Claims (20)

一種存儲輸入圖像的方法,所述輸入圖像存儲到記憶體中,包括:在所述記憶體中分配一個或多個幀暫存器;將所述輸入圖像分割成對應於所述輸入圖像的多個子集的多個訪問單元,並在所述幀暫存器中給多個訪問單元中的每個訪問單元分配主部分和副部分,其中至少一個所述副部分在所述幀暫存器中不順序地位於其各自的主部分之後;將所述多個訪問單元壓縮成多個已壓縮訪問單元;以及將每個已壓縮訪問單元中存儲到各自的主部分中,並且如果所述已壓縮訪問單元的尺寸超過所述主部分的尺寸,則將所述已壓縮訪問單元的剩餘部分存儲到各自的副部分中。     A method for storing an input image, said input image being stored in a memory, comprising: allocating one or more frame registers in said memory; and dividing said input image into corresponding to said input Multiple access units of multiple subsets of the image, and each access unit of the multiple access units in the frame register is assigned a main part and a sub part, wherein at least one of the sub parts is in the The frame registers are not sequentially behind their respective main sections; compressing the plurality of access units into a plurality of compressed access units; and storing each compressed access unit in a respective main section, and If the size of the compressed access unit exceeds the size of the main portion, the remaining portions of the compressed access unit are stored in respective secondary portions.     如申請專利範圍第1項所述之存儲輸入圖像的方法,其中所述存儲器具有一系列的記憶體塊,所述記憶體塊由位於為記憶體塊尺寸的倍數的多個位址處的多個記憶體分界線隔開,並且,所述記憶體塊尺寸基於所述記憶體的特性和訪問所述記憶體的多個設備的特性而確定。     The method for storing an input image according to item 1 of the patent application scope, wherein the memory has a series of memory blocks, and the memory blocks are located at multiple addresses that are multiples of the memory block size. A plurality of memory boundaries are separated, and the size of the memory block is determined based on characteristics of the memory and characteristics of a plurality of devices accessing the memory.     如申請專利範圍第2項所述之存儲輸入圖像的方法,其中每個主部分的尺寸為所述記憶體塊尺寸的一倍或者多倍,且每個主部分的起始位址分別與記憶體分界線對齊。     The method for storing an input image according to item 2 of the scope of the patent application, wherein the size of each main part is one or more times the size of the memory block, and the starting address of each main part is Memory boundaries are aligned.     如申請專利範圍第2項所述之存儲輸入圖像的方法,其中每個主部分的尺寸為所述記憶體塊尺寸的一部分,且每個 主部分位於各自記憶體塊的內部。     The method for storing an input image according to item 2 of the scope of the patent application, wherein the size of each main part is a part of the size of the memory block, and each main part is located inside the respective memory block.     如申請專利範圍第2項所述之存儲輸入圖像的方法,其中每個副部分的尺寸為所述記憶體塊尺寸的一部分,且多個副部分被組合成一個或多個副部分組。     The method for storing an input image according to item 2 of the scope of patent application, wherein the size of each sub-portion is a part of the size of the memory block, and a plurality of sub-portions are combined into one or more sub-portion groups.     如申請專利範圍第5項所述之存儲輸入圖像的方法,其中所述一個或多個副部分組的尺寸為所述記憶體塊尺寸的一倍或者多倍,每個所述副部分組的第一副部分的起始位址與記憶體分界線對齊。     The method for storing an input image according to item 5 of the scope of patent application, wherein the size of the one or more sub-groups is one or more times the size of the memory block, and each of the sub-groups is The starting address of the first subsection of aligns with the memory boundary.     如申請專利範圍第2項所述之存儲輸入圖像的方法,其中多個主部分和副部分是以預設模型排列,以形成尺寸為所述記憶體塊尺寸的一倍或者多倍的超級塊;以及所述幀暫存器中的所述多個主部分和所述多個副部分通過順序放置相互相鄰的多個超級塊來排列。     The method for storing an input image according to item 2 of the scope of patent application, wherein a plurality of main parts and sub-parts are arranged in a preset model to form a super size that is one or more times the size of the memory block. Blocks; and the plurality of main sections and the plurality of sub sections in the frame register are arranged by sequentially placing a plurality of super blocks adjacent to each other.     如申請專利範圍第2項所述之存儲輸入圖像的方法,其中所述記憶體塊尺寸被選擇為32位元組、64位元組、128位元組、256位元組、512位元組、1K位元組、2K位元組或者4K位元組。     The method for storing an input image according to item 2 of the scope of patent application, wherein the memory block size is selected as 32-bit, 64-bit, 128-bit, 256-bit, 512-bit Group, 1K byte, 2K byte, or 4K byte.     如申請專利範圍第1項所述之存儲輸入圖像的方法,其中所述輸入圖像為靜止圖像或視訊幀。     The method for storing an input image according to item 1 of the scope of patent application, wherein the input image is a still image or a video frame.     一種存儲輸入圖像的系統,包括:記憶體,具有一個或多個幀暫存器;記憶體分配裝置,用於接收所述輸入圖像,在所述記憶體中分配幀暫存器以存儲所述輸入圖像,將所述輸入圖像分割成多個對應於所述輸入圖像的多個子集的多個訪問單 元,並在所述幀暫存器中給每個訪問單元分配主部分和副部分,其中至少一個所述副部分在所述幀暫存器中不順序地位於其各自的主部分之後;以及記憶體控制器,用於響應於所述記憶體分配裝置的多個指令,將每個已壓縮訪問單元存儲到各自的主部分中,並且如果所述已壓縮訪問單元的尺寸超過所述主部分的尺寸,則將所述已壓縮訪問單元的剩餘部分存儲到各自的副部分中。     A system for storing input images includes: a memory having one or more frame registers; a memory allocation device for receiving the input images; and allocating frame registers in the memory to store The input image, the input image is divided into a plurality of access units corresponding to a plurality of subsets of the input image, and each access unit is assigned a master in the frame register A section and a sub-section, at least one of the sub-sections is not sequentially behind their respective main sections in the frame register; and a memory controller for responding to a plurality of the memory allocation devices Instructions to store each compressed access unit in a respective main portion, and if the size of the compressed access unit exceeds the size of the main portion, store the remaining portion of the compressed access unit in a respective In the subsection.     如申請專利範圍第10項所述之存儲輸入圖像的系統,其中,所述存儲器具有一系列的記憶體塊,所述記憶體塊由位於為記憶體塊尺寸的倍數的多個位址處的多個記憶體分界線隔開,並且,所述記憶體塊尺寸基於所述記憶體的特性和訪問所述記憶體的多個裝置的特性而確定。     The system for storing an input image according to item 10 of the scope of patent application, wherein the memory has a series of memory blocks, and the memory blocks are located at multiple addresses that are multiples of the memory block size. A plurality of memory boundaries are separated, and the size of the memory block is determined based on characteristics of the memory and characteristics of multiple devices accessing the memory.     如申請專利範圍第11項所述之存儲輸入圖像的系統,其中所述記憶體分配裝置用於將每個主部分的尺寸選擇為所述記憶體塊尺寸的一倍或者多倍,並將每個主部分的起始位址與記憶體分界線對齊。     The system for storing input images according to item 11 of the scope of patent application, wherein the memory allocation device is configured to select a size of each main part to be one or more times the size of the memory block, and The starting address of each main section is aligned with the memory boundary.     如申請專利範圍第11項所述之存儲輸入圖像的系統,其中所述記憶體分配裝置用於將每個主部分的尺寸選擇為所述記憶體塊尺寸的一部分,並將每個主部分放置在各自記憶體塊的內部。     The system for storing an input image according to item 11 of the patent application scope, wherein the memory allocation device is configured to select a size of each main part as a part of the size of the memory block, and Placed inside the respective memory block.     如申請專利範圍第11項所述之存儲輸入圖像的系統,其中所述記憶體分配裝置用於將每個副部分的尺寸選擇為所述記憶體塊尺寸的一部分,並將多個副部分組合成一個或多 個副部分組。     The system for storing an input image according to item 11 of the scope of patent application, wherein the memory allocation device is configured to select a size of each sub-portion as a part of the size of the memory block, and a plurality of sub-portions Group one or more sub-groups.     如申請專利範圍第14項所述之存儲輸入圖像的系統,其中所述記憶體分配裝置用於選擇一個或多個副部分組的尺寸為所述記憶體塊尺寸的一倍或者多倍,並將每個所述副部分組的首個副部分的起始位址與記憶體分界線對齊。     The system for storing input images according to item 14 of the scope of patent application, wherein the memory allocation device is configured to select one or more sub-groups whose size is one or more times the size of the memory block, The starting address of the first sub-section of each of the sub-section groups is aligned with the memory boundary.     如申請專利範圍第11項所述之存儲輸入圖像的系統,其中所述記憶體分配裝置用於以預設模型排列多個主部分和副部分,以形成尺寸為所述記憶體塊尺寸的一倍或者多倍的超級塊,並將相互相鄰的多個超級塊放置在所述幀暫存器中。     The system for storing input images according to item 11 of the scope of patent application, wherein the memory allocation device is used to arrange a plurality of main parts and sub-parts in a preset model to form a memory block having a size equal to the size of the memory block. One or more times of super blocks, and multiple super blocks adjacent to each other are placed in the frame register.     如申請專利範圍第11項所述之存儲輸入圖像的系統,其中所述記憶體分配裝置用於確定所述記憶體塊尺寸為32位元組、64位元組、128位元組、256位元組、512位元組、1K位元組、2K位元組或者4K位元組。     The system for storing input images according to item 11 of the scope of patent application, wherein the memory allocation device is configured to determine the size of the memory block as 32-bit, 64-bit, 128-bit, 256 Bytes, 512 bytes, 1K bytes, 2K bytes, or 4K bytes.     如申請專利範圍第10項所述之存儲輸入圖像的系統,其中所述記憶體位於與所述記憶體分配裝置不同的積體電路晶片上。     The system for storing input images according to item 10 of the scope of patent application, wherein the memory is located on an integrated circuit chip different from the memory distribution device.     如申請專利範圍第10項所述之存儲輸入圖像的系統,其中所述記憶體分配裝置被整合於視訊編碼解碼器中。     The system for storing input images as described in claim 10, wherein the memory allocation device is integrated in a video codec.     一種非暫態電腦可讀介質,存儲有電腦可讀指令,在處理電路執行所述電腦可讀指令時,所述處理電路執行一方法,所述方法包括:在所述記憶體中分配一個或多個幀暫存器;將所述輸入圖像分割成對應於所述輸入圖像的多個子集的 多個訪問單元,並在所述幀暫存器中給多個訪問單元中的每個訪問單元分配主部分和副部分,其中至少一個所述副部分在所述幀暫存器中不順序地位於其各自的主部分之後;將所述多個訪問單元壓縮成多個已壓縮訪問單元;將每個已壓縮訪問單元存儲到各自的主部分中,並且如果所述已壓縮訪問單元的尺寸超過所述主部分的尺寸,則將所述已壓縮訪問單元的剩餘部分存儲到各自的副部分中。     A non-transitory computer-readable medium storing computer-readable instructions. When the processing circuit executes the computer-readable instructions, the processing circuit executes a method. The method includes: allocating one or Multiple frame registers; dividing the input image into multiple access units corresponding to multiple subsets of the input image, and giving each of the multiple access units in the frame register Access units are assigned a main part and a sub-part, at least one of which is not sequentially behind its respective main part in the frame register; compressing the plurality of access units into a plurality of compressed accesses Unit; each compressed access unit is stored in a respective main section, and if the size of the compressed access unit exceeds the size of the main section, the remaining portion of the compressed access unit is stored in a respective In the subsection.    
TW107113191A 2017-04-25 2018-04-18 Method and system for storing an image TW201839714A (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US201762489588P 2017-04-25 2017-04-25
US62/489,588 2017-04-25
US15/786,908 2017-10-18
US15/786,908 US20180107616A1 (en) 2016-10-18 2017-10-18 Method and device for storing an image into a memory

Publications (1)

Publication Number Publication Date
TW201839714A true TW201839714A (en) 2018-11-01

Family

ID=64094364

Family Applications (2)

Application Number Title Priority Date Filing Date
TW107113191A TW201839714A (en) 2017-04-25 2018-04-18 Method and system for storing an image
TW107113842A TW201840177A (en) 2017-04-25 2018-04-24 Method for accessing frame buffer, method and apparatus for processing access units

Family Applications After (1)

Application Number Title Priority Date Filing Date
TW107113842A TW201840177A (en) 2017-04-25 2018-04-24 Method for accessing frame buffer, method and apparatus for processing access units

Country Status (2)

Country Link
CN (2) CN108804508B (en)
TW (2) TW201839714A (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4772956A (en) * 1987-06-02 1988-09-20 Eastman Kodak Company Dual block still video compander processor
US7106909B2 (en) * 2001-12-25 2006-09-12 Canon Kabushiki Kaisha Method and apparatus for encoding image data in accordance with a target data size
CN101212680B (en) * 2006-12-30 2011-03-23 扬智科技股份有限公司 Image data storage access method and system
GB2457262A (en) * 2008-02-08 2009-08-12 Linear Algebra Technologies Compression / decompression of data blocks, applicable to video reference frames
CN101499097B (en) * 2009-03-16 2011-03-23 浙江工商大学 Hash table based data stream frequent pattern internal memory compression and storage method
CN102740074A (en) * 2012-06-05 2012-10-17 沙基昌 Video data compressing/decompressing method and system
US20140219361A1 (en) * 2013-02-01 2014-08-07 Samplify Systems, Inc. Image data encoding for access by raster and by macroblock
CN105472442B (en) * 2015-12-01 2018-10-23 上海交通大学 Compressibility is cached outside a kind of piece for ultra high-definition frame rate up-conversion

Also Published As

Publication number Publication date
CN108804508A (en) 2018-11-13
CN108833922A (en) 2018-11-16
TW201840177A (en) 2018-11-01
CN108833922B (en) 2020-12-18
CN108804508B (en) 2022-06-07

Similar Documents

Publication Publication Date Title
US9367892B2 (en) Processing method and apparatus for single-channel convolution layer, and processing method and apparatus for multi-channel convolution layer
CN105431831B (en) Data access method and the data access device for utilizing same procedure
US8918589B2 (en) Memory controller, memory system, semiconductor integrated circuit, and memory control method
TWI744289B (en) A central processing unit (cpu)-based system and method for providing memory bandwidth compression using multiple last-level cache (llc) lines
US20080151677A1 (en) Memory device, memory controller and memory system
US20140086309A1 (en) Method and device for encoding and decoding an image
KR20180054797A (en) Efficient display processing by pre-fetching
US8320690B2 (en) System, data structure, and method for simultaneously retrieving multi-dimensional data with zero contention
CN108604211B (en) System and method for multiblock data transactions in a system-on-chip
RU2621611C1 (en) Method of data recording and memory system
US20180107616A1 (en) Method and device for storing an image into a memory
CN114428595A (en) Image processing method, image processing device, computer equipment and storage medium
US8190814B2 (en) Memory access apparatus and display using the same
US10249269B2 (en) System on chip devices and operating methods thereof
US7400683B2 (en) Device with virtual tilized image memory
TW201839714A (en) Method and system for storing an image
CN111052742A (en) Image processing
CN116523729A (en) Graphics processing device, graphics rendering pipeline distribution method and related devices
US10380029B2 (en) Method and apparatus for managing memory
KR20220166198A (en) Methods of and apparatus for storing data in memory in graphics processing systems
JP2003177958A (en) Specialized memory device
CN116700943A (en) Video playing system and method and electronic equipment
US20100211704A1 (en) Data Processing Apparatus
US11086534B2 (en) Memory data distribution based on communication channel utilization
EP3462322B1 (en) Semiconductor device and memory access method