WO2020107319A1 - Image processing method and device, and video processor - Google Patents

Image processing method and device, and video processor Download PDF

Info

Publication number
WO2020107319A1
WO2020107319A1 PCT/CN2018/118168 CN2018118168W WO2020107319A1 WO 2020107319 A1 WO2020107319 A1 WO 2020107319A1 CN 2018118168 W CN2018118168 W CN 2018118168W WO 2020107319 A1 WO2020107319 A1 WO 2020107319A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
color component
storage area
storage
read
Prior art date
Application number
PCT/CN2018/118168
Other languages
French (fr)
Chinese (zh)
Inventor
杨成章
张健华
崔明
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201880039323.8A priority Critical patent/CN110869975A/en
Priority to PCT/CN2018/118168 priority patent/WO2020107319A1/en
Publication of WO2020107319A1 publication Critical patent/WO2020107319A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Definitions

  • the present application relates to the field of image processing, and more specifically, to an image processing method and device, and a video processor.
  • a pixel For raw images, a pixel has a color component, and the pixels of each color component are arranged in an interleaved manner, and in subsequent applications, the pixels of each color component need to be taken out separately for Handle separately. When processing the pixels of each color component, it needs to be processed according to the image block.
  • the specific processing flow is to cache the image data in the cache unit, and then read the corresponding image data for deinterleaving according to the requirements of subsequent applications, and then send it to the block unit for block processing.
  • Embodiments of the present application provide an image processing method, device, and video processor, which correspond to a flexible raw image processing architecture, and facilitate the expansion and verification of the image processing architecture.
  • an image processing method including: reading image data, wherein the read image data includes a plurality of pixels, the plurality of pixels has at least one color component, and each pixel has a A color component; deinterleaving the read image data to obtain image data corresponding to each color component; storing the image data corresponding to each color component into the storage space separately for each color component In the corresponding storage area; from the storage area, for each color component, a read operation is separately performed to obtain an image block of each color component.
  • an image processing apparatus including: a first reading unit for reading image data, wherein the read image data includes a plurality of pixels, the plurality of pixels having at least one color Component, and each pixel has a color component; a deinterleaving unit, used to deinterleave the read image data to obtain image data corresponding to each color component; a storage unit, used to convert the The image data corresponding to each color component is respectively stored in the storage area corresponding to each color component in the storage space; the second reading unit is used to execute separately for each color component from the storage area Reading operation to obtain the image block of each color component.
  • an image processing apparatus including a processing circuit, the processing unit configured to perform the method in the first aspect.
  • a video processor including the image processing device described in the second aspect or the third aspect.
  • storage of image data is added between deinterleaving and segmentation, and the image data corresponding to each color component is stored in the storage area corresponding to each color component during storage, which can be implemented in When reading the image block, read from the storage area corresponding to each color component, and decoupling the deinterleaving from the image block. If you need to change the deinterleaving strategy, you don’t need to change the way of dividing. Configure the deinterleaving parameters to the deinterleaving unit.
  • the storage area can be used as the demarcation point to narrow down the troubleshooting And adjust the position, the verification of the processing method also played a simplified and accelerated effect.
  • FIG. 1 is a schematic diagram of an image interlacing arrangement method according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of another image interlacing arrangement method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of another image interlacing arrangement method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another image interlacing arrangement method according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an image processing method according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of image data reading according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another image data reading according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of image data storage according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another image data storage according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another image processing method according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of image data processing according to an embodiment of the present application.
  • FIG. 12 is a schematic diagram of another image data processing according to an embodiment of the present application.
  • FIG. 13 is a schematic diagram of another image processing method according to an embodiment of the present application.
  • FIG. 14 is a schematic diagram of an image processing architecture according to an embodiment of the present application.
  • 15 is a schematic diagram of an image processing apparatus according to an embodiment of the present application.
  • 16 is a schematic diagram of another image processing device according to an embodiment of the present application.
  • 17 is a schematic diagram of a video processor according to an embodiment of the present application.
  • a pixel can have one color component, and a raw image may have multiple color components (for example, including four color components R-Gr-Gb-B), and the multiple color components may be interleaved Arranged in a manner of arrangement.
  • the interlaced arrangement mentioned here means that the pixels of different color components in the same raw image are arranged in an interlaced manner.
  • the color components appearing in odd rows may be different from the color components appearing in even rows, and the color components appearing in odd rows may be different from those appearing in even columns.
  • the color components appearing in the same row may be different, or the color components appearing in the same row are the same, but the order in which the color components appear is different.
  • each small square represents a pixel.
  • R and Gr appear in odd rows, where R belongs to odd columns and Gr belongs to even columns, B and Gb appear in even rows, B belongs to even columns, and Gb belongs to odd columns.
  • B and Gb appear in odd rows, where B belongs to odd columns and Gb belongs to even columns, R and Gr appear in even rows, R belongs to even columns, and Gr belongs to odd columns.
  • B and Gb appear in odd rows, where Gb belongs to odd columns and B belongs to even columns, R and Gr appear in even rows, Gr belongs to even columns, and R belongs to odd columns.
  • R and Gr appear in odd rows, where Gr belongs to odd columns and R belongs to even columns, B and Gb appear in even rows, Gb belongs to even columns, and B belongs to odd columns.
  • the pixels of each color component need to be processed separately, so the pixels of each color component need to be taken out separately.
  • special logic can be used to read and split the interlace Image data together, this process can be called deinterleaving.
  • DCT discrete cosine Transform
  • Each color component takes 8x8 image blocks as the minimum unit to participate in the calculation.
  • This 8x8 block can be called 1 code block (code block, cb). Since the pixels of the 4 color components are interwoven together, a 16x16 image block of the original image will contain 1 cb for each of the 4 color components.
  • This 16x16 original image block can be called a microblock (mb).
  • the algorithm may require 1mb, 2mb, 4mb, 8mb or 16mb in the horizontal direction at a time. That is to say, the purpose of block division is to cut out image blocks of the required size from the deinterleaved image data.
  • the image data may be deinterleaved, and the deinterleaved image data may be divided.
  • FIG. 5 is a schematic flowchart of an image processing method 100 according to an embodiment of the present application.
  • the method 100 may include at least part of the following content.
  • the method 100 may be implemented by a processing device, which may be part of an encoder or independent of the encoder.
  • the processing device reads the image data, wherein the read image data includes a plurality of pixels having at least one color component, and each pixel has a color component, respectively.
  • the number of bits of the pixel value of each pixel is greater than or equal to 1, for example, 12 bits or 16 bits.
  • the read image data may be image data belonging to the raw image.
  • the processing device can read the image data of the raw image from Double Rate Synchronous Dynamic Random Access (SDRAM) (Double Data Data Rate SDRAM, DDR), where the image data can be Stored in DDR after capturing the image.
  • SDRAM Double Rate Synchronous Dynamic Random Access
  • DDR Double Data Data Rate SDRAM
  • the data amount of the image data read by the processing device per clock can optionally be determined according to the size of the storage space and/or the bus bandwidth mentioned below for storing the deinterleaved image data.
  • the amount of image data read per clock is less than the amount of data allowed by the bus bandwidth.
  • the amount of data of a single color component in the image data read by each clock may be the maximum amount of data that can be stored in one storage address of the storage space.
  • the number of pixels read by each clock may be an integer, or may not be an integer.
  • the number of pixels mentioned here is an integer number means that at least one complete pixel is read in one clock, and the bit of each pixel is only read in one clock, and will not be divided into two or two More than one clock.
  • each clock can read 128-bit data (many implementations in the embodiments of the present application are described using reading 128-bit data per clock as an example, but the embodiment of the present application is not limited to this ), if the number of bits of the pixel value of a single pixel is 12 bits, an integer number of pixels cannot be read by one clock, and a cycle of 3 clocks can accommodate the pixel value of a complete 32 pixels. Among them, these 32 pixels can belong to 2 color components and are staggered. Specifically, as shown in FIG. 6, p0-p31 represent 32 pixels.
  • the pixel value of one pixel may be stored separately in the data of two adjacent clocks Medium, that is, the pixel value of pixel p10 is divided into clock 1 and clock 2, where clock 1 reads 8 bits of pixel p10, and clock 2 reads 4 bits of pixel p10, and the pixel value of pixel 21 is divided To clock 2 and clock 3, where clock 2 reads 4 bits of pixel p21, and clock 3 reads 8 bits of pixel p21.
  • each clock can read 128-bit data. If the number of pixels of a single pixel is 16 bits, then one clock can read 8 pixels of data, where these 8 pixels can belong to 2 The color components are staggered. Specifically, as shown in FIG. 7, p0-p7 represents 8 pixels. Since 128 bits can accommodate an integer number of 16-bit pixels, the pixel values of the 8 pixels can be accommodated in one clock, namely clock 1.
  • the number of bits that can be read per clock can be divided by the number of bits of the pixel value of a single pixel, the number of pixels that can be read per clock is an integer, but it should be understood that even if each The number of clocks that can be read can be divided by the number of bits of the pixel value of a single pixel, but it is not necessary that the number of pixels read per clock is an integer.
  • each clock can read 128 bits of data. If the number of pixels of a single pixel is 16 bits, then there can be 8 bits of a pixel read by the last clock, and the remaining 8 of the pixel The bit is read by the next clock.
  • the processing device deinterleaves the read image data to obtain image data corresponding to each color component.
  • the processing device can deinterleave the read image data, that is, determine the color component of each pixel read, where the image data is interleaved and arranged in a certain way, it can be based on the read image The position of the data in the original image determines the color component of each pixel.
  • the processing device separately stores the image data corresponding to each color component into a storage area corresponding to each color component in a storage space.
  • each color component may exist in a corresponding storage area, and the processing device may store each color component in its corresponding storage area, so that in the storage area corresponding to each color component, read each
  • the image blocks of the color components are subjected to subsequent image block division processing to achieve decoupling between deinterleaving and image block (here and the image blocks mentioned below may be cb) division.
  • the image data corresponding to each color component is stored in the storage area corresponding to each color component in the storage space, and it can be stored without being affected by the interweaving arrangement of the original image data.
  • each color component may include one or more, each storage area may have an independent writing and reading interface, and the one storage area may be a random access memory (random access memory) Access (memory, RAM), of course, may also be other forms of memory, which are not specifically limited in the embodiments of the present application.
  • RAM random access memory
  • a storage address of each storage area may store the pixel value of a certain number of pixels (defined here as the number N), where The number N may optionally be equal to the number of pixels included in the row of the image block, or an integer multiple of the number of pixels included in the row, and one storage address stores only pixels of one color component.
  • one storage area may include one storage address or multiple storage addresses.
  • the present invention splits each RAM into at least two slices. That is, two RAMs can be provided for each color component, and after the address of one RAM is full, the remaining data of the color component is written in the other RAM.
  • each address of the storage area can store 8 pixels of a single color component, where the 8 pixels include
  • the total data can be 8 16-bit data
  • each 16-bit data can include a 12-bit pixel value of a single pixel and a 4-bit placeholder bit, or the total data of the 8 pixels can also be 8
  • the 12-bit data can be determined according to the data format to be stored in each storage area (the data format is distinguished by the number of bits in one pixel).
  • the color component corresponding to p0, p2, p4...p30 is color component 1
  • the color component corresponding to p1, p3, p5...p31 is color component 2.
  • the storage address 1 corresponding to color component 1 can store 8 bits of the pixel values of p0, p2, p4, p6, p8 and p10
  • the color component 2 corresponds to
  • the storage address 1 can store the pixel values of p1, p3, p5, p7, and p9.
  • To address 1 when storage address 1 has reached 8 addresses, you need to store p16, p18, and p20 to a storage address in another RAM.
  • color component 2 the process is similar.
  • each color component may have at least two storage areas respectively having independent reading and writing interfaces, and specifically may have at least two RAMs.
  • the image data of a certain color component can be stored to a storage address in one of the storage areas, and after the one address is full, the remaining unstored data of the image data of the color component is stored to A storage address in another storage area.
  • the addresses of each storage area may be continuous.
  • the address may be 0-127
  • the storage address may also be 0-127.
  • each storage area has 128 storage addresses, the actual storage addresses have reached 256.
  • the processing device can record the number of all addresses (not distinguishing the storage area, which are all storage areas) where the image data of the specific color component has been stored.
  • the value x can be obtained by adding 1 on the basis of the recorded number, and this x can be understood as the order of the current addresses to be stored in all the storage addresses corresponding to the color component. Since there are at least two storage areas, the address to be stored in the storage area may be further determined based on the value x corresponding to the address currently to be stored. For example, assuming that there are 2 storage areas, if x is even, the image data can be stored in the address x/2 of storage area 1, if x is odd, the image data can be stored in the address of storage area 1. (x-1)/2.
  • a color component corresponds to at least two storage areas
  • the image data of each clock can be stored at one address, there is no need to divide it into two addresses.
  • the two storage areas are interleaved, for example, clock 1 data is stored in one address in storage area 1, clock 2 data is stored in another address in storage area 2, and clock 3 data is stored in another storage area 1 Address etc.
  • clock 1 data is stored in one address in storage area 1
  • clock 2 data is stored in another address in storage area 2
  • clock 3 data is stored in another storage area 1 Address etc.
  • the storage addresses corresponding to the color component in one storage area may be stored in the storage addresses corresponding to the color component in another storage area.
  • the one color component may correspond to one storage area.
  • one clock can read each color of the two color components
  • the pixel value of the 4 pixels of the component can store a storage address for each of the two color components, that is, pixels that do not have a color component need to be stored in two addresses at the same clock.
  • one color component may correspond to one storage area, wherein, after the data in the storage area is read, the data of the color component continues to be stored.
  • the image data is read by line (That is, read line by line, read the next line after reading a line, where the length of the line can be determined according to the actual situation), so the color components of the same line may appear in the same clock, you need to avoid the same line
  • the color components are shared in the storage area, which can avoid multiple color components of the same row being stored to one address when storing, and can avoid the problem that one clock needs to store two addresses in one storage area.
  • the image data of a single clock contains at most 2 color components, so you can merge the color component storage areas that do not need to appear on the same line. 4 storage areas (that is, 4 RAMs).
  • R and Gr appear in odd rows and B and Gb appear in even rows
  • the storage area of R can be merged with one storage area of B and Gb
  • the storage area of Gr can also be merged with another storage area of B and Gb.
  • the storage areas of B and R can be merged, that is, both B and R occupy RAM1 and RAM2, and the storage areas of Gb and Gr can be combined, that is, both Gb and Gr occupy RAM3 and RAM4.
  • the address allocated to each color component is different.
  • the corresponding storage address is address 0-127, and for another color component B, the corresponding storage address may be address 128-255.
  • a single storage area with independent writing and reading interfaces may be used to store image data of at least two color components that do not appear in the same row of the image before deinterleaving, thereby While realizing the storage area, the image data of each color component can be stored independently by address.
  • the sharing of the storage area can reduce the number of interfaces and the number of wires and improve the wiring quality.
  • multiple color components may not be shared in the storage area, which is not specifically limited in the embodiment of the present application.
  • At least one storage area group may exist in the available storage space, and each storage area group includes at least one storage area corresponding to a color component.
  • Each storage area group can be used to cyclically store the de-interleaved image data, that is, the data can be read after it is full, and after reading, it can continue to be stored.
  • Different storage area groups include different storage areas for the same color component. For example, for storage area group 1, for color component 1, storage areas included are storage area 1 and storage area 2, and for storage area group 2, for color component 2, storage areas included are storage areas 3 and 4.
  • the above-mentioned 4 RAMs may be formed into a group, and 2 to 3 RAM groups may be deployed for ping-pong operation.
  • Each RAM group can be marked as idle, receiving and sending 3 states. All RAMs are in an idle state during initialization, and are in a receive state when data reception begins. When a certain RAM group is filled with de-interleaved data, this RAM group will be marked as sending.
  • the block unit detects that a RAM group is in the transmit state, it starts to read data from it. Because the deinterleaved data is stored in the buffer unit, the block dividing unit only needs to read the corresponding data according to the configured image block size, and does not need to communicate with the deinterleaving unit.
  • in 201 wait for the configuration start signal; in 202, determine whether the RAM group is idle, when not idle, continue to wait for the configuration start signal in 201, when the RAM group is idle, then Go to 203; in 203, configure the RAM group to receive mode, which means that the RAM group can store data; in 204, store the deinterleaved data in the RAM group; in 205, determine the storage Is the last data that the RAM group needs to store. If the storage address of the RAM group is full, it can be considered that the currently stored data is the last data. If it is not, in 204, continue to The deinterleaved data is stored in the RAM group.
  • the RAM group can be configured as the transmission mode, that is, the image data in the RAM group can be read, And continue to execute 202, from then on can realize the cyclic storage of the RAM group.
  • the order of returning the image data may not be returned according to the read image data (this out-of-order return method can improve bus efficiency), so
  • the color components of the returned image data are irregular, which may result in the inability to determine the color components of the pixels.
  • the deinterleaving unit is behind the storage unit (after the reading unit)
  • the deinterleaving unit receives sequential data (that is, the storage unit has sorted the data), which can be easily Complete pixels are stitched together in each clock.
  • the deinterleaving unit is before the storage unit, the deinterleaving unit needs to be able to process the read data returned by the reading unit out of order. Since the color components of the returned image data are irregular, it may cause the pixel color to be undetermined Component, which makes it difficult to deinterleave the image data.
  • the embodiment of the present application proposes a tag mechanism, that is, generating a tag for the read image data, the tag indicates that the image data is stored in the original image (that is, the image data before reading, for example, stored in DDR)
  • the processing device can determine the position of each pixel in the image data in the original image, and thus can deinterleave the read image data, that is, determine each pixel Color component.
  • the processing device when it sends a read request for reading image data to the DDR through the Advanced Extensible Interface (AXI), it can generate the above-mentioned label based on the identifier (ID) number of the read request and return
  • the image data may carry the ID number, and the processing device may determine a label corresponding to the returned image data based on the ID number, and deinterleave the returned image data based on the label.
  • the image data is deinterleaved based on the line information and clock information of the image data indicated by the label mentioned above.
  • the line information can represent whether the image data is an odd line or an even line.
  • the clock information may represent the number of clocks in the current row that the clock for reading the image data belongs to.
  • a clock corresponding to a row of data may be divided into cycles, and each row of data may correspond to a cycle, and each cycle may include one or more clocks. Therefore, the position of the image data in the original image can be determined based on the number of cycles the image data belongs to and the number of clocks in the cycle, so that the image data can be deinterleaved.
  • the storage location of the pixel may also be determined based on the label.
  • the storage area corresponding to the image data and the storage address in the storage area may be determined according to the line information of the image data and the clock information.
  • each storage area group (available storage space may include one storage area group or multiple storage area groups, and each storage area group is directed to the original image
  • Each color component included includes at least one storage area)
  • each cycle can deinterleave pixels with p addresses. p is the number of storage areas corresponding to the color component.
  • Each cycle is for each of the p storage areas.
  • One storage area can be written with data at one address.
  • the value of i can be from 0 to N-1, and the value of j can be from 0 to w-1. If the above storage exists In the case of area sharing, for other color components, a constant can be added on the basis of j*N+i, and the storage addresses of different color components can be distinguished. For example, the storage address of one color component is 0 to wN-1, and the storage address of another color component is wN to 2wN-1.
  • the clock number of the clock that reads the image data in the cycle to which the image data belongs and the row information of the image data can determine which storage area is stored, and the clock number of the clock that reads the image data in the cycle that belongs to can determine the data splicing method (also That is, to determine whether to write to the address of the last clock is not full).
  • each address can store 8 pixels, then converted to original data is 48 clocks per line, of which, every 3 clocks can be a cycle, there are 16 cycles, for a color component, each cycle can produce 16 pixels ,
  • the 16 pixels can occupy 2 addresses, the 2 addresses belong to 2 storage areas, then for a cycle, a storage area needs to add 1 address, and because the number of lines of an image block is 8,
  • Each additional loop can add 8 addresses, so you can use j*8+i or j*8+i+256 (where j is the number of loops, i is the number of even rows or odd rows) Calculate the storage address in the storage area to which it belongs. Since one cycle can occupy two addresses, and the two addresses belong to two storage areas, you can determine the data splicing method and the specific storage area according to the
  • the size of the image data that a storage area group can store is 32mb
  • the size of the image block is 8*8, 128 bits of data are read per clock
  • the pixel value of each pixel is 16 bits.
  • Each address can store 8 pixels, and the original data is converted into 64 clocks per line.
  • every 4 clocks can be a cycle, there are 16 cycles, and for a color component, each cycle can produce 16 Pixels, the 16 pixels can occupy 2 addresses, the 2 addresses belong to 2 storage areas, then for a cycle, a storage area needs to add 1 address, and because an image block has 8 lines ,
  • Each additional cycle you can add 8 addresses, so you can use j * 8 + i or j * 8 + i + 256 (where j is the number of cycles, i is the number of even rows or odd rows) Method to calculate the storage address in the storage area to which it belongs.
  • the above description is based on the example that the image block is a square, but it should be understood that the embodiments of the present application are not limited thereto, and the size of the divided image block may not be square.
  • the mechanism of the label of the present application can avoid buffering the data before deinterleaving and after the data is read to sort the read data.
  • the image data processed by the deinterleaving process is sequential data, it can be deinterleaved and written into the storage area when the image data of a certain clock is collected. But if the deinterleaving process is out of order data, the data return is irregular, you can deinterleave the data in the current clock, because it is meaningless to wait for the data of the next clock, you can carry out on the image data in time Processing to avoid more and more unprocessed image data, occupying storage resources.
  • the storage area of the embodiment of the present application can be used to store image data in multiple formats, where the number of pixels of the image data in different formats is different.
  • the processing device may process image data in multiple formats, for example, processing image data of 12 and 16 bits occupied by a single pixel, respectively.
  • the single pixel when storing the image data corresponding to each color component, the single pixel is place-filled so that the The number of bits of a single pixel reaches the first number of bits, where the first number of bits is the maximum number of bits corresponding to a single pixel in image data in multiple formats.
  • Each 12-bit pixel is filled with 4 bits. Among them, the lower bits of 12 bits can be filled. Of course, the higher bits of 12 bits can also be filled. The value of the filled bits can be 0.
  • each color component has two RAMs, and color components B and R share Storage area, the color components Gb and Gr share the storage area.
  • three clocks can be used as one cycle, and each cycle can generate two addresses of image data for each of the two color components.
  • the available storage space includes a total of 4 RAMs, namely RAM1, RAM2, RAM3 and RAM4. R and B share RAM1 and RAM2, and Gr and Gb share RAM3 and RAM4.
  • Fig. 11 shows the image data storage of 3 clocks in one cycle.
  • the top row of each large box is a clock of 128 bits of data read
  • each small box in the row represents 4 bits of data
  • 32 small boxes of 128 bits of data of which One pixel is arranged adjacent to every 12 bits
  • each color represents a color component.
  • each large frame in FIG. 11 The bottom four rows of each large frame in FIG. 11 are the data formats written to 4 pieces of RAM. In order to be compatible with the 16-bit format, the lower 4 bits of each 12-bit pixel are filled with 0s, as shown by the small gray and black boxes. Each time the deinterleaving unit receives a row of interleaved data, it can be split into the single-color image data shown below and written to the corresponding RAM.
  • the image data read by clock 1 includes color components R and Gr
  • the color corresponding to R can be stored in address 1 in RAM1
  • the color component corresponding to Gr can be stored in RAM3
  • the image data read by address 1 and clock 2 still include the color components R and Gr. Since neither address 1 in RAM 1 nor address 1 in RAM 3 is fully stored, a part of the pixel corresponding to R read by clock 2 can be used Data is stored in address 1 of RAM1, another part of data is stored in address 1 of RAM2, and part of the data of the pixel corresponding to Gr read by this clock 2 is stored in address 1 of RAM3, and the other part of data is stored in Address 1 in RAM4.
  • the image data read by clock 3 still includes the color components R and Gr.
  • the address written to the RAM is marked in a rectangular frame on the right. Assuming that the available storage space can open up 32MB of RAM, the conversion to raw data will take 48 clocks per line. The 48 clocks are divided into 16 cycles with 3 clocks as one cycle. In order to calculate the address where the data should be written, the raw data of each clock will have a label, which is displayed in the rectangular box on the right side of the figure. Where i represents how many even or odd rows the current data is, (2*i+0) represents that this is an even row of data. 48 is the increment of the address that each line should jump based on the size of the storage space. This number will change with the size of the RAM. j represents how many cycles the current data belongs to.
  • the last 0, 1, 2 represents that this is the data of the 0, 1, 2 clock of the current cycle.
  • the RAM address where the current deinterleaved data should be stored can be calculated.
  • the data splicing method can be determined according to the data of the several clocks of the current cycle.
  • each color component has two RAMs, and color components B and R share Storage area, the color components Gb and Gr share the storage area.
  • 4 clocks may be used as one cycle, and each cycle may generate image data of two addresses for each of the two color components.
  • a total of 4 RAMs are included, namely RAM1, RAM2, RAM3 and RAM4.
  • R and B share RAM1 and RAM2, and Gr and Gb share RAM3 and RAM4.
  • Fig. 12 shows the storage of image data of two clocks in one cycle.
  • the top row of each large box is a clock of 128 bits of data read
  • each small box in the row represents 4 bits of data
  • 32 small boxes of 128 bits of data of which One pixel is arranged adjacent to every 16 bits
  • each color represents a color component.
  • the lower four rows in Fig. 12 are the data formats written to 2 RAMs.
  • the image data read by clock 1 includes color components R and Gr
  • the color corresponding to R can be stored in address 1 in RAM1
  • the color component corresponding to Gr can be stored in RAM3 Address 1.
  • the image data read by clock 2 still includes the color components R and Gr. Since neither address 1 in RAM1 nor address 1 in RAM2 is full, the pixels corresponding to R read by clock 2 can be stored in RAM1. Address 1 (the remaining space at this address just stores the pixel corresponding to R read by clock 2), and the pixel corresponding to the Gr read by this clock is stored in address 1 of RAM2 (the remaining space at this address just stores clock 2 The pixel corresponding to the read Gr).
  • the address written to the RAM is marked in a rectangular frame on the right. Assuming that the size of each ram group can be cached by 32mb, it is converted into 64 clocks per line of raw data. The 64 clocks are divided into 16 cycles with 4 clocks as one cycle. In order to calculate the address where the data should be written, the raw data of each clock will have a label, such as shown in the rectangular box on the right side of the figure. Where i represents how many even or odd rows the current data is, (2*i+0) represents that this is an even row of data. 64 is the address increment that each line should jump based on the size of the storage space. This number will change with the RAM capacity. j represents how many cycles the current data belongs to.
  • the last 0, 1, 2, 3 represents that this is the data of the 0, 1, 2, 3 clock of the current cycle.
  • the RAM address where the current deinterleaved data should be stored can be calculated.
  • the data splicing method can be determined according to the data of the several clocks of the current cycle.
  • 301 wait for a configuration start signal; in 302, determine whether a back-end module (for example, a module that performs image compression) requests image data, and if not, in 301, continue to wait for configuration
  • the start signal if it is, in 303, determine whether there is a RAM group as the transmission mode.
  • FIG. 14 illustrates the technical background of prores raw video coding architecture as an example. It should be understood that the present application can be used in all similar video/image processing architectures.
  • FIG. 14 is a general block diagram of the prores raw video coding architecture.
  • the prores raw video coding architecture 400 is composed of three units, namely a preprocessing unit 410, a processing unit 420, and a writing unit 430.
  • the preprocessing unit 410 here may correspond to the processing device in the embodiment of the present application.
  • the reading unit 411 can send a read request to the DDR500 through the axi channel, read image data from the DDR, the reading unit 411 can generate a tag based on the ID, and can receive the image data sent by the DDR through the axi channel, the reading unit 411 can Send the label and the image data to the deinterleaving unit 412; the deinterleaving unit 412 can deinterleave the image data and generate a write address, and based on the write address, send the deinterleaved image data to the buffer unit 413, which may include multiple RAM group, each RAM group can be stored cyclically; the block unit 414 can perform RAM reading, block image data, and the image block is sent to the processing unit 420, the processing unit 420 can process the image block (for example, compression Process), and send the processed image data to the write-out unit 430, where the write-out unit 430 can write the processed data into the DDR500.
  • the deinterleaving unit 412 can deinterleave the image data and generate
  • read operations are performed for each color component separately to obtain an image block of each color component.
  • the storage of image data is added between the blocks, and the image data corresponding to each color component is stored in the storage area corresponding to each color component during storage, which can be achieved from each color component when the image block is read Read the corresponding storage area, decoupling the deinterleaving from the image block.
  • Interleaving unit similarly, if you need to change the strategy of partitioning, you don’t need to change the deinterleaving method, you only need to configure the relevant parameters of the partitioning to the partitioning unit, which not only simplifies the design complexity, but also increases the flexibility. Moreover, it can more conveniently support the new deinterleaving mode or the new block mode, which is conducive to the expansion of the system architecture.
  • the storage area can be used as the demarcation point to narrow down the troubleshooting and adjust the position, and verify the processing method. It also simplifies and accelerates.
  • the device 600 includes a first reading unit 610, a deinterleaving unit 620, a storage unit 630, and a second reading unit 640.
  • the first reading unit 610 is used to read image data, wherein the read image data includes a plurality of pixels, the plurality of pixels have at least one color component, and each pixel has a color component ;
  • Deinterleaving unit 620 used to deinterleave the read image data to obtain image data corresponding to each color component;
  • storage unit 630 used to store the image data corresponding to each color component respectively Into a storage area corresponding to each color component in the storage space;
  • a second reading unit 640 is configured to perform a reading operation for each color component from the storage area to obtain the Image block for each color component.
  • each color component corresponds to at least two storage areas, and each storage area has an independent writing and reading interface.
  • the at least one color component includes a first color component
  • the storage area corresponding to the first color component includes a first storage area and a second storage area
  • the corresponding image data is first image data, wherein the read image data is read by a single clock, and each storage area in the first storage area and the second storage includes at least one storage address, Each storage address stores the pixel value of at least one pixel;
  • the storage unit 630 is further used for:
  • each color component corresponds to at least one storage area, and each storage area is used to store image data of at least two color components that do not appear in the same row, and each storage area Separate write and read interfaces.
  • each color component corresponds to at least one storage area, and the storage areas corresponding to the color components belonging to the same row are different, and each storage area has an independent writing and reading interface.
  • the deinterleaving unit 620 is further used to:
  • the storage unit 630 is further used for:
  • the tag represents the position information of the image data in the original image before reading.
  • the label information includes line information of the image data and clock information of the image data in the line to which it belongs.
  • the line information indicates whether the line to which the image data belongs is an odd line or an even line, and indicates the number of odd or even lines to which the image data belongs.
  • the clock information indicates the number of cycles of the cycle to which the clock for reading the image data belongs, and indicates the number of clocks in the cycle to which the clock for reading the image data belongs;
  • the storage space includes at least one storage area group, each storage area group includes a storage area corresponding to the at least one color component, and the maximum storable line of data in each storage area group needs to be at least one cycle clock Read, each cycle includes at least one clock, and each cycle deinterleaves pixels of p addresses for each color component in the at least one color component, where p is the storage area corresponding to each color component Quantity.
  • the label is generated based on the identification ID number of the read request to read the image data.
  • the storage space can be used to store image data in multiple formats, wherein the number of pixels of the image data in different formats is different.
  • the storage unit 630 is further used to:
  • the single pixel When the number of bits of a single pixel of the image data corresponding to each color component is less than the first bit number, when storing the image data corresponding to each color component, the single pixel is place-filled so that the The number of bits reaches the first number of bits, where the first number of bits is the maximum number of bits of a single pixel corresponding to image data in multiple formats.
  • the storage space includes a plurality of storage area groups, each storage area group includes a storage area corresponding to the at least one color component, and different storage area groups include the same color component
  • Each storage area group is used to cyclically store deinterleaved image data.
  • image processing device 600 may implement the method in the foregoing method embodiments, and for the sake of brevity, no further description is provided here.
  • FIG. 16 is a schematic block diagram of an image processing apparatus 700 according to an embodiment of the present application.
  • the image processing apparatus 700 may include a processing circuit 710.
  • the processing circuit 710 may be used to implement the method in the above method embodiments, and for the sake of brevity, no further description is provided here.
  • the image processing device 700 further includes a memory, which may be used to provide a storage space for storing the deinterleaved image data mentioned in the embodiment of the present application.
  • FIG. 17 is a schematic block diagram of a video processor 800 according to an embodiment of the present application.
  • the video processor 800 may include an image processing device 810, which may correspond to the image processing device 600 or 700 described above.
  • the video processor 800 may further include other units, for example, a unit for compressing the image blocks read by the image processing device, etc. For the sake of brevity, details are not described here.
  • the image processing device or video processor in the embodiment of the present application may be applied to a drone to provide image processing for a RAM photographed by a photographing device carried on the drone.
  • the processing circuit in the embodiment of the present application may be an integrated circuit chip with data processing capabilities.
  • each step of the foregoing method embodiments may be completed by an integrated logic circuit of hardware in a processing circuit or an instruction in the form of software.
  • the above-mentioned processing circuit may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an existing programmable gate array (Field Programmable Gate Array, FPGA), or other available Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application may be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied and executed by a hardware decoding processor, or may be executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, and registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a division of logical functions.
  • there may be other divisions for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application essentially or part of the contribution to the existing technology or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Error Detection And Correction (AREA)

Abstract

Provided by embodiments of the present application are an image processing method and device, and provided is a flexible raw image processing structure, facilitating the extension and authentication of an image processing architecture. The method comprises: reading image data, the read image data comprising a plurality of pixels, the plurality of pixels having at least one color component, and each pixel having one color component respectively; de-interleaving the read image data so as to obtain image data corresponding to each color component; storing the image data corresponding to each color component in a storage region corresponding to each color component in a storage space; and from within the storage region, executing a read operation for each color component respectively so as to obtain an image block of each color component.

Description

图像处理方法和设备,以及视频处理器Image processing method and equipment, and video processor
版权申明Copyright statement
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。The content disclosed in this patent document contains material protected by copyright. The copyright is owned by the copyright owner. The copyright owner has no objection to anyone copying the patent document or the patent disclosure existing in the official records and archives of the Patent and Trademark Office.
技术领域Technical field
本申请涉及图像处理领域,并且更具体地,涉及一种图像处理方法和设备,以及视频处理器。The present application relates to the field of image processing, and more specifically, to an image processing method and device, and a video processor.
背景技术Background technique
对于原始(raw)图像而言,一个像素具有一个颜色分量,各个颜色分量的像素是以交织的方式进行排布的,而在后续的应用中,需要将各个颜色分量的像素分别取出,以进行分开处理。在对各个颜色分量的像素进行处理时,需要按照图像块进行处理。For raw images, a pixel has a color component, and the pixels of each color component are arranged in an interleaved manner, and in subsequent applications, the pixels of each color component need to be taken out separately for Handle separately. When processing the pixels of each color component, it needs to be processed according to the image block.
目前,具体的处理流程为将图像数据在缓存单元中进行缓存,再根据后续应用的需求读取相应的图像数据进行解交织,紧接着送给划块单元进行划块处理。At present, the specific processing flow is to cache the image data in the cache unit, and then read the corresponding image data for deinterleaving according to the requirements of subsequent applications, and then send it to the block unit for block processing.
这种方案将划块单元和解交织单元紧耦合在一起,彼此之间相互关联,因此在处理时需要考虑多种可能的情况。例如,如果某算法支持的解交织方案有4种,同时可能的划块大小有6种,则共有4x6=24种情况需要处理。因此,这种结构既不灵活,也不便于扩展和验证。This scheme tightly couples the block dividing unit and the deinterleaving unit, and is related to each other. Therefore, a variety of possible situations need to be considered when processing. For example, if there are 4 de-interleaving schemes supported by an algorithm, and there are 6 possible block sizes at the same time, there are 4x6=24 cases in total to be dealt with. Therefore, this structure is neither flexible nor easy to expand and verify.
发明内容Summary of the invention
本申请实施例提供了一种图像处理方法、设备以及视频处理器,对应于一种灵活的raw图像处理架构,并便于图像处理架构的扩展和验证。Embodiments of the present application provide an image processing method, device, and video processor, which correspond to a flexible raw image processing architecture, and facilitate the expansion and verification of the image processing architecture.
第一方面,提供了一种图像处理方法,包括:读取图像数据,其中,读取的所述图像数据包括多个像素,所述多个像素具有至少一个颜色分量,以及每个像素分别具有一个颜色分量;对读取的所述图像数据进行解交织,以得到每个颜色分量对应的图像数据;将所述每个颜色分量对应的图像数据分 别存储到存储空间中所述每个颜色分量对应的存储区域中;从所述存储区域中,针对所述每个颜色分量,分别执行读取操作,以得到所述每个颜色分量的图像块。In a first aspect, an image processing method is provided, including: reading image data, wherein the read image data includes a plurality of pixels, the plurality of pixels has at least one color component, and each pixel has a A color component; deinterleaving the read image data to obtain image data corresponding to each color component; storing the image data corresponding to each color component into the storage space separately for each color component In the corresponding storage area; from the storage area, for each color component, a read operation is separately performed to obtain an image block of each color component.
第二方面,提供了一种图像处理设备,包括:第一读取单元,用于读取图像数据,其中,读取的所述图像数据包括多个像素,所述多个像素具有至少一个颜色分量,以及每个像素分别具有一个颜色分量;解交织单元,用于对读取的所述图像数据进行解交织,以得到每个颜色分量对应的图像数据;存储单元,用于将所述每个颜色分量对应的图像数据分别存储到存储空间中所述每个颜色分量对应的存储区域中;第二读取单元,用于从所述存储区域中,针对所述每个颜色分量,分别执行读取操作,以得到所述每个颜色分量的图像块。According to a second aspect, there is provided an image processing apparatus including: a first reading unit for reading image data, wherein the read image data includes a plurality of pixels, the plurality of pixels having at least one color Component, and each pixel has a color component; a deinterleaving unit, used to deinterleave the read image data to obtain image data corresponding to each color component; a storage unit, used to convert the The image data corresponding to each color component is respectively stored in the storage area corresponding to each color component in the storage space; the second reading unit is used to execute separately for each color component from the storage area Reading operation to obtain the image block of each color component.
第三方面,提供了一种图像处理设备,包括处理电路,所述处理单元用于执行第一方面中的方法。In a third aspect, there is provided an image processing apparatus, including a processing circuit, the processing unit configured to perform the method in the first aspect.
第四方面,提供了一种视频处理器,包括第二方面或第三方面中所述的图像处理设备。In a fourth aspect, a video processor is provided, including the image processing device described in the second aspect or the third aspect.
本申请实施例在解交织与划块之间加入了图像数据的存储,并且在存储时将每个颜色分量对应的图像数据分别存储到所述每个颜色分量对应的存储区域中,可以实现在图像块读取时从各个颜色分量对应的存储区域进行读取,将解交织与图像块的划块进行了解耦,如果需要对解交织的策略进行变化,无需改动划块的方式,只需将解交织的相关参数配置给解交织单元,同样地,如果需要对划块的策略进行变化,无需改动解交织的方式,只需将划块的相关参数配置给划块单元,不仅简化了设计的复杂度,提高了灵活性,而且可以更方便的支持新的解交织模式或新的划块模式,利于系统架构的扩展,在图像处理出现故障时,可以以存储区域为分界点缩小故障排查和调整位置,对处理方式的验证也起到了简化和加速的效果。In the embodiment of the present application, storage of image data is added between deinterleaving and segmentation, and the image data corresponding to each color component is stored in the storage area corresponding to each color component during storage, which can be implemented in When reading the image block, read from the storage area corresponding to each color component, and decoupling the deinterleaving from the image block. If you need to change the deinterleaving strategy, you don’t need to change the way of dividing. Configure the deinterleaving parameters to the deinterleaving unit. Similarly, if you need to change the deblocking strategy without changing the deinterleaving method, you only need to configure the deblocking related parameters to the deblocking unit, which not only simplifies the design The complexity increases the flexibility, and can more easily support the new deinterleaving mode or the new block mode, which is beneficial to the expansion of the system architecture. When the image processing fails, the storage area can be used as the demarcation point to narrow down the troubleshooting And adjust the position, the verification of the processing method also played a simplified and accelerated effect.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some of the applications of the present application For the embodiment, for those of ordinary skill in the art, without paying any creative labor, other drawings may be obtained based on these drawings.
图1是根据本申请实施例的一种图像交织排布方式的示意性图。FIG. 1 is a schematic diagram of an image interlacing arrangement method according to an embodiment of the present application.
图2是根据本申请实施例的另一种图像交织排布方式的示意性图。FIG. 2 is a schematic diagram of another image interlacing arrangement method according to an embodiment of the present application.
图3是根据本申请实施例的另一种图像交织排布方式的示意性图。FIG. 3 is a schematic diagram of another image interlacing arrangement method according to an embodiment of the present application.
图4是根据本申请实施例的另一种图像交织排布方式的示意性图。FIG. 4 is a schematic diagram of another image interlacing arrangement method according to an embodiment of the present application.
图5是根据本申请实施例的一种图像处理方法的示意性图。FIG. 5 is a schematic diagram of an image processing method according to an embodiment of the present application.
图6是根据本申请实施例的一种图像数据读取的示意性图。6 is a schematic diagram of image data reading according to an embodiment of the present application.
图7是根据本申请实施例的另一种图像数据读取的示意性图。7 is a schematic diagram of another image data reading according to an embodiment of the present application.
图8是根据本申请实施例的一种图像数据存储的示意性图。FIG. 8 is a schematic diagram of image data storage according to an embodiment of the present application.
图9是根据本申请实施例的另一种图像数据存储的示意性图。9 is a schematic diagram of another image data storage according to an embodiment of the present application.
图10是根据本申请实施例的另一种图像处理方法的示意性图。FIG. 10 is a schematic diagram of another image processing method according to an embodiment of the present application.
图11是根据本申请实施例的一种图像数据处理的示意性图。11 is a schematic diagram of image data processing according to an embodiment of the present application.
图12是根据本申请实施例的另一种图像数据处理的示意性图。12 is a schematic diagram of another image data processing according to an embodiment of the present application.
图13是根据本申请实施例的另一种图像处理方法的示意性图。13 is a schematic diagram of another image processing method according to an embodiment of the present application.
图14是根据本申请实施例的图像处理架构的示意性图。14 is a schematic diagram of an image processing architecture according to an embodiment of the present application.
图15是根据本申请实施例的一种图像处理设备的示意性图。15 is a schematic diagram of an image processing apparatus according to an embodiment of the present application.
图16是根据本申请实施例的另一种图像处理设备的示意性图。16 is a schematic diagram of another image processing device according to an embodiment of the present application.
图17是根据本申请实施例的一种视频处理器的示意性图。17 is a schematic diagram of a video processor according to an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。Unless otherwise stated, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by those skilled in the technical field of the present application. The terminology used in this application is for the purpose of describing specific embodiments only, and is not intended to limit the scope of this application.
对于raw图像而言,一个像素可以具有一个颜色分量,一个raw图像可能会存在多个颜色分量(例如,包含四个颜色分量R-Gr-Gb-B),这多个颜色分量可以是以交织排布的方式进行排布的。其中,此处提到的交织排布是指同一raw图像中不同颜色分量的像素是交错排布的。在同一交织排布方式中,奇行出现的颜色分量可以与偶行出现的颜色分量不同,以及奇列出现的 颜色分量与偶列出现的颜色分量可以是不同的。对于不同的交织排布方式,相同行出现的颜色分量可以是不同的,或者,相同行出现的颜色分量是相同的,但是颜色分量出现的顺序是不同的。For raw images, a pixel can have one color component, and a raw image may have multiple color components (for example, including four color components R-Gr-Gb-B), and the multiple color components may be interleaved Arranged in a manner of arrangement. Among them, the interlaced arrangement mentioned here means that the pixels of different color components in the same raw image are arranged in an interlaced manner. In the same interlaced arrangement, the color components appearing in odd rows may be different from the color components appearing in even rows, and the color components appearing in odd rows may be different from those appearing in even columns. For different interweaving arrangements, the color components appearing in the same row may be different, or the color components appearing in the same row are the same, but the order in which the color components appear is different.
以下以图1至图4所示的交织排布方式为例进行说明。其中,图1至图4中,每个小方框代表一个像素。The following uses the interlace arrangement shown in FIGS. 1 to 4 as an example for description. Among them, in Figures 1 to 4, each small square represents a pixel.
例如,如图1所示的交织排布方式,R和Gr出现在奇行,其中,R属于奇列而Gr属于偶列,B和Gb出现偶行,B属于偶列,而Gb属于奇列。如图2所示的交织排布方式,B和Gb出现在奇行,其中,B属于奇列而Gb属于偶列,R和Gr出现在偶行,R属于偶列,而Gr属于奇列。如图3所示的交织排布方式,B和Gb出现在奇行,其中,Gb属于奇列而B属于偶列,R和Gr出现在偶行,Gr属于偶列,而R属于奇列。如图4所示的交织排布方式,R和Gr出现在奇行,其中,Gr属于奇列而R属于偶列,B和Gb出现在偶行,Gb属于偶列,而B属于奇列。For example, in the interleaved arrangement shown in FIG. 1, R and Gr appear in odd rows, where R belongs to odd columns and Gr belongs to even columns, B and Gb appear in even rows, B belongs to even columns, and Gb belongs to odd columns. In the interleaved arrangement shown in Figure 2, B and Gb appear in odd rows, where B belongs to odd columns and Gb belongs to even columns, R and Gr appear in even rows, R belongs to even columns, and Gr belongs to odd columns. In the interleaved arrangement shown in Figure 3, B and Gb appear in odd rows, where Gb belongs to odd columns and B belongs to even columns, R and Gr appear in even rows, Gr belongs to even columns, and R belongs to odd columns. In the interleaved arrangement shown in FIG. 4, R and Gr appear in odd rows, where Gr belongs to odd columns and R belongs to even columns, B and Gb appear in even rows, Gb belongs to even columns, and B belongs to odd columns.
在对raw图像的应用(例如,压缩处理)中,需要对各个颜色分量的像素分别进行处理,因此需要将各个颜色分量的像素分别取出,这时可以采用专用的逻辑来读取并拆分交织在一起的图像数据,这一过程可以称为解交织。In the application of raw images (for example, compression processing), the pixels of each color component need to be processed separately, so the pixels of each color component need to be taken out separately. At this time, special logic can be used to read and split the interlace Image data together, this process can be called deinterleaving.
此外,在图像处理中经常还需要对输入图像进行分割,这是因为大部分图像处理算法都是针对一个图像块而非整幅图像的。可以根据总线的带宽和片上的存储资源读取一定量的图像数据解交织,再从中切割出所需要的图像块大小。其中,可以将切割的过程称之为划块。In addition, in image processing, it is often necessary to segment the input image, because most image processing algorithms are for an image block rather than the entire image. A certain amount of image data can be deinterleaved according to the bus bandwidth and on-chip storage resources, and then the required image block size can be cut out from it. Among them, the cutting process can be referred to as dicing.
以prores raw图像压缩算法为例,可以采用离散余弦变换(Discrete Cosine Transform,DCT)来处理图像块,每个颜色分量以8x8的图像块为最小单位参与运算,可以将这个8x8的块称之为1个编码块(code block,cb)。由于4个颜色分量的像素交织在一起,则原始图像一个16x16的图像块中会包含4个颜色分量的各1个cb。这个16x16的原始图像块可以称之为1个微块(micro block,mb)。在prores raw算法处理时,可能会一次需要水平方向上的1mb,2mb,4mb,8mb或16mb。也就是说,划块的目的在于在解交织的图像数据中切割出所需要大小的图像块来。Taking prores raw image compression algorithm as an example, discrete cosine transform (Discrete Cosine Transform, DCT) can be used to process image blocks. Each color component takes 8x8 image blocks as the minimum unit to participate in the calculation. This 8x8 block can be called 1 code block (code block, cb). Since the pixels of the 4 color components are interwoven together, a 16x16 image block of the original image will contain 1 cb for each of the 4 color components. This 16x16 original image block can be called a microblock (mb). When processing prores, the algorithm may require 1mb, 2mb, 4mb, 8mb or 16mb in the horizontal direction at a time. That is to say, the purpose of block division is to cut out image blocks of the required size from the deinterleaved image data.
在通常的处理流程中,可以在读取交织的图像数据之后,对图像数据进行解交织,以及对解交织的图像数据进行划块处理。如果解交织单元和划块 单元紧耦合在一起,虽然对解交织单元来说,实现难度较小,但解交织单元和划块单元彼此之间相互关联,因此需要考虑多种可能的情况。即在解交织时必须同时考虑到该如何划块,不同的划块大小会影响解交织的数据量。例如,如果某算法支持的解交织方案有4种,同时可能的划块大小有6种,则解交织单元需要考虑4x6=24种情况。这种结构既不灵活,也不便于扩展和验证。In a normal processing flow, after reading the interleaved image data, the image data may be deinterleaved, and the deinterleaved image data may be divided. If the deinterleaving unit and the block unit are tightly coupled together, although it is less difficult for the deinterleaving unit to implement, the deinterleaving unit and the block unit are related to each other, so many possible situations need to be considered. That is, when deinterleaving, it is necessary to also consider how to block, and different block sizes will affect the amount of deinterleaved data. For example, if there are 4 deinterleaving schemes supported by an algorithm and 6 possible block sizes, the deinterleaving unit needs to consider 4x6=24 cases. This structure is neither flexible nor easy to expand and verify.
为此,本申请实施例提供了以下的方案,可以解决上述问题。Therefore, the embodiments of the present application provide the following solutions, which can solve the above problems.
图5是根据本申请实施例的图像处理方法100的示意性流程图。该方法100可以包括以下内容中的至少部分内容。该方法100可以由处理设备实现,该处理设备可以是编码器的一部分,也可以独立于编码器。FIG. 5 is a schematic flowchart of an image processing method 100 according to an embodiment of the present application. The method 100 may include at least part of the following content. The method 100 may be implemented by a processing device, which may be part of an encoder or independent of the encoder.
在110中,处理设备读取图像数据,其中,读取的该图像数据包括多个像素,该多个像素具有至少一个颜色分量,以及每个像素分别具有一个颜色分量。每个像素的像素值的比特数大于或等于1,例如,12比特或16比特。其中,读取的图像数据可以是属于raw图像的图像数据。In 110, the processing device reads the image data, wherein the read image data includes a plurality of pixels having at least one color component, and each pixel has a color component, respectively. The number of bits of the pixel value of each pixel is greater than or equal to 1, for example, 12 bits or 16 bits. Among them, the read image data may be image data belonging to the raw image.
具体地,处理设备可以从双倍速率同步动态随机存储器(Synchronous Dynamic Random Access Memory,SDRAM)(Double Data Rate SDRAM,DDR)中读取raw图像的图像数据,其中,该图像数据可以是拍摄设备在拍摄得到图像后存储在DDR中的。Specifically, the processing device can read the image data of the raw image from Double Rate Synchronous Dynamic Random Access (SDRAM) (Double Data Data Rate SDRAM, DDR), where the image data can be Stored in DDR after capturing the image.
其中,处理设备每个时钟读取的图像数据的数据量可选地可以根据下文提到的用于存储解交织后的图像数据的存储空间的大小和/或总线带宽确定的。Wherein, the data amount of the image data read by the processing device per clock can optionally be determined according to the size of the storage space and/or the bus bandwidth mentioned below for storing the deinterleaved image data.
例如,每个时钟读取的图像数据的数据量小于总线带宽允许的数据量。又例如,每个时钟读取的图像数据中单个颜色分量的数据量可以是存储空间的一个存储地址最大可存储的数据量。For example, the amount of image data read per clock is less than the amount of data allowed by the bus bandwidth. For another example, the amount of data of a single color component in the image data read by each clock may be the maximum amount of data that can be stored in one storage address of the storage space.
处理设备在读取图像数据时,每个时钟读取的像素的数量可以是整数个,也可以不是整数个。此处提到的像素的数量是整数个是指完整的至少一个像素在一个时钟内被读取,且每个像素的比特只在一个时钟内被读取,不会被分开到两个或两个以上的时钟。When the processing device reads the image data, the number of pixels read by each clock may be an integer, or may not be an integer. The number of pixels mentioned here is an integer number means that at least one complete pixel is read in one clock, and the bit of each pixel is only read in one clock, and will not be divided into two or two More than one clock.
例如,假设每个时钟可以读取128比特的数据(本申请实施例中的多处实现方式均以每个时钟读取128比特的数据为例进行的说明,但是本申请实施例并不限于此),如果单个像素的像素值的比特数为12比特,则一个时钟 无法读取整数个像素,而以3个时钟为循环则可以容纳完整32个像素的像素值。其中,这32个像素可以属于2个颜色分量,交错存放。具体地,如图6所示,p0-p31代表32个像素,由于128比特无法容纳整数个12比特的像素的像素值,则一个像素的像素值可能会分开存放在相邻两个时钟的数据中,即像素p10的像素值被分开到时钟1和时钟2,其中,时钟1读取像素p10的8个比特,以及时钟2读取该像素p10的4个比特,像素21的像素值被分开到时钟2和时钟3,其中,时钟2读取像素p21的4个比特,以及时钟3读取该像素p21的8个比特。For example, it is assumed that each clock can read 128-bit data (many implementations in the embodiments of the present application are described using reading 128-bit data per clock as an example, but the embodiment of the present application is not limited to this ), if the number of bits of the pixel value of a single pixel is 12 bits, an integer number of pixels cannot be read by one clock, and a cycle of 3 clocks can accommodate the pixel value of a complete 32 pixels. Among them, these 32 pixels can belong to 2 color components and are staggered. Specifically, as shown in FIG. 6, p0-p31 represent 32 pixels. Since 128 bits cannot accommodate the pixel values of an integer number of 12-bit pixels, the pixel value of one pixel may be stored separately in the data of two adjacent clocks Medium, that is, the pixel value of pixel p10 is divided into clock 1 and clock 2, where clock 1 reads 8 bits of pixel p10, and clock 2 reads 4 bits of pixel p10, and the pixel value of pixel 21 is divided To clock 2 and clock 3, where clock 2 reads 4 bits of pixel p21, and clock 3 reads 8 bits of pixel p21.
又例如,假设每个时钟可以读取128比特的数据,如果单个像素的像素值的比特数为16比特,则一个时钟可以读取8个像素的数据,其中,这8个像素可以属于2个颜色分量,交错存放。具体地,如图7所示,p0-p7代表8个像素,由于128比特可以容纳整数个16比特的像素,则该8个像素的像素值可以容纳在一个时钟,即时钟1中。For another example, suppose that each clock can read 128-bit data. If the number of pixels of a single pixel is 16 bits, then one clock can read 8 pixels of data, where these 8 pixels can belong to 2 The color components are staggered. Specifically, as shown in FIG. 7, p0-p7 represents 8 pixels. Since 128 bits can accommodate an integer number of 16-bit pixels, the pixel values of the 8 pixels can be accommodated in one clock, namely clock 1.
从以上可以看出,如果每个时钟可以读取的比特数可以将单个像素的像素值的比特数进行整除,则可以实现每个时钟读取的像素的数量是整数个,但应理解即使每个时钟可以读取的数量可以将单个像素的像素值的比特数进行整除,但是不是必须每个时钟读取的像素的数量是整数个。As can be seen from the above, if the number of bits that can be read per clock can be divided by the number of bits of the pixel value of a single pixel, the number of pixels that can be read per clock is an integer, but it should be understood that even if each The number of clocks that can be read can be divided by the number of bits of the pixel value of a single pixel, but it is not necessary that the number of pixels read per clock is an integer.
例如,假设每个时钟可以读取128比特的数据,如果单个像素的像素值的比特数为16比特,则可以存在一个像素的8比特是由上个时钟读取的,以及该像素的剩余8比特是由下一个时钟读取的。For example, suppose that each clock can read 128 bits of data. If the number of pixels of a single pixel is 16 bits, then there can be 8 bits of a pixel read by the last clock, and the remaining 8 of the pixel The bit is read by the next clock.
在120中,处理设备对读取的图像数据进行解交织,以得到每个颜色分量对应的图像数据。In 120, the processing device deinterleaves the read image data to obtain image data corresponding to each color component.
具体地,处理设备可以对读取的图像数据进行解交织,也即确定读取的每个像素的颜色分量,其中,由于图像数据的交织排布方式是一定的,则可以根据读取的图像数据在原始图像中的位置来确定各个像素的颜色分量。Specifically, the processing device can deinterleave the read image data, that is, determine the color component of each pixel read, where the image data is interleaved and arranged in a certain way, it can be based on the read image The position of the data in the original image determines the color component of each pixel.
在130中,处理设备将所述每个颜色分量对应的图像数据分别存储到存储空间中所述每个颜色分量对应的存储区域中。In 130, the processing device separately stores the image data corresponding to each color component into a storage area corresponding to each color component in a storage space.
具体地,在系统可用的存储空间中,各个颜色分量可以存在对应的存储区域,处理设备可以将各个颜色分量存储到其对应的存储区域,从而在各个颜色分量对应的存储区域中,读取各个颜色分量的图像块进行后续的图像块划块的处理,实现解交织与图像块(此处以及以下提到的图像块可以为cb) 划块的解耦。Specifically, in the storage space available to the system, each color component may exist in a corresponding storage area, and the processing device may store each color component in its corresponding storage area, so that in the storage area corresponding to each color component, read each The image blocks of the color components are subjected to subsequent image block division processing to achieve decoupling between deinterleaving and image block (here and the image blocks mentioned below may be cb) division.
并且将所述每个颜色分量对应的图像数据分别存储到存储空间中所述每个颜色分量对应的存储区域中,在存储时可以不受原始图像数据的交织排布方式的影响。In addition, the image data corresponding to each color component is stored in the storage area corresponding to each color component in the storage space, and it can be stored without being affected by the interweaving arrangement of the original image data.
在本申请实施例中,每个颜色分量对应的存储区域可以包括一个或多个,每个存储区域可以具有独立的写入和读取接口,该一个存储区域可以为一个随机存取存储器(random access memory,RAM),当然,也可以是其他形式的存储器,本申请实施例对此不做具体限定。In the embodiment of the present application, the storage area corresponding to each color component may include one or more, each storage area may have an independent writing and reading interface, and the one storage area may be a random access memory (random access memory) Access (memory, RAM), of course, may also be other forms of memory, which are not specifically limited in the embodiments of the present application.
可选地,在本申请实施例中,为了便于后续的图像块的划块操作,每个存储区域的一个存储地址可以存储一定数量(这里定义为数量N)的像素的像素值,其中,该数量N可选地可以等于图像块的行包括的像素的数量,或者为行包括的像素数量的整数倍,一个存储地址仅存储一个颜色分量的像素。其中,针对一个颜色分量,一个存储区域可以包括一个存储地址,也可以包括多个存储地址。Optionally, in the embodiment of the present application, in order to facilitate the subsequent block operation of the image block, a storage address of each storage area may store the pixel value of a certain number of pixels (defined here as the number N), where The number N may optionally be equal to the number of pixels included in the row of the image block, or an integer multiple of the number of pixels included in the row, and one storage address stores only pixels of one color component. For one color component, one storage area may include one storage address or multiple storage addresses.
由于每个时钟解交织得到的各个颜色分量的像素数是不固定的,而且有可能包含非完整的像素(例如,如图6所示),则可能会出现在存储完一个时钟的像素之后,一个存储地址存储的像素的数量未达到上述N。这种情况下,如果存储区域的某个地址存储的像素的数量未达到上述N,则在下一时钟的数据到来时,需要补齐当前地址剩余的空间,如果有多余的部分,则需要写入下一个地址。然而,由于RAM的机制无法在同一个时钟内写入两个地址,因此本发明把每个RAM拆分成至少两片。也即,可以为每个颜色分量设置两个RAM,在其中一个RAM的一个地址写满之后,在另一个RAM里写入该颜色分量的剩余数据。Since the number of pixels of each color component obtained by deinterleaving each clock is not fixed, and may contain incomplete pixels (for example, as shown in FIG. 6), it may appear after storing a pixel of a clock. The number of pixels stored in one storage address does not reach the aforementioned N. In this case, if the number of pixels stored at an address in the storage area does not reach the above N, when the data of the next clock arrives, the remaining space of the current address needs to be filled in, and if there is an extra part, it needs to be written Next address. However, since the mechanism of RAM cannot write two addresses in the same clock, the present invention splits each RAM into at least two slices. That is, two RAMs can be provided for each color component, and after the address of one RAM is full, the remaining data of the color component is written in the other RAM.
例如,对于图6所示的场景,在单个像素的像素值占用的比特数为12比特的情况下,存储区域的每个地址可以存储单个颜色分量的8个像素,其中,该8个像素包括的总数据可以为8个16比特的数据,每个16比特的数据可以包括单个像素的12比特的像素值以及4比特的占位比特,或者,该8个像素的总数据也可以是8个12比特的数据,具体可以根据每个存储区域需要存储的数据格式(数据格式由一个像素的比特数区分)而定。假设每个时钟可以读取128比特的数据,p0,p2,p4……p30对应的颜色分量为颜色分量1,而p1,p3,p5……p31对应的颜色分量为颜色分量2,则在对时钟1 读取且解交织的图像数据进行存储时,颜色分量1对应的存储地址1可以存储p0,p2,p4,p6,p8的像素值以及p10的像素值的8个比特,颜色分量2对应的存储地址1可以存储p1,p3,p5,p7和p9的像素值,则在对时钟2读取的图像数据进行存储时,则需要将p10的像素值的4个比特,以及p12和p14存储到地址1,此时存储地址1已经达到8个地址,则需要将p16、p18、p20存入到另一个RAM的一个存储地址,对于颜色分量2,则类似处理。For example, for the scenario shown in FIG. 6, in the case where the pixel value of a single pixel occupies 12 bits, each address of the storage area can store 8 pixels of a single color component, where the 8 pixels include The total data can be 8 16-bit data, each 16-bit data can include a 12-bit pixel value of a single pixel and a 4-bit placeholder bit, or the total data of the 8 pixels can also be 8 The 12-bit data can be determined according to the data format to be stored in each storage area (the data format is distinguished by the number of bits in one pixel). Assuming that each clock can read 128-bit data, the color component corresponding to p0, p2, p4...p30 is color component 1, and the color component corresponding to p1, p3, p5...p31 is color component 2. When clock 1 reads and deinterleaves the image data for storage, the storage address 1 corresponding to color component 1 can store 8 bits of the pixel values of p0, p2, p4, p6, p8 and p10, and the color component 2 corresponds to The storage address 1 can store the pixel values of p1, p3, p5, p7, and p9. When storing the image data read by clock 2, you need to store the four bits of the pixel value of p10, and p12 and p14. To address 1, when storage address 1 has reached 8 addresses, you need to store p16, p18, and p20 to a storage address in another RAM. For color component 2, the process is similar.
因此,在本申请实施例中,每个颜色分量可以具有至少两个分别具有独立的读取和写入接口的存储区域,具体可以具有至少两个RAM。其中,在存储时,可以将某个颜色分量的图像数据存储到其中一个存储区域的一个存储地址,在所述一个地址存储满之后,将该颜色分量的图像数据的剩余未存储的数据存储到另一个存储区域的一个存储地址。Therefore, in the embodiment of the present application, each color component may have at least two storage areas respectively having independent reading and writing interfaces, and specifically may have at least two RAMs. During storage, the image data of a certain color component can be stored to a storage address in one of the storage areas, and after the one address is full, the remaining unstored data of the image data of the color component is stored to A storage address in another storage area.
其中,在从RAM写入时,可以是以交错的方式在至少两片RAM之间切换,例如,如图8所示。这种存储方式可以保证当某一片RAM的任何一个地址所剩余的空间不足,需要同时写入下一个地址时,可以写入另外一片RAM的地址,从而解决由每个时钟的像素数量不确定,写入数据需要跨地址的问题。Among them, when writing from the RAM, it is possible to switch between at least two pieces of RAM in an interleaved manner, for example, as shown in FIG. 8. This storage method can ensure that when the remaining space of any address of a certain RAM is insufficient, and the next address needs to be written at the same time, the address of another RAM can be written, thereby solving the uncertainty of the number of pixels per clock. The problem of writing data needs to cross the address.
同样地,在从RAM中读取数据时,也可以是以交错的方式在至少两片RAM之间切换,并且从RAM中读取图像数据的顺序可以等于从RAM中写入图像数据的顺序。Similarly, when reading data from RAM, it is also possible to switch between at least two pieces of RAM in an interleaved manner, and the order of reading image data from RAM may be equal to the order of writing image data from RAM.
可选地,在本申请实施例中,一个颜色分量对应至少两个存储区域时,每个存储区域的地址均可以是连续的。例如,存储区域1,地址可以为0-127,存储区域2,存储地址也可以为0-127。虽然每个存储区域的存储地址均为128个,但是实际的存储地址达到了256个。Optionally, in an embodiment of the present application, when one color component corresponds to at least two storage areas, the addresses of each storage area may be continuous. For example, in storage area 1, the address may be 0-127, and in storage area 2, the storage address may also be 0-127. Although each storage area has 128 storage addresses, the actual storage addresses have reached 256.
这种情况下,处理设备可以对已存储特定颜色分量的图像数据的所有地址(不对存储区域进行区分,是所有存储区域的)的数量进行记录,在当前需要存储该颜色分量的图像数据时,可以在已记录数量的基础上加1得到数值x,该x可以理解为当前要存储器的地址在该颜色分量对应的所有存储地址中的排序。由于存储区域存在至少两个,则可以再进一步基于当前要存储的地址对应的数值x确定需要在存储区域要存储的地址。例如,假设存在2个存储区域,则如果x是偶数,则可以将图像数据存入到存储区域1的地址 x/2,如果x是奇数,则可以将图像数据存入到存储区域1的地址(x-1)/2。In this case, the processing device can record the number of all addresses (not distinguishing the storage area, which are all storage areas) where the image data of the specific color component has been stored. When the image data of the color component needs to be stored currently, The value x can be obtained by adding 1 on the basis of the recorded number, and this x can be understood as the order of the current addresses to be stored in all the storage addresses corresponding to the color component. Since there are at least two storage areas, the address to be stored in the storage area may be further determined based on the value x corresponding to the address currently to be stored. For example, assuming that there are 2 storage areas, if x is even, the image data can be stored in the address x/2 of storage area 1, if x is odd, the image data can be stored in the address of storage area 1. (x-1)/2.
可选地,在本申请实施例中,在一个颜色分量对应至少两个存储区域时,即使每个时钟的图像数据均可以在一个地址被存储,不需要分割到两个地址中,也可以在该两个存储区域进行交错存储,例如,时钟1的数据存储到存储区域1的一个地址,时钟2的数据存储到存储区域2的另一个地址,时钟3的数据存储到存储区域1的另一个地址等。当然,也可以在一个存储区域的该颜色分量对应的所有存储地址均被存满之后,再在另一个存储区域的该颜色分量对应的存储地址进行存储。Optionally, in an embodiment of the present application, when a color component corresponds to at least two storage areas, even if the image data of each clock can be stored at one address, there is no need to divide it into two addresses. The two storage areas are interleaved, for example, clock 1 data is stored in one address in storage area 1, clock 2 data is stored in another address in storage area 2, and clock 3 data is stored in another storage area 1 Address etc. Of course, after all the storage addresses corresponding to the color component in one storage area are stored, they may be stored in the storage addresses corresponding to the color component in another storage area.
应理解,在本申请实施例中,针对某个颜色分量,如果多个时钟读取的数据刚好可以达到一个地址所要求的像素数量,不会出现某一个时钟的图像数据需要存储到两个地址的情况,则此时,该一个颜色分量可以对应一个存储区域。It should be understood that in the embodiment of the present application, for a certain color component, if the data read by multiple clocks can just reach the number of pixels required by one address, the image data of a certain clock will not appear and need to be stored in two addresses In this case, at this time, the one color component may correspond to one storage area.
例如,对于图7所示的场景,假设单个像素的像素值占用的比特数为16比特,每个时钟读取的比特数为128比特,则一个时钟可以读取两个颜色分量中每个颜色分量的4个像素的像素值。两个时钟针对两个颜色分量的其中每个颜色分量可以存储一个存储地址,也即不会出现一个颜色分量的像素在同一时钟需要存入两个地址。在该种情况下,一个颜色分量可以对应一个存储区域,其中,在该存储区域的数据被读取之后,再继续存入该颜色分量的数据。For example, for the scenario shown in FIG. 7, assuming that the number of bits occupied by the pixel value of a single pixel is 16 bits and the number of bits read per clock is 128 bits, one clock can read each color of the two color components The pixel value of the 4 pixels of the component. The two clocks can store a storage address for each of the two color components, that is, pixels that do not have a color component need to be stored in two addresses at the same clock. In this case, one color component may correspond to one storage area, wherein, after the data in the storage area is read, the data of the color component continues to be stored.
按照以上的分析,如果以如图1-图4所示的颜色分量的交织排布方式为例,一个颜色分量需要两个存储区域,则4个颜色分量的情况下,需要8个存储区域,但是从图1至图4所示的颜色分量的交织排布方式可以看出,一行图像数据出现的颜色分量是4个颜色分量中的部分颜色分量,如果图像数据的读取是按行读取的(也即一行一行读取的,读完一行再读下一行,其中行的长度可以根据实际情况而定),所以同一行的颜色分量可能会出现在同一时钟内,则需要避免同一行的颜色分量进行存储区域的共享,这样可以避免同一行的多个颜色分量在存储时,存储到一个地址,以及可以避免一个时钟在一个存储区域需要存入两个地址的问题。According to the above analysis, if we take the interleaved arrangement of color components as shown in Figures 1 to 4 as an example, one color component requires two storage areas, and in the case of 4 color components, 8 storage areas are required. However, it can be seen from the interleaved arrangement of the color components shown in FIGS. 1 to 4 that the color components appearing in one line of image data are some of the four color components. If the image data is read by line (That is, read line by line, read the next line after reading a line, where the length of the line can be determined according to the actual situation), so the color components of the same line may appear in the same clock, you need to avoid the same line The color components are shared in the storage area, which can avoid multiple color components of the same row being stored to one address when storing, and can avoid the problem that one clock needs to store two addresses in one storage area.
而对于不会出现在同一行的多个颜色分量,因为数据的读取是按行,这些颜色分量的图像数据不会出现在相同的时钟里,则这些颜色分量可以进行存储区域的共享。For multiple color components that do not appear in the same line, because the data is read by line, and the image data of these color components does not appear in the same clock, these color components can be shared in the storage area.
例如,对于图1-图4所示的交织排布方式,单个时钟的图像数据最多只包含2个颜色分量,因此可以把不需要出现在同一行的颜色分量存储区域进行合并,则此时需要4个存储区域(也即4个RAM)。For example, for the interleaved arrangement shown in Figures 1 to 4, the image data of a single clock contains at most 2 color components, so you can merge the color component storage areas that do not need to appear on the same line. 4 storage areas (that is, 4 RAMs).
例如,对于图1所示的交织排布方式,R和Gr出现在奇行,B和Gb出现在偶行,则R的存储区域可以与B和Gb中的一个存储区域进行合并,和/或,Gr的存储区域也可以与B和Gb中的另一个存储区域进行合并。For example, for the interleaved arrangement shown in Figure 1, R and Gr appear in odd rows and B and Gb appear in even rows, then the storage area of R can be merged with one storage area of B and Gb, and/or, The storage area of Gr can also be merged with another storage area of B and Gb.
例如,如图9所示,B和R的存储区域可以合并,也即B和R均占有RAM1和RAM2,Gb和Gr的存储区域可以合并,也即Gb和Gr均占用RAM3和RAM4。For example, as shown in FIG. 9, the storage areas of B and R can be merged, that is, both B and R occupy RAM1 and RAM2, and the storage areas of Gb and Gr can be combined, that is, both Gb and Gr occupy RAM3 and RAM4.
因此,在如图1至图4所示的交织排布方式,仅需要4个RAM可以实现解交织后的数据的缓存功能。Therefore, in the interleaved arrangement shown in FIGS. 1 to 4, only four RAMs are needed to achieve the de-interleaved data buffering function.
可选地,在本申请实施例中,在一个存储区域有多个颜色分量共享时,每个颜色分量所分配的地址是不一样的,例如,针对其中一个存储区域,对于颜色分量R,则对应的存储地址为地址0-127,而对于另一颜色分量B,则对应的存储地址可以为地址128-255。Optionally, in the embodiment of the present application, when multiple color components are shared in one storage area, the address allocated to each color component is different. For example, for one of the storage areas, for the color component R, then The corresponding storage address is address 0-127, and for another color component B, the corresponding storage address may be address 128-255.
因此,在本申请实施例中,具有独立的写入和读取接口的单个存储区域可以用于存储不出现在解交织前的图像的同一行中的至少两个颜色分量的图像数据,由此可以在实现存储区域同时,实现各个颜色分量的图像数据按地址独立存储。其中,存储区域的共享,可以使接口数和连线数减小,提高布线质量。Therefore, in the embodiments of the present application, a single storage area with independent writing and reading interfaces may be used to store image data of at least two color components that do not appear in the same row of the image before deinterleaving, thereby While realizing the storage area, the image data of each color component can be stored independently by address. Among them, the sharing of the storage area can reduce the number of interfaces and the number of wires and improve the wiring quality.
当然,在本申请实施例中,多个颜色分量也可以不进行存储区域的共享,本申请实施例对此不做具体限定。Of course, in the embodiment of the present application, multiple color components may not be shared in the storage area, which is not specifically limited in the embodiment of the present application.
可选地,在本申请实施例中,可用存储空间可以存在至少一个存储区域组,每个存储区域组包括至少一个颜色分量对应的存储区域。每个存储区域组可以用于循环存储解交织后的图像数据,也即数据在存满之后,可以被读取,读取之后,可以继续进行存储。不同的存储区域组针对相同的颜色分量包括的存储区域不同。例如,对于存储区域组1,针对颜色分量1,包括的存储区域为存储区域1和存储区域2,而对于存储区域组2,针对颜色分量2,包括的存储区域为存储区域3和4。Optionally, in the embodiment of the present application, at least one storage area group may exist in the available storage space, and each storage area group includes at least one storage area corresponding to a color component. Each storage area group can be used to cyclically store the de-interleaved image data, that is, the data can be read after it is full, and after reading, it can continue to be stored. Different storage area groups include different storage areas for the same color component. For example, for storage area group 1, for color component 1, storage areas included are storage area 1 and storage area 2, and for storage area group 2, for color component 2, storage areas included are storage areas 3 and 4.
具体地,可以将上文提到的4个RAM(例如,如图9所示)构成一组,可以部署2~3个RAM组进行乒乓操作。每RAM个组可以被标记为空闲, 接收和发送3种状态。在初始化时所有RAM都处在空闲态,当开始接收数据时处在接收态。在某个RAM组被解交织好的数据填满时,这个RAM组就会被标记为发送态。当划块单元检测到有RAM组处在发送态后,就开始从中读取数据。因为缓存单元中存放的是已经解交织好的数据,因此划块单元只需按照配置的图像块大小读取相应的数据,无需跟解交织单元通讯。Specifically, the above-mentioned 4 RAMs (for example, as shown in FIG. 9) may be formed into a group, and 2 to 3 RAM groups may be deployed for ping-pong operation. Each RAM group can be marked as idle, receiving and sending 3 states. All RAMs are in an idle state during initialization, and are in a receive state when data reception begins. When a certain RAM group is filled with de-interleaved data, this RAM group will be marked as sending. When the block unit detects that a RAM group is in the transmit state, it starts to read data from it. Because the deinterleaved data is stored in the buffer unit, the block dividing unit only needs to read the corresponding data according to the configured image block size, and does not need to communicate with the deinterleaving unit.
例如,如图10所示,在201中,等待配置起始信号;在202中,判断RAM组是否空闲,在不空闲时,在201中继续等待配置起始信号,在RAM组空闲时,则跳转到203;在203中,配置RAM组为接收模式,此时意味着该RAM组可以进行数据的存储;在204中,将解交织数据存入到RAM组中;在205中,判断存储的数据是否是该RAM组需要存储的最后一笔数据,其中在RAM组的存储地址存满的情况下,可以认为当前已存储的数据是最后一笔数据,如果不是,在204中,继续将解交织数据存入到该RAM组,如果是最后一图像数据,则跳转到206;在206中,可以配置该RAM组为发送模式,也即该RAM组中的图像数据可以被读取,并继续执行202,从此可以实现该RAM组的循环存储。For example, as shown in FIG. 10, in 201, wait for the configuration start signal; in 202, determine whether the RAM group is idle, when not idle, continue to wait for the configuration start signal in 201, when the RAM group is idle, then Go to 203; in 203, configure the RAM group to receive mode, which means that the RAM group can store data; in 204, store the deinterleaved data in the RAM group; in 205, determine the storage Is the last data that the RAM group needs to store. If the storage address of the RAM group is full, it can be considered that the currently stored data is the last data. If it is not, in 204, continue to The deinterleaved data is stored in the RAM group. If it is the last image data, jump to 206; in 206, the RAM group can be configured as the transmission mode, that is, the image data in the RAM group can be read, And continue to execute 202, from then on can realize the cyclic storage of the RAM group.
可选地,在本申请实施例中,由于在读取图像数据时,返回图像数据的顺序有可能不是按照读取的图像数据进行返回的(这种乱序返回方式可以提高总线效率),所以返回的图像数据的颜色分量是无规律的,则可能会导致无法确定像素的颜色分量。具体地,如果解交织单元在存储单元(位于读取单元之后)的后面,那么解交织单元收到的是顺序的数据(也即存储单元已经对数据进行了排序),可以较为容易的从两个时钟中拼接出完整的像素。但如果解交织单元在储存单元之前,则解交织单元需要能处理读取单元乱序返回的读取数据,由于返回的图像数据的颜色分量是无规律的,则可能会导致无法确定像素的颜色分量,这对图像数据的解交织造成了难度。Optionally, in the embodiments of the present application, when the image data is read, the order of returning the image data may not be returned according to the read image data (this out-of-order return method can improve bus efficiency), so The color components of the returned image data are irregular, which may result in the inability to determine the color components of the pixels. Specifically, if the deinterleaving unit is behind the storage unit (after the reading unit), then the deinterleaving unit receives sequential data (that is, the storage unit has sorted the data), which can be easily Complete pixels are stitched together in each clock. However, if the deinterleaving unit is before the storage unit, the deinterleaving unit needs to be able to process the read data returned by the reading unit out of order. Since the color components of the returned image data are irregular, it may cause the pixel color to be undetermined Component, which makes it difficult to deinterleave the image data.
为了解决上述问题,本申请实施例提出了标签的机制,也就是为读取的图像数据生成标签,该标签指示该图像数据在原始图像(也即读取前的图像数据,例如在DDR中存储的raw图像)中的位置信息,从而可以基于该标签,处理设备可以确定图像数据中的各个像素在原始图像中的位置,并从而可以对读取的图像数据进行解交织,也即确定各个像素的颜色分量。In order to solve the above problems, the embodiment of the present application proposes a tag mechanism, that is, generating a tag for the read image data, the tag indicates that the image data is stored in the original image (that is, the image data before reading, for example, stored in DDR Based on the label, the processing device can determine the position of each pixel in the image data in the original image, and thus can deinterleave the read image data, that is, determine each pixel Color component.
其中,在处理设备在通过先进可扩展接口(Advanced eXtensible Interface,AXI)向DDR发送用于读取图像数据的读请求时,可以基于该读 请求的标识(Identifier,ID)号生成上述标签,返回的图像数据可以携带该ID号,处理设备可以基于该ID号,确定返回的图像数据对应的标签,并基于该标签对返回的图像数据进行解交织。Wherein, when the processing device sends a read request for reading image data to the DDR through the Advanced Extensible Interface (AXI), it can generate the above-mentioned label based on the identifier (ID) number of the read request and return The image data may carry the ID number, and the processing device may determine a label corresponding to the returned image data based on the ID number, and deinterleave the returned image data based on the label.
如图1至4所示,偶数行和奇数行分别存在不同的颜色分量,即偶数行存在两种颜色分量,奇数行存在另外两种颜色分量,从而可以基于图像数据是偶数行或是奇数行来确定返回的图像数据是哪两种颜色分量;以及,每行的图像数据可以由至少一个时钟读取,各个时钟读取的数据分别是该行的特定位置的数据,由此可以基于读取图像数据的时钟信息来确定各个像素是对应行的两个颜色分量中的哪个颜色分量。As shown in Figures 1 to 4, there are different color components for even-numbered lines and odd-numbered lines, that is, there are two color components for even-numbered lines, and there are two other color components for odd-numbered lines, which can be based on whether the image data is even or odd To determine which two color components of the returned image data; and, the image data of each line can be read by at least one clock, and the data read by each clock is the data of a specific position of the line, which can be based on the reading The clock information of the image data determines which of the two color components of the corresponding row each pixel is.
由此,以上根据提到的标签指示的图像数据的行信息以及时钟信息来对图像数据进行解交织。其中,该行信息可以表征图像数据是奇数行还是偶数行。该时钟信息可以表征读取图像数据的时钟属于当前行的第几个时钟。或者,可以将一行数据对应的时钟进行循环的划分,每行数据可以对应一个循环,每个循环可以包括一个或多个时钟。由此可以基于图像数据属于第几个循环以及循环中的第几个时钟,确定图像数据的在原始图像中的位置,从而可以对图像数据进行解交织。Thus, the image data is deinterleaved based on the line information and clock information of the image data indicated by the label mentioned above. Wherein, the line information can represent whether the image data is an odd line or an even line. The clock information may represent the number of clocks in the current row that the clock for reading the image data belongs to. Alternatively, a clock corresponding to a row of data may be divided into cycles, and each row of data may correspond to a cycle, and each cycle may include one or more clocks. Therefore, the position of the image data in the original image can be determined based on the number of cycles the image data belongs to and the number of clocks in the cycle, so that the image data can be deinterleaved.
可选地,在本申请实施例中,也可以基于标签确定像素存储的位置。具体地可以根据图像数据的行信息以及时钟信息来确定图像数据对应的存储区域和在存储区域中的存储地址。Optionally, in the embodiment of the present application, the storage location of the pixel may also be determined based on the label. Specifically, the storage area corresponding to the image data and the storage address in the storage area may be determined according to the line information of the image data and the clock information.
假设需要分割的图像块的大小是N*N(N行N列),一个存储区域组(可用存储空间可以包括一个存储区域组也可以包括多个存储区域组,每个存储区域组针对原始图像包括的每个颜色分量均包括至少一个存储区域)针对原始数据的一行可以存储的数据可以为m个时钟读取的数据,m个时钟读取的数据可以对应m/s=w个循环,每个循环包括s个时钟,针对某个颜色分量,每个循环可以解交织出p个地址的像素,p是该颜色分量对应的存储区域的数量,则每个循环针对p个存储区域中的每个存储区域可以写入一个地址的数据,在计算存储的地址时可以按照j*N+i,i取值从0到N-1,j取值从0到w-1,其中如果存在上述存储区域共享的情况,对于其他颜色分量,可以在j*N+i的基础上加个常数,不同颜色分量的存储地址可以区分开。例如,一个颜色分量的存储地址为0至wN-1,而另一个颜色分量的存储地址为wN至2wN-1。Assume that the size of the image block to be divided is N*N (N rows and N columns), one storage area group (available storage space may include one storage area group or multiple storage area groups, and each storage area group is directed to the original image Each color component included includes at least one storage area) The data that can be stored for one row of the original data can be data read by m clocks, and the data read by m clocks can correspond to m/s=w cycles, each Each cycle includes s clocks. For a certain color component, each cycle can deinterleave pixels with p addresses. p is the number of storage areas corresponding to the color component. Each cycle is for each of the p storage areas. One storage area can be written with data at one address. When calculating the storage address, the value of i can be from 0 to N-1, and the value of j can be from 0 to w-1. If the above storage exists In the case of area sharing, for other color components, a constant can be added on the basis of j*N+i, and the storage addresses of different color components can be distinguished. For example, the storage address of one color component is 0 to wN-1, and the storage address of another color component is wN to 2wN-1.
读取图像数据的时钟在所属的循环中的时钟数和图像数据的行信息可以确定存储哪个存储区域,以及读取图像数据的时钟在所属的循环中的时钟数可以确定数据的拼接方式(也即确定是否写入到上个时钟未被写满的地址)。The clock number of the clock that reads the image data in the cycle to which the image data belongs and the row information of the image data can determine which storage area is stored, and the clock number of the clock that reads the image data in the cycle that belongs to can determine the data splicing method (also That is, to determine whether to write to the address of the last clock is not full).
例如,假设一个存储区域组可以存储的图像数据的大小是32mb,图像块的大小是8*8,每个时钟读取128比特的数据,每个像素的像素值为12比特,存储区域的每个地址可以存储8个像素,则换算成原始数据为每行为48个时钟,其中,可以每3个时钟为一循环,则存在16个循环,针对一个颜色分量,每个循环可以产生16个像素,该16个像素可以占据2个地址,该2个地址属于2个存储区域,则对于一个循环而言,一个存储区域需要加上1个地址,而由于一个图像块的行数为8行,则每增加一个循环,可以加上8个地址,因此,可以利用j*8+i或j*8+i+256(其中,j为循环数,i为偶数行数或奇数行数)的方式计算在所属的存储区域的存储地址。由于一个循环可以占据2个地址,该2个地址分别属于2个存储区域,则可以根据读取图像数据的时钟在所属的循环中的时钟数可以确定数据的拼接方式和具体存入哪个存储区域。For example, suppose that the size of the image data that a storage area group can store is 32mb, the size of the image block is 8*8, 128 bits of data are read per clock, and the pixel value of each pixel is 12 bits. Each address can store 8 pixels, then converted to original data is 48 clocks per line, of which, every 3 clocks can be a cycle, there are 16 cycles, for a color component, each cycle can produce 16 pixels , The 16 pixels can occupy 2 addresses, the 2 addresses belong to 2 storage areas, then for a cycle, a storage area needs to add 1 address, and because the number of lines of an image block is 8, Each additional loop can add 8 addresses, so you can use j*8+i or j*8+i+256 (where j is the number of loops, i is the number of even rows or odd rows) Calculate the storage address in the storage area to which it belongs. Since one cycle can occupy two addresses, and the two addresses belong to two storage areas, you can determine the data splicing method and the specific storage area according to the number of clocks in the cycle of the clock that reads the image data. .
又例如,假设一个存储区域组可以存储的图像数据的大小是32mb,图像块的大小是8*8,每个时钟读取128比特的数据,每个像素的像素值为16比特,存储区域的每个地址可以存储8个像素,则换算成原始数据为每行为64个时钟,其中,可以每4个时钟为一循环,则存在16个循环,针对一个颜色分量,每个循环可以产生16个像素,该16个像素可以占据2个地址,该2个地址属于2个存储区域,则对于一个循环而言,一个存储区域需要加上1个地址,而由于一个图像块的行数为8行,则每增加一个循环,可以加上8个地址,因此,可以利用j*8+i或j*8+i+256(其中,j为循环数,i为偶数行数或奇数行数)的方式计算在所属的存储区域的存储地址。For another example, suppose that the size of the image data that a storage area group can store is 32mb, the size of the image block is 8*8, 128 bits of data are read per clock, and the pixel value of each pixel is 16 bits. Each address can store 8 pixels, and the original data is converted into 64 clocks per line. Among them, every 4 clocks can be a cycle, there are 16 cycles, and for a color component, each cycle can produce 16 Pixels, the 16 pixels can occupy 2 addresses, the 2 addresses belong to 2 storage areas, then for a cycle, a storage area needs to add 1 address, and because an image block has 8 lines , Each additional cycle, you can add 8 addresses, so you can use j * 8 + i or j * 8 + i + 256 (where j is the number of cycles, i is the number of even rows or odd rows) Method to calculate the storage address in the storage area to which it belongs.
应理解,以上给出的存储地址的计算方式仅仅是本申请实施例的一种实现方式,不应对本申请造成特别的限定。It should be understood that the calculation method of the storage address given above is only an implementation manner of the embodiment of the present application, and should not be particularly limited to the present application.
应理解,以上是以图像块是正方形为例进行说明的,但应理解,本申请实施例并不限于此,分割的图像块的大小也可以不是正方形的。It should be understood that the above description is based on the example that the image block is a square, but it should be understood that the embodiments of the present application are not limited thereto, and the size of the divided image block may not be square.
例如,假设需要分割的图像块的大小是Q*N(Q行N列),一个存储区域组针对原始数据的一行可以存储的数据可以为m个时钟读取的数据,m个 时钟可以对应m/s=w个循环,每个循环包括s个时钟,针对单个颜色分量,每个循环可以产生p个地址的数据,p是该单个颜色分量对应的存储区域的数量,则每个循环针对一个存储区域可以写入一个地址的数据,因此,在计算存储位置是可以按照j*Q+i,i取值从0到N-1,j取值从0到w-1。For example, assuming that the size of the image block to be divided is Q*N (Q rows and N columns), the data that one storage area group can store for one row of the original data can be data read by m clocks, and m clocks can correspond to m /s=w cycles, each cycle includes s clocks, for a single color component, each cycle can generate p addresses of data, p is the number of storage areas corresponding to the single color component, then each cycle is for one Data in an address can be written in the storage area. Therefore, in calculating the storage location, the value of i can be from 0 to N-1 according to j*Q+i, and the value of j can be from 0 to w-1.
因此,基于以上方案,可以基于标签,对图像数据进行解交织,以及各个颜色分量在存储区域中的地址。本申请标签的机制可以避免在解交织之前以及数据读取之后对数据进行缓存以对读取的数据进行排序。Therefore, based on the above scheme, it is possible to deinterleave the image data based on the label and the address of each color component in the storage area. The mechanism of the label of the present application can avoid buffering the data before deinterleaving and after the data is read to sort the read data.
如果解交织处理的图像数据是顺序的数据,可以在收集一定时钟的图像数据时,可以再进行解交织,并写入存储区域。但是如果解交织处理乱序的数据,数据的返回是没有规律的,则可以在当前时钟内对数据进行解交织,这是因为等待下一时钟的数据是没有意义的,可以及时对图像数据进行处理,避免未处理的图像数据越来越多,占据存储资源。If the image data processed by the deinterleaving process is sequential data, it can be deinterleaved and written into the storage area when the image data of a certain clock is collected. But if the deinterleaving process is out of order data, the data return is irregular, you can deinterleave the data in the current clock, because it is meaningless to wait for the data of the next clock, you can carry out on the image data in time Processing to avoid more and more unprocessed image data, occupying storage resources.
可选地,本申请实施例的存储区域能够用于存储多种格式的图像数据,其中,不同格式的图像数据的像素的比特数不同。Optionally, the storage area of the embodiment of the present application can be used to store image data in multiple formats, where the number of pixels of the image data in different formats is different.
具体地,为了保证兼容性,处理设备可能会处理多种格式的图像数据,例如,处理单个像素占用的比特数分别为12和16比特的图像数据。Specifically, in order to ensure compatibility, the processing device may process image data in multiple formats, for example, processing image data of 12 and 16 bits occupied by a single pixel, respectively.
为此,在各个颜色分量对应的图像数据的单个像素的比特数小于第一比特数时,在针对各个颜色分量对应的图像数据进行存储时,对所述单个像素进行占位填充,使得所述单个像素的比特数达到所述第一比特数,其中,所述第一比特数是多种格式的图像数据中单个像素对应的最大比特数。For this reason, when the number of bits of a single pixel of image data corresponding to each color component is less than the first bit number, when storing the image data corresponding to each color component, the single pixel is place-filled so that the The number of bits of a single pixel reaches the first number of bits, where the first number of bits is the maximum number of bits corresponding to a single pixel in image data in multiple formats.
以单个像素占用的比特数分别为12比特和16比特为例,为了保证存储区域既可以存储12比特的像素,也可以存储16比特的像素,则在对12比特的像素进行存储时,可以针对每12个比特的像素填充4比特,其中,可以在12比特的低位填充,当然,也可以在12比特的高位填充,其中,填充的比特位的数值可以为0。Taking the number of bits occupied by a single pixel as 12-bit and 16-bit, respectively, in order to ensure that the storage area can store both 12-bit pixels and 16-bit pixels, when storing 12-bit pixels, you can target Each 12-bit pixel is filled with 4 bits. Among them, the lower bits of 12 bits can be filled. Of course, the higher bits of 12 bits can also be filled. The value of the filled bits can be 0.
为了便于更加清楚地理解本申请,以下将分别以单个像素的比特数为12比特,以及单个像素的比特数为16比特为例,结合图11和图12分别说明如何对图像数据进行解交织和存储。In order to facilitate a clearer understanding of the present application, the following will take the number of bits of a single pixel as 12 bits and the number of bits of a single pixel as 16 bits as an example. storage.
假设单个像素的比特数为12比特,每个时钟读取的比特数为128比特,图像的交织排布方式可以如图1所示,每个颜色分量具有两个RAM,颜色分量B和R共享存储区域,颜色分量Gb和Gr共享存储区域。此时,可以 3个时钟为一个循环,每个循环可以针对两个颜色分量中的每个颜色分量产生两个地址的图像数据。可用存储空间中共包括4个RAM,即RAM1,RAM2,RAM3和RAM4。R和B共享RAM1和RAM2,Gr和Gb共享RAM3和RAM4。Assuming that the number of bits of a single pixel is 12 bits, and the number of bits read per clock is 128 bits, the interleaved arrangement of the image can be as shown in Figure 1, each color component has two RAMs, and color components B and R share Storage area, the color components Gb and Gr share the storage area. At this time, three clocks can be used as one cycle, and each cycle can generate two addresses of image data for each of the two color components. The available storage space includes a total of 4 RAMs, namely RAM1, RAM2, RAM3 and RAM4. R and B share RAM1 and RAM2, and Gr and Gb share RAM3 and RAM4.
图11所示的是一个循环中的3个时钟的图像数据存储情况,图11中共存在3个大框,每个大框内部分别是一个时钟的情况。其中,每个大框中最上面一排为读取的一个时钟128比特的数据,该排中的每个小方框代表4比特的数据,32个小方框共128个比特的数据,其中每12比特一个像素相邻排放,每种颜色代表一种颜色分量。Fig. 11 shows the image data storage of 3 clocks in one cycle. There are 3 large frames in Fig. 11, each of which is a clock. Among them, the top row of each large box is a clock of 128 bits of data read, each small box in the row represents 4 bits of data, 32 small boxes of 128 bits of data, of which One pixel is arranged adjacent to every 12 bits, and each color represents a color component.
图11中的每个大框的下面四排为写入4片RAM的数据格式。为了跟16比特格式兼容,在每12比特像素低4位补0,即灰色黑字小方框所示。解交织单元每收到一排交织数据,则可以拆分成下面所示的单颜色分量的图像数据,写入对应的RAM。The bottom four rows of each large frame in FIG. 11 are the data formats written to 4 pieces of RAM. In order to be compatible with the 16-bit format, the lower 4 bits of each 12-bit pixel are filled with 0s, as shown by the small gray and black boxes. Each time the deinterleaving unit receives a row of interleaved data, it can be split into the single-color image data shown below and written to the corresponding RAM.
从图11可以看出,时钟1读取的图像数据包括颜色分量R和Gr,可以将R对应的颜色存入到RAM1中的地址1,以及可以将Gr对应的颜色分量存入到RAM3中的地址1,时钟2读取的图像数据仍然包括颜色分量R和Gr,由于RAM1中的地址1和RAM3中的地址1均没有存储满,则可以将该时钟2读取的R对应的像素的一部分数据存入到RAM1的地址1,另一部分数据存入到RAM2中的地址1,以及将该时钟2读取的Gr对应的像素的一部分数据存入到RAM3的地址1,另一部分数据存入到RAM4中的地址1。时钟3读取的图像数据仍然包括颜色分量R和Gr,由于RAM2中的地址1和RAM4中的地址1均没有存储满,则可以将该时钟3读取的R对应的像素存入到RAM3的地址1(该地址剩余的空间刚好存储时钟3读取的R对应的像素),以及将该时钟读取的Gr对应的像素的存入到RAM4的地址1(该地址剩余的空间刚好存储时钟3读取的R对应的像素)。It can be seen from FIG. 11 that the image data read by clock 1 includes color components R and Gr, the color corresponding to R can be stored in address 1 in RAM1, and the color component corresponding to Gr can be stored in RAM3 The image data read by address 1 and clock 2 still include the color components R and Gr. Since neither address 1 in RAM 1 nor address 1 in RAM 3 is fully stored, a part of the pixel corresponding to R read by clock 2 can be used Data is stored in address 1 of RAM1, another part of data is stored in address 1 of RAM2, and part of the data of the pixel corresponding to Gr read by this clock 2 is stored in address 1 of RAM3, and the other part of data is stored in Address 1 in RAM4. The image data read by clock 3 still includes the color components R and Gr. Since neither address 1 in RAM2 nor address 1 in RAM4 is full, the pixels corresponding to R read by clock 3 can be stored in RAM3. Address 1 (the remaining space at this address just stores the pixel corresponding to R read by clock 3), and the pixel corresponding to the Gr read by this clock is stored in address 1 of RAM 4 (the remaining space at this address just stores clock 3 The pixel corresponding to R read).
如图11所示,写入RAM的地址标注在右侧的长方形框中。假设可用存储空间开辟的RAM大小可以缓存32mb,则换算成原始数据每行为48个时钟。这48个时钟以3个时钟为一个循环分为16个循环。为了计算出数据应该写入的地址,每一个时钟的原始数据会带有一个标签,显示在图中右边的长方形框中。其中i代表当前数据是第多少偶行或奇行,(2*i+0)代表这是一个偶数行的数据。48是根据存储空间的大小计算出的每行应该 跳转的地址增量,这个数字会随RAM的容量大小而改变。j代表当前数据属于第多少次循环。最后的0,1,2代表这是当前循环的第0,1,2时钟的数据。根据i和j信息可以计算出当前解交织后的数据应该存储的RAM地址。根据这是当前循环的第几个时钟的数据可以确定数据的拼接方式。As shown in FIG. 11, the address written to the RAM is marked in a rectangular frame on the right. Assuming that the available storage space can open up 32MB of RAM, the conversion to raw data will take 48 clocks per line. The 48 clocks are divided into 16 cycles with 3 clocks as one cycle. In order to calculate the address where the data should be written, the raw data of each clock will have a label, which is displayed in the rectangular box on the right side of the figure. Where i represents how many even or odd rows the current data is, (2*i+0) represents that this is an even row of data. 48 is the increment of the address that each line should jump based on the size of the storage space. This number will change with the size of the RAM. j represents how many cycles the current data belongs to. The last 0, 1, 2 represents that this is the data of the 0, 1, 2 clock of the current cycle. According to the information of i and j, the RAM address where the current deinterleaved data should be stored can be calculated. The data splicing method can be determined according to the data of the several clocks of the current cycle.
假设单个像素的比特数为16比特,每个时钟读取的比特数为128比特,图像的交织排布方式可以如图1所示,每个颜色分量具有两个RAM,颜色分量B和R共享存储区域,颜色分量Gb和Gr共享存储区域。此时,可以4个时钟为一个循环,每个循环可以针对两个颜色分量中的每个颜色分量产生两个地址的图像数据。共包括4个RAM,即RAM1,RAM2,RAM3和RAM4。R和B共享RAM1和RAM2,Gr和Gb共享RAM3和RAM4。Assuming that the number of bits of a single pixel is 16 bits, and the number of bits read per clock is 128 bits, the interleaved arrangement of the image can be as shown in Figure 1, each color component has two RAMs, and color components B and R share Storage area, the color components Gb and Gr share the storage area. At this time, 4 clocks may be used as one cycle, and each cycle may generate image data of two addresses for each of the two color components. A total of 4 RAMs are included, namely RAM1, RAM2, RAM3 and RAM4. R and B share RAM1 and RAM2, and Gr and Gb share RAM3 and RAM4.
图12所示的是一个循环中的2个时钟的图像数据的存储情况,图12中共存在2个大框,每个大框内部分别是一个时钟的情况。其中,每个大框中最上面一排为读取的一个时钟128比特的数据,该排中的每个小方框代表4比特的数据,32个小方框共128个比特的数据,其中每16比特一个像素相邻排放,每种颜色代表一种颜色分量。图12中的下面四排为写入2片RAM的数据格式。Fig. 12 shows the storage of image data of two clocks in one cycle. There are two large frames in Fig. 12, and each large frame contains a clock. Among them, the top row of each large box is a clock of 128 bits of data read, each small box in the row represents 4 bits of data, 32 small boxes of 128 bits of data, of which One pixel is arranged adjacent to every 16 bits, and each color represents a color component. The lower four rows in Fig. 12 are the data formats written to 2 RAMs.
从图12可以看出,时钟1读取的图像数据包括颜色分量R和Gr,可以将R对应的颜色存入到RAM1中的地址1,以及可以将Gr对应的颜色分量存入到RAM3中的地址1。时钟2读取的图像数据仍然包括颜色分量R和Gr,由于RAM1中的地址1和RAM2中的地址1均没有存储满,则可以将该时钟2读取的R对应的像素存入到RAM1的地址1(该地址剩余的空间刚好存储时钟2读取的R对应的像素),以及将该时钟读取的Gr对应的像素的存入到RAM2的地址1(该地址剩余的空间刚好存储时钟2读取的Gr对应的像素)。As can be seen from FIG. 12, the image data read by clock 1 includes color components R and Gr, the color corresponding to R can be stored in address 1 in RAM1, and the color component corresponding to Gr can be stored in RAM3 Address 1. The image data read by clock 2 still includes the color components R and Gr. Since neither address 1 in RAM1 nor address 1 in RAM2 is full, the pixels corresponding to R read by clock 2 can be stored in RAM1. Address 1 (the remaining space at this address just stores the pixel corresponding to R read by clock 2), and the pixel corresponding to the Gr read by this clock is stored in address 1 of RAM2 (the remaining space at this address just stores clock 2 The pixel corresponding to the read Gr).
如图12所示,写入RAM的地址标注在右侧的长方形框中。假设每个ram组开辟的大小可以缓存32mb,则换算成原始数据每行为64个时钟。这64个时钟以4个时钟为一个循环分为16个循环。为了计算出数据应该写入的地址,每一个时钟的原始数据会带有一个标签,例如显示在图中右边的长方形框中所示。其中i代表当前数据是第多少偶行或奇行,(2*i+0)代表这是一个偶数行的数据。64是根据存储空间的大小计算出的每行应该跳转 的地址增量,这个数字会随RAM的容量大小而改变。j代表当前数据属于第多少次循环。最后的0,1,2,3代表这是当前循环的第0,1,2,3时钟的数据。根据i和j信息可以计算出当前解交织后的数据应该存储的RAM地址。根据这是当前循环的第几个时钟的数据可以确定数据的拼接方式。As shown in FIG. 12, the address written to the RAM is marked in a rectangular frame on the right. Assuming that the size of each ram group can be cached by 32mb, it is converted into 64 clocks per line of raw data. The 64 clocks are divided into 16 cycles with 4 clocks as one cycle. In order to calculate the address where the data should be written, the raw data of each clock will have a label, such as shown in the rectangular box on the right side of the figure. Where i represents how many even or odd rows the current data is, (2*i+0) represents that this is an even row of data. 64 is the address increment that each line should jump based on the size of the storage space. This number will change with the RAM capacity. j represents how many cycles the current data belongs to. The last 0, 1, 2, 3 represents that this is the data of the 0, 1, 2, 3 clock of the current cycle. According to the information of i and j, the RAM address where the current deinterleaved data should be stored can be calculated. The data splicing method can be determined according to the data of the several clocks of the current cycle.
在140中,从所述存储区域中,针对所述每个颜色分量,分别执行读取操作,以得到所述每个颜色分量的图像块。In 140, from the storage area, for each color component, a read operation is separately performed to obtain an image block of each color component.
例如,如图13所示,在301中,等待配置起始信号;在302中,判断后端模块(例如,进行图像压缩的模块)是否请求图像数据,如果否,在301中,继续等待配置起始信号,如果是,在303中,判断是否存在RAM组为发送模式如果否,继续执行303,如果是,执行304;在304中,在该RAM组中读取图像数据;在305中,判断读取的数据是否达到了配置的图像块大小,如果否,继续执行304,进行读取数据,如果是,则执行306;在306中,判断RAM组中是否还有未使用的数据,如果否,配置RAM组为空闲模式,则后续可以进行解交织数据的写入,如果是,执行302,判断后端模块是否请求数据。For example, as shown in FIG. 13, in 301, wait for a configuration start signal; in 302, determine whether a back-end module (for example, a module that performs image compression) requests image data, and if not, in 301, continue to wait for configuration The start signal, if it is, in 303, determine whether there is a RAM group as the transmission mode. If not, continue to execute 303, if yes, perform 304; in 304, read the image data in the RAM group; in 305, Determine whether the read data reaches the configured image block size, if not, continue to perform 304, read data, if yes, then perform 306; in 306, determine whether there is unused data in the RAM group, if No, if the RAM group is configured in idle mode, the deinterleaving data can be written subsequently. If yes, go to 302 to determine whether the back-end module requests data.
为了更加清楚地理解本申请,以下将结合图14对本申请实施例进行描述。In order to understand the application more clearly, the embodiments of the application will be described below with reference to FIG. 14.
图14以prores raw视频编码架构的技术背景为例进行阐述。应理解,本申请可以被用于所有类似的视频/图像类处理架构中。图14为prores raw视频编码架构的总框图,prores raw视频编码架构400由3个单元组成,分别是预处理单元410,处理单元420和写出单元430。此处的预处理单元410可以对应本申请实施例中的处理设备。Figure 14 illustrates the technical background of prores raw video coding architecture as an example. It should be understood that the present application can be used in all similar video/image processing architectures. FIG. 14 is a general block diagram of the prores raw video coding architecture. The prores raw video coding architecture 400 is composed of three units, namely a preprocessing unit 410, a processing unit 420, and a writing unit 430. The preprocessing unit 410 here may correspond to the processing device in the embodiment of the present application.
读取单元411可以通过axi通道向DDR500发送读请求,从DDR中读取图像数据,读取单元411可以基于ID,生成标签,并且可以接收DDR通过axi通道发送的图像数据,读取单元411可以将标签以及图像数据发送至解交织单元412;解交织单元412可以对图像数据进行解交织以及生成写地址,基于写地址,将解交织的图像数据发送至缓存单元413,缓存单元可以包括多个RAM组,每个RAM组可以循环存储;划块单元414可以进行RAM读取,进行图像数据的划块,以及图像块发送至处理单元420,处理单元420可以对图像块进行处理(例如,压缩处理),并将处理后的图像数据发送至 写出单元430,写出单元430可以将处理后的数据写入DDR500中。The reading unit 411 can send a read request to the DDR500 through the axi channel, read image data from the DDR, the reading unit 411 can generate a tag based on the ID, and can receive the image data sent by the DDR through the axi channel, the reading unit 411 can Send the label and the image data to the deinterleaving unit 412; the deinterleaving unit 412 can deinterleave the image data and generate a write address, and based on the write address, send the deinterleaved image data to the buffer unit 413, which may include multiple RAM group, each RAM group can be stored cyclically; the block unit 414 can perform RAM reading, block image data, and the image block is sent to the processing unit 420, the processing unit 420 can process the image block (for example, compression Process), and send the processed image data to the write-out unit 430, where the write-out unit 430 can write the processed data into the DDR500.
在本申请实施例中,对读取的图像数据进行解交织,以得到每个颜色分量对应的图像数据,并将所述每个颜色分量对应的图像数据分别存储到存储空间中所述每个颜色分量对应的存储区域中,从所述存储区域中,针对所述每个颜色分量,分别执行读取操作,以得到所述每个颜色分量的图像块,本申请实施例在解交织与划块之间加入了图像数据的存储,并且在存储时将每个颜色分量对应的图像数据分别存储到所述每个颜色分量对应的存储区域中,可以实现在图像块读取时从各个颜色分量对应的存储区域进行读取,将解交织与图像块的划块进行了解耦,如果需要对解交织的策略进行变化,无需改动划块的方式,只需将解交织的相关参数配置给解交织单元,同样地,如果需要对划块的策略进行变化,无需改动解交织的方式,只需将划块的相关参数配置给划块单元,不仅简化了设计的复杂度,提高了灵活性,而且可以更方便的支持新的解交织模式或新的划块模式,利于系统架构的扩展,在图像处理出现故障时,可以以存储区域为分界点缩小故障排查和调整位置,对处理方式的验证也起到了简化和加速的效果。In the embodiment of the present application, de-interleaving the read image data to obtain image data corresponding to each color component, and storing the image data corresponding to each color component to the storage space respectively In the storage area corresponding to the color component, from the storage area, read operations are performed for each color component separately to obtain an image block of each color component. The storage of image data is added between the blocks, and the image data corresponding to each color component is stored in the storage area corresponding to each color component during storage, which can be achieved from each color component when the image block is read Read the corresponding storage area, decoupling the deinterleaving from the image block. If you need to change the deinterleaving strategy, you don’t need to change the method of block division, just configure the relevant parameters of the deinterleaving to the solution. Interleaving unit, similarly, if you need to change the strategy of partitioning, you don’t need to change the deinterleaving method, you only need to configure the relevant parameters of the partitioning to the partitioning unit, which not only simplifies the design complexity, but also increases the flexibility. Moreover, it can more conveniently support the new deinterleaving mode or the new block mode, which is conducive to the expansion of the system architecture. When the image processing fails, the storage area can be used as the demarcation point to narrow down the troubleshooting and adjust the position, and verify the processing method. It also simplifies and accelerates.
图15是根据本申请实施例的图像处理设备600的示意性框图。该设备600包括第一读取单元610、解交织单元620、存储单元630和第二读取单元640。15 is a schematic block diagram of an image processing apparatus 600 according to an embodiment of the present application. The device 600 includes a first reading unit 610, a deinterleaving unit 620, a storage unit 630, and a second reading unit 640.
其中,第一读取单元610,用于读取图像数据,其中,读取的所述图像数据包括多个像素,所述多个像素具有至少一个颜色分量,以及每个像素分别具有一个颜色分量;解交织单元620,用于对读取的所述图像数据进行解交织,以得到每个颜色分量对应的图像数据;存储单元630,用于将所述每个颜色分量对应的图像数据分别存储到存储空间中所述每个颜色分量对应的存储区域中;第二读取单元640,用于从所述存储区域中,针对所述每个颜色分量,分别执行读取操作,以得到所述每个颜色分量的图像块。The first reading unit 610 is used to read image data, wherein the read image data includes a plurality of pixels, the plurality of pixels have at least one color component, and each pixel has a color component ; Deinterleaving unit 620, used to deinterleave the read image data to obtain image data corresponding to each color component; storage unit 630, used to store the image data corresponding to each color component respectively Into a storage area corresponding to each color component in the storage space; a second reading unit 640 is configured to perform a reading operation for each color component from the storage area to obtain the Image block for each color component.
可选地,在本申请实施例中,所述每个颜色分量对应有至少两个存储区域,每个存储区域分别具有独立的写入和读取接口。Optionally, in the embodiment of the present application, each color component corresponds to at least two storage areas, and each storage area has an independent writing and reading interface.
可选地,在本申请实施例中,所述至少一个颜色分量包括第一颜色分量,所述第一颜色分量对应的存储区域包括第一存储区域和第二存储区域,所述第一颜色分量对应的图像数据为第一图像数据,其中,读取的所述图像数据为单个时钟读取的,所述第一存储区域和所述第二存储中每个存储区域分别 包括至少一个存储地址,每个存储地址存储至少一个像素的像素值;Optionally, in the embodiment of the present application, the at least one color component includes a first color component, and the storage area corresponding to the first color component includes a first storage area and a second storage area, and the first color component The corresponding image data is first image data, wherein the read image data is read by a single clock, and each storage area in the first storage area and the second storage includes at least one storage address, Each storage address stores the pixel value of at least one pixel;
所述存储单元630进一步用于:The storage unit 630 is further used for:
将所述第一图像数据存储到所述第一存储区域的一个存储地址,在所述一个地址存储满之后,将所述第一图像数据的剩余未存储的数据存储到所述第二存储区域的一个存储地址。Storing the first image data to a storage address of the first storage area, and after the one address is full, storing the remaining unstored data of the first image data to the second storage area A storage address.
可选地,在本申请实施例中,所述每个颜色分量对应至少一个存储区域,每个存储区域用于存储不出现在同一行中的至少两个颜色分量的图像数据,每个存储区域分别具有独立的写入和读取接口。Optionally, in the embodiment of the present application, each color component corresponds to at least one storage area, and each storage area is used to store image data of at least two color components that do not appear in the same row, and each storage area Separate write and read interfaces.
可选地,在本申请实施例中,所述每个颜色分量对应至少一个存储区域,属于同一行的颜色分量对应的存储区域不同,每个存储区域分别具有独立的写入和读取接口。Optionally, in the embodiment of the present application, each color component corresponds to at least one storage area, and the storage areas corresponding to the color components belonging to the same row are different, and each storage area has an independent writing and reading interface.
可选地,在本申请实施例中,所述解交织单元620进一步用于:Optionally, in the embodiment of the present application, the deinterleaving unit 620 is further used to:
基于所述图像数据的标签,对所述图像数据进行解交织;Deinterleaving the image data based on the label of the image data;
所述存储单元630进一步用于:The storage unit 630 is further used for:
基于所述标签,确定所述每个颜色分量在对应的存储区域中的存储地址;Based on the label, determining the storage address of each color component in the corresponding storage area;
其中,所述标签表征所述图像数据在读取前的原始图像中的位置信息。Wherein, the tag represents the position information of the image data in the original image before reading.
可选地,在本申请实施例中,所述标签信息包括所述图像数据的行信息和所述图像数据在所属行中的时钟信息。Optionally, in the embodiment of the present application, the label information includes line information of the image data and clock information of the image data in the line to which it belongs.
可选地,在本申请实施例中,所述行信息指示所述图像数据所属的行是奇数行或是偶数行,以及指示所述图像数据所属行的奇数行数或偶数行数。Optionally, in the embodiment of the present application, the line information indicates whether the line to which the image data belongs is an odd line or an even line, and indicates the number of odd or even lines to which the image data belongs.
可选地,在本申请实施例中,所述时钟信息指示读取所述图像数据的时钟所属的循环的循环数,以及指示读取所述图像数据的时钟在所属的循环中的时钟数;其中,所述存储空间包括至少一个存储区域组,每个存储区域组包括所述至少一个颜色分量对应的存储区域,所述每个存储区域组最大可存储的一行数据需要被至少一个循环的时钟读取,每个循环包括至少一个时钟,每个循环针对所述至少一个颜色分量中的每个颜色分量解交织出p个地址的像素,其中p是所述每个颜色分量对应的存储区域的数量。Optionally, in the embodiment of the present application, the clock information indicates the number of cycles of the cycle to which the clock for reading the image data belongs, and indicates the number of clocks in the cycle to which the clock for reading the image data belongs; Wherein, the storage space includes at least one storage area group, each storage area group includes a storage area corresponding to the at least one color component, and the maximum storable line of data in each storage area group needs to be at least one cycle clock Read, each cycle includes at least one clock, and each cycle deinterleaves pixels of p addresses for each color component in the at least one color component, where p is the storage area corresponding to each color component Quantity.
可选地,在本申请实施例中,所述标签是基于读取所述图像数据的读请求的标识ID号生成的。Optionally, in the embodiment of the present application, the label is generated based on the identification ID number of the read request to read the image data.
可选地,在本申请实施例中,所述存储空间能够用于存储多种格式的图 像数据,其中,不同格式的图像数据的像素的比特数不同。Optionally, in the embodiment of the present application, the storage space can be used to store image data in multiple formats, wherein the number of pixels of the image data in different formats is different.
可选地,在本申请实施例中,所述存储单元630进一步用于:Optionally, in the embodiment of the present application, the storage unit 630 is further used to:
在各个颜色分量对应的图像数据的单个像素的比特数小于第一比特数时,在针对各个颜色分量对应的图像数据进行存储时,对所述单个像素进行占位填充,使得所述单个像素的比特数达到所述第一比特数,其中,所述第一比特数是多种格式的图像数据对应的单个像素的最大比特数。When the number of bits of a single pixel of the image data corresponding to each color component is less than the first bit number, when storing the image data corresponding to each color component, the single pixel is place-filled so that the The number of bits reaches the first number of bits, where the first number of bits is the maximum number of bits of a single pixel corresponding to image data in multiple formats.
可选地,在本申请实施例中,所述存储空间包括多个存储区域组,每个存储区域组包括所述至少一个颜色分量对应的存储区域,不同的存储区域组针对相同的颜色分量包括的存储区域不同,所述每个存储区域组用于循环存储解交织后的图像数据。Optionally, in the embodiment of the present application, the storage space includes a plurality of storage area groups, each storage area group includes a storage area corresponding to the at least one color component, and different storage area groups include the same color component Each storage area group is used to cyclically store deinterleaved image data.
应理解,该图像处理设备600可以实现上述方法实施例中的方法,为了简洁,在此不再赘述。It should be understood that the image processing device 600 may implement the method in the foregoing method embodiments, and for the sake of brevity, no further description is provided here.
图16是根据本申请实施例的图像处理设备700的示意性框图。如图16所示,该图像处理设备700可以包括处理电路710。其中,该处理电路710可以用于实现上述方法实施例中的方法,为了简洁,在此不再赘述。16 is a schematic block diagram of an image processing apparatus 700 according to an embodiment of the present application. As shown in FIG. 16, the image processing apparatus 700 may include a processing circuit 710. Wherein, the processing circuit 710 may be used to implement the method in the above method embodiments, and for the sake of brevity, no further description is provided here.
可选地,在本申请实施例中,该图像处理设备700还包括存储器,该存储器可以用于提供存储空间,用于存储本申请实施例中提到的解交织的图像数据。Optionally, in the embodiment of the present application, the image processing device 700 further includes a memory, which may be used to provide a storage space for storing the deinterleaved image data mentioned in the embodiment of the present application.
图17是根据本申请实施例的视频处理器800的示意性框图。该视频处理器800可以包括图像处理设备810,该图像处理设备810可以对应于上述图像处理设备600或700。17 is a schematic block diagram of a video processor 800 according to an embodiment of the present application. The video processor 800 may include an image processing device 810, which may correspond to the image processing device 600 or 700 described above.
应理解,该视频处理器800还可以包括其他的单元,例如,用于对图像处理设备读取的图像块进行压缩的单元等,为了简洁,在此不再赘述。It should be understood that the video processor 800 may further include other units, for example, a unit for compressing the image blocks read by the image processing device, etc. For the sake of brevity, details are not described here.
本申请实施例中的图像处理设备或视频处理器可以应用于无人机中,为无人机上承载的拍摄设备拍摄的RAM提供图像处理。The image processing device or video processor in the embodiment of the present application may be applied to a drone to provide image processing for a RAM photographed by a photographing device carried on the drone.
本申请实施例的处理电路可能是一种集成电路芯片,具有数据处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理电路中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理电路可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶 体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。The processing circuit in the embodiment of the present application may be an integrated circuit chip with data processing capabilities. In the implementation process, each step of the foregoing method embodiments may be completed by an integrated logic circuit of hardware in a processing circuit or an instruction in the form of software. The above-mentioned processing circuit may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an existing programmable gate array (Field Programmable Gate Array, FPGA), or other available Programming logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps, and logical block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied and executed by a hardware decoding processor, or may be executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, and registers. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art may realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application of the technical solution and design constraints. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and conciseness of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a division of logical functions. In actual implementation, there may be other divisions, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使 用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,)ROM、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application essentially or part of the contribution to the existing technology or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。The above is only the specific implementation of this application, but the scope of protection of this application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application. It should be covered by the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (29)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized in that it includes:
    读取图像数据,其中,读取的所述图像数据包括多个像素,所述多个像素具有至少一个颜色分量,以及每个像素分别具有一个颜色分量;Reading image data, wherein the read image data includes a plurality of pixels, the plurality of pixels has at least one color component, and each pixel has a color component;
    对读取的所述图像数据进行解交织,以得到每个颜色分量对应的图像数据;De-interleaving the read image data to obtain image data corresponding to each color component;
    将所述每个颜色分量对应的图像数据分别存储到存储空间中所述每个颜色分量对应的存储区域中;Storing the image data corresponding to each color component to a storage area corresponding to each color component in the storage space;
    从所述存储区域中,针对所述每个颜色分量,分别执行读取操作,以得到所述每个颜色分量的图像块。From the storage area, for each color component, a read operation is separately performed to obtain an image block of each color component.
  2. 根据权利要求1所述的方法,其特征在于,所述每个颜色分量对应有至少两个存储区域,每个存储区域分别具有独立的写入和读取接口。The method according to claim 1, wherein each color component corresponds to at least two storage areas, and each storage area has an independent writing and reading interface.
  3. 根据权利要求2所述的方法,其特征在于,所述至少一个颜色分量包括第一颜色分量,所述第一颜色分量对应的存储区域包括第一存储区域和第二存储区域,所述第一颜色分量对应的图像数据为第一图像数据,其中,读取的所述图像数据为单个时钟读取的,所述第一存储区域和所述第二存储中每个存储区域分别包括至少一个存储地址,每个存储地址存储至少一个像素的像素值;The method according to claim 2, wherein the at least one color component includes a first color component, and the storage area corresponding to the first color component includes a first storage area and a second storage area, the first The image data corresponding to the color component is first image data, wherein the read image data is read by a single clock, and each of the first storage area and the second storage includes at least one storage Address, each storage address stores the pixel value of at least one pixel;
    所述将所述每个颜色分量对应的图像数据分别存储到所述每个颜色分量对应的存储区域中,包括:The storing the image data corresponding to each color component to the storage area corresponding to each color component respectively includes:
    将所述第一图像数据存储到所述第一存储区域的一个存储地址,在所述一个地址存储满之后,将所述第一图像数据的剩余未存储的数据存储到所述第二存储区域的一个存储地址。Storing the first image data to a storage address of the first storage area, and after the one address is full, storing the remaining unstored data of the first image data to the second storage area A storage address.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述每个颜色分量对应至少一个存储区域,每个存储区域用于存储不出现在同一行中的至少两个颜色分量的图像数据,每个存储区域分别具有独立的写入和读取接口。The method according to any one of claims 1 to 3, wherein each color component corresponds to at least one storage area, and each storage area is used to store at least two color components that do not appear in the same row For the image data, each storage area has an independent write and read interface.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述每个颜色分量对应至少一个存储区域,属于同一行的颜色分量对应的存储区域不同,每个存储区域分别具有独立的写入和读取接口。The method according to any one of claims 1 to 4, wherein each color component corresponds to at least one storage area, and the color components belonging to the same row correspond to different storage areas, and each storage area has an independent Write and read interface.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述对读 取的所述图像数据进行解交织,包括:The method according to any one of claims 1 to 5, wherein the deinterleaving the read image data includes:
    基于所述图像数据的标签,对所述图像数据进行解交织;Deinterleaving the image data based on the label of the image data;
    所述将所述每个颜色分量对应的图像数据分别存储到所述每个颜色分量对应的存储区域中,包括:The storing the image data corresponding to each color component to the storage area corresponding to each color component respectively includes:
    基于所述标签,确定所述每个颜色分量在对应的存储区域中的存储地址;Based on the label, determining the storage address of each color component in the corresponding storage area;
    其中,所述标签表征所述图像数据在读取前的原始图像中的位置信息。Wherein, the tag represents the position information of the image data in the original image before reading.
  7. 根据权利要求6所述的方法,其特征在于,所述标签信息包括所述图像数据的行信息和所述图像数据在所属行中的时钟信息。The method according to claim 6, wherein the tag information includes line information of the image data and clock information of the image data in the line to which it belongs.
  8. 根据权利要求7所述的方法,其特征在于,所述行信息指示所述图像数据所属的行是奇数行或是偶数行,以及指示所述图像数据所属行的奇数行数或偶数行数。The method according to claim 7, wherein the line information indicates whether the line to which the image data belongs is an odd line or an even line, and indicates the number of odd or even lines to which the image data belongs.
  9. 根据权利要求7或8所述的方法,其特征在于,所述时钟信息指示读取所述图像数据的时钟所属的循环的循环数,以及指示读取所述图像数据的时钟在所属的循环中的时钟数;其中,所述存储空间包括至少一个存储区域组,每个存储区域组包括所述至少一个颜色分量对应的存储区域,所述每个存储区域组最大可存储的一行数据需要被至少一个循环的时钟读取,每个循环包括至少一个时钟,每个循环针对所述至少一个颜色分量中的每个颜色分量解交织出p个地址的像素,其中p是所述每个颜色分量对应的存储区域的数量。The method according to claim 7 or 8, wherein the clock information indicates the cycle number of the cycle to which the clock for reading the image data belongs, and indicates that the clock for reading the image data is in the corresponding cycle The number of clocks; wherein, the storage space includes at least one storage area group, each storage area group includes the storage area corresponding to the at least one color component, and the maximum storable line of data in each storage area group needs to be at least One cycle of clock reading, each cycle includes at least one clock, and each cycle deinterleaves pixels of p addresses for each color component in the at least one color component, where p is corresponding to each color component The number of storage areas.
  10. 根据权利要求6至9中任一项所述的方法,其特征在于,所述标签是基于读取所述图像数据的读请求的标识ID号生成的。The method according to any one of claims 6 to 9, wherein the tag is generated based on an identification ID number of a read request to read the image data.
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述存储空间能够用于存储多种格式的图像数据,其中,不同格式的图像数据的像素的比特数不同。The method according to any one of claims 1 to 10, wherein the storage space can be used to store image data in multiple formats, wherein the number of pixels of the image data in different formats is different.
  12. 根据权利要求11所述的方法,其特征在于,所述将所述每个颜色分量对应的图像数据分别存储到所述每个颜色分量对应的存储区域中,包括:The method according to claim 11, wherein the storing the image data corresponding to each color component to the storage area corresponding to each color component respectively comprises:
    在各个颜色分量对应的图像数据的单个像素的比特数小于第一比特数时,在针对各个颜色分量对应的图像数据进行存储时,对所述单个像素进行占位填充,使得所述单个像素的比特数达到所述第一比特数,其中,所述第 一比特数是多种格式的图像数据对应的单个像素的最大比特数。When the number of bits of a single pixel of the image data corresponding to each color component is less than the first bit number, when storing the image data corresponding to each color component, the single pixel is place-filled so that the The number of bits reaches the first number of bits, where the first number of bits is the maximum number of bits of a single pixel corresponding to image data in multiple formats.
  13. 根据权利要求1至12中任一项所述的方法,其特征在于,所述存储空间包括多个存储区域组,每个存储区域组包括所述至少一个颜色分量对应的存储区域,不同的存储区域组针对相同的颜色分量包括的存储区域不同,所述每个存储区域组用于循环存储解交织后的图像数据。The method according to any one of claims 1 to 12, wherein the storage space includes a plurality of storage area groups, and each storage area group includes a storage area corresponding to the at least one color component, different storage The area groups include different storage areas for the same color component, and each storage area group is used to cyclically store deinterleaved image data.
  14. 一种图像处理设备,其特征在于,包括:An image processing device, characterized in that it includes:
    第一读取单元,用于读取图像数据,其中,读取的所述图像数据包括多个像素,所述多个像素具有至少一个颜色分量,以及每个像素分别具有一个颜色分量;A first reading unit for reading image data, wherein the read image data includes a plurality of pixels, the plurality of pixels has at least one color component, and each pixel has a color component;
    解交织单元,用于对读取的所述图像数据进行解交织,以得到每个颜色分量对应的图像数据;A deinterleaving unit for deinterleaving the read image data to obtain image data corresponding to each color component;
    存储单元,用于将所述每个颜色分量对应的图像数据分别存储到存储空间中所述每个颜色分量对应的存储区域中;A storage unit, configured to store the image data corresponding to each color component in a storage area corresponding to each color component in a storage space;
    第二读取单元,用于从所述存储区域中,针对所述每个颜色分量,分别执行读取操作,以得到所述每个颜色分量的图像块。The second reading unit is configured to perform a reading operation for each color component from the storage area to obtain an image block of each color component.
  15. 根据权利要求14所述的设备,其特征在于,所述每个颜色分量对应有至少两个存储区域,每个存储区域分别具有独立的写入和读取接口。The device according to claim 14, wherein each color component corresponds to at least two storage areas, and each storage area has an independent writing and reading interface.
  16. 根据权利要求15所述的设备,其特征在于,所述至少一个颜色分量包括第一颜色分量,所述第一颜色分量对应的存储区域包括第一存储区域和第二存储区域,所述第一颜色分量对应的图像数据为第一图像数据,其中,读取的所述图像数据为单个时钟读取的,所述第一存储区域和所述第二存储中每个存储区域分别包括至少一个存储地址,每个存储地址存储至少一个像素的像素值;The device according to claim 15, wherein the at least one color component includes a first color component, and the storage area corresponding to the first color component includes a first storage area and a second storage area, the first The image data corresponding to the color component is first image data, wherein the read image data is read by a single clock, and each of the first storage area and the second storage includes at least one storage Address, each storage address stores the pixel value of at least one pixel;
    所述存储单元进一步用于:The storage unit is further used for:
    将所述第一图像数据存储到所述第一存储区域的一个存储地址,在所述一个地址存储满之后,将所述第一图像数据的剩余未存储的数据存储到所述第二存储区域的一个存储地址。Storing the first image data to a storage address of the first storage area, and after the one address is full, storing the remaining unstored data of the first image data to the second storage area A storage address.
  17. 根据权利要求14至16中任一项所述的设备,其特征在于,所述每个颜色分量对应至少一个存储区域,每个存储区域用于存储不出现在同一行中的至少两个颜色分量的图像数据,每个存储区域分别具有独立的写入和读取接口。The device according to any one of claims 14 to 16, wherein each color component corresponds to at least one storage area, and each storage area is used to store at least two color components that do not appear in the same row For the image data, each storage area has an independent write and read interface.
  18. 根据权利要求14至17中任一项所述的设备,其特征在于,所述每个颜色分量对应至少一个存储区域,属于同一行的颜色分量对应的存储区域不同,每个存储区域分别具有独立的写入和读取接口。The device according to any one of claims 14 to 17, wherein each color component corresponds to at least one storage area, and color components belonging to the same row correspond to different storage areas, and each storage area has an independent Write and read interface.
  19. 根据权利要求14至18中任一项所述的设备,其特征在于,所述解交织单元进一步用于:The device according to any one of claims 14 to 18, wherein the deinterleaving unit is further used to:
    基于所述图像数据的标签,对所述图像数据进行解交织;Deinterleaving the image data based on the label of the image data;
    所述存储单元进一步用于:The storage unit is further used for:
    基于所述标签,确定所述每个颜色分量在对应的存储区域中的存储地址;Based on the label, determining the storage address of each color component in the corresponding storage area;
    其中,所述标签表征所述图像数据在读取前的原始图像中的位置信息。Wherein, the tag represents the position information of the image data in the original image before reading.
  20. 根据权利要求19所述的设备,其特征在于,所述标签信息包括所述图像数据的行信息和所述图像数据在所属行中的时钟信息。The device according to claim 19, wherein the tag information includes line information of the image data and clock information of the image data in the line to which it belongs.
  21. 根据权利要求19所述的设备,其特征在于,所述行信息指示所述图像数据所属的行是奇数行或是偶数行,以及指示所述图像数据所属行的奇数行数或偶数行数。The apparatus according to claim 19, wherein the line information indicates whether the line to which the image data belongs is an odd line or an even line, and indicates the number of odd or even lines to which the image data belongs.
  22. 根据权利要求20或21所述的设备,其特征在于,所述时钟信息指示读取所述图像数据的时钟所属的循环的循环数,以及指示读取所述图像数据的时钟在所属的循环中的时钟数;其中,所述存储空间包括至少一个存储区域组,每个存储区域组包括所述至少一个颜色分量对应的存储区域,所述每个存储区域组最大可存储的一行数据需要被至少一个循环的时钟读取,每个循环包括至少一个时钟,每个循环针对所述至少一个颜色分量中的每个颜色分量解交织出p个地址的像素,其中p是所述每个颜色分量对应的存储区域的数量。The apparatus according to claim 20 or 21, wherein the clock information indicates a cycle number of a cycle to which the clock for reading the image data belongs, and instructs a clock for reading the image data to belong to the cycle The number of clocks; wherein, the storage space includes at least one storage area group, each storage area group includes the storage area corresponding to the at least one color component, and the maximum storable line of data in each storage area group needs to be at least One cycle of clock reading, each cycle includes at least one clock, and each cycle deinterleaves pixels of p addresses for each color component in the at least one color component, where p is corresponding to each color component The number of storage areas.
  23. 根据权利要求19至22中任一项所述的设备,其特征在于,所述标签是基于读取所述图像数据的读请求的标识ID号生成的。The apparatus according to any one of claims 19 to 22, wherein the tag is generated based on an identification ID number of a read request to read the image data.
  24. 根据权利要求14至23中任一项所述的设备,其特征在于,所述存储空间能够用于存储多种格式的图像数据,其中,不同格式的图像数据的像素的比特数不同。The device according to any one of claims 14 to 23, wherein the storage space can be used to store image data in multiple formats, wherein the number of pixels of the image data in different formats is different.
  25. 根据权利要求24所述的设备,其特征在于,所述存储单元进一步用于:The device according to claim 24, wherein the storage unit is further used to:
    在各个颜色分量对应的图像数据的单个像素的比特数小于第一比特数 时,在针对各个颜色分量对应的图像数据进行存储时,对所述单个像素进行占位填充,使得所述单个像素的比特数达到所述第一比特数,其中,所述第一比特数是多种格式的图像数据对应的单个像素的最大比特数。When the number of bits of a single pixel of the image data corresponding to each color component is less than the first bit number, when storing the image data corresponding to each color component, the single pixel is place-filled so that the The number of bits reaches the first number of bits, where the first number of bits is the maximum number of bits of a single pixel corresponding to image data in multiple formats.
  26. 根据权利要求14至25中任一项所述的设备,其特征在于,所述存储空间包括多个存储区域组,每个存储区域组包括所述至少一个颜色分量对应的存储区域,不同的存储区域组针对相同的颜色分量包括的存储区域不同,所述每个存储区域组用于循环存储解交织后的图像数据。The device according to any one of claims 14 to 25, wherein the storage space includes a plurality of storage area groups, and each storage area group includes a storage area corresponding to the at least one color component, different storage The area groups include different storage areas for the same color component, and each storage area group is used to cyclically store deinterleaved image data.
  27. 一种图像处理设备,其特征在于,包括处理电路和存储器;其中,所述处理单元用于执行根据权利要求1至13中任一项所述的方法。An image processing apparatus, characterized by comprising a processing circuit and a memory; wherein the processing unit is used to execute the method according to any one of claims 1 to 13.
  28. 根据权利要求27所述的设备,其特征在于,所述图像处理设备还包括存储器,其中,所述存储器用于提供存储空间,所述存储空间用于所述处理电路存储解交织后的图像数据。The apparatus according to claim 27, wherein the image processing apparatus further comprises a memory, wherein the memory is used to provide a storage space, and the storage space is used by the processing circuit to store deinterleaved image data .
  29. 一种视频处理器,其特征在于,包括根据权利要求14至28中任一项所述的图像处理设备。A video processor, characterized by comprising the image processing device according to any one of claims 14 to 28.
PCT/CN2018/118168 2018-11-29 2018-11-29 Image processing method and device, and video processor WO2020107319A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880039323.8A CN110869975A (en) 2018-11-29 2018-11-29 Image processing method and apparatus, and video processor
PCT/CN2018/118168 WO2020107319A1 (en) 2018-11-29 2018-11-29 Image processing method and device, and video processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/118168 WO2020107319A1 (en) 2018-11-29 2018-11-29 Image processing method and device, and video processor

Publications (1)

Publication Number Publication Date
WO2020107319A1 true WO2020107319A1 (en) 2020-06-04

Family

ID=69651908

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/118168 WO2020107319A1 (en) 2018-11-29 2018-11-29 Image processing method and device, and video processor

Country Status (2)

Country Link
CN (1) CN110869975A (en)
WO (1) WO2020107319A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111641417B (en) * 2020-06-09 2023-03-31 电子科技大学 FPGA-based device for finishing matrix array permutation interleaving
CN113613014A (en) * 2021-08-03 2021-11-05 北京爱芯科技有限公司 Image decoding method and device and image coding method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007070051A1 (en) * 2005-12-16 2007-06-21 Thomson Licensing Method, apparatus and system for color component registration
CN101188018A (en) * 2007-12-06 2008-05-28 北大方正集团有限公司 An automatic land return method and device in typeset
CN106568782A (en) * 2016-11-05 2017-04-19 上海大学 Machine vision-based method for conducting color quantization of colored bottle cap image

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007006381A (en) * 2005-06-27 2007-01-11 Toshiba Corp Image processing apparatus
CN106328045B (en) * 2015-07-06 2019-07-16 西安诺瓦电子科技有限公司 Programmable logic device and its sub-pix Downsapling method and data encoding circuit
CN108513670A (en) * 2017-07-25 2018-09-07 深圳市大疆创新科技有限公司 Handle method, chip, processor, system and the movable equipment of image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007070051A1 (en) * 2005-12-16 2007-06-21 Thomson Licensing Method, apparatus and system for color component registration
CN101188018A (en) * 2007-12-06 2008-05-28 北大方正集团有限公司 An automatic land return method and device in typeset
CN106568782A (en) * 2016-11-05 2017-04-19 上海大学 Machine vision-based method for conducting color quantization of colored bottle cap image

Also Published As

Publication number Publication date
CN110869975A (en) 2020-03-06

Similar Documents

Publication Publication Date Title
CN105120293B (en) Image collaboration coding/decoding method and device based on CPU and GPU
KR101127962B1 (en) Apparatus for image processing and method for managing frame memory in image processing
CN103609117B (en) Code and decode the method and device of image
US20060204046A1 (en) Method and apparatus for motion estimation in video signal decoding
CN107155093B (en) Video preview method, device and equipment
CN1306412C (en) Pixel data block generating apparatus and pixel data block generating method
CN105578190A (en) Lossless compression method and system for video hard decoding
CN107396112A (en) A kind of coding method and device, computer installation, readable storage medium storing program for executing
JP2011258207A (en) Processing system, data structure, and data processing method for simultaneous retrieval of multi-dimensional data without data conflict
WO2020107319A1 (en) Image processing method and device, and video processor
CN103841359A (en) Video multi-image synthesizing method, device and system
US20080259089A1 (en) Apparatus and method for performing motion compensation by macro block unit while decoding compressed motion picture
US20200128264A1 (en) Image processing
US7680351B2 (en) Video deblocking method and apparatus
EP1992162B1 (en) Memory organizational scheme and controller architecture for image and video processing
CN104954749B (en) A kind of information recording method
CN103093485B (en) Full view video cylindrical surface image storage method and system
US11189006B2 (en) Managing data for transportation
CN101662684A (en) Data storage method and device for video image coding and decoding
US8150215B2 (en) Routable image pipeline device
TWI517695B (en) On die/off die memory management
US10026149B2 (en) Image processing system and image processing method
US20050169541A1 (en) Image signal processing apparatus and image signal processing method
KR100710305B1 (en) data manager of video decording apparatus
CN103974073A (en) Image data processing method and image processing device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18941834

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18941834

Country of ref document: EP

Kind code of ref document: A1