WO2020220179A1 - Wavelet inverse transformation circuit and method - Google Patents

Wavelet inverse transformation circuit and method Download PDF

Info

Publication number
WO2020220179A1
WO2020220179A1 PCT/CN2019/084919 CN2019084919W WO2020220179A1 WO 2020220179 A1 WO2020220179 A1 WO 2020220179A1 CN 2019084919 W CN2019084919 W CN 2019084919W WO 2020220179 A1 WO2020220179 A1 WO 2020220179A1
Authority
WO
WIPO (PCT)
Prior art keywords
row
line
wavelet
data
code block
Prior art date
Application number
PCT/CN2019/084919
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 PCT/CN2019/084919 priority Critical patent/WO2020220179A1/en
Priority to CN201980007856.2A priority patent/CN111567042B/en
Publication of WO2020220179A1 publication Critical patent/WO2020220179A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets

Definitions

  • This application relates to the field of image decoding, and more specifically, to a wavelet inverse transform circuit and method.
  • JPEG 2000 Joint Photographic Experts Group 2000 is a commonly used image coding standard.
  • JPEG 2000 uses wavelet transform and performs entropy coding based on optimized interception of embedded block coding (embedded block coding with optimized truncation, EBCOT), which has a higher compression ratio than JPEG, and supports progressive download and display.
  • EBCOT embedded block coding with optimized truncation
  • the wavelet inverse transform circuit of the traditional JPEG 2000 decoder decodes code blocks of wavelet transform coding at the same level in the order of row order first and column order second.
  • the calculation efficiency of the wavelet inverse transform process is low.
  • This application provides a wavelet inverse transform circuit and method, which can improve the calculation efficiency of the wavelet inverse transform process.
  • a wavelet inverse transform circuit which includes: a first interface circuit for obtaining decoded code block data; an inverse transform circuit for obtaining data according to the first row, the N+1th row, and the second row , Line N+2, ..., line N, line 2N, perform inverse wavelet transform on the j-th level wavelet transform data of the code block data line by line to obtain the j-th level of the code block data
  • N and j are both positive integers greater than 1, and the frequency component corresponding to the data in the N+1 row is different from the frequency component corresponding to the data in the first row.
  • a wavelet inverse transform method including: obtaining decoded code block data; according to the first row, the N+1th row, the second row, the N+2th row,..., the Nth row, In the order of the 2Nth line, perform inverse wavelet transform on the j-th level wavelet transform data of the code block data line by line to obtain the j-th level wavelet inverse transform result of the code block data, and both N and j are greater than 1.
  • N and j are greater than 1.
  • a decoder in a third aspect, includes the wavelet inverse transform circuit described in the first aspect.
  • a computer-readable storage medium is provided, and instructions are stored in the computer-readable storage medium, which when run on a computer, cause the computer to execute the method described in the second aspect.
  • a computer program product containing instructions which when run on a computer, causes the computer to execute the method described in the second aspect.
  • the wavelet inverse transform circuit and method of the embodiment of the present application executes wavelet line by line in the order of line 1, line N+1, line 2, line N+2, ..., line N, line 2N Inverse transform, that is, adjust the processing sequence of wavelet inverse transform, so that wavelet train inverse transform and wavelet row inverse transform can be performed in parallel, which can improve the calculation efficiency of wavelet inverse transform process.
  • Fig. 1 is a schematic structural diagram of a decoder provided by an embodiment of the present application.
  • Figure 2 is a schematic structural diagram of another decoder provided by an embodiment of the present application.
  • Fig. 3 is a schematic diagram of the principle of wavelet transform of image blocks.
  • Fig. 4 is a schematic structural diagram of a wavelet inverse transform circuit of an embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of another wavelet inverse transform circuit according to an embodiment of the present application.
  • Fig. 6 is a schematic diagram of a decoding mode according to an embodiment of the present application.
  • Fig. 7 is a schematic diagram of another decoding mode according to an embodiment of the present application.
  • Fig. 8 is a schematic diagram of another decoding mode according to an embodiment of the present application.
  • Fig. 9 is a schematic diagram of another decoding mode according to an embodiment of the present application.
  • FIG. 10 is a schematic flowchart of a wavelet inverse transform method provided by an embodiment of the present application.
  • This application can be applied to the field of image coding and decoding, video coding and decoding, hardware video coding and decoding, dedicated circuit video coding and decoding, and real-time video coding and decoding.
  • the decoder provided in this application can be used to decode image lossy compression (lossy compression) and can also be used to decode image lossless compression (lossless compression).
  • the lossless compression can be a visually lossless compression (visually lossless compression) or a mathematically lossless compression (mathematically lossless compression).
  • the decoder 1 may include one or more of the following circuits: code stream reading circuit 11, code stream analysis circuit 12, decoding circuit 13, inverse quantization circuit 14, inverse transform circuit 15, output circuit 16.
  • the code stream reading circuit 11 can be used to read the code stream to be decoded.
  • the code stream reading circuit 11 can, for example, use an advanced extensible interface (AXI) to read the code stream to be decoded from an external memory (such as a memory).
  • AXI advanced extensible interface
  • the code stream parsing circuit 12 may also be referred to as a code stream header parser circuit (header parser).
  • the code stream analysis circuit 12 can parse various types of header information in the code stream, and separate parameters and code stream data related to decoding therefrom for use by the subsequent decoding circuit 13.
  • the decoding circuit 13 may include one decoding unit or parallel multiple decoding units (the specific number can be configured according to actual needs, for example, one parallel decoding unit can be configured). Each decoding unit in the decoding circuit 13 can independently perform entropy decoding on a code block.
  • a preprocessing circuit may be provided before the decoding circuit 13.
  • the preprocessing circuit can be used to distribute the decoding parameters, code stream data, etc. output by the code stream analysis circuit 12 to parallel multiple decoding units.
  • a post-processing circuit may also be provided.
  • the post-processing circuit can be used to reorganize the entropy decoded data output by the decoding circuit 13 and output the organized data to the subsequent circuit.
  • the inverse quantization circuit 14 can be used to inversely quantize the data obtained by entropy decoding by the decoding circuit 13.
  • the wavelet inverse transform circuit 15 can be used to perform wavelet inverse transform on the data output by the inverse quantization circuit 14.
  • the output circuit 16 can be used to write the data output by the wavelet inverse transform circuit 15 into an external memory.
  • the data output by the wavelet inverse transform circuit 15 can be written into an external memory through AXI.
  • the decoder 1 may also include a software configuration interface. Through the software configuration interface, the information in the internal registers of the decoder 1 can be configured or changed, so as to control the decoding mode of the decoder 1.
  • decoding the operations performed by the decoder 1 are collectively referred to as “decoding”, and the operations performed by the decoding circuit 13 are referred to as “entropy decoding”. If not explicitly indicated, “decoding” refers to the operations performed by the decoder 1. It will not be repeated in the embodiment.
  • Fig. 2 shows a schematic structural diagram of another decoder 2 provided by an embodiment of the present application.
  • the decoder 2 shown in FIG. 2 includes the following modules: a Din module 21, a header parser module 22, a pre-organizer module 23, a parallel decoding circuit 24, and a post-organizer module 25, IQUANT module 26, IDWT module 27, Dout module 28, Reg interface 29.
  • the Din module 21 is used to read a code stream from an external memory through AXI, and corresponds to the code stream reading circuit 11 in FIG. 1.
  • the header parser module 22 is used to parse the code stream, and corresponds to the code stream parsing circuit 12 in FIG. 1.
  • the pre-organizer module 23 is used to allocate the decoding parameters and code stream data output by the header parser module 22 to the parallel decoding circuit 24.
  • the pre-organizer module 23 may also be called a pre-processing circuit.
  • the parallel decoding circuit 24 includes 8 decoding units, including decoding unit 0, decoding unit 1,..., decoding unit 7, for example, DEC unit 0, DEC unit 1,..., DEC unit 7, and each decoding unit can be independently Entropy decoding the data of a code block.
  • the parallel decoding circuit 24 corresponds to the decoding circuit 13 in FIG. 1.
  • the Post-organizer module 25 is used to reorganize the entropy decoded data of the parallel decoding circuit 24 and output the organized data to the subsequent circuit.
  • the post-organizer module 25 may also be referred to as a post-processing circuit.
  • the IQUANT module 26 is used to inversely quantize the data from the Post-organizer module 25, corresponding to the inverse quantization circuit 14 in FIG. 1.
  • the IDWT module 27 is used to perform inverse wavelet transform on the inversely quantized data, corresponding to the inverse wavelet transform circuit 15 in FIG. 1.
  • the Dout module 28 is used to write the image recovered after the wavelet inverse transformation into the external memory, corresponding to the output circuit 16 in FIG. 1.
  • Reg interface 29 is the software configuration interface of decoder 2, which can be configured through the peripheral bus (advanced peripheral bus, APB) (or advanced high performance bus (AHB), or AXI) to configure the relevant control registers of decoder 2 to control Decoding behavior of decoder 2.
  • APB advanced peripheral bus
  • AXI advanced high performance bus
  • the decoder 2 only shows the deployment of 8 decoding units, and working at a frequency of 700Mhz can achieve 8192 ⁇ 4320 12bit 15fps RAW image decoding. If you want to support higher specifications, such as 30fps, etc., you only need to increase the number of decoding units in the parallel decoding circuit 24, and the pre- and post-processing modules can be slightly adjusted, which will not be repeated here.
  • the decoder 1 and the decoder 2 provided in the embodiment of the present application may perform decoding in units of tiles (tile). Take decoder 1 as an example. After decoder 1 reads the code stream from an external memory, the entire decoding process can be performed on-chip (because the embodiment of this application uses image blocks as the unit for decoding, the intermediate data is not too large and can be passed The on-chip cache is used for temporary storage) and does not interact with external memory to save system bandwidth. In addition, all levels of circuits in the decoder 1 can work in a pipeline manner to improve decoding efficiency. Decoder 2 is similar and will not be repeated.
  • the decoder 1 and the decoder 2 in the embodiments of the present application are based on the JPEG2000 standard, implement hardware decoding for various images (such as RAW domain images), can support resolution downsampling decoding, and support layered decoding.
  • JPEG 2000 uses wavelet transform and performs entropy coding based on optimized interception of embedded block coding (embedded block coding with optimized truncation, EBCOT), which has a higher compression ratio than JPEG, and supports progressive download and display.
  • the wavelet inverse transform circuit of the traditional JPEG 2000 decoder (such as the above decoder 1, decoder 2) decodes the wavelet transform coding code blocks of the same level in the order of row order first and column order second, and the wavelet inverse transform process The calculation efficiency is low.
  • the embodiment of the present application provides a new wavelet inverse transform circuit, which can improve the calculation efficiency of the wavelet inverse transform process.
  • Wavelet transform is generally performed by a wavelet transform circuit, which corresponds to the wavelet inverse transform circuit deployed in the decoder 1 and/or decoder 2, and the wavelet transform circuit is deployed in the encoder.
  • Fig. 3 is a schematic diagram of the principle of wavelet transform of image blocks. Assuming that the size of the image block shown in FIG. 3 is 256 ⁇ 256, the wavelet transform circuit usually divides the image block into several blocks for transformation, and each transformation will produce 4 intermediate results, namely 4 code blocks. Among them, for the last transformation, the generated 4 code blocks will be output at the same time. In other cases, 3 code blocks will be output (that is, the code blocks corresponding to the frequency components of HL, LH, and HH).
  • the image block shown in FIG. 3 is the result of performing three wavelet transforms.
  • the result of the first-level wavelet transform is the code blocks corresponding to 1LL, 1HL, 1LH, and 1HH (size Respectively 128 ⁇ 128).
  • the second-level wavelet transform is continued on the 1LL code block in the upper left corner, and the result is the code block corresponding to 2LL, 2HL, 2LH, and 2HH (the size is 64 ⁇ 64 respectively).
  • the third-level wavelet transform is the code block corresponding to 3LL, 3HL, 3LH, and 3HH (32 ⁇ 32 in size respectively).
  • wavelet transform is divided into wavelet row transform and wavelet row transform.
  • the wavelet transform circuit can perform wavelet row transform first, then wavelet row transform, or wavelet row transform first, then wavelet row transform.
  • inverse wavelet transform is divided into inverse wavelet row transform and inverse wavelet column transform. If the wavelet transform circuit first performs wavelet row transform on the image block, and then performs wavelet column transform, the wavelet inverse transform circuit needs to perform wavelet column first Inverse transformation, and then wavelet row inverse transformation; if the wavelet transform circuit performs wavelet column transformation on the image block first, and then wavelet row transformation, the wavelet inverse transform circuit needs to perform wavelet row inverse transformation first, and then wavelet column inverse transformation .
  • Fig. 4 shows a schematic structural diagram of a wavelet inverse transform circuit of an embodiment of the present application.
  • the wavelet inverse transform circuit 15 shown in FIG. 4 includes: a first interface circuit 31 and an inverse transform circuit 32.
  • the first interface circuit 31 is used to obtain the decoded code block data
  • the inverse transform circuit 32 is used to obtain the data according to the first row, the N+1th row, the second row, the N+2th row,..., the Nth row, In the order of the 2Nth line, perform inverse wavelet transform on the j-th level wavelet transform data of the code block data line by line to obtain the j-th level wavelet inverse transform result of the code block data, and both N and j are greater than 1.
  • the frequency component corresponding to the data in the N+1 row is different from the frequency component corresponding to the data in the first row.
  • the above-mentioned inverse wavelet transform operation is performed alternately for line data of at least two different frequency components. Due to coding, the wavelet transform operation will obtain 4 frequency components (LL, HL, LH and HH respectively) through de-interleaving.
  • the process of alternately performing wavelet inverse transform is equivalent to a data re-interleaving process. Therefore, in this application
  • the interleaving and the wavelet inverse transform can be performed at the same time. Compared with the separate and independent operations of the interleaving and the wavelet inverse transform, it saves more hardware resources such as memory, which is beneficial to improve calculation efficiency.
  • the above-mentioned j-th level wavelet transform may be the third level wavelet transform data (for example, 3LL, 3HL, 3LH and 3HH), or the second level wavelet transform (for example, 2LL, 3HH, 2HL, 2LH and 2HH).
  • the data of is not limited in the embodiment of this application.
  • the wavelet inverse transform circuit of the embodiment of the present application performs wavelet inverse transform on the data of the j-th wavelet transform of the code block data in a prescribed order, so that after the wavelet inverse transform is performed for a period of time, the data output by the wavelet inverse transform After satisfying the number of data processing of wavelet inverse transform, the inverse wavelet transform is started.
  • the inverse wavelet transform and the wavelet row inverse transform of the remaining data can be performed in parallel, which can improve the calculation efficiency of the wavelet inverse transform process.
  • both the data in the 1 row and the data in the N+1th row belong to the data in the frequency component LL after the j-1th level wavelet transform.
  • FIG. 5 shows a schematic structural diagram of another wavelet inverse transform circuit according to an embodiment of the present application.
  • the above-mentioned inverse transform circuit may include: a first inverse transform circuit 41, a transposition circuit 43, and a second inverse transform circuit 44.
  • the first inverse transform circuit 41 is used to: in the order of row 1, row N+1, row 2, row N+2, ..., row N, row 2N, row by row to the code
  • the j-th level wavelet transform data of the block data is subjected to wavelet line inverse transformation to obtain the j-th level wavelet line inverse transform result of the code block data.
  • the number of rows of the j-th wavelet transform data is 2N, where N is A positive integer greater than 1, j is a positive integer;
  • the transposition circuit 43 is used to: transpose the result of the j-th level wavelet row inverse transform of the code block data;
  • the second inverse transform circuit 44 is used to: Row, row N+1, row 2, row N+2, ..., row N, row 2N, the j-th level wavelet row inverse transformation of the transposed code block data row by row Perform the inverse wavelet transform on the result of to obtain the result of the j-th level wavelet inverse transform of the code block data.
  • the above-mentioned wavelet inverse transform circuit first performs wavelet inverse transform on the data of the j-th level of wavelet transform, then transposes the result of the j-th level of wavelet inverse transform, and executes the wavelet inverse transform. It should be understood that the wavelet inverse transform circuit may also first perform wavelet inverse transform on the j-th level of wavelet transform data, and then transpose the result of the j-th level of wavelet inverse transform, and perform wavelet row inverse transform. This is not limited.
  • the transposition circuit 43 may transpose the M rows of data after the result of the j-th level wavelet row inverse transform of the code block data includes M rows of data, so that the second inverse transform circuit 44 advances Perform inverse wavelet transformation on the transposed code block data.
  • M indicates that the second inverse transform circuit 44 can process at most M data in each clock cycle, and M is a positive integer.
  • the inverse wavelet transform is performed line by line in the order of line 1, line N+1, line 2, line N+2,..., line N, line 2N, the inverse wavelet transform is performed After M rows of data, the wavelet inverse transform can be executed. At this time, the first inverse transform circuit can continue to perform wavelet inverse transform on the remaining data. In this way, the wavelet inverse transform and wavelet inverse transform will be executed in parallel, which improves The computational efficiency of the wavelet inverse transform circuit.
  • the wavelet inverse transform circuit further includes: a first buffer 42 for storing the result of the j-th level wavelet row inverse transform of the code block data.
  • the transposition circuit 43 is further configured to obtain the result of the j-th level wavelet row inverse transformation of the code block data from the first buffer 42.
  • the above-mentioned first buffer 42 and transposition circuit 43 may also be a set of circuits.
  • the first buffer may be all or part of the memory in the transposition circuit 43.
  • the embodiment of the present application There is no restriction on this.
  • the wavelet inverse transform circuit further includes: a second buffer 45 for storing the result of the j-th level wavelet inverse transform of the code block data.
  • j is greater than 1
  • the first inverse transform circuit 41 is further configured to: obtain the j-th level wavelet inverse transform result of the code block data from the second buffer 45;
  • the result of the j-th level wavelet inverse transform is used as the LL data of the j-1 level wavelet transform, and the HL data, LH data, and HH data of the j-1 level wavelet transform of the code block data are combined as the code block
  • the inverse transform circuit is also used to: according to the first line, the 2N+1 line, the second line, the 2N+2 line,..., the 2Nth line, the 4Nth line In the order of lines, perform wavelet inverse transformation on the j-1 level wavelet transform data of the code block data line by line to obtain the j-1 level wavelet inverse transform result of the code block data.
  • the data of the first row and the data of the 2N+1th row both belong to the data in the original image block (ie, the image block before wavelet transform). If j is greater than 2, then the data in the first row and the data in the 2N+1 row belong to the data in the frequency component LL after the j-2th level wavelet transform.
  • the encoder performs the j-th level wavelet transform
  • the decoder when the decoder decodes the j-1th level wavelet transform data, it needs to decode the j-th level wavelet transform data first, and the wavelet inverse of the j-th level wavelet transform data
  • the transformation result will be stored in the second buffer 45. Therefore, when performing the j-1th level wavelet inverse transform processing, the inverse transform circuit can combine the jth level wavelet inverse transform results stored in the second buffer 45 and the remaining data of the j-1th level to perform wavelet inverse transform .
  • the first inverse transform circuit 41 shown in FIG. 5 can be used to: according to the first row, the 2N+1th row, the second row, the 2N+2th row,..., the 2Nth row, the 4Nth row In the order of rows, perform wavelet inverse transform on the j-1th level wavelet transform data of the code block data line by line to obtain the j-1th level wavelet line inverse transform result of the code block data; transposition circuit 43 It can be used to: transpose the result of the j-1th level wavelet row inverse transform of the code block data; the second inverse transform circuit 44 can be used to: according to the first row, the 2N+1 row, and the second row , Row 2N+2, ..., row 2N, row 4N, perform the wavelet column inverse transformation on the j-1 level wavelet row inverse transformation result of the transposed code block data row by row to obtain The result of the j-1th level wavelet inverse transform of the code block data.
  • level j-1 data is similar to that of level j data, and the transposition circuit 43 may also include M rows of data in the result of the j-1 level wavelet row inverse transformation of the code block data. After that, the M rows of data are transposed, so that the second inverse transform circuit 44 performs wavelet inverse transform on the transposed code block data in advance, which will not be repeated here.
  • decoder 1 or decoder 2 can select an appropriate decoding mode from the following four decoding modes according to requirements when decoding:
  • the wavelet inverse transform circuit will directly output the 3LL component (the size is 32 ⁇ 32) without any operation.
  • Decoding all the components of the third-level wavelet transform is equivalent to decoding 2LL (64 ⁇ 64 in size), as shown in Figure 7, the wavelet inverse transform circuit will first input the first row of data of 3LL+3HL (corresponding to the execution order 0 in the figure) ), a total of 64 data, 8 data input per clock cycle, the total overhead is 8 clock cycles.
  • 4 data belong to the 3LL component and 4 data belong to the 3HL component, that is, the data of different frequency components are simultaneously interleaved and inversely transformed. In this way, the data before wavelet transform can be interleaved and restored.
  • the wavelet inverse transform circuit inputs the first row of data of 3LH+3HH (corresponding to the execution order 1 in the figure), then inputs the second row of data of 3LL+3HL (corresponding to the execution order 2 in the figure), and then inputs 3LH+3HH The second row of data (corresponding to the execution order 3 in the figure), and so on, until all the components of the third-level wavelet transform have been input.
  • Decoding all the components of the second-level wavelet transform requires decoding all the components of the third-level wavelet transform (ie 3LL, 3HL, 3LH, and 3HH), and then decode the remaining components of the second-level wavelet transform (ie, 2HL, 2LH, and 2HH).
  • the decoding of all components of the third-level wavelet transform is as described in 2).
  • the wavelet inverse transform circuit can input the first row of 2HL data (64 data in total), and combine the 64 data of the first row of 2LL for processing (corresponding to the execution sequence 00 in the figure), and input 8 data per clock cycle.
  • the total overhead is 16 clock cycles.
  • 4 data belong to the 2LL component
  • 4 data belong to the 2HL component.
  • the wavelet inverse transform circuit inputs the first row of data of 2LH+2HH (corresponding to the execution order 11 in the figure), and then inputs the second row of data of 2LL+2HL (corresponding to the execution order 22 in the figure), and then inputs 2LH+2HH The second row of data (corresponding to the execution order 33 in the figure), and so on, until all the components of the second-level wavelet transform have been input.
  • the wavelet inverse transform circuit can input the first row of data of 1HL (128 data in total), and combine the 128 data of the first row of 1LL for processing (corresponding to the execution sequence 000 in the figure), and input 8 data per clock cycle.
  • the total overhead is 32 clock cycles. Among the 8 data input in each clock cycle, 4 data belong to 1LL component, and 4 data belong to 1HL component.
  • the wavelet inverse transform circuit inputs the first row of data of 1LH+1HH (corresponding to the execution order 111 in the figure), then inputs the second row of data of 1LL+1HL (corresponding to the execution order 222 in the figure), and then inputs 1LH+1HH The second row of data (corresponding to the execution sequence 333 in the figure), and so on, until all the components of the first-level wavelet transform have been input.
  • the wavelet inverse transform circuit of the embodiment of the present application performs wavelet inverse transform on the j-th wavelet transform data of the code block data in a prescribed order, so that the wavelet column inverse transform and the wavelet row inverse transform can be performed in parallel, which can improve the wavelet inverse transform The computational efficiency of the process.
  • the embodiment of the application also provides a wavelet inverse transform method.
  • the wavelet inverse transform method can be executed by the decoder 1, the decoder 2, or the wavelet inverse transform circuit 15 mentioned above.
  • the wavelet inverse transform method includes:
  • both the data in the 1 row and the data in the N+1th row belong to the data in the frequency component LL after the j-1th level wavelet transform.
  • the performing wavelet inverse transformation on the j-th wavelet transform data of the code block data line by line includes: according to the first line, the N+1th line, the second line, the N+2th line, ..., in the order of the Nth row and the 2Nth row, perform wavelet row inverse transformation on the j-th level wavelet transform data of the code block data line by line to obtain the j-th level wavelet line inverse transform result of the code block data ,
  • the number of rows of the j-th level wavelet transform data is 2N, N is a positive integer greater than 1, and j is a positive integer; transpose the result of the j-th level wavelet row inverse transform of the code block data; according to In the order of row 1, row N+1, row 2, row N+2, ..., row N, row 2N, the j-th level wavelet row of the transposed code block data is row by row
  • the result of the inverse transformation performs inverse wavelet transformation to obtain the result of the j-th level
  • the transposing the result of the j-th level wavelet row inverse transform of the code block data includes: after the result of the j-th level wavelet row inverse transform of the code block data includes M rows of data, Transpose the M rows of data, M indicates that each clock cycle can process at most M data, and M is a positive integer.
  • the method further includes: storing the j-th level wavelet row inverse transform result of the code block data in the In a buffer.
  • the method further includes: obtaining the j-th level wavelet of the code block data from the first buffer The result of the inverse transformation.
  • the method further includes: storing the j-th level wavelet inverse transform result of the code block data in a second buffer ⁇
  • j is greater than 1, and the method further includes: obtaining the result of the j-th level wavelet inverse transform of the code block data from the second buffer; and taking the result of the j-th level wavelet inverse transform as
  • the LL data of the j-1 level wavelet transform, combined with the HL data, LH data, and HH data of the j-1 level wavelet transform of the code block data, are used as the j-1 level wavelet transform of the code block data Data; in the order of row 1, row 2N+1, row 2, row 2N+2, ..., row 2N, row 4N, row by row the j-1 level wavelet of the code block data
  • the transformed data is subjected to inverse wavelet transform to obtain the result of the j-1th level wavelet inverse transform of the code block data.
  • the performing wavelet inverse transform on the j-1th level wavelet transform data of the code block data line by line includes: according to the first line, the 2N+1th line, the second line, and the 2N+2th line Row,..., 2Nth row, 4Nth row, perform wavelet row inverse transformation on the j-1th level wavelet transformed data of the code block data row by row to obtain the j-1th level of the code block data Wavelet inverse transform result; transpose the result of j-1 level wavelet inverse transform of the code block data; according to the first line, the 2N+1 line, the second line, the 2N+2 line,...
  • the 2Nth row and the 4Nth row perform wavelet column inverse transformation on the j-1th level wavelet row inverse transform result of the transposed code block data row by row to obtain the jth row of the code block data
  • the result of -1 level wavelet inverse transform is the result of -1 level wavelet inverse transform.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It 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 they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

Provided are a wavelet inverse transformation circuit and method. The wavelet inverse transformation circuit comprises: a first interface circuit used for obtaining decoded code block data; and an inverse transformation circuit used for performing wavelet inverse transformation on the jth level wavelet transformation data of the code block data line by line in an order of the 1st line, the (N+1)th line , the 2nd line, the (N+2)th line , ... , the Nth line, the 2Nth line to obtain the result of the jth level wavelet inverse transformation of the code block data, wherein both N and j each are positive integers greater than 1, and the frequency component corresponding to the data in the (N+1)th line is different from the frequency component corresponding to the data in the 1st line. According to the wavelet inverse transformation circuit and method of the embodiment of the present application, the wavelet inverse transformation sequence is adjusted, such that the wavelet column inverse transformation and the wavelet line inverse transformation can be performed in parallel, thereby improving the calculation efficiency of the wavelet inverse transformation process.

Description

小波逆变换电路和方法Wavelet inverse transform circuit and method
版权申明Copyright statement
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。The content disclosed in this patent document contains copyrighted material. The copyright belongs to the copyright owner. The copyright owner does not object to anyone copying the patent document or the patent disclosure in the official records and archives of the Patent and Trademark Office.
技术领域Technical field
本申请涉及图像解码领域,更为具体地,涉及一种小波逆变换电路和方法。This application relates to the field of image decoding, and more specifically, to a wavelet inverse transform circuit and method.
背景技术Background technique
联合图像专家小组(joint photographic experts group,JPEG)2000是常用的图像编码标准。Joint Photographic Experts Group (JPEG) 2000 is a commonly used image coding standard.
JPEG 2000采用小波变换,并基于优化截取内嵌码块编码(embedded block coding with optimized truncation,EBCOT)进行熵编码,具有比JPEG更高的压缩比,并支持渐进式下载和显示。JPEG 2000 uses wavelet transform and performs entropy coding based on optimized interception of embedded block coding (embedded block coding with optimized truncation, EBCOT), which has a higher compression ratio than JPEG, and supports progressive download and display.
传统JPEG 2000的解码器的小波逆变换电路针对同级的小波变换编码码块,按照行序优先、列序次之的顺序进行解码,小波逆变换过程的计算效率较低。The wavelet inverse transform circuit of the traditional JPEG 2000 decoder decodes code blocks of wavelet transform coding at the same level in the order of row order first and column order second. The calculation efficiency of the wavelet inverse transform process is low.
发明内容Summary of the invention
本申请提供一种小波逆变换电路和方法,能够提高小波逆变换过程的计算效率。This application provides a wavelet inverse transform circuit and method, which can improve the calculation efficiency of the wavelet inverse transform process.
第一方面,提供了一种小波逆变换电路,包括:第一接口电路,用于获取解码后的码块数据;逆变换电路,用于按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波逆变换,得到所述码块数据的第j级小波逆变换的结果,N和j均为大于1的正整数,所述N+1行的数据对应的频率分量与所述第1行的数据对应的频率分量不同。In the first aspect, a wavelet inverse transform circuit is provided, which includes: a first interface circuit for obtaining decoded code block data; an inverse transform circuit for obtaining data according to the first row, the N+1th row, and the second row , Line N+2, ..., line N, line 2N, perform inverse wavelet transform on the j-th level wavelet transform data of the code block data line by line to obtain the j-th level of the code block data As a result of the wavelet inverse transform, N and j are both positive integers greater than 1, and the frequency component corresponding to the data in the N+1 row is different from the frequency component corresponding to the data in the first row.
第二方面,提供了一种小波逆变换方法,包括:获取解码后的码块数据; 按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波逆变换,得到所述码块数据的第j级小波逆变换的结果,N和j均为大于1的正整数。In the second aspect, a wavelet inverse transform method is provided, including: obtaining decoded code block data; according to the first row, the N+1th row, the second row, the N+2th row,..., the Nth row, In the order of the 2Nth line, perform inverse wavelet transform on the j-th level wavelet transform data of the code block data line by line to obtain the j-th level wavelet inverse transform result of the code block data, and both N and j are greater than 1. A positive integer.
第三方面,提供了一种解码器,所述解码器包括第一方面所述的小波逆变换电路。In a third aspect, a decoder is provided, and the decoder includes the wavelet inverse transform circuit described in the first aspect.
第四方面,提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行第二方面所述的方法。In a fourth aspect, a computer-readable storage medium is provided, and instructions are stored in the computer-readable storage medium, which when run on a computer, cause the computer to execute the method described in the second aspect.
第五方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第二方面所述的方法。In a fifth aspect, a computer program product containing instructions is provided, which when run on a computer, causes the computer to execute the method described in the second aspect.
本申请实施例的小波逆变换电路和方法,通过按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行执行小波逆变换,即调整小波逆变换的处理顺序,使得小波列逆变换和小波行逆变换能够并行进行,能够提高小波逆变换过程的计算效率。The wavelet inverse transform circuit and method of the embodiment of the present application executes wavelet line by line in the order of line 1, line N+1, line 2, line N+2, ..., line N, line 2N Inverse transform, that is, adjust the processing sequence of wavelet inverse transform, so that wavelet train inverse transform and wavelet row inverse transform can be performed in parallel, which can improve the calculation efficiency of wavelet inverse transform process.
附图说明Description of the drawings
图1是本申请实施例提供的解码器的结构示意图。Fig. 1 is a schematic structural diagram of a decoder provided by an embodiment of the present application.
图2是本申请实施例提供的另一解码器的结构示意图。Figure 2 is a schematic structural diagram of another decoder provided by an embodiment of the present application.
图3是图像块的小波变换的原理示意图。Fig. 3 is a schematic diagram of the principle of wavelet transform of image blocks.
图4是本申请实施例的小波逆变换电路的结构示意图。Fig. 4 is a schematic structural diagram of a wavelet inverse transform circuit of an embodiment of the present application.
图5是本申请实施例的另一种小波逆变换电路的结构示意图。Fig. 5 is a schematic structural diagram of another wavelet inverse transform circuit according to an embodiment of the present application.
图6是本申请实施例的一种解码模式的示意图。Fig. 6 is a schematic diagram of a decoding mode according to an embodiment of the present application.
图7是本申请实施例的另一种解码模式的示意图。Fig. 7 is a schematic diagram of another decoding mode according to an embodiment of the present application.
图8是本申请实施例的另一种解码模式的示意图。Fig. 8 is a schematic diagram of another decoding mode according to an embodiment of the present application.
图9是本申请实施例的另一种解码模式的示意图。Fig. 9 is a schematic diagram of another decoding mode according to an embodiment of the present application.
图10是本申请实施例提供的小波逆变换方法的示意性流程图。FIG. 10 is a schematic flowchart of a wavelet inverse transform method provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请可应用于图像编解码领域、视频编解码领域、硬件视频编解码领域、专用电路视频编解码领域、实时视频编解码领域。This application can be applied to the field of image coding and decoding, video coding and decoding, hardware video coding and decoding, dedicated circuit video coding and decoding, and real-time video coding and decoding.
本申请提供的解码器可用于对图像有损压缩(lossy compression)进行解码,也可用于对图像无损压缩(lossless compression)进行解码。该无损 压缩可以是视觉无损压缩(visually lossless compression),也可以是数学无损压缩(mathematically lossless compression)。The decoder provided in this application can be used to decode image lossy compression (lossy compression) and can also be used to decode image lossless compression (lossless compression). The lossless compression can be a visually lossless compression (visually lossless compression) or a mathematically lossless compression (mathematically lossless compression).
为了便于理解,下文结合图1,对本申请实施例提供的解码器1的结构进行举例说明。For ease of understanding, the structure of the decoder 1 provided in the embodiment of the present application will be illustrated below with reference to FIG. 1.
如图1所示,解码器1可以包括以下电路中的一种或多种:码流读取电路11,码流解析电路12,解码电路13,逆量化电路14,逆变换电路15,输出电路16。As shown in Fig. 1, the decoder 1 may include one or more of the following circuits: code stream reading circuit 11, code stream analysis circuit 12, decoding circuit 13, inverse quantization circuit 14, inverse transform circuit 15, output circuit 16.
码流读取电路11可用于读取待解码的码流。该码流读取电路11例如可以利用高级可扩展接口(advanced eXtensible interface,AXI)从外部存储器(如内存)中读取该待解码的码流。The code stream reading circuit 11 can be used to read the code stream to be decoded. The code stream reading circuit 11 can, for example, use an advanced extensible interface (AXI) to read the code stream to be decoded from an external memory (such as a memory).
码流解析电路12也可称为码流头部解析电路(header parser)。码流解析电路12可以解析码流中的各种类型的头部信息,并从中分离出与解码相关的参数和码流数据,供后级的解码电路13使用。The code stream parsing circuit 12 may also be referred to as a code stream header parser circuit (header parser). The code stream analysis circuit 12 can parse various types of header information in the code stream, and separate parameters and code stream data related to decoding therefrom for use by the subsequent decoding circuit 13.
解码电路13可以包括一个解码单元,也可以包括并行的多路解码单元(具体数量可以根据实际需要配置,如可以配置并行地1路解码单元)。解码电路13中的每个解码单元可以独立地对一个码块进行熵解码。The decoding circuit 13 may include one decoding unit or parallel multiple decoding units (the specific number can be configured according to actual needs, for example, one parallel decoding unit can be configured). Each decoding unit in the decoding circuit 13 can independently perform entropy decoding on a code block.
可选地,在某些实施例中,在解码电路13之前,还可以设置预处理电路。预处理电路可用于将码流解析电路12输出的解码参数、码流数据等分配给并行的多路解码单元。Optionally, in some embodiments, a preprocessing circuit may be provided before the decoding circuit 13. The preprocessing circuit can be used to distribute the decoding parameters, code stream data, etc. output by the code stream analysis circuit 12 to parallel multiple decoding units.
可选地,在某些实施例中,在解码电路13之后,还可以设置后处理电路。后处理电路可用于对解码电路13输出的熵解码数据进行重新组织,并将组织好的数据输出给后级电路。Optionally, in some embodiments, after the decoding circuit 13, a post-processing circuit may also be provided. The post-processing circuit can be used to reorganize the entropy decoded data output by the decoding circuit 13 and output the organized data to the subsequent circuit.
逆量化电路14可用于对解码电路13熵解码得到的数据进行逆量化。The inverse quantization circuit 14 can be used to inversely quantize the data obtained by entropy decoding by the decoding circuit 13.
小波逆变换电路15可用于对逆量化电路14输出的数据进行小波逆变换。The wavelet inverse transform circuit 15 can be used to perform wavelet inverse transform on the data output by the inverse quantization circuit 14.
输出电路16可用于将小波逆变换电路15输出的数据写入到外部的存储器中。例如,可以通过AXI将小波逆变换电路15输出的数据写入到外部的存储器中。The output circuit 16 can be used to write the data output by the wavelet inverse transform circuit 15 into an external memory. For example, the data output by the wavelet inverse transform circuit 15 can be written into an external memory through AXI.
可选地,在某些实施例中,解码器1还可以包括软件配置接口。通过该软件配置接口可以配置或改变解码器1内部的寄存器中的信息,从而控制解码器1的解码方式。Optionally, in some embodiments, the decoder 1 may also include a software configuration interface. Through the software configuration interface, the information in the internal registers of the decoder 1 can be configured or changed, so as to control the decoding mode of the decoder 1.
在本文中,将解码器1执行的操作统称为“解码”,将解码电路13执行 的操作称为“熵解码”,若没有明确指出,“解码”均指由解码器1执行的操作,后面实施例中不再赘述。In this article, the operations performed by the decoder 1 are collectively referred to as "decoding", and the operations performed by the decoding circuit 13 are referred to as "entropy decoding". If not explicitly indicated, "decoding" refers to the operations performed by the decoder 1. It will not be repeated in the embodiment.
图2示出了本申请实施例提供的另一解码器2的结构示意图。图2所示的解码器2包括以下模块:Din模块21,头解析(Header parser)模块22,预处理(Pre-organizer)模块23,并行解码电路24,后处理(Post-organizer)模块25,IQUANT模块26,IDWT模块27,Dout模块28,Reg接口29。Fig. 2 shows a schematic structural diagram of another decoder 2 provided by an embodiment of the present application. The decoder 2 shown in FIG. 2 includes the following modules: a Din module 21, a header parser module 22, a pre-organizer module 23, a parallel decoding circuit 24, and a post-organizer module 25, IQUANT module 26, IDWT module 27, Dout module 28, Reg interface 29.
Din模块21用于通过AXI从外部存储器中读取码流,对应图1中的码流读取电路11。The Din module 21 is used to read a code stream from an external memory through AXI, and corresponds to the code stream reading circuit 11 in FIG. 1.
Header parser模块22用于对码流进行解析,对应图1中的码流解析电路12。The header parser module 22 is used to parse the code stream, and corresponds to the code stream parsing circuit 12 in FIG. 1.
Pre-organizer模块23用于将Header parser模块22输出的解码参数、码流数据等分配给并行解码电路24。Pre-organizer模块23也可以称为预处理电路。The pre-organizer module 23 is used to allocate the decoding parameters and code stream data output by the header parser module 22 to the parallel decoding circuit 24. The pre-organizer module 23 may also be called a pre-processing circuit.
并行解码电路24包括8个解码单元,包括解码单元0、解码单元1、…、解码单元7,例如可以分别为DEC unit 0、DEC unit 1、…、DEC unit 7,每个解码单元可以独立地对一个码块的数据进行熵解码。并行解码电路24对应图1中的解码电路13。The parallel decoding circuit 24 includes 8 decoding units, including decoding unit 0, decoding unit 1,..., decoding unit 7, for example, DEC unit 0, DEC unit 1,..., DEC unit 7, and each decoding unit can be independently Entropy decoding the data of a code block. The parallel decoding circuit 24 corresponds to the decoding circuit 13 in FIG. 1.
Post-organizer模块25用于对并行解码电路24熵解码后的数据重新组织,并将组织好的数据输出给后级电路。Post-organizer模块25也可以称为后处理电路。The Post-organizer module 25 is used to reorganize the entropy decoded data of the parallel decoding circuit 24 and output the organized data to the subsequent circuit. The post-organizer module 25 may also be referred to as a post-processing circuit.
IQUANT模块26用于对来自Post-organizer模块25的数据进行逆量化,对应图1中的逆量化电路14。The IQUANT module 26 is used to inversely quantize the data from the Post-organizer module 25, corresponding to the inverse quantization circuit 14 in FIG. 1.
IDWT模块27用于对逆量化后的数据进行小波逆变换,对应图1中的小波逆变换电路15。The IDWT module 27 is used to perform inverse wavelet transform on the inversely quantized data, corresponding to the inverse wavelet transform circuit 15 in FIG. 1.
Dout模块28用于将小波逆变换后恢复的图像写入到外部存储器中,对应图1中的输出电路16。The Dout module 28 is used to write the image recovered after the wavelet inverse transformation into the external memory, corresponding to the output circuit 16 in FIG. 1.
Reg接口29即为解码器2的软件配置接口,可以通过外围总线(advanced peripheral bus,APB)(或高性能总线(advanced high performance Bus,AHB),或AXI)配置解码器2相关控制寄存器,控制解码器2的解码行为。 Reg interface 29 is the software configuration interface of decoder 2, which can be configured through the peripheral bus (advanced peripheral bus, APB) (or advanced high performance bus (AHB), or AXI) to configure the relevant control registers of decoder 2 to control Decoding behavior of decoder 2.
应理解,解码器2中仅示出了部署8个解码单元的情况,在700Mhz频率下工作能够实现8192x4320 12bit 15fps规格的RAW图像解码。如果要支 持更高规格,如30fps等,只需要增加并行解码电路24中解码单元的个数,前后处理模块稍作调整即可,此处不再赘述。It should be understood that the decoder 2 only shows the deployment of 8 decoding units, and working at a frequency of 700Mhz can achieve 8192×4320 12bit 15fps RAW image decoding. If you want to support higher specifications, such as 30fps, etc., you only need to increase the number of decoding units in the parallel decoding circuit 24, and the pre- and post-processing modules can be slightly adjusted, which will not be repeated here.
本申请实施例提供的解码器1和解码器2可以以图像块(tile)为单位进行解码。以解码器1为例,解码器1从外部的存储器读入码流之后,整个解码过程可以在片上进行(由于本申请实施例以图像块为单位进行解码,中间数据不会太大,可以通过片上缓存进行临时存储),不与外部存储器进行交互,以节省系统带宽。此外,解码器1中的各级电路可以采用流水线的方式工作,以提高解码效率。解码器2类似,不再赘述。The decoder 1 and the decoder 2 provided in the embodiment of the present application may perform decoding in units of tiles (tile). Take decoder 1 as an example. After decoder 1 reads the code stream from an external memory, the entire decoding process can be performed on-chip (because the embodiment of this application uses image blocks as the unit for decoding, the intermediate data is not too large and can be passed The on-chip cache is used for temporary storage) and does not interact with external memory to save system bandwidth. In addition, all levels of circuits in the decoder 1 can work in a pipeline manner to improve decoding efficiency. Decoder 2 is similar and will not be repeated.
本申请实施例的解码器1和解码器2基于JPEG2000标准,针对各种图像(例如RAW域图像)实现硬件解码,可以支持分辨率下采样解码,且支持分层解码。The decoder 1 and the decoder 2 in the embodiments of the present application are based on the JPEG2000 standard, implement hardware decoding for various images (such as RAW domain images), can support resolution downsampling decoding, and support layered decoding.
JPEG 2000采用小波变换,并基于优化截取内嵌码块编码(embedded block coding with optimized truncation,EBCOT)进行熵编码,具有比JPEG更高的压缩比,并支持渐进式下载和显示。传统JPEG 2000的解码器(例如上述解码器1、解码器2)的小波逆变换电路针对同级的小波变换编码码块,按照行序优先、列序次之的顺序进行解码,小波逆变换过程的计算效率较低。JPEG 2000 uses wavelet transform and performs entropy coding based on optimized interception of embedded block coding (embedded block coding with optimized truncation, EBCOT), which has a higher compression ratio than JPEG, and supports progressive download and display. The wavelet inverse transform circuit of the traditional JPEG 2000 decoder (such as the above decoder 1, decoder 2) decodes the wavelet transform coding code blocks of the same level in the order of row order first and column order second, and the wavelet inverse transform process The calculation efficiency is low.
有鉴于此,本申请实施例提供了一种新的小波逆变换电路,能够提高小波逆变换过程的计算效率。In view of this, the embodiment of the present application provides a new wavelet inverse transform circuit, which can improve the calculation efficiency of the wavelet inverse transform process.
由于小波逆变换是基于小波变换的操作,是小波变换的逆序,因此,为便于理解本申请实施例中的小波逆变换,先介绍一下小波变换的原理。小波变换一般是由小波变换电路执行的,与小波逆变换电路部署在上述解码器1和/或解码器2对应,小波变换电路部署在编码器中。Since the inverse wavelet transform is based on the operation of the wavelet transform and is the inverse order of the wavelet transform, in order to facilitate the understanding of the inverse wavelet transform in the embodiments of the present application, the principle of the wavelet transform will be introduced first. Wavelet transform is generally performed by a wavelet transform circuit, which corresponds to the wavelet inverse transform circuit deployed in the decoder 1 and/or decoder 2, and the wavelet transform circuit is deployed in the encoder.
图3是图像块的小波变换的原理示意图。假设图3所示的图像块的大小为256×256,小波变换电路通常会将该图像块分为若干个块进行变换,每次变换后会产生4个中间结果,即4个码块。其中,对于最后一次变换,产生的4个码块将同时输出,其他情况下,会输出3个码块(即频率分量为HL、LH、HH对应的码块)。Fig. 3 is a schematic diagram of the principle of wavelet transform of image blocks. Assuming that the size of the image block shown in FIG. 3 is 256×256, the wavelet transform circuit usually divides the image block into several blocks for transformation, and each transformation will produce 4 intermediate results, namely 4 code blocks. Among them, for the last transformation, the generated 4 code blocks will be output at the same time. In other cases, 3 code blocks will be output (that is, the code blocks corresponding to the frequency components of HL, LH, and HH).
具体而言,图3示出的图像块是进行了三次小波变换后的结果,在本申请实施例中,第一级小波变换产生的结果为1LL、1HL、1LH、1HH对应的码块(大小分别为128×128)。对左上角的1LL的码块继续进行第二级小波变换,产生的结果为2LL、2HL、2LH、2HH对应的码块(大小分别为64 ×64)。继续对左上角的2LL的码块进行第三级小波变换,产生的结果为3LL、3HL、3LH、3HH对应的码块(大小分别为32×32)。Specifically, the image block shown in FIG. 3 is the result of performing three wavelet transforms. In the embodiment of the present application, the result of the first-level wavelet transform is the code blocks corresponding to 1LL, 1HL, 1LH, and 1HH (size Respectively 128×128). The second-level wavelet transform is continued on the 1LL code block in the upper left corner, and the result is the code block corresponding to 2LL, 2HL, 2LH, and 2HH (the size is 64×64 respectively). Continue to perform the third-level wavelet transform on the 2LL code block in the upper left corner, and the resulting result is the code block corresponding to 3LL, 3HL, 3LH, and 3HH (32×32 in size respectively).
应理解,小波变换分为小波行变换和小波列变换,小波变换电路是可以先进行小波行变换,再进行小波列变换,也可以先进行小波列变换,再进行小波行变换。则对应地,小波逆变换分为小波行逆变换和小波列逆变换,若小波变换电路先对图像块进行了小波行变换,后进行了小波列变换,则小波逆变换电路需要先进行小波列逆变换,再进行小波行逆变换;若小波变换电路先对图像块进行了小波列变换,后进行了小波行变换,则小波逆变换电路需要先进行小波行逆变换,再进行小波列逆变换。It should be understood that wavelet transform is divided into wavelet row transform and wavelet row transform. The wavelet transform circuit can perform wavelet row transform first, then wavelet row transform, or wavelet row transform first, then wavelet row transform. Correspondingly, inverse wavelet transform is divided into inverse wavelet row transform and inverse wavelet column transform. If the wavelet transform circuit first performs wavelet row transform on the image block, and then performs wavelet column transform, the wavelet inverse transform circuit needs to perform wavelet column first Inverse transformation, and then wavelet row inverse transformation; if the wavelet transform circuit performs wavelet column transformation on the image block first, and then wavelet row transformation, the wavelet inverse transform circuit needs to perform wavelet row inverse transformation first, and then wavelet column inverse transformation .
下面将结合图4至图10,对本申请中的技术方案进行描述。The technical solution in this application will be described below in conjunction with FIGS. 4 to 10.
图4示出了本申请实施例的小波逆变换电路的结构示意图。图4所示的小波逆变换电路15包括:第一接口电路31和逆变换电路32。其中,第一接口电路31用于获取解码后的码块数据;逆变换电路32用于按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波逆变换,得到所述码块数据的第j级小波逆变换的结果,N和j均为大于1的正整数,所述N+1行的数据对应的频率分量与所述第1行的数据对应的频率分量不同。Fig. 4 shows a schematic structural diagram of a wavelet inverse transform circuit of an embodiment of the present application. The wavelet inverse transform circuit 15 shown in FIG. 4 includes: a first interface circuit 31 and an inverse transform circuit 32. Among them, the first interface circuit 31 is used to obtain the decoded code block data; the inverse transform circuit 32 is used to obtain the data according to the first row, the N+1th row, the second row, the N+2th row,..., the Nth row, In the order of the 2Nth line, perform inverse wavelet transform on the j-th level wavelet transform data of the code block data line by line to obtain the j-th level wavelet inverse transform result of the code block data, and both N and j are greater than 1. The frequency component corresponding to the data in the N+1 row is different from the frequency component corresponding to the data in the first row.
上述小波逆变换操作是针对至少两个不同的频率分量的行数据交替执行的。因为编码的原因,小波变换操作会通过解交织得到4个频率分量(分别为LL、HL、LH和HH),交替进行小波逆变换的过程相当于一个数据重新交织的过程,因此,在本申请实施例中,交织和小波逆变换可以同时进行,与分开独立进行交织和小波逆变换操作相比,更加节省内存等硬件资源,有利于提高计算效率。The above-mentioned inverse wavelet transform operation is performed alternately for line data of at least two different frequency components. Due to coding, the wavelet transform operation will obtain 4 frequency components (LL, HL, LH and HH respectively) through de-interleaving. The process of alternately performing wavelet inverse transform is equivalent to a data re-interleaving process. Therefore, in this application In the embodiment, the interleaving and the wavelet inverse transform can be performed at the same time. Compared with the separate and independent operations of the interleaving and the wavelet inverse transform, it saves more hardware resources such as memory, which is beneficial to improve calculation efficiency.
应理解,上述第j级小波变换可以是第三级小波变换的数据(例如,3LL、3HL、3LH和3HH),也可以是第二级小波变换(例如,2LL、3HH、2HL、2LH和2HH)的数据,本申请实施例对此不作限定。It should be understood that the above-mentioned j-th level wavelet transform may be the third level wavelet transform data (for example, 3LL, 3HL, 3LH and 3HH), or the second level wavelet transform (for example, 2LL, 3HH, 2HL, 2LH and 2HH). The data of) is not limited in the embodiment of this application.
本申请实施例的小波逆变换电路,按照规定的顺序对码块数据的第j级小波变换的数据执行小波逆变换,使得小波行逆变换进行了一段时间后,即小波行逆变换输出的数据满足小波列逆变换的数据处理个数之后,开始进行小波列逆变换,小波列逆变换和剩余数据的小波行逆变换能够并行进行,能够提高小波逆变换过程的计算效率。The wavelet inverse transform circuit of the embodiment of the present application performs wavelet inverse transform on the data of the j-th wavelet transform of the code block data in a prescribed order, so that after the wavelet inverse transform is performed for a period of time, the data output by the wavelet inverse transform After satisfying the number of data processing of wavelet inverse transform, the inverse wavelet transform is started. The inverse wavelet transform and the wavelet row inverse transform of the remaining data can be performed in parallel, which can improve the calculation efficiency of the wavelet inverse transform process.
可选地,所述1行的数据和所述第N+1行的数据均属于第j-1级小波变换后的频率分量LL中的数据。Optionally, both the data in the 1 row and the data in the N+1th row belong to the data in the frequency component LL after the j-1th level wavelet transform.
可选地,考虑到小波逆变换需要进行小波行逆变换和小波列逆变换,因此,图5示出了本申请实施例的另一种小波逆变换电路的结构示意图。在图5中,上述逆变换电路可以包括:第一逆变换电路41、转置电路43和第二逆变换电路44。Optionally, considering that the wavelet inverse transform requires wavelet row inverse transform and wavelet column inverse transform, FIG. 5 shows a schematic structural diagram of another wavelet inverse transform circuit according to an embodiment of the present application. In FIG. 5, the above-mentioned inverse transform circuit may include: a first inverse transform circuit 41, a transposition circuit 43, and a second inverse transform circuit 44.
其中,第一逆变换电路41用于:按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波行逆变换,得到所述码块数据的第j级小波行逆变换的结果,所述第j级小波变换的数据的行数为2N,N为大于1的正整数,j为正整数;转置电路43用于:对所述码块数据的第j级小波行逆变换的结果进行转置;第二逆变换电路44用于:按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对转置后的所述码块数据的第j级小波行逆变换的结果执行小波列逆变换,得到所述码块数据的第j级小波逆变换的结果。Wherein, the first inverse transform circuit 41 is used to: in the order of row 1, row N+1, row 2, row N+2, ..., row N, row 2N, row by row to the code The j-th level wavelet transform data of the block data is subjected to wavelet line inverse transformation to obtain the j-th level wavelet line inverse transform result of the code block data. The number of rows of the j-th wavelet transform data is 2N, where N is A positive integer greater than 1, j is a positive integer; the transposition circuit 43 is used to: transpose the result of the j-th level wavelet row inverse transform of the code block data; the second inverse transform circuit 44 is used to: Row, row N+1, row 2, row N+2, ..., row N, row 2N, the j-th level wavelet row inverse transformation of the transposed code block data row by row Perform the inverse wavelet transform on the result of to obtain the result of the j-th level wavelet inverse transform of the code block data.
在上述实施例中,上述小波逆变换电路是先对第j级小波变换的数据执行了小波行逆变换,再对第j级小波行逆变换的结果进行转置,执行小波列逆变换。应理解,小波逆变换电路也可以先对第j级小波变换的数据执行小波列逆变换,再对第j级小波列逆变换的结果进行转置,执行小波行逆变换,本申请实施例对此不作限定。In the above-mentioned embodiment, the above-mentioned wavelet inverse transform circuit first performs wavelet inverse transform on the data of the j-th level of wavelet transform, then transposes the result of the j-th level of wavelet inverse transform, and executes the wavelet inverse transform. It should be understood that the wavelet inverse transform circuit may also first perform wavelet inverse transform on the j-th level of wavelet transform data, and then transpose the result of the j-th level of wavelet inverse transform, and perform wavelet row inverse transform. This is not limited.
可选地,上述转置电路43可以在所述码块数据的第j级小波行逆变换的结果包括M行数据之后,对所述M行数据进行转置,以便第二逆变换电路44提前对转置后的码块数据执行小波列逆变换。其中,M表示所述第二逆变换电路44在每个时钟周期最多能够处理M个数据,M为正整数。Optionally, the transposition circuit 43 may transpose the M rows of data after the result of the j-th level wavelet row inverse transform of the code block data includes M rows of data, so that the second inverse transform circuit 44 advances Perform inverse wavelet transformation on the transposed code block data. Wherein, M indicates that the second inverse transform circuit 44 can process at most M data in each clock cycle, and M is a positive integer.
由于小波行逆变换是按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序逐行进行的,在小波行逆变换执行了M行数据之后,小波列逆变换即可开始执行,此时,第一逆变换电路可以继续对剩余数据执行小波行逆变换,这样,小波列逆变换和小波行逆变换会并行执行,提高了小波逆变换电路的计算效率。Since the inverse wavelet transform is performed line by line in the order of line 1, line N+1, line 2, line N+2,..., line N, line 2N, the inverse wavelet transform is performed After M rows of data, the wavelet inverse transform can be executed. At this time, the first inverse transform circuit can continue to perform wavelet inverse transform on the remaining data. In this way, the wavelet inverse transform and wavelet inverse transform will be executed in parallel, which improves The computational efficiency of the wavelet inverse transform circuit.
可选地,所述小波逆变换电路还包括:第一缓存42,用于存储所述码块数据的第j级小波行逆变换的结果。Optionally, the wavelet inverse transform circuit further includes: a first buffer 42 for storing the result of the j-th level wavelet row inverse transform of the code block data.
可选地,所述转置电路43还用于:从所述第一缓存42中获取所述码块数据的第j级小波行逆变换的结果。Optionally, the transposition circuit 43 is further configured to obtain the result of the j-th level wavelet row inverse transformation of the code block data from the first buffer 42.
应理解,在一种可能的设计中,上述第一缓存42和转置电路43也可以为一套电路,例如,第一缓存可以为转置电路43中的全部或部分内存,本申请实施例对此不作限定。It should be understood that in a possible design, the above-mentioned first buffer 42 and transposition circuit 43 may also be a set of circuits. For example, the first buffer may be all or part of the memory in the transposition circuit 43. The embodiment of the present application There is no restriction on this.
可选地,所述小波逆变换电路还包括:第二缓存45,用于存储所述码块数据的第j级小波逆变换的结果。Optionally, the wavelet inverse transform circuit further includes: a second buffer 45 for storing the result of the j-th level wavelet inverse transform of the code block data.
在一种可能的设计中,j大于1,所述第一逆变换电路41还用于:从所述第二缓存45中获取所述码块数据的第j级小波逆变换的结果;将所述第j级小波逆变换的结果作为第j-1级小波变换的LL数据,结合所述码块数据的第j-1级小波变换的HL数据、LH数据和HH数据,作为所述码块数据的第j-1级小波变换的数据;所述逆变换电路还用于:按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对所述码块数据的第j-1级小波变换的数据执行小波逆变换,得到所述码块数据的第j-1级小波逆变换的结果。In a possible design, j is greater than 1, and the first inverse transform circuit 41 is further configured to: obtain the j-th level wavelet inverse transform result of the code block data from the second buffer 45; The result of the j-th level wavelet inverse transform is used as the LL data of the j-1 level wavelet transform, and the HL data, LH data, and HH data of the j-1 level wavelet transform of the code block data are combined as the code block The data of the j-1 level wavelet transform of the data; the inverse transform circuit is also used to: according to the first line, the 2N+1 line, the second line, the 2N+2 line,..., the 2Nth line, the 4Nth line In the order of lines, perform wavelet inverse transformation on the j-1 level wavelet transform data of the code block data line by line to obtain the j-1 level wavelet inverse transform result of the code block data.
示例性地,在本实施例中,若j等于2,那么第1行的数据和第2N+1行的数据均属于原始图像块(即小波变换之前的图像块)中的数据。若j大于2,那么第1行的数据和第2N+1行的数据均属于第j-2级小波变换后的频率分量LL中的数据。Exemplarily, in this embodiment, if j is equal to 2, then the data of the first row and the data of the 2N+1th row both belong to the data in the original image block (ie, the image block before wavelet transform). If j is greater than 2, then the data in the first row and the data in the 2N+1 row belong to the data in the frequency component LL after the j-2th level wavelet transform.
应理解,若编码器执行了第j级小波变换,解码器在解码第j-1级小波变换的数据时,需要先解码第j级小波变换的数据,第j级小波变换的数据的小波逆变换结果会存储在第二缓存45中。因此,在进行第j-1级小波逆变换的处理时,逆变换电路可以结合第二缓存45中存储的第j级小波逆变换的结果和第j-1级的剩余数据,进行小波逆变换。It should be understood that if the encoder performs the j-th level wavelet transform, when the decoder decodes the j-1th level wavelet transform data, it needs to decode the j-th level wavelet transform data first, and the wavelet inverse of the j-th level wavelet transform data The transformation result will be stored in the second buffer 45. Therefore, when performing the j-1th level wavelet inverse transform processing, the inverse transform circuit can combine the jth level wavelet inverse transform results stored in the second buffer 45 and the remaining data of the j-1th level to perform wavelet inverse transform .
在上述实施例中,图5所示的第一逆变换电路41可以用于:按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对所述码块数据的第j-1级小波变换的数据执行小波行逆变换,得到所述码块数据的第j-1级小波行逆变换结果;转置电路43可以用于:对所述码块数据的第j-1级小波行逆变换的结果进行转置;第二逆变换电路44可以用于:按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对转置后的所述码块数据的第j-1级小波行逆变换的结果执行小 波列逆变换,得到所述码块数据的第j-1级小波逆变换的结果。In the above embodiment, the first inverse transform circuit 41 shown in FIG. 5 can be used to: according to the first row, the 2N+1th row, the second row, the 2N+2th row,..., the 2Nth row, the 4Nth row In the order of rows, perform wavelet inverse transform on the j-1th level wavelet transform data of the code block data line by line to obtain the j-1th level wavelet line inverse transform result of the code block data; transposition circuit 43 It can be used to: transpose the result of the j-1th level wavelet row inverse transform of the code block data; the second inverse transform circuit 44 can be used to: according to the first row, the 2N+1 row, and the second row , Row 2N+2, ..., row 2N, row 4N, perform the wavelet column inverse transformation on the j-1 level wavelet row inverse transformation result of the transposed code block data row by row to obtain The result of the j-1th level wavelet inverse transform of the code block data.
应理解,第j-1级数据的具体处理过程与第j级数据的类似,上述转置电路43也可以在所述码块数据的第j-1级小波行逆变换的结果包括M行数据之后,对所述M行数据进行转置,以便第二逆变换电路44提前对转置后的码块数据执行小波列逆变换,此处不再赘述。It should be understood that the specific processing process of level j-1 data is similar to that of level j data, and the transposition circuit 43 may also include M rows of data in the result of the j-1 level wavelet row inverse transformation of the code block data. After that, the M rows of data are transposed, so that the second inverse transform circuit 44 performs wavelet inverse transform on the transposed code block data in advance, which will not be repeated here.
下面,结合图6至图9对本申请实施例进行详细说明。Hereinafter, the embodiments of the present application will be described in detail with reference to FIGS. 6-9.
假设小波逆变换电路每个时钟周期能处理8个数据,即内部计算能力为8point/cycle。在其它实施例中,小波逆变换电路的内部计算能力也可以为12point/cycle、16point/cycle等,本方案不做限制。针对图3所示的三级小波变换的编码模式,解码器1或解码器2在解码的时候可以根据需求从如下四种解码模式中选择适当的解码模式:Assuming that the wavelet inverse transform circuit can process 8 data per clock cycle, that is, the internal calculation capacity is 8 points/cycle. In other embodiments, the internal calculation capability of the wavelet inverse transform circuit may also be 12 points/cycle, 16 points/cycle, etc., and this solution does not impose restrictions. For the three-level wavelet transform encoding mode shown in Figure 3, decoder 1 or decoder 2 can select an appropriate decoding mode from the following four decoding modes according to requirements when decoding:
1)只解码3LL的分量1) Only decode the 3LL component
对于这种解码模式,如图6所示,小波逆变换电路将对3LL的分量(大小为32×32)不进行任何运算,直接输出。For this decoding mode, as shown in Figure 6, the wavelet inverse transform circuit will directly output the 3LL component (the size is 32×32) without any operation.
2)解码第三级小波变换的所有分量,即3LL、3HL、3LH和3HH2) Decode all components of the third-level wavelet transform, namely 3LL, 3HL, 3LH and 3HH
解码第三级小波变换的所有分量相当于解码2LL(大小为64×64),如图7所示,小波逆变换电路会先输入3LL+3HL的第一行数据(对应图中的执行顺序0),共64个数据,每个时钟周期输入8个数据,总开销为8个时钟周期。在上述每个时钟周期输入的8个数据中,4个数据属于3LL分量,4个数据属于3HL分量,即对不同频率分量的数据同时进行交织和逆变换。这样,能够交织还原出小波变换之前的数据。接着,小波逆变换电路输入3LH+3HH的第一行数据(对应图中的执行顺序1),再输入3LL+3HL的第二行数据(对应图中的执行顺序2),再输入3LH+3HH的第二行数据(对应图中的执行顺序3),以此类推,直到将第三级小波变换的所有分量全部输入完毕。Decoding all the components of the third-level wavelet transform is equivalent to decoding 2LL (64×64 in size), as shown in Figure 7, the wavelet inverse transform circuit will first input the first row of data of 3LL+3HL (corresponding to the execution order 0 in the figure) ), a total of 64 data, 8 data input per clock cycle, the total overhead is 8 clock cycles. Among the 8 data input in each clock cycle, 4 data belong to the 3LL component and 4 data belong to the 3HL component, that is, the data of different frequency components are simultaneously interleaved and inversely transformed. In this way, the data before wavelet transform can be interleaved and restored. Next, the wavelet inverse transform circuit inputs the first row of data of 3LH+3HH (corresponding to the execution order 1 in the figure), then inputs the second row of data of 3LL+3HL (corresponding to the execution order 2 in the figure), and then inputs 3LH+3HH The second row of data (corresponding to the execution order 3 in the figure), and so on, until all the components of the third-level wavelet transform have been input.
3)解码第二级小波变换的所有分量,即3LL、3HL、3LH、3HH、2HL、2LH和2HH3) Decode all components of the second-level wavelet transform, namely 3LL, 3HL, 3LH, 3HH, 2HL, 2LH and 2HH
解码第二级小波变换的所有分量需要先解码第三级小波变换的所有分量(即3LL、3HL、3LH和3HH),再解码第二级小波变换的剩余分量(即2HL、2LH和2HH)。Decoding all the components of the second-level wavelet transform requires decoding all the components of the third-level wavelet transform (ie 3LL, 3HL, 3LH, and 3HH), and then decode the remaining components of the second-level wavelet transform (ie, 2HL, 2LH, and 2HH).
具体地,如图8所示,解码第三级小波变换的所有分量如2)所述,在 完成了第三级小波变换的所有分量的解码之后,已经有了2LL的数据。小波逆变换电路可以输入2HL的第一行数据(共64个数据),结合2LL的第一行的64个数据进行处理(对应图中的执行顺序00),每个时钟周期输入8个数据,总开销为16个时钟周期。在上述每个时钟周期输入的8个数据中,4个数据属于2LL分量,4个数据属于2HL分量。接着,小波逆变换电路输入2LH+2HH的第一行数据(对应图中的执行顺序11),再输入2LL+2HL的第二行数据(对应图中的执行顺序22),再输入2LH+2HH的第二行数据(对应图中的执行顺序33),以此类推,直到将第二级小波变换的所有分量全部输入完毕。Specifically, as shown in Figure 8, the decoding of all components of the third-level wavelet transform is as described in 2). After the decoding of all the components of the third-level wavelet transform is completed, there is already 2LL data. The wavelet inverse transform circuit can input the first row of 2HL data (64 data in total), and combine the 64 data of the first row of 2LL for processing (corresponding to the execution sequence 00 in the figure), and input 8 data per clock cycle. The total overhead is 16 clock cycles. Among the 8 data input in each clock cycle, 4 data belong to the 2LL component, and 4 data belong to the 2HL component. Next, the wavelet inverse transform circuit inputs the first row of data of 2LH+2HH (corresponding to the execution order 11 in the figure), and then inputs the second row of data of 2LL+2HL (corresponding to the execution order 22 in the figure), and then inputs 2LH+2HH The second row of data (corresponding to the execution order 33 in the figure), and so on, until all the components of the second-level wavelet transform have been input.
4)解码所有的分量,即3LL、3HL、3LH、3HH、2HL、2LH、2HH、1HL、1LH和1HH4) Decode all components, namely 3LL, 3HL, 3LH, 3HH, 2HL, 2LH, 2HH, 1HL, 1LH and 1HH
解码所有的分量需要先解码第三级小波变换的所有分量(即3LL、3HL、3LH和3HH),再解码第二级小波变换的剩余分量(即2HL、2LH和2HH),最后解码第一级小波变换的剩余分量(即1HL、1LH和1HH)。To decode all components, you need to decode all the components of the third-level wavelet transform (ie 3LL, 3HL, 3LH, and 3HH), then decode the remaining components of the second-level wavelet transform (ie, 2HL, 2LH, and 2HH), and finally decode the first level The remaining components of the wavelet transform (ie 1HL, 1LH, and 1HH).
具体地,如图9所示,解码第三级小波变换的所有分量如2)所述,解码第二级小波变换的所有分量如3)所述,在完成了第二级小波变换的所有分量的解码之后,已经有了1LL的数据。小波逆变换电路可以输入1HL的第一行数据(共128个数据),结合1LL的第一行的128个数据进行处理(对应图中的执行顺序000),每个时钟周期输入8个数据,总开销为32个时钟周期。在上述每个时钟周期输入的8个数据中,4个数据属于1LL分量,4个数据属于1HL分量。接着,小波逆变换电路输入1LH+1HH的第一行数据(对应图中的执行顺序111),再输入1LL+1HL的第二行数据(对应图中的执行顺序222),再输入1LH+1HH的第二行数据(对应图中的执行顺序333),以此类推,直到将第一级小波变换的所有分量全部输入完毕。Specifically, as shown in Figure 9, decoding all components of the third-level wavelet transform as described in 2), and decoding all components of the second-level wavelet transform as described in 3). After completing all the components of the second-level wavelet transform After the decoding, there is already 1LL data. The wavelet inverse transform circuit can input the first row of data of 1HL (128 data in total), and combine the 128 data of the first row of 1LL for processing (corresponding to the execution sequence 000 in the figure), and input 8 data per clock cycle. The total overhead is 32 clock cycles. Among the 8 data input in each clock cycle, 4 data belong to 1LL component, and 4 data belong to 1HL component. Next, the wavelet inverse transform circuit inputs the first row of data of 1LH+1HH (corresponding to the execution order 111 in the figure), then inputs the second row of data of 1LL+1HL (corresponding to the execution order 222 in the figure), and then inputs 1LH+1HH The second row of data (corresponding to the execution sequence 333 in the figure), and so on, until all the components of the first-level wavelet transform have been input.
本申请实施例的小波逆变换电路,按照规定的顺序对码块数据的第j级小波变换的数据执行小波逆变换,使得小波列逆变换和小波行逆变换能够并行进行,能够提高小波逆变换过程的计算效率。The wavelet inverse transform circuit of the embodiment of the present application performs wavelet inverse transform on the j-th wavelet transform data of the code block data in a prescribed order, so that the wavelet column inverse transform and the wavelet row inverse transform can be performed in parallel, which can improve the wavelet inverse transform The computational efficiency of the process.
本申请实施例还提供了一种小波逆变换方法。该小波逆变换方法可以由上文提及的解码器1、解码器2或小波逆变换电路15执行。如图10所示,该小波逆变换方法包括:The embodiment of the application also provides a wavelet inverse transform method. The wavelet inverse transform method can be executed by the decoder 1, the decoder 2, or the wavelet inverse transform circuit 15 mentioned above. As shown in Figure 10, the wavelet inverse transform method includes:
S91,获取解码后的码块数据;S91: Obtain decoded code block data;
S92,按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波逆变换,得到所述码块数据的第j级小波逆变换的结果,N和j均为大于1的正整数,所述N+1行的数据对应的频率分量与所述第1行的数据对应的频率分量不同。S92, in the order of the first row, the N+1th row, the second row, the N+2th row, ..., the Nth row, the 2Nth row, the j-th level wavelet transform of the code block data line by line The data is subjected to inverse wavelet transform to obtain the result of the j-th level wavelet inverse transform of the code block data. Both N and j are positive integers greater than 1, and the frequency components corresponding to the data of the N+1 rows are the same as those of the first The frequency components corresponding to the row data are different.
可选地,所述1行的数据和所述第N+1行的数据均属于第j-1级小波变换后的频率分量LL中的数据。Optionally, both the data in the 1 row and the data in the N+1th row belong to the data in the frequency component LL after the j-1th level wavelet transform.
可选地,所述逐行对所述码块数据的第j级小波变换的数据执行小波逆变换,包括:按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波行逆变换,得到所述码块数据的第j级小波行逆变换的结果,所述第j级小波变换的数据的行数为2N,N为大于1的正整数,j为正整数;对所述码块数据的第j级小波行逆变换的结果进行转置;按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对转置后的所述码块数据的第j级小波行逆变换的结果执行小波列逆变换,得到所述码块数据的第j级小波逆变换的结果。Optionally, the performing wavelet inverse transformation on the j-th wavelet transform data of the code block data line by line includes: according to the first line, the N+1th line, the second line, the N+2th line, …, in the order of the Nth row and the 2Nth row, perform wavelet row inverse transformation on the j-th level wavelet transform data of the code block data line by line to obtain the j-th level wavelet line inverse transform result of the code block data , The number of rows of the j-th level wavelet transform data is 2N, N is a positive integer greater than 1, and j is a positive integer; transpose the result of the j-th level wavelet row inverse transform of the code block data; according to In the order of row 1, row N+1, row 2, row N+2, ..., row N, row 2N, the j-th level wavelet row of the transposed code block data is row by row The result of the inverse transformation performs inverse wavelet transformation to obtain the result of the j-th level wavelet inverse transformation of the code block data.
可选地,所述对所述码块数据的第j级小波行逆变换的结果进行转置,包括:在所述码块数据的第j级小波行逆变换的结果包括M行数据之后,对所述M行数据进行转置,M表示每个时钟周期最多能够处理M个数据,M为正整数。Optionally, the transposing the result of the j-th level wavelet row inverse transform of the code block data includes: after the result of the j-th level wavelet row inverse transform of the code block data includes M rows of data, Transpose the M rows of data, M indicates that each clock cycle can process at most M data, and M is a positive integer.
可选地,在所述得到所述码块数据的第j级小波行逆变换的结果之后,所述方法还包括:将所述码块数据的第j级小波行逆变换的结果存储至第一缓存器中。Optionally, after obtaining the result of the j-th level wavelet row inverse transform of the code block data, the method further includes: storing the j-th level wavelet row inverse transform result of the code block data in the In a buffer.
可选地,在所述存储所述码块数据的第j级小波行逆变换的结果之后,所述方法还包括:从所述第一缓存器中获取所述码块数据的第j级小波行逆变换的结果。Optionally, after storing the result of the j-th level wavelet row inverse transformation of the code block data, the method further includes: obtaining the j-th level wavelet of the code block data from the first buffer The result of the inverse transformation.
可选地,在所述得到所述码块数据的第j级小波逆变换的结果之后,所述方法还包括:将所述码块数据的第j级小波逆变换的结果存储至第二缓存器中。Optionally, after obtaining the j-th level wavelet inverse transform result of the code block data, the method further includes: storing the j-th level wavelet inverse transform result of the code block data in a second buffer器中。
可选地,j大于1,所述方法还包括:从所述第二缓存器中获取所述码块数据的第j级小波逆变换的结果;将所述第j级小波逆变换的结果作为第j-1级小波变换的LL数据,结合所述码块数据的第j-1级小波变换的HL数据、 LH数据和HH数据,作为所述码块数据的第j-1级小波变换的数据;按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对所述码块数据的第j-1级小波变换的数据执行小波逆变换,得到所述码块数据的第j-1级小波逆变换的结果。Optionally, j is greater than 1, and the method further includes: obtaining the result of the j-th level wavelet inverse transform of the code block data from the second buffer; and taking the result of the j-th level wavelet inverse transform as The LL data of the j-1 level wavelet transform, combined with the HL data, LH data, and HH data of the j-1 level wavelet transform of the code block data, are used as the j-1 level wavelet transform of the code block data Data; in the order of row 1, row 2N+1, row 2, row 2N+2, ..., row 2N, row 4N, row by row the j-1 level wavelet of the code block data The transformed data is subjected to inverse wavelet transform to obtain the result of the j-1th level wavelet inverse transform of the code block data.
可选地,所述逐行对所述码块数据的第j-1级小波变换的数据执行小波逆变换,包括:按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对所述码块数据的第j-1级小波变换的数据执行小波行逆变换,得到所述码块数据的第j-1级小波行逆变换结果;对所述码块数据的第j-1级小波行逆变换的结果进行转置;按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对转置后的所述码块数据的第j-1级小波行逆变换的结果执行小波列逆变换,得到所述码块数据的第j-1级小波逆变换的结果。Optionally, the performing wavelet inverse transform on the j-1th level wavelet transform data of the code block data line by line includes: according to the first line, the 2N+1th line, the second line, and the 2N+2th line Row,..., 2Nth row, 4Nth row, perform wavelet row inverse transformation on the j-1th level wavelet transformed data of the code block data row by row to obtain the j-1th level of the code block data Wavelet inverse transform result; transpose the result of j-1 level wavelet inverse transform of the code block data; according to the first line, the 2N+1 line, the second line, the 2N+2 line,... , The 2Nth row and the 4Nth row, perform wavelet column inverse transformation on the j-1th level wavelet row inverse transform result of the transposed code block data row by row to obtain the jth row of the code block data The result of -1 level wavelet inverse transform.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其他任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)), etc. .
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in combination 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 by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to realize the described functions, but this realization should not be considered beyond the scope of this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。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 illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It 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 they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units 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 above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (21)

  1. 一种小波逆变换电路,其特征在于,包括:A wavelet inverse transform circuit, characterized in that it comprises:
    第一接口电路,用于获取解码后的码块数据;The first interface circuit is used to obtain decoded code block data;
    逆变换电路,用于按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波逆变换,得到所述码块数据的第j级小波逆变换的结果,N和j均为大于1的正整数,所述N+1行的数据对应的频率分量与所述第1行的数据对应的频率分量不同。An inverse transform circuit for row-by-row processing of the jth row of the code block data in the order of row 1, row N+1, row 2, row N+2, ..., row N, row 2N Perform wavelet inverse transformation on the data of level wavelet transform to obtain the result of the j-th level wavelet inverse transform of the code block data. Both N and j are positive integers greater than 1, and the frequency components corresponding to the data of the N+1 row are equal to The frequency components corresponding to the data in the first row are different.
  2. 根据权利要求1所述的小波逆变换电路,其特征在于,所述1行的数据和所述第N+1行的数据均属于第j-1级小波变换后的频率分量LL中的数据。The wavelet inverse transform circuit according to claim 1, wherein the data of the 1 row and the data of the N+1th row belong to the data in the frequency component LL after the j-1 level wavelet transform.
  3. 根据权利要求1或2所述的小波逆变换电路,其特征在于,所述逆变换电路包括:The wavelet inverse transform circuit according to claim 1 or 2, wherein the inverse transform circuit comprises:
    第一逆变换电路,用于按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波行逆变换,得到所述码块数据的第j级小波行逆变换的结果,所述第j级小波变换的数据的行数为2N,N为大于1的正整数,j为正整数;The first inverse transform circuit is used to process the code block data line by line in the order of line 1, line N+1, line 2, line N+2, ..., line N, line 2N The j-th level wavelet transformed data is subjected to wavelet row inverse transformation, and the result of the j-th level wavelet row inverse transformation of the code block data is obtained. The number of rows of the j-th level wavelet transformed data is 2N, and N is greater than 1. Positive integer, j is a positive integer;
    所述小波逆变换电路还包括:The wavelet inverse transform circuit further includes:
    转置电路,用于对所述码块数据的第j级小波行逆变换的结果进行转置;A transposition circuit, configured to transpose the result of the j-th level wavelet row inverse transformation of the code block data;
    所述逆变换电路还包括:The inverse transform circuit further includes:
    第二逆变换电路,用于按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对转置后的所述码块数据的第j级小波行逆变换的结果执行小波列逆变换,得到所述码块数据的第j级小波逆变换的结果。The second inverse transform circuit is used for row-by-row pairing of the transposed ones in the order of row 1, row N+1, row 2, row N+2, ..., row N, row 2N The result of the j-th level wavelet row inverse transformation of the code block data is subjected to wavelet inverse transformation to obtain the result of the j-th level wavelet inverse transformation of the code block data.
  4. 根据权利要求3所述的小波逆变换电路,其特征在于,所述转置电路还用于:The wavelet inverse transform circuit according to claim 3, wherein the transposition circuit is further used for:
    在所述码块数据的第j级小波行逆变换的结果包括M行数据之后,对所述M行数据进行转置,M表示所述第二逆变换电路在每个时钟周期最多能够处理M个数据,M为正整数。After the result of the j-th level wavelet row inverse transform of the code block data includes M rows of data, transpose the M rows of data, where M indicates that the second inverse transform circuit can process at most M in each clock cycle. Data, M is a positive integer.
  5. 根据权利要求3或4所述的小波逆变换电路,其特征在于,所述小波逆变换电路还包括:The wavelet inverse transform circuit according to claim 3 or 4, wherein the wavelet inverse transform circuit further comprises:
    第一缓存,用于存储所述码块数据的第j级小波行逆变换的结果。The first buffer is used to store the result of the j-th level wavelet line inverse transformation of the code block data.
  6. 根据权利要求5所述的小波逆变换电路,其特征在于,所述转置电路还用于:The wavelet inverse transform circuit according to claim 5, wherein the transposition circuit is further used for:
    从所述第一缓存中获取所述码块数据的第j级小波行逆变换的结果。Obtain the j-th level wavelet line inverse transform result of the code block data from the first buffer.
  7. 根据权利要求3至6中任一项所述的小波逆变换电路,其特征在于,所述小波逆变换电路还包括:The wavelet inverse transform circuit according to any one of claims 3 to 6, wherein the wavelet inverse transform circuit further comprises:
    第二缓存,用于存储所述码块数据的第j级小波逆变换的结果。The second buffer is used to store the j-th level wavelet inverse transform result of the code block data.
  8. 根据权利要求7所述的小波逆变换电路,其特征在于,j大于1,所述第一逆变换电路还用于:The wavelet inverse transform circuit according to claim 7, wherein j is greater than 1, and the first inverse transform circuit is also used for:
    从所述第二缓存中获取所述码块数据的第j级小波逆变换的结果;Obtaining the j-th level wavelet inverse transform result of the code block data from the second buffer;
    将所述第j级小波逆变换的结果作为第j-1级小波变换的LL数据,结合所述码块数据的第j-1级小波变换的HL数据、LH数据和HH数据,作为所述码块数据的第j-1级小波变换的数据;The result of the j-th level wavelet inverse transform is used as the j-1 level wavelet transform LL data, and the j-1 level wavelet transform HL data, LH data, and HH data of the code block data are combined as the J-1 level wavelet transform data of code block data;
    所述逆变换电路还用于:The inverse transform circuit is also used for:
    按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对所述码块数据的第j-1级小波变换的数据执行小波逆变换,得到所述码块数据的第j-1级小波逆变换的结果。The j-1 level wavelet transform of the code block data line by line in the order of line 1, line 2N+1, line 2, line 2N+2, ..., line 2N, line 4N The data is subjected to inverse wavelet transform to obtain the result of the j-1th level wavelet inverse transform of the code block data.
  9. 根据权利要求8所述的小波逆变换电路,其特征在于,所述第一逆变换电路还用于:The wavelet inverse transform circuit according to claim 8, wherein the first inverse transform circuit is further used for:
    按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对所述码块数据的第j-1级小波变换的数据执行小波行逆变换,得到所述码块数据的第j-1级小波行逆变换结果;The j-1 level wavelet transform of the code block data line by line in the order of line 1, line 2N+1, line 2, line 2N+2, ..., line 2N, line 4N Perform wavelet inverse transformation on the data to obtain the j-1th level wavelet inverse transformation result of the code block data;
    所述转置电路还用于:The transposition circuit is also used for:
    对所述码块数据的第j-1级小波行逆变换的结果进行转置;Transpose the result of the j-1th level wavelet row inverse transform of the code block data;
    所述第二逆变换电路还用于:The second inverse transform circuit is also used for:
    按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对转置后的所述码块数据的第j-1级小波行逆变换的结果执行小波列逆变换,得到所述码块数据的第j-1级小波逆变换的结果。According to the order of row 1, row 2N+1, row 2, row 2N+2, ..., row 2N, row 4N, row by row the j-1 of the transposed code block data The result of the first-level wavelet row inverse transform is performed on the inverse wavelet sequence to obtain the result of the j-1th-level wavelet inverse transform of the code block data.
  10. 一种小波逆变换方法,其特征在于,包括:A wavelet inverse transform method is characterized in that it includes:
    获取解码后的码块数据;Obtain decoded code block data;
    按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行 的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波逆变换,得到所述码块数据的第j级小波逆变换的结果,N和j均为大于1的正整数,所述N+1行的数据对应的频率分量与所述第1行的数据对应的频率分量不同。Perform line by line on the j-th level wavelet transform data of the code block data in the order of line 1, line N+1, line 2, line N+2, ..., line N, line 2N Wavelet inverse transform to obtain the j-th level wavelet inverse transform result of the code block data, N and j are both positive integers greater than 1, and the frequency components corresponding to the data in the N+1 row are the same as those in the first row. The frequency components corresponding to the data are different.
  11. 根据权利要求10所述的方法,其特征在于,所述1行的数据和所述第N+1行的数据均属于第j-1级小波变换后的频率分量LL中的数据。The method according to claim 10, wherein the data of the 1 row and the data of the N+1th row belong to the data in the frequency component LL after the j-1 level wavelet transform.
  12. 根据权利要求10或11所述的方法,其特征在于,所述逐行对所述码块数据的第j级小波变换的数据执行小波逆变换,包括:The method according to claim 10 or 11, wherein the performing wavelet inverse transformation on the j-th level wavelet transformed data of the code block data line by line comprises:
    按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对所述码块数据的第j级小波变换的数据执行小波行逆变换,得到所述码块数据的第j级小波行逆变换的结果,所述第j级小波变换的数据的行数为2N,N为大于1的正整数,j为正整数;Perform line by line on the j-th level wavelet transform data of the code block data in the order of line 1, line N+1, line 2, line N+2, ..., line N, line 2N Inverse wavelet transform to obtain the result of the j-th level wavelet transform of the code block data. The number of rows of the j-th wavelet transform data is 2N, where N is a positive integer greater than 1, and j is a positive integer;
    对所述码块数据的第j级小波行逆变换的结果进行转置;Transpose the result of the j-th level wavelet row inverse transformation of the code block data;
    按照第1行、第N+1行、第2行、第N+2行、…、第N行、第2N行的顺序,逐行对转置后的所述码块数据的第j级小波行逆变换的结果执行小波列逆变换,得到所述码块数据的第j级小波逆变换的结果。In the order of row 1, row N+1, row 2, row N+2, ..., row N, row 2N, the j-th level wavelet of the transposed code block data is row by row The inverse wavelet transform is performed on the result of the row inverse transform to obtain the j-th level wavelet inverse transform result of the code block data.
  13. 根据权利要求12所述的方法,其特征在于,所述对所述码块数据的第j级小波行逆变换的结果进行转置,包括:The method according to claim 12, wherein the transposing the result of the j-th level wavelet row inverse transform of the code block data comprises:
    在所述码块数据的第j级小波行逆变换的结果包括M行数据之后,对所述M行数据进行转置,M表示每个时钟周期最多能够处理M个数据,M为正整数。After the result of the j-th level wavelet row inverse transformation of the code block data includes M rows of data, the M rows of data are transposed, M represents that each clock cycle can process at most M data, and M is a positive integer.
  14. 根据权利要求12或13所述的方法,其特征在于,在所述得到所述码块数据的第j级小波行逆变换的结果之后,所述方法还包括:The method according to claim 12 or 13, wherein after obtaining the result of the j-th level wavelet row inverse transform of the code block data, the method further comprises:
    将所述码块数据的第j级小波行逆变换的结果存储至第一缓存器中。The result of the j-th level wavelet row inverse transformation of the code block data is stored in the first buffer.
  15. 根据权利要求14所述的方法,其特征在于,在所述存储所述码块数据的第j级小波行逆变换的结果之后,所述方法还包括:The method according to claim 14, characterized in that, after storing the result of the j-th level wavelet row inverse transform of the code block data, the method further comprises:
    从所述第一缓存器中获取所述码块数据的第j级小波行逆变换的结果。Obtaining the j-th level wavelet line inverse transform result of the code block data from the first buffer.
  16. 根据权利要求12至15中任一项所述的方法,其特征在于,在所述得到所述码块数据的第j级小波逆变换的结果之后,所述方法还包括:The method according to any one of claims 12 to 15, wherein after obtaining the result of the j-th level wavelet inverse transform of the code block data, the method further comprises:
    将所述码块数据的第j级小波逆变换的结果存储至第二缓存器中。The result of the j-th level wavelet inverse transform of the code block data is stored in the second buffer.
  17. 根据权利要求16所述的方法,其特征在于,j大于1,所述方法还包括:The method according to claim 16, wherein j is greater than 1, and the method further comprises:
    从所述第二缓存器中获取所述码块数据的第j级小波逆变换的结果;Obtaining the j-th level wavelet inverse transform result of the code block data from the second buffer;
    将所述第j级小波逆变换的结果作为第j-1级小波变换的LL数据,结合所述码块数据的第j-1级小波变换的HL数据、LH数据和HH数据,作为所述码块数据的第j-1级小波变换的数据;The result of the j-th level wavelet inverse transform is used as the j-1 level wavelet transform LL data, and the j-1 level wavelet transform HL data, LH data, and HH data of the code block data are combined as the J-1 level wavelet transform data of code block data;
    按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对所述码块数据的第j-1级小波变换的数据执行小波逆变换,得到所述码块数据的第j-1级小波逆变换的结果。The j-1 level wavelet transform of the code block data line by line in the order of line 1, line 2N+1, line 2, line 2N+2, ..., line 2N, line 4N The data is subjected to inverse wavelet transform to obtain the result of the j-1th level wavelet inverse transform of the code block data.
  18. 根据权利要求17所述的方法,其特征在于,所述逐行对所述码块数据的第j-1级小波变换的数据执行小波逆变换,包括:The method according to claim 17, wherein the performing wavelet inverse transform on the j-1th level wavelet transform data of the code block data line by line comprises:
    按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对所述码块数据的第j-1级小波变换的数据执行小波行逆变换,得到所述码块数据的第j-1级小波行逆变换结果;The j-1 level wavelet transform of the code block data line by line in the order of line 1, line 2N+1, line 2, line 2N+2, ..., line 2N, line 4N Perform wavelet inverse transformation on the data to obtain the j-1th level wavelet inverse transformation result of the code block data;
    对所述码块数据的第j-1级小波行逆变换的结果进行转置;Transpose the result of the j-1th level wavelet row inverse transform of the code block data;
    按照第1行、第2N+1行、第2行、第2N+2行、…、第2N行、第4N行的顺序,逐行对转置后的所述码块数据的第j-1级小波行逆变换的结果执行小波列逆变换,得到所述码块数据的第j-1级小波逆变换的结果。According to the order of row 1, row 2N+1, row 2, row 2N+2, ..., row 2N, row 4N, row by row the j-1 of the transposed code block data The result of the first-level wavelet row inverse transform is performed on the inverse wavelet sequence to obtain the result of the j-1th-level wavelet inverse transform of the code block data.
  19. 一种解码器,其特征在于,包括如权利要求1至9中任一项所述的小波逆变换电路。A decoder, characterized by comprising the wavelet inverse transform circuit according to any one of claims 1 to 9.
  20. 一种计算机存储介质,其特征在于,其上存储有计算机程序,所述计算机程序被计算机执行时使得,所述计算机执行如权利要求10至18中任一项所述的方法。A computer storage medium, characterized in that a computer program is stored thereon, and when the computer program is executed by a computer, the computer executes the method according to any one of claims 10 to 18.
  21. 一种包含指令的计算机程序产品,其特征在于,所述指令被计算机执行时使得计算机执行如权利要求10至18中任一项所述的方法。A computer program product containing instructions, characterized in that, when the instructions are executed by a computer, the computer executes the method according to any one of claims 10 to 18.
PCT/CN2019/084919 2019-04-29 2019-04-29 Wavelet inverse transformation circuit and method WO2020220179A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/084919 WO2020220179A1 (en) 2019-04-29 2019-04-29 Wavelet inverse transformation circuit and method
CN201980007856.2A CN111567042B (en) 2019-04-29 2019-04-29 Inverse wavelet transform circuit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/084919 WO2020220179A1 (en) 2019-04-29 2019-04-29 Wavelet inverse transformation circuit and method

Publications (1)

Publication Number Publication Date
WO2020220179A1 true WO2020220179A1 (en) 2020-11-05

Family

ID=72072868

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/084919 WO2020220179A1 (en) 2019-04-29 2019-04-29 Wavelet inverse transformation circuit and method

Country Status (2)

Country Link
CN (1) CN111567042B (en)
WO (1) WO2020220179A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030152280A1 (en) * 2001-09-25 2003-08-14 Yukio Kadowaki Image processing device, image processing method, and image reading method
CN101984666A (en) * 2010-11-19 2011-03-09 南京邮电大学 Image lossless compression and decompression method based on lifting wavelet transform
CN102572429A (en) * 2011-12-29 2012-07-11 东南大学 Hardware framework for two-dimensional discrete wavelet transformation
CN104053011A (en) * 2014-06-13 2014-09-17 哈尔滨工业大学 Two-dimensional discrete inverse wavelet transform device applied to JPEG 2000 decoder
CN105491392A (en) * 2015-11-24 2016-04-13 北京优素科技有限公司 Multilevel IDWT (Inverse Discrete Wavelet Transform) parallel processing method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3855827B2 (en) * 2002-04-05 2006-12-13 ソニー株式会社 Two-dimensional subband encoding device
JP5263621B2 (en) * 2009-09-24 2013-08-14 ソニー株式会社 Image processing apparatus and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030152280A1 (en) * 2001-09-25 2003-08-14 Yukio Kadowaki Image processing device, image processing method, and image reading method
CN101984666A (en) * 2010-11-19 2011-03-09 南京邮电大学 Image lossless compression and decompression method based on lifting wavelet transform
CN102572429A (en) * 2011-12-29 2012-07-11 东南大学 Hardware framework for two-dimensional discrete wavelet transformation
CN104053011A (en) * 2014-06-13 2014-09-17 哈尔滨工业大学 Two-dimensional discrete inverse wavelet transform device applied to JPEG 2000 decoder
CN105491392A (en) * 2015-11-24 2016-04-13 北京优素科技有限公司 Multilevel IDWT (Inverse Discrete Wavelet Transform) parallel processing method and system

Also Published As

Publication number Publication date
CN111567042B (en) 2022-05-17
CN111567042A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
KR101710001B1 (en) Apparatus and Method for JPEG2000 Encoding/Decoding based on GPU
CN101309417B (en) Apparatus and method for processing image data
CN100558164C (en) The picture coding device of image processing method and this image processing method of employing
WO2016110031A1 (en) Data flow decoding method and device
CN101631243B (en) Image encoding/decoding method based on wavelet transformation
Wheeler et al. Low-memory packetized SPIHT image compression
JP2008288857A (en) Apparatus and method for processing information
WO2020220179A1 (en) Wavelet inverse transformation circuit and method
KR100529540B1 (en) image compression method using wavelet transform
US8989278B2 (en) Method and device for coding a multi dimensional digital signal comprising original samples to form coded stream
US8249375B2 (en) Information processing apparatus and method
Lian et al. Analysis and architecture design of lifting based DWT and EBCOT for JPEG 2000
US8670624B2 (en) Information processing apparatus and method
JP4111761B2 (en) Image processing device
JP4793320B2 (en) Information processing apparatus and method
KR20110071204A (en) Parallel processing method in wavelet-based jpeg2000
Wu et al. An efficient architecture for JPEG2000 coprocessor
Wu et al. Analysis and architecture design for high performance JPEG2000 coprocessor
JP4115142B2 (en) Image processing apparatus and image processing method
WO2020215193A1 (en) Coder, coding system, and coding method
JP2004201047A (en) Image processing apparatus, program, and storage medium
US20210203952A1 (en) Encoder, encoding system and encoding method
Liu et al. An ASIC implementation of JPEG2000 codec
Mukherjee et al. Efficient Performance of Lifting Scheme Along With Integer Wavelet Transform In Image Compression
CN101984664B (en) Multi-band wavelet transformation method for image and video compression coding and decoding and applications

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: 19926816

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: 19926816

Country of ref document: EP

Kind code of ref document: A1