US20180107616A1 - Method and device for storing an image into a memory - Google Patents
Method and device for storing an image into a memory Download PDFInfo
- Publication number
- US20180107616A1 US20180107616A1 US15/786,908 US201715786908A US2018107616A1 US 20180107616 A1 US20180107616 A1 US 20180107616A1 US 201715786908 A US201715786908 A US 201715786908A US 2018107616 A1 US2018107616 A1 US 2018107616A1
- Authority
- US
- United States
- Prior art keywords
- memory
- size
- portions
- main
- memory block
- 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.)
- Abandoned
Links
Images
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/36—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
- G09G5/39—Control of the bit-mapped memory
- G09G5/393—Arrangements for updating the contents of the bit-mapped memory
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
- G06F13/1673—Details of memory controller using buffers
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/36—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
- G09G5/39—Control of the bit-mapped memory
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/36—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
- G09G5/39—Control of the bit-mapped memory
- G09G5/395—Arrangements specially adapted for transferring the contents of the bit-mapped memory to the screen
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/32—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
- H04N1/32561—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device using a programmed control device, e.g. a microprocessor
- H04N1/32593—Using a plurality of controllers, e.g. for controlling different interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/30—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
- H04N19/39—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability involving multiple description coding [MDC], i.e. with separate layers being structured as independently decodable descriptions of input picture data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods 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/423—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods 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/423—Methods 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
- H04N19/426—Methods 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 using memory downsizing methods
- H04N19/428—Recompression, e.g. by spatial or temporal decimation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/59—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2330/00—Aspects of power supply; Aspects of display protection and defect management
- G09G2330/02—Details of power systems and of start or stop of display operation
- G09G2330/021—Power management, e.g. power saving
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2340/00—Aspects of display data processing
- G09G2340/02—Handling of images in compressed format, e.g. JPEG, MPEG
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2350/00—Solving problems of bandwidth in display systems
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/12—Frame memory handling
- G09G2360/121—Frame memory handling using a cache memory
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/12—Frame memory handling
- G09G2360/122—Tiling
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/12—Frame memory handling
- G09G2360/123—Frame memory handling using interleaving
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/12—Frame memory handling
- G09G2360/125—Frame memory handling using unified memory architecture [UMA]
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/12—Frame memory handling
- G09G2360/127—Updating a frame memory using a transfer of data from a source area to a destination area
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/12—Frame memory handling
- G09G2360/128—Frame memory using a Synchronous Dynamic RAM [SDRAM]
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/18—Use of a frame buffer in a display terminal, inclusive of the display panel
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- An electronic device such as a computer system, can include one or more memories.
- the electronic device includes a component, such as a central processing unit (CPU) located on a different integrated circuit chip than the memory, that accesses the memory a memory controller. Memory access by the CPU can generate heavy data traffic between the CPU and the memory.
- CPU central processing unit
- the method can include allocating one or more frame buffers in the memory, and 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 method can further include 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.
- the memory can have a sequence of memory blocks separated by memory boundaries at addresses that are multiples of a memory block size and the memory block size is determined based on characteristics of the memory and devices accessing the memory.
- the size of the main portions can be one or multiples of the memory block size and starting addresses of the main portions are aligned to memory boundaries. Further, a size of the main portions can be a fraction of the memory block size and each main portion is located within a respective memory block.
- a size of the secondary portions can be a fraction of the memory block size and secondary portions are grouped into one or more secondary portion groups.
- the one or more secondary portion groups can have a size being one or multiples of the memory block size and the first secondary portion of each secondary portion group has a starting address aligned to a memory boundary.
- a plurality of main portions and secondary portions can be arranged in a predetermined pattern to form a superblock having a size that is one or multiples of the memory block size.
- the main and secondary portions in the frame buffer can be arranged by sequentially positioning a plurality of superblocks adjacent to each other.
- the memory block size can be selected to be 32, 64, 128, 256, 512, 1K, 2K, or 4K bytes.
- the device can include a memory configured to store one or more frame buffers, and a memory distribution device configured to receive the input image, allocate a frame buffer in the memory to store the input image, divide the input image into access units corresponding to subsets of the input image, and allocate 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 device can further include a memory controller configured to store, in response to instructions of the memory distribution device, 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 store a remainder of the compressed access unit into its respective secondary portion.
- a memory controller configured to store, in response to instructions of the memory distribution device, 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 store a remainder of the compressed access unit into its respective secondary portion.
- the memory can have a sequence of memory blocks separated by memory boundaries at addresses that are multiples of a memory block size.
- the memory block size can be determined based on characteristics of the memory and devices accessing the memory including the memory distribution device.
- the memory distribution device can be configured to select a size of the main portions to be one or multiples of the memory block size and align starting addresses of the main portions to memory boundaries. Further, the memory distribution device can be configured to select a size of the main portions to be a fraction of the memory block size and position each main portion within a respective memory block.
- the memory distribution device can be configured to a select a size of the secondary portions to be a fraction of the memory block size and group secondary portions into one or more secondary portion groups.
- the memory distribution device can be configured to select a size of the one or more secondary portion groups to be one or multiples of the memory block size and align the starting address of the first secondary portion of each secondary portion group to a memory boundary.
- the memory distribution device can be configured to arrange a plurality of main portions and secondary portions in a predetermined pattern to form a superblock having a size being one or multiples of the memory block size.
- the superblocks can be positioned adjacent to each other in the frame buffer.
- the memory can be located on a different integrated circuit chip than the memory distribution device. Further, the memory distribution device can be integrated into a video codec. Additionally, the memory distribution device can be configured to select the memory block size to be 32, 64, 128, 256, 512, 1K, 2K, or 4K bytes.
- Alternative aspects of the disclosure can provide a non-transitory computer readable medium having computer readable instructions stored thereon which, when executed by a processing circuit, cause the processing circuit to perform a method.
- the method can include allocating one or more frame buffers in the memory, and 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 method can further includes 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.
- FIG. 1 shows an exemplary block diagram of a memory system 100 according to an embodiment of the disclosure
- FIG. 2 shows exemplary data structures 200 according to an embodiment of the disclosure
- FIG. 3 shows three exemplary superblocks 341 A- 341 C in three frame buffers 331 A- 331 C according to an embodiment of the disclosure
- FIG. 4 shows three exemplary superblocks 441 A- 441 C in three frame buffers 431 A- 431 C according to an embodiment of the disclosure
- FIG. 5 shows two exemplary superblocks 541 A- 541 B in two frame buffers 531 A- 531 B according to an embodiment of the disclosure
- FIG. 6 shows alternative frame buffer examples according to an embodiment of the disclosure.
- FIG. 7 shows a flow chart outlining an exemplary process 700 according to an embodiment of the disclosure.
- FIG. 1 shows an exemplary block diagram of a memory system 100 according to an embodiment of the disclosure.
- the memory system 100 can include a memory distribution device 110 , a memory controller 120 , and a memory 130 .
- the memory 130 can include a frame butler 131 .
- the memory system 100 is configured to divide an input image into one or more access units and to store each compressed access unit into a main portion and la secondary portion allocated in the frame buffer 131 for the respective access unit.
- the memory system 100 can be any suitable system for storing data.
- 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 camera, a camcorder, a media player, and the like.
- the memory system 100 can further include other components accessing the data stored in the memory 130 .
- other components can include a central processing unit (CPU) 141 , a graphics processing unit (GPU) 142 , a multimedia engine 143 , display circuitry 144 , an image processor 145 , a video codec 146 , and the like.
- the memory 130 can have a sequence of memory blocks separated by memory boundaries, for example, at every 32, 64, 128, 256, 512, 1K, 2K, or 4K bytes based on page size or channel division. Accessing a certain amount of data stored within a memory block in between two adjacent boundaries is more efficient than accessing the same amount of data separately stored in two memory blocks across a memory boundary. As a result, data in the memory 130 can be accessed efficiently by another component of the memory system 100 when a starting address of the data is aligned to a memory boundary. Memory boundaries are formed at addresses that are multiples of a memory block size.
- the memory block size can be a certain amount of data that can be rapidly transferred between the memory 130 and the other components of the memory system 100 in a sequence of burst read/write command with single or a few pre-charge and active commands.
- the memory block size can be selected based on characteristics of the memory 130 and other components of the memory system 100 accessing the memory 130 , such as page size and channel division of the memory 130 as well as architecture and operation mode of the memory 130 and other components of the memory system 100 accessing the memory 130 .
- the memory distribution device 110 is configured to receive and divide the input image into one or more access units.
- the memory distribution device 110 is further configured to allocate a portion of the memory 130 , such as the frame buffer 131 , to the input image and allocate to each access unit two memory portions, a main portion and a secondary portion, in the frame buffer 131 .
- a starting address of the frame buffer 131 can be aligned to a memory boundary, such as 0 bytes.
- the memory distribution device 110 is configured to compress each access unit and store each compressed access unit into the respective main portion, and if a size of the compressed access unit exceeds a size of the main portion, then store a remainder part of the compressed access unit into its respective secondary portion.
- the memory distribution device 110 can be integrated into any component accessing data stored in the memory 130 , such as one or more components of the memory system 100 including the CPU 141 , the GPU 142 , the multimedia engine 143 , the display circuitry 144 , the image processor 145 , and the video codec 146 , and the like.
- the main portions can have starting addresses aligned to memory boundaries and sizes that are one or multiples of the memory block size. Accordingly, data stored in the main portions can be efficiently accessed.
- each main portion can be located within the respective memory block while one or more main portions can have starting addresses aligned to one or more memory boundaries.
- the size of the secondary portion can be a fraction of the memory block size. As a result, two or more secondary portions can be grouped together and stored separately from their respective main portions. When a size of a compressed access unit is less than or equal to that of the main portion, the compressed access unit can be completely stored inside the main portion, without using the secondary portion. As a result, accessing the compressed access unit, can be done efficiently because the main portion can be accessed efficiently.
- At least one of the secondary portions is not sequentially located after its respective main portion within the frame buffer, including in a reversed order where the main portion has a larger address than that of its respective secondary portion.
- the memory controller 120 is configured to manage memory access from the memory distribution device 110 to the memory 130 .
- the memory controller 120 can be configured to receive requests from the memory distribution device 110 to store a compressed access unit to the respective main and secondary portion in the frame buffer 131 of the memory 130 . Based on the requests, the memory controller 120 can transmit commands to the memory 130 with instructions to store the compressed access unit to the respective main and secondary portion in the frame buffer 131 .
- the memory controller 120 can also be configured to schedule and buffer the requests and the like.
- the memory 130 can be any suitable device for storing data.
- the memory 130 includes a dynamic random access memory (DRAM) type memory module, such as 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 (LPDDR SDRAM), and the like.
- DRAM dynamic random access memory
- DDR double data rate synchronous DRAM
- DDR2 SDRAM double data rate two synchronous.
- DDR3 SDRAM double data rate three synchronous DRAM
- DDR4 SDRAM double data rate four synchronous DRAM
- LPDDR SDRAM low power DDR SDRAM
- the memory system 100 can be a system-on chip (SOC) where all the components are located on a single integrated circuit (IC) chip. Additionally, the other components such as the CPU 141 , GPU 142 , multimedia engine 143 , display circuitry 144 , image processor 145 , and video coder 146 can also be included on the same single IC chip. Alternatively, the components in the memory system 100 can 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 can be located on multiple IC chips.
- SOC system-on chip
- the memory distribution device 110 can be integrated into any component that accesses data stored in the memory 130 , such as one or more components of the memory system 100 including the CPU 141 , the GPS 142 , the multimedia engine 143 , the display circuitry 144 , the image processor 145 , and the video codec 146 , and the like.
- an input image can be received by the memory distribution device 110 .
- the memory distribution device 110 can divide the input image into one or more access units. Further, the memory distribution device 110 can allocate a portion of the memory 130 , such as the frame buffer 131 , to the input image. Two memory portions, a main portion and a secondary portion, are allocated for each access unit in the frame buffer 131 . Under the instruction of the memory distribution device 110 , the memory controller 120 can store compressed access units into their respective main portions and, depending on size, also their secondary portions.
- the main portions can have starting addresses aligned to memory boundaries and a size that can be one or multiples of the memory block size.
- the size of the secondary portion can be a fraction of the memory block size.
- two or more secondary portions can be grouped together and stored separately from their main portions.
- the compressed access unit can be completely stored in the main portion without using the secondary portion. As a result, accessing the compressed access unit can be done efficiently.
- FIG. 2 shows exemplary data structures 200 according to embodiments of the disclosure illustrating an input image 210 divided into access units, as well as frame buffers 231 A and 231 B.
- the input image 210 can be divided into an N ⁇ M array of access units.
- the size of an access unit depends on the number of pixels in the access unit and the pixel bit-depth.
- the pixel bit-depth is the number of bits used to specify a color of a pixel, such as 10 or 12 bits corresponding to 1024 or 4096 colors, respectively.
- the number of pixels in the access unit can depend on a compression method used by the memory distribution device 110 , such as the size of a compression unit on which the compression method operates.
- the size of the compression unit can be 4 ⁇ 4, 8 ⁇ 8, 16 ⁇ 4, 16 ⁇ 8, 16 ⁇ 16 pixels, and the like.
- An access unit can have one or more compression units.
- the frame buffer 231 A illustrates an exemplary frame buffer structure for storing the input image.
- Frame buffers can be memories having addressable locations for storing data.
- the addressable locations within the memories can be grouped into memory blocks having a memory block size.
- the memory block size can be selected based on characteristics of the memory 130 and other components of the memory system 100 accessing the memory 130 , such as page size and channel division of the memory 130 as well as architecture and operation mode of the memory 130 and other components of the memory system 100 accessing the memory 130 .
- the memory block size can be selected to be 32, 64, 128, 256, 512, 1K, 2K, 4K bytes, or the like.
- the memory 130 can be a DDR3S DRAM device and data is retrieved from the memory 130 .
- the memory block size is the amount of data that can be retrieved from the memory 130 in a single read cycle.
- the memory block size can be 32 bytes when the, data bus width and burst length are 64-bit (8 bytes) and 4, respectively.
- the memory block size can be determined by a size of a CPU 141 or GPU 142 cache line that accesses the memory to be 64, 128 bytes or the like.
- the memory block size is 64 bytes, and thus the memory boundaries 250 ( 1 ) to 250 (n) are at addresses 0, 64, 128, 192 bytes, and etc. in the frame buffers 231 A and 231 B.
- a main portion and a secondary portion can be allocated for each access unit.
- a size of the main portions can depend on the compressibility of the input image, the compression method, the memory block size, and the like.
- the summation of a size of the main portion and a size of the secondary portion can be equal to the size of the access unit.
- a ratio of the size of the main portion over the size of the secondary portion can depend on the compressibility of the input image and the compression method, and the like. For example, when the access units can be compressed to smaller sizes, smaller main portions can be sufficient to store the compressed access units and the respective secondary portions can remain empty, also resulting in a smaller ratio of the size of the main portion over the size of the secondary portion. For example, the ratio of the size of the main portion over the size of the secondary portion can be 2, 4, 8, or the like.
- the main portions can have starting addresses that are aligned to memory boundaries and sizes that are multiples of the memory block size so that the data stored in the main portions can be efficiently accessed.
- the size of the main portions 221 ( 1 )- 221 ( 3 ) can be selected to have a memory block size of 64 bytes and starting addresses of the main portions 221 ( 1 )- 221 ( 3 ) are aligned to the memory boundaries 250 ( 1 )- 250 ( 3 ), respectively.
- a size of the respective secondary portions 241 ( 1 )- 241 ( 3 ) can be selected to be smaller than 64 bytes, for example, 32 bytes.
- the frame buffer 231 B shows an example when compressed access units 261 - 263 having various sizes are stored.
- the compressed access units 261 - 263 can be stored in their respective main 221 ( 1 )- 221 ( 3 ) and secondary portions 241 ( 1 )- 241 ( 3 ).
- the size of the compressed access unit 261 is less than 64-byte memory block size.
- the compressed access unit 261 can be stored, completely within the Main portion 221 ( 1 ), while the secondary portion 241 ( 1 ) remains empty.
- the size of the compressed access unit 262 is equal to 64-byte memory block size.
- the compressed access unit 262 can also be stored completely within the, main portion 221 ( 2 ), while the secondary portion 241 ( 2 ) remains empty.
- the size of the compressed access unit 263 is larger than 64-byte memory block size. As a result, a first part of the compressed access unit 263 can fill the main portion 221 ( 3 ) and a second part or a remainder part of the compressed access unit 263 can be stored in the secondary portion 241 ( 3 ).
- the size of the access unit and the sizes of the main and secondary portion can be selected and remain constant for an input image.
- multiple input images such as sequential frames of a video, can be stored by the memory system 100 .
- the size of the access unit and the sizes of the main and secondary portion can be selected for each individual input image, and thus can dynamically vary from one input image to another.
- the main and secondary portions can be arranged in the frame buffer 131 according to various layouts.
- FIGS. 3-5 show exemplary layouts including repeating patterns of the main and secondary portions in a periodic manner, where, a smallest repeating unit is a superblock.
- the main, and secondary portions in the frame buffer 131 can be arranged by, for example, sequentially positioning superblocks next to each other.
- the size of superblocks can be multiples of the memory block size.
- FIG. 3 shows three exemplary superblocks 341 A- 341 C in three frame buffers 331 A- 331 C according to an embodiment of the disclosure.
- the superblocks 341 A- 341 C share a common feature where all secondary portions in a superblock are collected as a secondary portion group that is located in the middle of the respective superblock.
- the starting addresses of the main portions are aligned to memory boundaries.
- the size of the secondary portion group is one or multiples of the memory block size and the first secondary portion of the secondary portion group is aligned to a memory boundary.
- the size of the access unit is set to 160 bytes
- the memory block size is set to 128 bytes
- the sizes of the main and secondary portion are set to 128 and 32 bytes, respectively.
- the superblock pattern has a secondary portion group having four secondary portions (S 0 -S 3 ) that is sandwiched between a first main portion, group (M 0 -M 1 ) and a second main portion group (M 2 -M 3 ).
- the size of the superblock 341 A is five times the memory block size (i.e., 640 bytes).
- Memory boundaries of the superblock 341 A are located at 0, 128, 256, 384, 512, and 640 bytes, and the starting addresses of all main portions M 0 -M- 3 are aligned to the memory boundaries 0, 128, 384, and 512 bytes, respectively,
- the secondary portion group has, a size of 128 bytes and the first secondary portion S0 is aligned to the memory boundary 256 bytes.
- the size of the access unit is set to 192 bytes
- the memory block size is set to 128 bytes
- the sizes of the main and secondary portion are set to 128 and 64 bytes, respectively.
- the superblock pattern has a secondary portion group having four secondary portions (S 0 -S 3 ) that is sandwiched between a first main portion group (M 0 -M 1 ) and a second main portion group (M 2 -M 3 ).
- the size of the superblock 341 B is six times the memory block size (i.e., 768 bytes).
- Memory boundaries of the superblock 341 B are located at 0, 128, 256, 384, 512, 640, and 768 bytes, and the starting addresses of all main portions M 0 -M 3 are aligned to the memory boundaries 0, 128, 512, and 640 bytes, respectively.
- the secondary portion group has a size of 256 bytes and the first secondary portion S0 is aligned to the memory boundary 256 bytes.
- the size of the access unit is set to 384 bytes
- the memory block size is set to 256 bytes
- the sizes of the main and secondary portion are set to 256 and 128 bytes, respectively.
- the superblock pattern has a secondary portion group having two secondary portions (S 0 -S 1 ) that is sandwiched between a first main portion M 0 and a second main portion M 1 .
- the size of the superblock 341 C is three times the memory block size (i.e., 768 bytes).
- Memory boundaries of the superblock 341 C are located at 0, 256, 512, and 768 bytes, and the starting addresses of the main, portions M 0 -M 1 are aligned to the memory boundaries 0 and 512 bytes, respectively.
- the secondary portion group has a size of 256 bytes and the first secondary portion S 0 is aligned to the memory boundary 256 bytes.
- FIG. 4 shows three exemplary superblocks 441 A- 441 C in three frame buffers 431 A- 431 C according to an embodiment of the disclosure.
- the superblocks 441 A- 441 C share a common feature where all secondary portions are collected as a secondary portion group that follows a main portion group having main portions.
- the starting addresses of the main portions are aligned to memory boundaries.
- the size of the secondary portion group is selected to be one or multiples of the memory block size and the first secondary portion in the secondary portion group being aligned to a memory boundary.
- the size of the access unit is set to 192 bytes
- the memory block size is set to 128 bytes
- the sizes of the main and secondary portion are set to 128 and 64 bytes, respectively.
- the superblock pattern 441 A has a secondary portion group having two secondary portions (S 0 -S 1 ) that follows a main portion group (M 0 -M 1 ),
- the size of the superblock 441 A is three times the memory block size (i.e., 384 bytes).
- Memory boundaries of the superblock 441 A are located at 0, 128, 256, and 384 bytes, and the starting addresses of all main portions M 0 -M 1 are aligned to the memory boundaries 0 and 128 bytes, respectively.
- the secondary portion group has a size of 128 bytes and the first secondary portion S 0 is aligned to the memory boundary 256 bytes.
- the size of the access unit is set to 160 bytes
- the memory block size is set to 128 bytes
- the sizes of the main and secondary portion are set to 128 and 32 bytes, respectively.
- the superblock pattern has a secondary portion group having four secondary portions (S 0 -S 3 ) that follows a main portion group (M 0 -M 3 ).
- the size of the superblock 441 B is five times the memory block size 640 bytes).
- Memory boundaries of the superblock 441 B are located at 0, 128, 256, 384, 512, and 640 bytes, and the starting addresses of all main portions M 0 -M 3 are aligned to the memory boundaries 0, 128, 256, and 384 bytes, respectively.
- the secondary portion group has a size of 128 bytes and the first secondary portion S 0 is aligned to the memory boundary 512 bytes.
- the size of the access unit is set to 320 bytes
- the memory block size is set to 128 bytes
- the sizes of the main and secondary portion are set to be 256 and 64 bytes, respectively.
- the superblock pattern has a secondary portion group having two secondary portions (S 0 -S 1 ) that follows a main portion group (M 0 -M 1 ).
- the size of the superblock 441 C is five times the memory block size (i.e., 640 bytes).
- Memory boundaries of the superblock 441 C are located at 0, 128, 256, 384, 512, and 640 bytes, and the starting addresses of all main portions M 0 -M 1 are aligned to the memory boundaries 0 and 256 bytes, respectively
- the secondary portion group has a size of 128 bytes, and the first secondary portion S 0 is aligned to the memory boundary 512 bytes.
- FIG. 5 shows two exemplary superblocks 541 A- 541 B in two frame buffers 531 A- 531 B according to an embodiment of the disclosure.
- the superblocks 541 A- 541 B share a common feature where the size of the main portion (128 bytes) is smaller than the memory block size (256 bytes).
- some compressed access units may need to be stored in both the main and secondary portions, while some compressed access units can be stored completely in the main portions.
- As many as possible secondary portions corresponding to main portions can be included in the same memory blocks, and preferably immediately follow the respective main portions. For example, the main portions M 0 and M 3 are followed by their respective secondary portions S 0 and S 3 in their respective memory blocks in the superblocks 541 A.
- the size of the access unit is set to 192 bytes
- the memory block size is set to 256 bytes
- the sizes of the main and secondary portion are set to 128 and 64 bytes, respectively.
- the superblock pattern has a secondary portion S 0 following the respective main portion M 0 and a secondary portion S 3 following the respective main portion M 3 .
- the size of the superblock 541 A is three times the memory block size (i.e., 768 bytes).
- Memory boundaries of the superblock 541 A are located at 0, 256, 512, and 768 bytes, and the starting addresses of three main portions M 0 , M 1 , and M 3 are aligned to the memory boundaries 0, 256, and 512 bytes, respectively.
- the starting address of the main portion M 2 is not aligned to a memory boundary, but M 2 is within a single memory block between 256 and 512 bytes.
- the size of the access unit is set to 192 bytes
- the memory block size is set to 256 bytes
- the sizes of the main and secondary portion are set to 128 and 64 bytes, respectively.
- the superblock pattern has a secondary portion S 0 following the respective main portion M 0 , and a secondary portion S 1 following the respective main portion M 1 .
- the size of the superblock 541 B is three times the memory block size (i.e., 768 bytes).
- Memory boundaries of the superblock 541 B are located at 0, 256, 512, and 768 bytes, and the starting addresses of three, main portions M 0 , M 1 , and M 2 are aligned to the memory boundaries 0, 256, and 512 bytes, respectively.
- the starting address of the main portion M 3 is not aligned to a memory boundary, but M 3 is within a single memory block between 512 and 768 bytes.
- FIG. 6 shows alternative frame buffer examples according to embodiments of the disclosure.
- the main and secondary portions the frame buffers 631 A and 631 B can be arranged by having two groups, a main portion group and a secondary portion group, wherein the main portion group includes all the main, portions sequentially positioned next to each other while the secondary portion group includes all the secondary portions sequentially positioned next to each other.
- the size of the main portion is one or multiples of the memory block size
- the starting addresses of the main portions can be aligned to memory boundaries.
- the main portion group can be positioned adjacent to the secondary portion group or can be separated from the secondary portion group.
- the size of the access unit is set to 80 bytes
- the memory block size is set to 64 bytes
- the sizes of the main and secondary portion are set to 64 and 16 bytes, respectively.
- the main portion group includes all the main portions. As shown, the main portions can be positioned next to each other and have starting addresses aligned to consecutive memory boundaries at 0, 64, 128, 192, 256 bytes and etc.
- The, secondary portion group includes all the secondary portions.
- the first secondary portion S 0 can have a starting address aligned to a memory boundary such as 512 bytes.
- the size of the access unit is set to 160 bytes
- the memory block size is set to 128 bytes
- the sizes of the main and secondary portion are set to 128 and 32 bytes, respectively.
- the main portion group includes all the main portions. As shown, the main portions can, be positioned next to each other and have starting addresses aligned to consecutive memory boundaries at 0, 128, 256, 384, 512 bytes and etc.
- the secondary portion group includes all the secondary portions.
- the first secondary portion S 0 can have a starting address aligned to a memory boundary such as 4096 bytes.
- At least one of the secondary portions is not sequentially located after its respective main portion.
- starting addresses of superblocks and frame buffers can be aligned to memory boundaries of the memory 130 , such as 0 bytes shown in FIGS. 3-6 .
- compressed access units can be stored in the respective main portions, For example, a compressed access unit can be stored in the respective main portion and, if necessary, respective secondary portion. When the size of the compressed access unit is equal to or smaller than that of the respective main portion, the compressed access unit can be completely stored inside the respective main portion and the corresponding secondary portion can remain empty.
- FIG. 7 shows a flow chart outlining an exemplary process 700 according to an embodiment of the disclosure.
- the process 700 is executed by the memory system 100 in FIG. 1 , The process starts at S 701 and proceeds to S 710 .
- an input image is divided into one or more access units, such as an N ⁇ M array of access units as shown in FIG. 2 .
- the memory distribution device 110 is configured to divide the input image into an array of access units.
- the input image can be a video frame, a. photographic picture, a graphic art, an animated picture, and the like.
- a video frame can be a reference frame used by a video codec 146 .
- the process then proceeds to S 720 .
- a frame buffer is allocated in a memory.
- the memory distribution device 110 is configured to allocate the frame buffer 131 in the memory 130 .
- the size of the frame buffer is equal to or larger than a size of the input image.
- the starting address of the frame buffer can be aligned to a memory boundary, such as 0 bytes.
- two memory portions are allocated for each access unit in the frame buffer.
- the memory distribution device is configured to allocate a main portion and a secondary portion for each access unit in the frame buffer 131 .
- the summation of a size of the main portion and a size of the secondary portion can be equal to a size of the access unit and, for example, it can be a size of an uncompressed access unit.
- the size of the main portion can depend on the compressibility of the input image, the compression method, the memory block size, and the like.
- a ratio of the size of the main portion over the size of the secondary portion can depend on the compressibility of the input image, the compression method, and the like. For example, when the access units can be compressed to smaller sizes, smaller main portions can be sufficient to store the compressed access units and the respective secondary portions can remain empty, resulting in a smaller ratio of the size of the main portion over the size of the secondary portion.
- the main portions can have starting addresses that are aligned to memory boundaries and sizes that are one or multiples of the memory block size so that the data stored in the main portions can be efficiently accessed.
- each main portion can be located within the respective memory block while one or more main portions can have starting addresses aligned to one or more memory boundaries.
- the size of the secondary portion can be a fraction of the memory block size.
- two or more secondary portions can be grouped together as one or more secondary portion groups and stored separately from their respective main portions.
- the first secondary portion in each respective secondary portion group can have starting address aligned to a memory boundary.
- At least one of the secondary portions is not sequentially located after its respective main portion within the frame buffer.
- the main and secondary portions can be arranged in the frame buffer, such as the frame buffer 131 , according to various layouts.
- the layouts can include repeating patterns of superblocks where a superblock is a smallest repeating unit in the frame buffer.
- the main and secondary portions in the frame buffer can be arranged by, for example, sequentially positioning superblocks next to each other.
- the size of superblocks can be set to multiples of the memory block size.
- the starting addresses of the main portions in the superblock are aligned to memory boundaries.
- the secondary portions in the superblock can be grouped into one or more secondary portion groups having a size being multiples of the memory block size.
- the first secondary portion in each secondary portion group can be aligned to a memory boundary.
- a superblock can have one or more main portions having a size smaller than the memory block size.
- Some exemplary superblocks are shown by FIG. 5 .
- as many as possible secondary portions immediately follow the respective main portions (such as S 0 follows M 0 and S 3 follows M 3 in 541 A of FIG. 5 ).
- each main portion can be located completely within the same memory block.
- a layout does not include repeating patterns of superblocks.
- the main and secondary portions in the frame buffers can be arranged by having a main portion group and a secondary portion group, such as the examples shown by FIG. 6 .
- the main portion group includes the main portions having starting addresses aligned to consecutive memory boundaries.
- the secondary portion group includes the secondary portions positioned next to each other. The first secondary portion of the secondary portion group can be aligned to a memory boundary.
- an access unit can be compressed into a compressed access unit to reduce the bandwidth requirement of data transfer between the memory and another device accessing the memory.
- the memory 130 can be located on a different chip than the memory distribution device 110
- the memory distribution device 110 is configured to compress the access units to reduce the large bandwidth requirement of data transfer between the memory 130 and the memory distribution device 110 .
- Both lossless and lossy compression methods can be used to compress the access units. Lossless compression methods can preserve the quality of the initial data while lossy compression methods can achieve more compression.
- the compression methods can be generic compression methods, or image compression methods, or video compression methods, or the like.
- compression methods can include run-length encoding, dictionary based algorithm, Hoffman coding, deflation, chroma subsampling, discrete cosine transform, or the like.
- the size of the compressed access unit can be compared with the size of the main portion.
- the memory distribution device 110 is configured to compare the sizes of the compressed access unit and the main portion. If the size of the compressed access unit is larger than the size of the main portion, the process then proceeds to S 770 . Otherwise, the process then proceeds to S 760 .
- the compressed access unit can be stored completely in the respective main portion because the size of the compressed access unit is less than or equal to the size of the main portion.
- the memory controller 120 is configured to store, in response to instructions of the memory distribution device 110 , the compressed access unit into its respective main portion.
- a first part of the compressed access unit can be stored in the respective main portion.
- the first part of the compressed access unit can have the same size as the main portion and fill the respective main portion.
- the memory controller 120 is configured to store, in response to instructions of the memory distribution device 110 , the first part of the compressed access unit into its respective main portion.
- a second part, or the remainder part, of the compressed access unit can be stored in the respective secondary portion. Therefore, the compressed access unit can be stored separately in the respective main and secondary portion when the size of the compressed access unit is larger than the size of the main portion.
- the memory controller 120 is configured to store, in response to instructions of the memory distribution device 110 , the remainder part of the compressed access unit into its respective secondary portion.
- S 740 -S 780 can be repeatedly performed on all the access units before the process proceeds to S 799 , where the process terminates.
- the memory distribution device 110 and the memory controller 120 are configured to perform S 740 -S 780 repeatedly for all the access units in the input image.
- the size of the access unit and the sizes of the main and secondary portion can be selected and remain constant for an input image.
- multiple input images such as sequential frames of a video, can be stored by a memory.
- the size of the access unit and the sizes of the main and secondary portion can be selected for each individual input image, and thus can dynamically vary from one input image to another.
- the memory distribution device 110 or functions of the memory distribution device 110 can be implemented with hardware, software, or combination thereof.
- the memory distribution device 110 is implemented in hardware, such as a processing circuit, the hardware may comprise one or more of discrete components, an integrated circuit, an application-specific integrated circuit (ASIC), and the like.
- functions of memory distribution can be implemented with software or firmware including instructions stored in a computer-readable non-volatile storage medium. The instructions, when executed by a processing circuit, causing the processing circuit to perform the respective functions.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Microelectronics & Electronic Packaging (AREA)
- General Engineering & Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
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
- This present disclosure claims the benefit of U.S. Provisional Application No. 62/409,416, “UFO Format” filed on Oct. 18, 2016, and U.S. Provisional Application No. 62/489,588, “Memory Access Efficiency Optimization for Frame Buffer Compression” filed on Apr. 25, 2017, which are incorporated herein by reference in their entirety.
- The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent the work is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
- An electronic device, such as a computer system, can include one or more memories. In an example, the electronic device includes a component, such as a central processing unit (CPU) located on a different integrated circuit chip than the memory, that accesses the memory a memory controller. Memory access by the CPU can generate heavy data traffic between the CPU and the memory.
- Aspects of the disclosure provide a method for storing an input image into a memory. The method can include allocating one or more frame buffers in the memory, and 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 method can further include 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.
- In embodiments, the memory can have a sequence of memory blocks separated by memory boundaries at addresses that are multiples of a memory block size and the memory block size is determined based on characteristics of the memory and devices accessing the memory. The size of the main portions can be one or multiples of the memory block size and starting addresses of the main portions are aligned to memory boundaries. Further, a size of the main portions can be a fraction of the memory block size and each main portion is located within a respective memory block. A size of the secondary portions can be a fraction of the memory block size and secondary portions are grouped into one or more secondary portion groups. The one or more secondary portion groups can have a size being one or multiples of the memory block size and the first secondary portion of each secondary portion group has a starting address aligned to a memory boundary.
- In embodiments, a plurality of main portions and secondary portions can be arranged in a predetermined pattern to form a superblock having a size that is one or multiples of the memory block size. The main and secondary portions in the frame buffer can be arranged by sequentially positioning a plurality of superblocks adjacent to each other.
- In embodiments of the disclosure, the memory block size can be selected to be 32, 64, 128, 256, 512, 1K, 2K, or 4K bytes.
- Aspects of the disclosure can also provide a device for storing an input image. The device can include a memory configured to store one or more frame buffers, and a memory distribution device configured to receive the input image, allocate a frame buffer in the memory to store the input image, divide the input image into access units corresponding to subsets of the input image, and allocate 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 device can further include a memory controller configured to store, in response to instructions of the memory distribution device, 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 store a remainder of the compressed access unit into its respective secondary portion.
- In exemplary embodiments, the memory can have a sequence of memory blocks separated by memory boundaries at addresses that are multiples of a memory block size. The memory block size can be determined based on characteristics of the memory and devices accessing the memory including the memory distribution device. The memory distribution device can be configured to select a size of the main portions to be one or multiples of the memory block size and align starting addresses of the main portions to memory boundaries. Further, the memory distribution device can be configured to select a size of the main portions to be a fraction of the memory block size and position each main portion within a respective memory block. The memory distribution device can be configured to a select a size of the secondary portions to be a fraction of the memory block size and group secondary portions into one or more secondary portion groups. The memory distribution device can be configured to select a size of the one or more secondary portion groups to be one or multiples of the memory block size and align the starting address of the first secondary portion of each secondary portion group to a memory boundary.
- In alternative embodiments, the memory distribution device can be configured to arrange a plurality of main portions and secondary portions in a predetermined pattern to form a superblock having a size being one or multiples of the memory block size. The superblocks can be positioned adjacent to each other in the frame buffer.
- In embodiments, the memory can be located on a different integrated circuit chip than the memory distribution device. Further, the memory distribution device can be integrated into a video codec. Additionally, the memory distribution device can be configured to select the memory block size to be 32, 64, 128, 256, 512, 1K, 2K, or 4K bytes.
- Alternative aspects of the disclosure can provide a non-transitory computer readable medium having computer readable instructions stored thereon which, when executed by a processing circuit, cause the processing circuit to perform a method. The method can include allocating one or more frame buffers in the memory, and 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 method can further includes 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.
- Various embodiments of this disclosure that are proposed as examples will be described in detail with reference to the following figures, wherein like numerals reference like elements, and wherein:
-
FIG. 1 shows an exemplary block diagram of amemory system 100 according to an embodiment of the disclosure; -
FIG. 2 showsexemplary data structures 200 according to an embodiment of the disclosure; -
FIG. 3 shows threeexemplary superblocks 341A-341C in threeframe buffers 331A-331C according to an embodiment of the disclosure; -
FIG. 4 shows threeexemplary superblocks 441A-441C in threeframe buffers 431A-431C according to an embodiment of the disclosure; -
FIG. 5 shows twoexemplary superblocks 541A-541B in twoframe buffers 531A-531B according to an embodiment of the disclosure; -
FIG. 6 shows alternative frame buffer examples according to an embodiment of the disclosure; and -
FIG. 7 shows a flow chart outlining anexemplary process 700 according to an embodiment of the disclosure. -
FIG. 1 shows an exemplary block diagram of amemory system 100 according to an embodiment of the disclosure. As shown, thememory system 100 can include amemory distribution device 110, amemory controller 120, and amemory 130. Thememory 130 can include aframe butler 131. Thememory system 100 is configured to divide an input image into one or more access units and to store each compressed access unit into a main portion and la secondary portion allocated in theframe buffer 131 for the respective access unit. - The
memory system 100 can be any suitable system for storing data. In an embodiment, thememory system 100 is an electronic device, such as a desktop computer, a tablet computer, a smart phone, a wearable device, a smart TV, a camera, a camcorder, a media player, and the like. In an exemplary embodiment, thememory system 100 can further include other components accessing the data stored in thememory 130. For example, other components can include a central processing unit (CPU) 141, a graphics processing unit (GPU) 142, amultimedia engine 143,display circuitry 144, animage processor 145, avideo codec 146, and the like. - In an embodiment, the
memory 130 can have a sequence of memory blocks separated by memory boundaries, for example, at every 32, 64, 128, 256, 512, 1K, 2K, or 4K bytes based on page size or channel division. Accessing a certain amount of data stored within a memory block in between two adjacent boundaries is more efficient than accessing the same amount of data separately stored in two memory blocks across a memory boundary. As a result, data in thememory 130 can be accessed efficiently by another component of thememory system 100 when a starting address of the data is aligned to a memory boundary. Memory boundaries are formed at addresses that are multiples of a memory block size. In one embodiment, the memory block size can be a certain amount of data that can be rapidly transferred between thememory 130 and the other components of thememory system 100 in a sequence of burst read/write command with single or a few pre-charge and active commands. The memory block size can be selected based on characteristics of thememory 130 and other components of thememory system 100 accessing thememory 130, such as page size and channel division of thememory 130 as well as architecture and operation mode of thememory 130 and other components of thememory system 100 accessing thememory 130. - The
memory distribution device 110 is configured to receive and divide the input image into one or more access units. Thememory distribution device 110 is further configured to allocate a portion of thememory 130, such as theframe buffer 131, to the input image and allocate to each access unit two memory portions, a main portion and a secondary portion, in theframe buffer 131. In an example, a starting address of theframe buffer 131 can be aligned to a memory boundary, such as 0 bytes. Thememory distribution device 110 is configured to compress each access unit and store each compressed access unit into the respective main portion, and if a size of the compressed access unit exceeds a size of the main portion, then store a remainder part of the compressed access unit into its respective secondary portion. In an embodiment, thememory distribution device 110 can be integrated into any component accessing data stored in thememory 130, such as one or more components of thememory system 100 including theCPU 141, theGPU 142, themultimedia engine 143, thedisplay circuitry 144, theimage processor 145, and thevideo codec 146, and the like. - In an embodiment, the main portions can have starting addresses aligned to memory boundaries and sizes that are one or multiples of the memory block size. Accordingly, data stored in the main portions can be efficiently accessed. Alternatively, when the size of the main portion is smaller than the memory block size, each main portion can be located within the respective memory block while one or more main portions can have starting addresses aligned to one or more memory boundaries.
- The size of the secondary portion can be a fraction of the memory block size. As a result, two or more secondary portions can be grouped together and stored separately from their respective main portions. When a size of a compressed access unit is less than or equal to that of the main portion, the compressed access unit can be completely stored inside the main portion, without using the secondary portion. As a result, accessing the compressed access unit, can be done efficiently because the main portion can be accessed efficiently.
- In another embodiment, at least one of the secondary portions is not sequentially located after its respective main portion within the frame buffer, including in a reversed order where the main portion has a larger address than that of its respective secondary portion.
- The
memory controller 120 is configured to manage memory access from thememory distribution device 110 to thememory 130. Thememory controller 120 can be configured to receive requests from thememory distribution device 110 to store a compressed access unit to the respective main and secondary portion in theframe buffer 131 of thememory 130. Based on the requests, thememory controller 120 can transmit commands to thememory 130 with instructions to store the compressed access unit to the respective main and secondary portion in theframe buffer 131. Thememory controller 120 can also be configured to schedule and buffer the requests and the like. - The
memory 130 can be any suitable device for storing data. in an embodiment, thememory 130 includes a dynamic random access memory (DRAM) type memory module, such as 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 (LPDDR SDRAM), and the like. - In an embodiment, the
memory system 100 can be a system-on chip (SOC) where all the components are located on a single integrated circuit (IC) chip. Additionally, the other components such as theCPU 141,GPU 142,multimedia engine 143,display circuitry 144,image processor 145, andvideo coder 146 can also be included on the same single IC chip. Alternatively, the components in thememory system 100 can be distributed across several ICs. For example, thememory distribution device 110, thememory controller 120, thememory 130, and other components of thememory system 100 can be located on multiple IC chips. Further, thememory distribution device 110 can be integrated into any component that accesses data stored in thememory 130, such as one or more components of thememory system 100 including theCPU 141, theGPS 142, themultimedia engine 143, thedisplay circuitry 144, theimage processor 145, and thevideo codec 146, and the like. - During operation, an input image can be received by the
memory distribution device 110. Thememory distribution device 110 can divide the input image into one or more access units. Further, thememory distribution device 110 can allocate a portion of thememory 130, such as theframe buffer 131, to the input image. Two memory portions, a main portion and a secondary portion, are allocated for each access unit in theframe buffer 131. Under the instruction of thememory distribution device 110, thememory controller 120 can store compressed access units into their respective main portions and, depending on size, also their secondary portions. The main portions can have starting addresses aligned to memory boundaries and a size that can be one or multiples of the memory block size. The size of the secondary portion can be a fraction of the memory block size. As a result, two or more secondary portions can be grouped together and stored separately from their main portions. When the size of the compressed access unit is less than or equal to that of the main portion, the compressed access unit can be completely stored in the main portion without using the secondary portion. As a result, accessing the compressed access unit can be done efficiently. -
FIG. 2 showsexemplary data structures 200 according to embodiments of the disclosure illustrating aninput image 210 divided into access units, as well asframe buffers 231A and 231B. As shown, theinput image 210 can be divided into an N×M array of access units. Within the array, the size of an access unit depends on the number of pixels in the access unit and the pixel bit-depth. The pixel bit-depth is the number of bits used to specify a color of a pixel, such as 10 or 12 bits corresponding to 1024 or 4096 colors, respectively. In an example, the number of pixels in the access unit can depend on a compression method used by thememory distribution device 110, such as the size of a compression unit on which the compression method operates. For example, the size of the compression unit can be 4×4, 8×8, 16×4, 16×8, 16×16 pixels, and the like. An access unit can have one or more compression units. - The
frame buffer 231A illustrates an exemplary frame buffer structure for storing the input image. Frame buffers can be memories having addressable locations for storing data. The addressable locations within the memories can be grouped into memory blocks having a memory block size. As discussed above, the memory block size can be selected based on characteristics of thememory 130 and other components of thememory system 100 accessing thememory 130, such as page size and channel division of thememory 130 as well as architecture and operation mode of thememory 130 and other components of thememory system 100 accessing thememory 130. In an example, the memory block size can be selected to be 32, 64, 128, 256, 512, 1K, 2K, 4K bytes, or the like. For example, thememory 130 can be a DDR3S DRAM device and data is retrieved from thememory 130. The memory block size is the amount of data that can be retrieved from thememory 130 in a single read cycle. In particular, the memory block size can be 32 bytes when the, data bus width and burst length are 64-bit (8 bytes) and 4, respectively. In another example, the memory block size can be determined by a size of aCPU 141 orGPU 142 cache line that accesses the memory to be 64, 128 bytes or the like. In theFIG. 2 example, the memory block size is 64 bytes, and thus the memory boundaries 250(1) to 250(n) are at 0, 64, 128, 192 bytes, and etc. in theaddresses frame buffers 231A and 231B. - A main portion and a secondary portion can be allocated for each access unit. In an embodiment, a size of the main portions can depend on the compressibility of the input image, the compression method, the memory block size, and the like. In addition, in an embodiment, the summation of a size of the main portion and a size of the secondary portion can be equal to the size of the access unit. Similarly, a ratio of the size of the main portion over the size of the secondary portion can depend on the compressibility of the input image and the compression method, and the like. For example, when the access units can be compressed to smaller sizes, smaller main portions can be sufficient to store the compressed access units and the respective secondary portions can remain empty, also resulting in a smaller ratio of the size of the main portion over the size of the secondary portion. For example, the ratio of the size of the main portion over the size of the secondary portion can be 2, 4, 8, or the like.
- Further, the main portions can have starting addresses that are aligned to memory boundaries and sizes that are multiples of the memory block size so that the data stored in the main portions can be efficiently accessed. In the example shown in
FIG. 2 , the size of the main portions 221(1)-221(3) can be selected to have a memory block size of 64 bytes and starting addresses of the main portions 221(1)-221(3) are aligned to the memory boundaries 250(1)-250(3), respectively. A size of the respective secondary portions 241(1)-241(3) can be selected to be smaller than 64 bytes, for example, 32 bytes. - The frame buffer 231B shows an example when compressed access units 261-263 having various sizes are stored. The compressed access units 261-263 can be stored in their respective main 221(1)-221(3) and secondary portions 241(1)-241(3). In the
FIG. 2 example, the size of thecompressed access unit 261 is less than 64-byte memory block size. As a result, thecompressed access unit 261 can be stored, completely within the Main portion 221(1), while the secondary portion 241(1) remains empty. The size of thecompressed access unit 262 is equal to 64-byte memory block size. As a result, thecompressed access unit 262 can also be stored completely within the, main portion 221(2), while the secondary portion 241(2) remains empty. However, the size of thecompressed access unit 263 is larger than 64-byte memory block size. As a result, a first part of thecompressed access unit 263 can fill the main portion 221(3) and a second part or a remainder part of thecompressed access unit 263 can be stored in the secondary portion 241(3). - In various embodiments, the size of the access unit and the sizes of the main and secondary portion can be selected and remain constant for an input image. On the other hand, multiple input images, such as sequential frames of a video, can be stored by the
memory system 100. The size of the access unit and the sizes of the main and secondary portion can be selected for each individual input image, and thus can dynamically vary from one input image to another. - The main and secondary portions can be arranged in the
frame buffer 131 according to various layouts.FIGS. 3-5 show exemplary layouts including repeating patterns of the main and secondary portions in a periodic manner, where, a smallest repeating unit is a superblock. Accordingly, the main, and secondary portions in theframe buffer 131 can be arranged by, for example, sequentially positioning superblocks next to each other. In an embodiment, the size of superblocks can be multiples of the memory block size. -
FIG. 3 shows threeexemplary superblocks 341A-341C in threeframe buffers 331A-331C according to an embodiment of the disclosure. Thesuperblocks 341A-341C share a common feature where all secondary portions in a superblock are collected as a secondary portion group that is located in the middle of the respective superblock. The starting addresses of the main portions are aligned to memory boundaries. The size of the secondary portion group is one or multiples of the memory block size and the first secondary portion of the secondary portion group is aligned to a memory boundary. - Referring to the
superblock 341A, the size of the access unit is set to 160 bytes, the memory block size is set to 128 bytes, and the sizes of the main and secondary portion are set to 128 and 32 bytes, respectively. As shown, the superblock pattern has a secondary portion group having four secondary portions (S0-S3) that is sandwiched between a first main portion, group (M0-M1) and a second main portion group (M2-M3). The size of thesuperblock 341A is five times the memory block size (i.e., 640 bytes). Memory boundaries of thesuperblock 341A are located at 0, 128, 256, 384, 512, and 640 bytes, and the starting addresses of all main portions M0-M-3 are aligned to the 0, 128, 384, and 512 bytes, respectively, The secondary portion group has, a size of 128 bytes and the first secondary portion S0 is aligned to thememory boundaries memory boundary 256 bytes. - Referring to the superblock 341B, the size of the access unit is set to 192 bytes, the memory block size is set to 128 bytes, and the sizes of the main and secondary portion are set to 128 and 64 bytes, respectively. As shown, the superblock pattern has a secondary portion group having four secondary portions (S0-S3) that is sandwiched between a first main portion group (M0-M1) and a second main portion group (M2-M3). The size of the superblock 341B is six times the memory block size (i.e., 768 bytes). Memory boundaries of the superblock 341B are located at 0, 128, 256, 384, 512, 640, and 768 bytes, and the starting addresses of all main portions M0-M3 are aligned to the
0, 128, 512, and 640 bytes, respectively. The secondary portion group has a size of 256 bytes and the first secondary portion S0 is aligned to thememory boundaries memory boundary 256 bytes. - Referring to the
superblock 341C, the size of the access unit is set to 384 bytes, the memory block size is set to 256 bytes, and the sizes of the main and secondary portion are set to 256 and 128 bytes, respectively. As shown, the superblock pattern has a secondary portion group having two secondary portions (S0-S1) that is sandwiched between a first main portion M0 and a second main portion M1. The size of thesuperblock 341C is three times the memory block size (i.e., 768 bytes). Memory boundaries of the superblock 341C are located at 0, 256, 512, and 768 bytes, and the starting addresses of the main, portions M0-M1 are aligned to thememory boundaries 0 and 512 bytes, respectively. The secondary portion group has a size of 256 bytes and the first secondary portion S0 is aligned to thememory boundary 256 bytes. -
FIG. 4 shows threeexemplary superblocks 441A-441C in threeframe buffers 431A-431C according to an embodiment of the disclosure. Thesuperblocks 441A-441C share a common feature where all secondary portions are collected as a secondary portion group that follows a main portion group having main portions. The starting addresses of the main portions are aligned to memory boundaries. The size of the secondary portion group is selected to be one or multiples of the memory block size and the first secondary portion in the secondary portion group being aligned to a memory boundary. - Referring to the
superblock 441A, the size of the access unit is set to 192 bytes, the memory block size is set to 128 bytes, and the sizes of the main and secondary portion are set to 128 and 64 bytes, respectively. As shown, thesuperblock pattern 441A has a secondary portion group having two secondary portions (S0-S1) that follows a main portion group (M0-M1), The size of thesuperblock 441A is three times the memory block size (i.e., 384 bytes). Memory boundaries of thesuperblock 441A are located at 0, 128, 256, and 384 bytes, and the starting addresses of all main portions M0-M1 are aligned to thememory boundaries 0 and 128 bytes, respectively. The secondary portion group has a size of 128 bytes and the first secondary portion S0 is aligned to thememory boundary 256 bytes. - Referring to the
superblock 441B, the size of the access unit is set to 160 bytes, the memory block size is set to 128 bytes, and the sizes of the main and secondary portion are set to 128 and 32 bytes, respectively. As shown, the superblock pattern has a secondary portion group having four secondary portions (S0-S3) that follows a main portion group (M0-M3). The size of thesuperblock 441B is five times thememory block size 640 bytes). Memory boundaries of the superblock 441B are located at 0, 128, 256, 384, 512, and 640 bytes, and the starting addresses of all main portions M0-M3 are aligned to the 0, 128, 256, and 384 bytes, respectively. The secondary portion group has a size of 128 bytes and the first secondary portion S0 is aligned to thememory boundaries memory boundary 512 bytes. - Referring to the superblock 441C, the size of the access unit is set to 320 bytes, the memory block size is set to 128 bytes, and the sizes of the main and secondary portion are set to be 256 and 64 bytes, respectively. As shown, the superblock pattern has a secondary portion group having two secondary portions (S0-S1) that follows a main portion group (M0-M1). The size of the superblock 441C is five times the memory block size (i.e., 640 bytes). Memory boundaries of the superblock 441C are located at 0, 128, 256, 384, 512, and 640 bytes, and the starting addresses of all main portions M0-M1 are aligned to the
memory boundaries 0 and 256 bytes, respectively The secondary portion group has a size of 128 bytes, and the first secondary portion S0 is aligned to thememory boundary 512 bytes. -
FIG. 5 shows twoexemplary superblocks 541A-541B in twoframe buffers 531A-531B according to an embodiment of the disclosure. Thesuperblocks 541A-541B share a common feature where the size of the main portion (128 bytes) is smaller than the memory block size (256 bytes). In addition, some compressed access units may need to be stored in both the main and secondary portions, while some compressed access units can be stored completely in the main portions. To allow for efficient access to the compressed access units stored in the main and secondary portions, as many as possible secondary portions corresponding to main portions can be included in the same memory blocks, and preferably immediately follow the respective main portions. For example, the main portions M0 and M3 are followed by their respective secondary portions S0 and S3 in their respective memory blocks in thesuperblocks 541A. - Referring to the
superblock 541A, the size of the access unit is set to 192 bytes, the memory block size is set to 256 bytes, and the sizes of the main and secondary portion are set to 128 and 64 bytes, respectively. As shown, the superblock pattern has a secondary portion S0 following the respective main portion M0 and a secondary portion S3 following the respective main portion M3. The size of thesuperblock 541A is three times the memory block size (i.e., 768 bytes). Memory boundaries of thesuperblock 541A are located at 0, 256, 512, and 768 bytes, and the starting addresses of three main portions M0, M1, and M3 are aligned to the 0, 256, and 512 bytes, respectively. The starting address of the main portion M2 is not aligned to a memory boundary, but M2 is within a single memory block between 256 and 512 bytes.memory boundaries - Referring to the superblock 541B, the size of the access unit is set to 192 bytes, the memory block size is set to 256 bytes, and the sizes of the main and secondary portion are set to 128 and 64 bytes, respectively. As shown, the superblock pattern has a secondary portion S0 following the respective main portion M0, and a secondary portion S1 following the respective main portion M1. The size of the superblock 541B is three times the memory block size (i.e., 768 bytes). Memory boundaries of the superblock 541B are located at 0, 256, 512, and 768 bytes, and the starting addresses of three, main portions M0, M1, and M2 are aligned to the
0, 256, and 512 bytes, respectively. The starting address of the main portion M3 is not aligned to a memory boundary, but M3 is within a single memory block between 512 and 768 bytes.memory boundaries -
FIG. 6 shows alternative frame buffer examples according to embodiments of the disclosure. The main and secondary portions theframe buffers 631A and 631B can be arranged by having two groups, a main portion group and a secondary portion group, wherein the main portion group includes all the main, portions sequentially positioned next to each other while the secondary portion group includes all the secondary portions sequentially positioned next to each other. In an embodiment, the size of the main portion is one or multiples of the memory block size, the starting addresses of the main portions can be aligned to memory boundaries. The main portion group can be positioned adjacent to the secondary portion group or can be separated from the secondary portion group. - Referring to the
frame buffer 631A, the size of the access unit is set to 80 bytes, the memory block size is set to 64 bytes, and the sizes of the main and secondary portion are set to 64 and 16 bytes, respectively. The main portion group includes all the main portions. As shown, the main portions can be positioned next to each other and have starting addresses aligned to consecutive memory boundaries at 0, 64, 128, 192, 256 bytes and etc. The, secondary portion group includes all the secondary portions. The first secondary portion S0 can have a starting address aligned to a memory boundary such as 512 bytes. - Referring to the frame buffer 631B, the size of the access unit is set to 160 bytes, the memory block size is set to 128 bytes, and the sizes of the main and secondary portion are set to 128 and 32 bytes, respectively. The main portion group includes all the main portions. As shown, the main portions can, be positioned next to each other and have starting addresses aligned to consecutive memory boundaries at 0, 128, 256, 384, 512 bytes and etc. The secondary portion group includes all the secondary portions. The first secondary portion S0 can have a starting address aligned to a memory boundary such as 4096 bytes.
- In the superblocks and frame buffers shown in
FIGS. 3-6 , at least one of the secondary portions is not sequentially located after its respective main portion. - In an embodiment, starting addresses of superblocks and frame buffers can be aligned to memory boundaries of the
memory 130, such as 0 bytes shown inFIGS. 3-6 . - While exemplary superblocks and frame buffers are shown in
FIGS. 3-6 , it should be understood that variations, such as variations of superblock patterns, the positioning of superblocks in frame buffers, and the like, are possible in order to satisfy different memory usage situations. - During operation, when the main and secondary portions are positioned in the
frame buffer 131 according to a layout, such as those shown inFIGS. 3 to 6 , compressed access units can be stored in the respective main portions, For example, a compressed access unit can be stored in the respective main portion and, if necessary, respective secondary portion. When the size of the compressed access unit is equal to or smaller than that of the respective main portion, the compressed access unit can be completely stored inside the respective main portion and the corresponding secondary portion can remain empty. -
FIG. 7 shows a flow chart outlining anexemplary process 700 according to an embodiment of the disclosure. In an example, theprocess 700 is executed by thememory system 100 inFIG. 1 , The process starts at S701 and proceeds to S710. - At S710, an input image is divided into one or more access units, such as an N×M array of access units as shown in
FIG. 2 . In an example, thememory distribution device 110 is configured to divide the input image into an array of access units. The input image can be a video frame, a. photographic picture, a graphic art, an animated picture, and the like. For example, a video frame can be a reference frame used by avideo codec 146. The process then proceeds to S720. - At S720, a frame buffer is allocated in a memory. In an example, the
memory distribution device 110 is configured to allocate theframe buffer 131 in thememory 130. The size of the frame buffer is equal to or larger than a size of the input image. In one embodiment, the starting address of the frame buffer can be aligned to a memory boundary, such as 0 bytes. - At S730, two memory portions, a main portion and a secondary portion, are allocated for each access unit in the frame buffer. In an example, the memory distribution device is configured to allocate a main portion and a secondary portion for each access unit in the
frame buffer 131. In an embodiment, the summation of a size of the main portion and a size of the secondary portion can be equal to a size of the access unit and, for example, it can be a size of an uncompressed access unit. In an embodiment, the size of the main portion can depend on the compressibility of the input image, the compression method, the memory block size, and the like. In addition, in an embodiment, a ratio of the size of the main portion over the size of the secondary portion can depend on the compressibility of the input image, the compression method, and the like. For example, when the access units can be compressed to smaller sizes, smaller main portions can be sufficient to store the compressed access units and the respective secondary portions can remain empty, resulting in a smaller ratio of the size of the main portion over the size of the secondary portion. - Further, in an embodiment, the main portions can have starting addresses that are aligned to memory boundaries and sizes that are one or multiples of the memory block size so that the data stored in the main portions can be efficiently accessed.
- Alternatively, when the size of the main portion is smaller than the memory block size, each main portion can be located within the respective memory block while one or more main portions can have starting addresses aligned to one or more memory boundaries.
- In an embodiment, the size of the secondary portion can be a fraction of the memory block size. As a result, two or more secondary portions can be grouped together as one or more secondary portion groups and stored separately from their respective main portions.
- Further, in an embodiment, the first secondary portion in each respective secondary portion group can have starting address aligned to a memory boundary.
- In another embodiment, at least one of the secondary portions is not sequentially located after its respective main portion within the frame buffer.
- The main and secondary portions can be arranged in the frame buffer, such as the
frame buffer 131, according to various layouts. In one embodiment, the layouts can include repeating patterns of superblocks where a superblock is a smallest repeating unit in the frame buffer. Accordingly, the main and secondary portions in the frame buffer cart be arranged by, for example, sequentially positioning superblocks next to each other. The size of superblocks can be set to multiples of the memory block size. - In an embodiment, the starting addresses of the main portions in the superblock are aligned to memory boundaries. The secondary portions in the superblock can be grouped into one or more secondary portion groups having a size being multiples of the memory block size. The first secondary portion in each secondary portion group can be aligned to a memory boundary. Some exemplary superblocks having the above features are shown in
FIGS. 3 and 4 . - In another embodiment, a superblock can have one or more main portions having a size smaller than the memory block size. Some exemplary superblocks are shown by
FIG. 5 . For example, as many as possible secondary portions immediately follow the respective main portions (such as S0 follows M0 and S3 follows M3 in 541A ofFIG. 5 ). In another example, each main portion can be located completely within the same memory block. - In one embodiment, a layout does not include repeating patterns of superblocks. Instead, the main and secondary portions in the frame buffers can be arranged by having a main portion group and a secondary portion group, such as the examples shown by
FIG. 6 . For example, the main portion group includes the main portions having starting addresses aligned to consecutive memory boundaries. The secondary portion group includes the secondary portions positioned next to each other. The first secondary portion of the secondary portion group can be aligned to a memory boundary. - At S740, an access unit can be compressed into a compressed access unit to reduce the bandwidth requirement of data transfer between the memory and another device accessing the memory. For example, in the
memory system 100, thememory 130 can be located on a different chip than thememory distribution device 110, thememory distribution device 110 is configured to compress the access units to reduce the large bandwidth requirement of data transfer between thememory 130 and thememory distribution device 110. Both lossless and lossy compression methods can be used to compress the access units. Lossless compression methods can preserve the quality of the initial data while lossy compression methods can achieve more compression. The compression methods can be generic compression methods, or image compression methods, or video compression methods, or the like. For example, compression methods can include run-length encoding, dictionary based algorithm, Hoffman coding, deflation, chroma subsampling, discrete cosine transform, or the like. - At S750, the size of the compressed access unit can be compared with the size of the main portion. In an example, the
memory distribution device 110 is configured to compare the sizes of the compressed access unit and the main portion. If the size of the compressed access unit is larger than the size of the main portion, the process then proceeds to S770. Otherwise, the process then proceeds to S760. - At S760, the compressed access unit can be stored completely in the respective main portion because the size of the compressed access unit is less than or equal to the size of the main portion. In an example, the
memory controller 120 is configured to store, in response to instructions of thememory distribution device 110, the compressed access unit into its respective main portion. - When the size of the compressed access unit is larger than the size of the main portion, the process proceeds to S770. At S770, a first part of the compressed access unit can be stored in the respective main portion. The first part of the compressed access unit can have the same size as the main portion and fill the respective main portion. In an example, the
memory controller 120 is configured to store, in response to instructions of thememory distribution device 110, the first part of the compressed access unit into its respective main portion. - At S780, a second part, or the remainder part, of the compressed access unit can be stored in the respective secondary portion. Therefore, the compressed access unit can be stored separately in the respective main and secondary portion when the size of the compressed access unit is larger than the size of the main portion. In an example, the
memory controller 120 is configured to store, in response to instructions of thememory distribution device 110, the remainder part of the compressed access unit into its respective secondary portion. - S740-S780 can be repeatedly performed on all the access units before the process proceeds to S799, where the process terminates. In an example, the
memory distribution device 110 and thememory controller 120 are configured to perform S740-S780 repeatedly for all the access units in the input image. - In various embodiments, the size of the access unit and the sizes of the main and secondary portion can be selected and remain constant for an input image. On the other hand, multiple input images, such as sequential frames of a video, can be stored by a memory. The size of the access unit and the sizes of the main and secondary portion can be selected for each individual input image, and thus can dynamically vary from one input image to another.
- In various examples, the
memory distribution device 110 or functions of thememory distribution device 110 can be implemented with hardware, software, or combination thereof. In one example, thememory distribution device 110 is implemented in hardware, such as a processing circuit, the hardware may comprise one or more of discrete components, an integrated circuit, an application-specific integrated circuit (ASIC), and the like. In another example, functions of memory distribution can be implemented with software or firmware including instructions stored in a computer-readable non-volatile storage medium. The instructions, when executed by a processing circuit, causing the processing circuit to perform the respective functions. - While aspects of the present disclosure have been described in conjunction with the specific embodiments thereof that are proposed as examples, alternatives, modifications, and variations to the examples may be made. Accordingly, embodiments as set forth herein are intended to be illustrative and not limiting. There are changes that may be made without departing from the scope of the claims set forth below.
Claims (20)
1. A method for storing an input image into a memory, comprising:
allocating one or more frame buffers in the memory;
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;
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.
2. The method of claim 1 , wherein the memory has a sequence of memory blocks separated by memory boundaries at addresses that are multiples of a memory block size and the memory block size is determined based on characteristics of the memory and devices accessing the memory.
3. The method of claim 2 , wherein a size of the main portions is one or multiples of the memory block size and starting addresses of the main portions are aligned to memory boundaries.
4. The method of claim 2 , wherein a size of the main portions is a fraction of the memory block size and each main portion is located within a respective memory block.
5. The method of claim 2 , wherein a size of the secondary portions is a fraction of the memory block size and secondary portions are grouped into one or more secondary portion groups.
6. The method of claim 5 , wherein the one or more secondary portion groups have a size being one or multiples of the memory block size and the first secondary portion of each secondary portion group has a starting address aligned to a memory boundary.
7. The method of claim 2 , wherein a plurality of main portions and secondary portions are arranged in a predetermined pattern to form a superblock having a size that is one or multiples of the memory block size and the main and secondary portions in the frame buffer are arranged by sequentially positioning a plurality of superblocks adjacent to each other.
8. The method of claim 2 , wherein the memory block size is selected to be 32, 64, 128, 256, 512, 1K, 2K, or 4K bytes.
9. The method of claim 1 , wherein the input image is a still image or a video frame.
10. A device for storing an input image, comprising:
a memory configured to store one or more frame buffers;
a memory distribution device configured to receive the input image, allocate a frame buffer in the memory to store the input image, divide the input image into access units corresponding to subsets of the input image, and allocate 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; and
a memory controller configured to store, in response to instructions of the memory distribution device, 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 store a remainder of the compressed access unit into its respective secondary portion.
11. The device of claim 10 , wherein the memory has a sequence of memory blocks separated by memory boundaries at addresses that are multiples of a memory block size and the memory block size is determined based on characteristics of the memory and devices accessing the memory including the memory distribution device.
12. The device of claim 11 , wherein the memory distribution device is configured to select a size of the main portions to be one or multiples of the memory block size and align starting addresses of the main portions to memory boundaries.
13. The device of claim 11 , wherein the memory distribution device is configured to select a size of the main portions to be a fraction of the memory block size and position each main portion within a respective memory block.
14. The device of claim 11 , wherein the memory distribution device is configured to a select a size of the secondary portions to be a fraction of the memory block size and group secondary portions into one or more secondary portion groups.
15. The device of claim 14 , wherein the memory distribution devices configured to select a size of the one or more secondary portion groups to be one or multiples of the memory block size and align the starting address of the first secondary portion of each secondary portion group to a memory boundary.
16. The device of claim 11 , wherein the memory distribution device is configured to arrange a plurality of main portions and secondary portions in a predetermined pattern to form a superblock having a size being one or multiples, of the memory block size and further position a plurality of superblocks adjacent to each other in the frame buffer.
17. The device of claim 10 , wherein the memory is located on a different integrated chip than the memory distribution device.
18. The device of claim 10 , wherein the memory distribution device is integrated into a video codec.
19. The device of claim wherein the memory, distribution device is configured to determine the memory block size to be 32, 64, 128, 256, 512, 1K, 2K, or 4K bytes.
20. A non-transitory computer readable medium having computer readable instructions stored thereon which, when executed by a processing circuit, cause the processing circuit to perform a method, the method comprising:
allocating one or more frame buffers in the memory;
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;
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.
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/786,908 US20180107616A1 (en) | 2016-10-18 | 2017-10-18 | Method and device for storing an image into a memory |
| CN201810344898.2A CN108804508B (en) | 2017-04-25 | 2018-04-17 | A method and system for storing input images |
| TW107113191A TW201839714A (en) | 2017-04-25 | 2018-04-18 | Method and system for storing an image |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US201662409416P | 2016-10-18 | 2016-10-18 | |
| US201762489588P | 2017-04-25 | 2017-04-25 | |
| 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 |
|---|---|
| US20180107616A1 true US20180107616A1 (en) | 2018-04-19 |
Family
ID=61904136
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/786,240 Active 2037-10-27 US10418002B2 (en) | 2016-10-18 | 2017-10-17 | Merged access units in frame buffer compression |
| US15/786,908 Abandoned US20180107616A1 (en) | 2016-10-18 | 2017-10-18 | Method and device for storing an image into a memory |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/786,240 Active 2037-10-27 US10418002B2 (en) | 2016-10-18 | 2017-10-17 | Merged access units in frame buffer compression |
Country Status (1)
| Country | Link |
|---|---|
| US (2) | US10418002B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9378560B2 (en) * | 2011-06-17 | 2016-06-28 | Advanced Micro Devices, Inc. | Real time on-chip texture decompression using shader processors |
| US10535114B2 (en) * | 2015-08-18 | 2020-01-14 | Nvidia Corporation | Controlling multi-pass rendering sequences in a cache tiling architecture |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6683986B1 (en) * | 1999-10-28 | 2004-01-27 | Sharp Laboratories Of America, Inc. | Efficient transmission of quarter-VGA images using DVC codecs |
| US20050216691A1 (en) * | 2004-03-29 | 2005-09-29 | International Business Machines Corporation | Method for completely lock-free user-level dynamic memory |
| US20080056307A1 (en) * | 2006-08-30 | 2008-03-06 | Decusatis Casimer M | Method and System to Enable the Transport of Sysplex Timer Protocols Over Generic Frame Procedure Networks |
| US20100060934A1 (en) * | 2008-09-11 | 2010-03-11 | Darrell Eugene Bellert | Systems and Methods for Optimal Memory Allocation Units |
| US20110235928A1 (en) * | 2009-01-19 | 2011-09-29 | Teleonaktiebolaget L M Ericsson (publ) | Image processing |
| US8966209B2 (en) * | 2010-08-23 | 2015-02-24 | Apple Inc. | Efficient allocation policies for a system having non-volatile memory |
| US9332276B1 (en) * | 2012-08-09 | 2016-05-03 | Google Inc. | Variable-sized super block based direct prediction mode |
| US20180046401A1 (en) * | 2016-08-15 | 2018-02-15 | Oracle International Corporation | Efficient Copy-on-Write Transactions on Persistent Memory |
Family Cites Families (13)
| 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 |
| US7934008B2 (en) * | 2000-10-20 | 2011-04-26 | Sony Corporation | Delivery of multimedia descriptions using access units |
| GB2457262A (en) * | 2008-02-08 | 2009-08-12 | Linear Algebra Technologies | Compression / decompression of data blocks, applicable to video reference frames |
| US20090238259A1 (en) * | 2008-03-19 | 2009-09-24 | Sung-Hung Yeh | Method of rate control for video frame compression and encoder thereof |
| KR101710619B1 (en) * | 2009-02-04 | 2017-02-28 | 삼성전자주식회사 | Method and apparatus for successively encoding/decoding image |
| US8619866B2 (en) * | 2009-10-02 | 2013-12-31 | Texas Instruments Incorporated | Reducing memory bandwidth for processing digital image data |
| US8990435B2 (en) * | 2011-01-17 | 2015-03-24 | Mediatek Inc. | Method and apparatus for accessing data of multi-tile encoded picture stored in buffering apparatus |
| AU2012294053B2 (en) * | 2011-08-11 | 2016-07-07 | Sun Patent Trust | Image coding method, image decoding method, image coding apparatus, image decoding apparatus, and image coding and decoding apparatus |
| US20130243100A1 (en) * | 2012-03-15 | 2013-09-19 | Mediatek Inc. | System and Method for Adaptive Frame Re-compression in Video Processing System |
| JP5969914B2 (en) * | 2012-12-20 | 2016-08-17 | 株式会社日立情報通信エンジニアリング | Video compression / decompression device |
| US9578339B2 (en) * | 2013-03-05 | 2017-02-21 | Qualcomm Incorporated | Parallel processing for video coding |
| US9307248B2 (en) * | 2013-03-08 | 2016-04-05 | Mediatek Inc. | Image encoding method and apparatus for performing bit-plane scanning coding upon pixel data and related image decoding method and apparatus |
| US9596477B2 (en) * | 2013-12-26 | 2017-03-14 | Mediatek Inc. | Methods of multiple-slice coding for frame buffer compression |
-
2017
- 2017-10-17 US US15/786,240 patent/US10418002B2/en active Active
- 2017-10-18 US US15/786,908 patent/US20180107616A1/en not_active Abandoned
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6683986B1 (en) * | 1999-10-28 | 2004-01-27 | Sharp Laboratories Of America, Inc. | Efficient transmission of quarter-VGA images using DVC codecs |
| US20050216691A1 (en) * | 2004-03-29 | 2005-09-29 | International Business Machines Corporation | Method for completely lock-free user-level dynamic memory |
| US20080056307A1 (en) * | 2006-08-30 | 2008-03-06 | Decusatis Casimer M | Method and System to Enable the Transport of Sysplex Timer Protocols Over Generic Frame Procedure Networks |
| US20100060934A1 (en) * | 2008-09-11 | 2010-03-11 | Darrell Eugene Bellert | Systems and Methods for Optimal Memory Allocation Units |
| US20110235928A1 (en) * | 2009-01-19 | 2011-09-29 | Teleonaktiebolaget L M Ericsson (publ) | Image processing |
| US8966209B2 (en) * | 2010-08-23 | 2015-02-24 | Apple Inc. | Efficient allocation policies for a system having non-volatile memory |
| US9332276B1 (en) * | 2012-08-09 | 2016-05-03 | Google Inc. | Variable-sized super block based direct prediction mode |
| US20180046401A1 (en) * | 2016-08-15 | 2018-02-15 | Oracle International Corporation | Efficient Copy-on-Write Transactions on Persistent Memory |
Also Published As
| Publication number | Publication date |
|---|---|
| US10418002B2 (en) | 2019-09-17 |
| US20180108331A1 (en) | 2018-04-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10366467B1 (en) | Method and apparatus for accessing compressed data and/or uncompressed data of image frame in frame buffer | |
| TWI544751B (en) | Reformatting data to decrease bandwidth between a video encoder and a buffer | |
| US20140086309A1 (en) | Method and device for encoding and decoding an image | |
| US8781000B2 (en) | Dynamic video data compression | |
| US8918589B2 (en) | Memory controller, memory system, semiconductor integrated circuit, and memory control method | |
| CN103888777A (en) | Video image compression/decompression device | |
| US10459646B2 (en) | Semiconductor device, data processing system, and semiconductor device control method | |
| CN104952088B (en) | A kind of method for being compressed and decompressing to display data | |
| US10304212B2 (en) | Graphic data compression device and graphic data compression method | |
| JP2011120244A (en) | System for processing images | |
| US20180107616A1 (en) | Method and device for storing an image into a memory | |
| CN101212680B (en) | Memory access method and system for image data | |
| DE102011100936B4 (en) | Techniques for storing and retrieving pixel data | |
| CN107204199B (en) | Semiconductor memory device and address control method thereof | |
| US12361508B2 (en) | Methods of and apparatus for storing data in memory in graphics processing systems | |
| US20190095338A1 (en) | Semiconductor device, data processing system, and semiconductor device control method | |
| CN108804508B (en) | A method and system for storing input images | |
| US9990900B2 (en) | Image processing device and method thereof | |
| CN101847394A (en) | Storage mapping method and device for encoding and displaying video files | |
| RU142700U1 (en) | IMAGE PROCESSING SYSTEM | |
| CN112214174A (en) | Flash-memory-based cache decompression system and method for mobile equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| AS | Assignment |
Owner name: MEDIATEK INC., TAIWAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:CHAO, PING;YANG, CHIH-WEN;WANG, CHIH-MING;REEL/FRAME:044559/0843 Effective date: 20171016 |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: NON FINAL ACTION MAILED |
|
| STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |