WO2021077489A1 - 图像解压缩方法、装置及显示终端 - Google Patents

图像解压缩方法、装置及显示终端 Download PDF

Info

Publication number
WO2021077489A1
WO2021077489A1 PCT/CN2019/117926 CN2019117926W WO2021077489A1 WO 2021077489 A1 WO2021077489 A1 WO 2021077489A1 CN 2019117926 W CN2019117926 W CN 2019117926W WO 2021077489 A1 WO2021077489 A1 WO 2021077489A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
data
transformation
row
inverse quantization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/117926
Other languages
English (en)
French (fr)
Inventor
朱江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL China Star Optoelectronics Technology Co Ltd
Original Assignee
TCL China Star Optoelectronics Technology Co Ltd
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 TCL China Star Optoelectronics Technology Co Ltd filed Critical TCL China Star Optoelectronics Technology Co Ltd
Priority to US16/625,336 priority Critical patent/US11436759B2/en
Publication of WO2021077489A1 publication Critical patent/WO2021077489A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/147Discrete orthonormal transforms, e.g. discrete cosine transform, discrete sine transform, and variations therefrom, e.g. modified discrete cosine transform, integer transforms approximating the discrete cosine transform
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4084Scaling of whole images or parts thereof, e.g. expanding or contracting in the transform domain, e.g. fast Fourier transform [FFT] domain scaling
    • 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/124Quantisation
    • 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/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • 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/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]

Definitions

  • This application relates to the field of display panel technology, and in particular to an image decompression method, device and display terminal.
  • the generally adopted method is data compression. Before data is stored or transmitted, the CPU is usually used for compression. This process usually takes a relatively long time. Before the data is used, it needs to be decompressed. For example, video APP/DVD needs to be decompressed when playing the network or the data transmitted from the optical disc. , This process usually requires real-time processing. FPGA has great advantages in real-time data processing, but the type of data and the complexity of the operation have a great influence on the usage of FPGA resources.
  • DCT Discrete Cosine Transform, Discrete Cosine Transform
  • DCT transformation not only has a large number of floating-point operations, but also requires more multipliers and uses a lot of resources.
  • DCT inverse transformation in the prior art also requires a large number of floating-point operations and multiplication operations, resulting in low processing efficiency of FPGA decompression.
  • the embodiments of the present application provide an image decompression method, device, and display terminal to solve the problem of low processing efficiency during image decompression.
  • the embodiment of the present application provides an image decompression method, including:
  • the inverse quantization factor is an integer
  • the inverse DCT transform is performed on the inverse quantized data to obtain image data; the inverse DCT transform includes a shift operation and an addition operation.
  • the method further includes:
  • the obtained integer is multiplied by the quantization factor and then rounded to obtain the inverse quantization factor.
  • the inverse quantization data is a matrix with n rows and n columns, and n>1;
  • the performing DCT inverse transformation on the inverse quantization data to obtain image data specifically includes:
  • the transformation operation includes a shift operation and an addition operation
  • the column transformation matrix is shifted right by the preset number of bits to obtain the image data.
  • the performing a transformation operation on each row of data of the inverse quantization data to obtain a row transformation matrix specifically includes:
  • Each row of data in the inverse quantization data is used as a target matrix, the odd-digit data in the target matrix is formed into an odd-digit matrix, and the even-digit data in the target matrix is formed into an even-digit matrix;
  • the first operation includes a shift operation and an addition operation
  • the second operation includes a shift operation and an addition operation
  • the data in the first transformation matrix and the data in the second transformation matrix are combined into a target transformation matrix corresponding to the target matrix; the target transformation matrix corresponding to the n rows of data in the dequantized data constitutes the Row transformation matrix.
  • the dequantized data is a matrix with 8 rows and 8 columns, and the target matrix is a matrix with 1 row and 8 columns;
  • the first operation is:
  • Y_1C is the first operation matrix, Is an odd-digit matrix, da1, da3, da5, da7 are the odd-digit data in the target matrix;
  • the second operation is:
  • Y_2C is the second operation matrix
  • da2, da4, da6, da8 are the even bit data in the target matrix.
  • An embodiment of the present application also provides an image decompression device, including:
  • the dequantization module is configured to dequantize the image compression data based on a preset dequantization factor to obtain dequantization data; the dequantization factor is an integer; and,
  • the inverse transform module is used to perform DCT inverse transform on the inverse quantized data to obtain image data; the DCT inverse transform includes shift operations and addition operations.
  • the device further includes:
  • the factor acquisition module is used to acquire the DCT transform base and quantization factors in the image compression process
  • Decimal acquisition module configured to acquire the decimal part in the DCT transform base
  • the left shift module is used to shift the decimal part to the left by a preset number of digits to obtain an integer
  • the rounding module is used to multiply the obtained integer by the quantization factor and then round to obtain the inverse quantization factor.
  • the inverse quantization data is a matrix with n rows and n columns, and n>1;
  • the inverse transform module specifically includes:
  • the row transformation unit is configured to perform a transformation operation on each row of data of the inverse quantization data to obtain a row transformation matrix; the transformation operation includes a shift operation and an addition operation;
  • the column transformation unit is used to perform transformation operations on each column of data of the row transformation matrix to obtain a column transformation matrix
  • the right shift unit is configured to shift the column transformation matrix right by the preset number of bits to obtain the image data.
  • the row transformation unit specifically includes:
  • the matrix acquisition subunit is used to separately use each row of data in the inverse quantization data as a target matrix, and form an odd-digit matrix of odd-digit data in the target matrix, and form an even-digit data in the target matrix Even bit matrix
  • the first operation subunit is used to perform a first operation on the odd bit matrix to obtain a first operation matrix; the first operation includes a shift operation and an addition operation;
  • the second operation subunit is configured to perform a second operation on the even-numbered bit matrix to obtain a second operation matrix; the second operation includes a shift operation and an addition operation;
  • the first calculation subunit is configured to calculate the sum of the first operation matrix and the second operation matrix to obtain a first transformation matrix
  • the second calculation subunit is configured to calculate the difference between the first operation matrix and the second operation matrix to obtain a second transformation matrix
  • the merging subunit is used to merge the data in the first transformation matrix and the data in the second transformation matrix into a target transformation matrix corresponding to the target matrix; the n rows of data in the dequantized data correspond to The target transformation matrix constitutes the row transformation matrix.
  • the dequantized data is a matrix with 8 rows and 8 columns, and the target matrix is a matrix with 1 row and 8 columns;
  • the first operation is:
  • Y_1C is the first operation matrix, Is an odd-digit matrix, da1, da3, da5, da7 are the odd-digit data in the target matrix;
  • the second operation is:
  • Y_2C is the second operation matrix
  • da2, da4, da6, da8 are the even bit data in the target matrix.
  • An embodiment of the present application also provides a display terminal, including a processor and a memory, where the memory is used to store instructions and data, and the processor is used to execute the following steps:
  • the inverse quantization factor is an integer
  • the inverse DCT transform is performed on the inverse quantized data to obtain image data; the inverse DCT transform includes a shift operation and an addition operation.
  • the method further includes:
  • the obtained integer is multiplied by the quantization factor and then rounded to obtain the inverse quantization factor.
  • the inverse quantization data is a matrix with n rows and n columns, and n>1;
  • the performing DCT inverse transformation on the inverse quantization data to obtain image data specifically includes:
  • the transformation operation includes a shift operation and an addition operation
  • the column transformation matrix is shifted right by the preset number of bits to obtain the image data.
  • the performing a transformation operation on each row of data of the inverse quantization data to obtain a row transformation matrix specifically includes:
  • Each row of data in the dequantized data is used as a target matrix, the odd-digit data in the target matrix is formed into an odd-digit matrix, and the even-digit data in the target matrix is formed into an even-digit matrix;
  • the first operation includes a shift operation and an addition operation
  • the second operation includes a shift operation and an addition operation
  • the data in the first transformation matrix and the data in the second transformation matrix are combined into a target transformation matrix corresponding to the target matrix; the target transformation matrix corresponding to the n rows of data in the dequantized data constitutes the Row transformation matrix.
  • the dequantized data is a matrix with 8 rows and 8 columns, and the target matrix is a matrix with 1 row and 8 columns;
  • the first operation is:
  • Y_1C is the first operation matrix, Is an odd-digit matrix, da1, da3, da5, da7 are the odd-digit data in the target matrix;
  • the second operation is:
  • Y_2C is the second operation matrix
  • da2, da4, da6, da8 are the even bit data in the target matrix.
  • the beneficial effects of this application are: dequantize the image compressed data based on integer dequantization factors to obtain dequantized data, and then perform DCT inverse transformation on the dequantized data based on shift operations and addition operations to obtain image data, so that the image can be dequantized.
  • DCT inverse transformation on the dequantized data based on shift operations and addition operations to obtain image data, so that the image can be dequantized.
  • There are no floating-point operations and multiplication operations in the compression process which effectively improves the processing efficiency of decompression and ensures real-time processing of decompression.
  • FIG. 1 is a schematic flowchart of an image decompression method provided by an embodiment of the application
  • FIG. 2 is a schematic diagram of inverse quantization data to column transformation matrix in the image decompression method provided by an embodiment of the application;
  • FIG. 3 is a schematic structural diagram of an image decompression device provided by an embodiment of the application.
  • FIG. 4 is a schematic structural diagram of a display terminal provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of another structure of a display terminal provided by an embodiment of the application.
  • connection should be understood in a broad sense unless otherwise clearly specified and limited.
  • it can be a support connection or a detachable connection. Connected or integrally connected; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication between two components.
  • connection can be a support connection or a detachable connection. Connected or integrally connected; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication between two components.
  • an embodiment of the present application provides an image decompression method, including
  • image compression data refers to compressed data obtained after original image data is compressed.
  • the compression process can include DCT transformation, quantization, and coding.
  • DCT transform is also known as discrete cosine transform, its purpose is to transform the spatial domain signal to the frequency domain signal, effectively remove the correlation of the signal, and concentrate most of the energy in the low frequency region, and then there is a significant low frequency domain of the selected coding Signal, discard insignificant high-frequency domain signals, to achieve the purpose of improving compression efficiency.
  • the DCT transform formula in N ⁇ M space is as follows:
  • the DCT transform base C is:
  • Quantization refers to the process of approximating the continuous value of the signal (or a large number of possible discrete values) to a finite number of (or fewer) discrete values. Based on the preset quantization factor Q, the data after the DCT transformation is quantized.
  • Encoding is the process of converting information from one format or form to another.
  • the quantized data is encoded to obtain image compression data.
  • the inverse quantization factor is an integer.
  • the image compression data may be decoded first.
  • Decoding is the process of restoring information from its encoded form to its original state before encoding.
  • the decoded image compression data is inversely quantized.
  • the inverse quantization factor is calculated and set in advance based on the DCT transform base C and the quantization factor Q in the image compression process.
  • the calculation method of the dequantization factor includes:
  • the obtained integer is multiplied by the quantization factor and then rounded to obtain the inverse quantization factor.
  • the DCT transform base C and the quantization factor Q are both matrices.
  • Each data in the DCT transform base C includes an integer part and a decimal part.
  • the decimal part of each data in the DCT transform base C is extracted to form a decimal.
  • Matrix A Shifting the decimal matrix A to the left by the preset number f is equivalent to amplifying the decimal matrix A to the power of 2 to become an integer.
  • the decimal matrix A can be a matrix with 8 rows and 8 columns
  • the quantization factor Q can be a matrix with 8 rows and 8 columns
  • the preset number f can be a matrix with 8 rows and 8 columns, as follows:
  • V floor(A*Q*2 f )
  • * is dot multiplication
  • floor is rounding
  • the calculation of the inverse quantization factor V can be performed offline, and the calculated inverse quantization factor V is written into the register, and it is directly read and used from the register during inverse quantization.
  • this embodiment uses the inverse quantization factor V to replace the quantization factor Q in the prior art, and performs inverse quantization on the decoded image compression data, so as not to increase the inverse quantization operation.
  • the inverse DCT transform includes a shift operation and an addition operation.
  • the dequantized data is a matrix with n rows and n columns, n>1, and each data in the matrix is an integer.
  • the inverse DCT transformation of an integer matrix can only use shift operations and addition operations, and avoid the use of multiplication operations, which effectively reduces the computational complexity and improves the processing efficiency of the DCT inverse transformation.
  • performing DCT inverse transformation on the inverse quantization data to obtain image data specifically includes:
  • the transformation operation includes a shift operation and an addition operation
  • the column transformation matrix is shifted right by the preset number of bits to obtain the image data.
  • the transformation operation is first performed from the first row, and then sequentially transformed to the nth row. After the transformation of the n rows of data is completed, the row transformation matrix can be obtained, and the row transformation matrix is still a matrix with n rows and n columns. Then, for the row transformation matrix, the transformation operation is performed from the first column first, and then transformed to the nth column in turn. After the transformation of the N columns of data is completed, the column transformation matrix can be obtained, and the column transformation matrix is still a matrix with n rows and n columns.
  • the transformation operation of each row has the same principle as the transformation operation of each column.
  • the performing a transformation operation on each row of data of the inverse quantization data to obtain a row transformation matrix specifically includes:
  • Each row of data in the inverse quantization data is used as a target matrix, the odd-digit data in the target matrix is formed into an odd-digit matrix, and the even-digit data in the target matrix is formed into an even-digit matrix;
  • the first operation includes a shift operation and an addition operation
  • the second operation includes a shift operation and an addition operation
  • the data in the first transformation matrix and the data in the second transformation matrix are combined into a target transformation matrix corresponding to the target matrix; the target transformation matrix corresponding to the n rows of data in the dequantized data constitutes the Row transformation matrix.
  • the transformation operation for each row of the inverse quantization data has the same principle as the transformation operation for each column of the row transformation matrix.
  • the row data is divided into an odd bit matrix and an even bit matrix.
  • the first operation and the second operation are respectively performed on the odd bit matrix and the even bit matrix. Both the first operation and the second operation include shift operation and addition operation. An operation matrix and a second operation matrix, and then the first operation matrix and the second operation matrix are added.
  • the addition operation here includes the addition and subtraction of the first operation matrix and the second operation matrix. Combining the operation results of the two operations, such as arranging the results of the addition operation in order, and arranging the results of the subtraction operation in reverse order after the results of the addition operation, can form the transformed i-th row of data. Cache the transformed i-th row of data with i++, if i ⁇ 8 at this time, continue to obtain the i-th row of data in the inverse quantized data, and perform transformation operations on the i-th row of data; if i>8, All rows of data in the cache are arranged in the original row order to form a row transformation matrix.
  • the bit matrix and the even bit matrix respectively perform the first operation on the odd bit matrix and the second operation on the even bit matrix.
  • Both the first operation and the second operation include shift operation and addition operation, and the first operation matrix and the second operation matrix are obtained correspondingly.
  • the second operation matrix, and then the first operation matrix and the second operation matrix are added.
  • the addition operation here includes the addition and subtraction of the first operation matrix and the second operation matrix.
  • the operations of the two operations The results are arranged alternately.
  • the result of the addition operation is arranged in order, and the result of the subtraction operation is arranged in the reverse order after the result of the addition operation to form the transformed j-th column data.
  • the inverse quantization data is a matrix with 8 rows and 8 columns, and the data in a certain row is taken as the target matrix.
  • the data in the target matrix are da1, da2, da3, da4, da5, da6, da7, da8 in order.
  • da1, da3, da5, da7 are odd-digit data
  • forming an odd-digit matrix da2, da4, da6, da8 are even-digit data
  • forming an even-digit matrix Perform the first operation on the odd bit matrix to obtain the first operation matrix Y_1C.
  • the first operation is:
  • Multiplying the data in the odd bit matrix by 2 means moving one bit to the left, and multiplying the data by 1 means not shifting, so there are only shift operations and addition operations in the first operation.
  • the second operation is:
  • Multiplying the data in the even bit matrix by 4 means moving two bits to the left, multiplying the data by 2 means moving one bit to the left, and multiplying the data by 1 means no shift. Therefore, there are only shift and addition operations in the second operation.
  • the data in the column transformation matrix needs to be shifted to the right by the preset number f, that is Divide the data in the transformation matrix by 2 f to obtain the original image data.
  • the embodiment of the application can inversely quantize image compressed data based on integer inverse quantization factors to obtain inverse quantized data, and then perform DCT inverse transformation on the inverse quantized data based on shift operations and addition operations to obtain image data, so that the image decompression process There is no floating point operation and multiplication operation, which effectively improves the processing efficiency of decompression and guarantees the real-time processing of decompression.
  • an embodiment of the present application also provides an image decompression device, which can implement all the processes of the image decompression method in the foregoing embodiment.
  • the image decompression device provided by the embodiment of the present application includes:
  • the dequantization module 2 is configured to dequantize the image compression data based on a preset dequantization factor to obtain dequantization data; the dequantization factor is an integer; and,
  • the inverse transform module 3 is used to perform inverse DCT transform on the inverse quantized data to obtain image data; the inverse DCT transform includes shift operations and addition operations.
  • the device further includes:
  • the factor acquisition module is used to acquire the DCT transform base and quantization factors in the image compression process
  • Decimal acquisition module configured to acquire the decimal part in the DCT transform base
  • the left shift module is used to shift the decimal part to the left by a preset number of digits to obtain an integer
  • the rounding module is used to multiply the obtained integer by the quantization factor and then round to obtain the inverse quantization factor.
  • the inverse quantization data is a matrix with n rows and n columns, and n>1;
  • the inverse transform module specifically includes:
  • the row transformation unit is configured to perform a transformation operation on each row of data of the inverse quantization data to obtain a row transformation matrix; the transformation operation includes a shift operation and an addition operation;
  • the column transformation unit is used to perform transformation operations on each column of data of the row transformation matrix to obtain a column transformation matrix
  • the right shift unit is configured to shift the column transformation matrix right by the preset number of bits to obtain the image data.
  • the row transformation unit specifically includes:
  • the matrix acquisition subunit is used to separately use each row of data in the inverse quantization data as a target matrix, and form an odd-digit matrix of odd-digit data in the target matrix, and form an even-digit data in the target matrix Even bit matrix
  • the first operation subunit is used to perform a first operation on the odd bit matrix to obtain a first operation matrix; the first operation includes a shift operation and an addition operation;
  • the second operation subunit is configured to perform a second operation on the even-numbered bit matrix to obtain a second operation matrix; the second operation includes a shift operation and an addition operation;
  • the first calculation subunit is configured to calculate the sum of the first operation matrix and the second operation matrix to obtain a first transformation matrix
  • the second calculation subunit is configured to calculate the difference between the first operation matrix and the second operation matrix to obtain a second transformation matrix
  • the merging subunit is used to merge the data in the first transformation matrix and the data in the second transformation matrix into a target transformation matrix corresponding to the target matrix; the n rows of data in the dequantized data correspond to The target transformation matrix constitutes the row transformation matrix.
  • the dequantized data is a matrix with 8 rows and 8 columns, and the target matrix is a matrix with 1 row and 8 columns;
  • the first operation is:
  • Y_1C is the first operation matrix, Is an odd-digit matrix, da1, da3, da5, da7 are the odd-digit data in the target matrix;
  • the second operation is:
  • Y_2C is the second operation matrix
  • da2, da4, da6, da8 are the even bit data in the target matrix.
  • the embodiment of the application can inversely quantize image compressed data based on integer inverse quantization factors to obtain inverse quantized data, and then perform DCT inverse transformation on the inverse quantized data based on shift operations and addition operations to obtain image data, so that the image decompression process There is no floating point operation and multiplication operation, which effectively improves the processing efficiency of decompression and guarantees the real-time processing of decompression.
  • an embodiment of the present application also provides a display terminal, which may be a device such as a smart phone, a tablet computer, or a TV.
  • the display terminal 400 includes a processor 401 and a memory 402. Wherein, the processor 401 and the memory 402 are electrically connected.
  • the processor 401 is the control center of the display terminal 400. It uses various interfaces and lines to connect various parts of the entire display terminal, and executes display by running or loading application programs stored in the memory 402, and calling data stored in the memory 402. Various functions of the terminal and processing data, so as to monitor the display terminal as a whole.
  • the processor 401 in the display terminal 400 will load the instructions corresponding to the process of one or more applications into the memory 402 according to the following steps, and the processor 401 will run the instructions and store them in the memory 402. In order to achieve various functions:
  • the inverse quantization factor is an integer
  • the inverse DCT transform is performed on the inverse quantized data to obtain image data; the inverse DCT transform includes a shift operation and an addition operation.
  • FIG. 5 is a schematic structural diagram of a display terminal provided by an embodiment of the application.
  • the display terminal 300 may include an RF circuit 310, a memory 320 including one or more computer-readable storage media, an input unit 330, a display unit 340, a sensor 350, an audio circuit 360, a speaker 361, a microphone 362, a transmission module 370, It includes a processor 380 with one or more processing cores, a power supply 390 and other components.
  • the structure of the display terminal shown in FIG. 5 does not constitute a limitation on the display terminal, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements.
  • the RF circuit 310 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices.
  • the RF circuit 310 may include various existing circuit elements for performing these functions, for example, an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a subscriber identity module (SIM) card, a memory, and so on.
  • the RF circuit 310 can communicate with various networks such as the Internet, an intranet, and a wireless network, or communicate with other devices through a wireless network.
  • the aforementioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network.
  • the above-mentioned wireless network can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment, EDGE, and broadband code Wideband Code Division Multiple Access (WCDMA), Code Division Access (CDMA), Time Division Multiple Access (TDMA), and Wireless Fidelity (Wi-Fi) Fi) (such as the standards of the Institute of Electrical and Electronics Engineers IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and/or IEEE 802.11n), Internet telephony (Voice over Internet Protocol, VoIP), Worldwide Interoperability for Microwave Access, Wi-Max), other protocols for mail, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.
  • GSM Global System for Mobile Communication
  • WCDMA Wideband Code Division Multiple Access
  • CDMA Code Division Access
  • TDMA Time Division Multiple Access
  • Wi-Fi Wireless Fidelity
  • the memory 320 can be used to store software programs and modules, such as the program instructions/modules corresponding to the image decompression device and method in the above embodiments.
  • the processor 380 executes various functional applications by running the software programs and modules stored in the memory 320 As well as data processing, the front camera can automatically fill light when taking pictures.
  • the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 320 may further include a memory remotely provided with respect to the processor 380, and these remote memories may be connected to the display terminal 300 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input unit 330 can be used to receive inputted digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the input unit 330 may include a touch-sensitive surface 331 and other input devices 332.
  • the touch-sensitive surface 331 also called a touch screen or a touchpad, can collect user touch operations on or near it (for example, the user uses a finger, stylus, or any other suitable object or accessory on or on the touch-sensitive surface 331). Operation near the touch-sensitive surface 331), and drive the corresponding connection device according to a preset program.
  • the touch-sensitive surface 331 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 380, and can receive and execute the commands sent by the processor 380.
  • the touch-sensitive surface 331 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the input unit 330 may also include other input devices 332.
  • the other input device 332 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, and joystick.
  • the display unit 340 may be used to display information input by the user or information provided to the user and various graphical user interfaces of the display terminal 300. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof.
  • the display unit 340 may include a display panel 341.
  • the display panel 341 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.
  • the touch-sensitive surface 331 may cover the display panel 341. When the touch-sensitive surface 331 detects a touch operation on or near it, it is transmitted to the processor 380 to determine the type of the touch event, and then the processor 380 determines the type of the touch event. The type provides corresponding visual output on the display panel 341.
  • the touch-sensitive surface 331 and the display panel 341 are used as two independent components to implement input and output functions, in some embodiments, the touch-sensitive surface 331 and the display panel 341 can be integrated to implement input. And output function.
  • the display terminal 300 may also include at least one sensor 350, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display panel 341 according to the brightness of the ambient light, and the proximity sensor can close the display panel 341 when the display terminal 300 is moved to the ear. And/or backlight.
  • the gravity acceleration sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when it is stationary.
  • mobile phone posture applications such as horizontal and vertical screen switching, related Games, magnetometer posture calibration
  • vibration recognition related functions such as pedometer, percussion
  • sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc.
  • An audio circuit 360 a speaker 361, and a microphone 362, which can provide an audio interface between the user and the display terminal 300.
  • the audio circuit 360 can transmit the electrical signal converted from the received audio data to the speaker 361, and the speaker 361 converts it into a sound signal for output; on the other hand, the microphone 362 converts the collected sound signal into an electrical signal, which is then output by the audio circuit 360. After being received, it is converted into audio data, and then processed by the audio data output processor 380, and sent to, for example, another terminal via the RF circuit 310, or the audio data is output to the memory 320 for further processing.
  • the audio circuit 360 may also include an earplug jack to provide communication between a peripheral earphone and the display terminal 300.
  • the display terminal 300 can help users to send and receive emails, browse webpages, and access streaming media through the transmission module 370 (such as a Wi-Fi module), and it provides users with wireless broadband Internet access.
  • the transmission module 370 such as a Wi-Fi module
  • FIG. 5 shows the transmission module 370, it is understandable that it is not a necessary component of the display terminal 300, and can be omitted as needed without changing the essence of the invention.
  • the processor 380 is the control center of the display terminal 300, which uses various interfaces and lines to connect various parts of the entire mobile phone, runs or executes software programs and/or modules stored in the memory 320, and calls data stored in the memory 320 , Perform various functions of the display terminal 300 and process data, so as to monitor the mobile phone as a whole.
  • the processor 380 may include one or more processing cores; in some embodiments, the processor 380 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and For application programs, the modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 380.
  • the display terminal 300 also includes a power source 390 (such as a battery) for supplying power to various components.
  • the power source may be logically connected to the processor 380 through a power management system, so that the power management system can manage charging, discharging, and power consumption. Management and other functions.
  • the power supply 390 may also include any components such as one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
  • the display terminal 300 may also include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be repeated here.
  • the display unit of the display terminal is a touch screen display, and the display terminal also includes a memory and one or more programs.
  • One or more programs are stored in the memory and configured to be configured by one or more programs.
  • the above processor executes one or more programs including instructions for performing the following operations:
  • the inverse quantization factor is an integer
  • the inverse DCT transform is performed on the inverse quantized data to obtain image data; the inverse DCT transform includes a shift operation and an addition operation.
  • each of the above modules can be implemented as an independent entity, or can be combined arbitrarily, and implemented as the same or several entities.
  • each of the above modules please refer to the previous method embodiments, which will not be repeated here.
  • an embodiment of the present invention provides a storage medium in which multiple instructions are stored, and the instructions can be loaded by a processor to execute the steps in any image decompression method provided in the embodiments of the present invention.
  • the storage medium may include: read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
  • the instructions stored in the storage medium can execute the steps in any image decompression method provided in the embodiments of the present invention, it can implement what is possible in any image decompression method provided in the embodiments of the present invention.
  • the beneficial effects achieved refer to the previous embodiment for details, which will not be repeated here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Multimedia (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Discrete Mathematics (AREA)
  • Computing Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请公开了一种图像解压缩方法、装置及显示终端。所述方法包括:获取图像压缩数据;基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。

Description

图像解压缩方法、装置及显示终端 技术领域
本申请涉及显示面板技术领域,尤其涉及一种图像解压缩方法、装置及显示终端。
背景技术
随着经济水平的提高,平板电视愈来愈受到人们欢迎,电视的解析度也越来越高,从最初的高清至全高清,再至4K,8K,在单位时间内,数据的传输量越来越大。另外,人们对液晶电视的品质要求也越来越高,液晶电视由于制造工艺的原因,液晶面板难免会出现显示画质不均匀的问题,常用画质均匀度补偿算法进行补偿。随着液晶面板解析度的增高,补偿数据所需的储存单元越来越大,成本亦越来越高。
针对越来越大的数据传输与存储,一般采取的方法为数据压缩。数据在存储或者传输之前,常用CPU进行压缩,此过程通常作用时间较为宽裕,而数据在使用之前,需进行解压缩,如视频APP/DVD在播放网路或者光盘传过来的数据需进行解压缩,此过程通常需进行实时处理。FPGA在实时处理数据方面具有很大的优势,但是数据类型,运算的复杂程度对FPGA资源的使用情况影响很大。
但是,DCT(Discrete Cosine Transform,离散余弦变换)是压缩技术中常使用的变换技术,DCT变换不仅存在大量的浮点运算,而且需使用较多的乘法器,资源使用较大。而现有技术中的DCT反变换也需要进行大量的浮点运算和乘法运算,导致FPGA解压缩的处理效率 低下。
技术问题
本申请实施例提供一种图像解压缩方法、装置及显示终端,以解决图像解压缩时处理效率低下的问题。
技术解决方案
本申请实施例提供了一种图像解压缩方法,包括:
获取图像压缩数据;
基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;
对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
进一步地,在所述基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据之前,还包括:
获取图像压缩过程中的DCT变换基和量化因素;
获取所述DCT变换基中的小数部分;
将所述小数部分左移预设位数,获得整数;
将获得的整数与所述量化因素相乘后取整,获得所述反量化因素。
进一步地,所述反量化数据为n行n列的矩阵,n>1;
所述对所述反量化数据进行DCT反变换,获得图像数据,具体包括:
对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵;所述变换运算包括移位运算和加法运算;
对所述行变换矩阵的每一列数据进行变换运算,获得列变换矩阵;
将所述列变换矩阵右移所述预设位数,获得所述图像数据。
进一步地,所述对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵,具体包括:
分别将所述反量化数据中的每一行数据作为目标矩阵,并将所述目标矩阵中的奇数位数据构成奇数位矩阵,将所述目标矩阵中的偶数位数据构成偶数位矩阵;
对所述奇数位矩阵进行第一运算,获得第一运算矩阵;所述第一运算包括移位运算和加法运算;
对所述偶数位矩阵进行第二运算,获得第二运算矩阵;所述第二运算包括移位运算和加法运算;
计算所述第一运算矩阵与所述第二运算矩阵之和,获得第一变换矩阵;
计算所述第一运算矩阵与所述第二运算矩阵的差值,获得第二变换矩阵;
将所述第一变换矩阵中的数据与所述第二变换矩阵中的数据合并为所述目标矩阵对应的目标变换矩阵;所述反量化数据中的n行数据对应的目标变换矩阵构成所述行变换矩阵。
进一步地,所述反量化数据为8行8列的矩阵,所述目标矩阵为1行8列的矩阵;
所述第一运算为:
Figure PCTCN2019117926-appb-000001
其中,Y_1C为第一运算矩阵,
Figure PCTCN2019117926-appb-000002
为奇数位矩阵,da1、da3、da5、da7为目标矩阵中的奇数位数据;
所述第二运算为:
Figure PCTCN2019117926-appb-000003
其中,Y_2C为第二运算矩阵,
Figure PCTCN2019117926-appb-000004
为偶数位矩阵,da2、da4、da6、da8为目标矩阵中的偶数位数据。
本申请实施例还提供一种图像解压缩装置,包括:
数据获取模块,用于获取图像压缩数据;
反量化模块,用于基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;以及,
反变换模块,用于对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
进一步地,所述装置还包括:
因素获取模块,用于获取图像压缩过程中的DCT变换基和量化因素;
小数获取模块,用于获取所述DCT变换基中的小数部分;
左移模块,用于将所述小数部分左移预设位数,获得整数;以及,
取整模块,用于将获得的整数与所述量化因素相乘后取整,获得所述反量化因素。
进一步地,所述反量化数据为n行n列的矩阵,n>1;
所述反变换模块具体包括:
行变换单元,用于对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵;所述变换运算包括移位运算和加法运算;
列变换单元,用于对所述行变换矩阵的每一列数据进行变换运算,获得列变换矩阵;
右移单元,用于将所述列变换矩阵右移所述预设位数,获得所述图像数据。
进一步地,所述行变换单元具体包括:
矩阵获取子单元,用于分别将所述反量化数据中的每一行数据作为目标矩阵,并将所述目标矩阵中的奇数位数据构成奇数位矩阵,将所述目标矩阵中的偶数位数据构成偶数位矩阵;
第一运算子单元,用于对所述奇数位矩阵进行第一运算,获得第一运算矩阵;所述第一运算包括移位运算和加法运算;
第二运算子单元,用于对所述偶数位矩阵进行第二运算,获得第二运算矩阵;所述第二运算包括移位运算和加法运算;
第一计算子单元,用于计算所述第一运算矩阵与所述第二运算矩阵之和,获得第一变换矩阵;
第二计算子单元,用于计算所述第一运算矩阵与所述第二运算矩阵的差值,获得第二变换矩阵;以及,
合并子单元,用于将所述第一变换矩阵中的数据与所述第二变换矩阵中的数据合并为所述目标矩阵对应的目标变换矩阵;所述反量化数据中的n行数据对应的目标变换矩阵构成所述行变换矩阵。
进一步地,所述反量化数据为8行8列的矩阵,所述目标矩阵为1行8列的矩阵;
所述第一运算为:
Figure PCTCN2019117926-appb-000005
其中,Y_1C为第一运算矩阵,
Figure PCTCN2019117926-appb-000006
为奇数位矩阵,da1、da3、da5、da7为目标矩阵中的奇数位数据;
所述第二运算为:
Figure PCTCN2019117926-appb-000007
其中,Y_2C为第二运算矩阵,
Figure PCTCN2019117926-appb-000008
为偶数位矩阵,da2、da4、da6、da8为目标矩阵中的偶数位数据。
本申请实施例还提供一种显示终端,包括处理器和存储器,所述 存储器用于存储指令和数据,所述处理器用于执行以下步骤:
获取图像压缩数据;
基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;
对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
进一步地,在所述基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据之前,还包括:
获取图像压缩过程中的DCT变换基和量化因素;
获取所述DCT变换基中的小数部分;
将所述小数部分左移预设位数,获得整数;
将获得的整数与所述量化因素相乘后取整,获得所述反量化因素。
进一步地,所述反量化数据为n行n列的矩阵,n>1;
所述对所述反量化数据进行DCT反变换,获得图像数据,具体包括:
对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵;所述变换运算包括移位运算和加法运算;
对所述行变换矩阵的每一列数据进行变换运算,获得列变换矩阵;
将所述列变换矩阵右移所述预设位数,获得所述图像数据。
进一步地,所述对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵,具体包括:
分别将所述反量化数据中的每一行数据作为目标矩阵,并将所述 目标矩阵中的奇数位数据构成奇数位矩阵,将所述目标矩阵中的偶数位数据构成偶数位矩阵;
对所述奇数位矩阵进行第一运算,获得第一运算矩阵;所述第一运算包括移位运算和加法运算;
对所述偶数位矩阵进行第二运算,获得第二运算矩阵;所述第二运算包括移位运算和加法运算;
计算所述第一运算矩阵与所述第二运算矩阵之和,获得第一变换矩阵;
计算所述第一运算矩阵与所述第二运算矩阵的差值,获得第二变换矩阵;
将所述第一变换矩阵中的数据与所述第二变换矩阵中的数据合并为所述目标矩阵对应的目标变换矩阵;所述反量化数据中的n行数据对应的目标变换矩阵构成所述行变换矩阵。
进一步地,所述反量化数据为8行8列的矩阵,所述目标矩阵为1行8列的矩阵;
所述第一运算为:
Figure PCTCN2019117926-appb-000009
其中,Y_1C为第一运算矩阵,
Figure PCTCN2019117926-appb-000010
为奇数位矩阵,da1、da3、da5、da7为目标矩阵中的奇数位数据;
所述第二运算为:
Figure PCTCN2019117926-appb-000011
其中,Y_2C为第二运算矩阵,
Figure PCTCN2019117926-appb-000012
为偶数位矩阵,da2、da4、da6、da8为目标矩阵中的偶数位数据。
有益效果
本申请的有益效果为:基于整数的反量化因素对图像压缩数据进行反量化,获得反量化数据,进而基于移位运算和加法运算对反量化数据进行DCT反变换,获得图像数据,使得图像解压缩过程中无浮点运算和乘法运算,有效提高解压缩的处理效率,保证解压缩的实时处理。
附图说明
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其它有益效果显而易见。
图1为本申请实施例提供的图像解压缩方法的一种流程示意图;
图2为本申请实施例提供的图像解压缩方法中反量化数据到列变换矩阵的原理图;
图3为本申请实施例提供的图像解压缩装置的一种结构示意图;
图4为本申请实施例提供的显示终端的一种结构示意图;
图5为本申请实施例提供的显示终端的另一种结构示意图。
本发明的实施方式
这里所公开的具体结构和功能细节仅仅是代表性的,并且是用于描述本申请的示例性实施例的目的。但是本申请可以通过许多替换形式来具体实现,并且不应当被解释成仅仅受限于这里所阐述的实施例。
在本申请的描述中,需要理解的是,术语“中心”、“横向”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。另外,术语“包括”及其任何变形,意图在于覆盖不排他的包含。
在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是支撑连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。
这里所使用的术语仅仅是为了描述具体实施例而不意图限制示 例性实施例。除非上下文明确地另有所指,否则这里所使用的单数形式“一个”、“一项”还意图包括复数。还应当理解的是,这里所使用的术语“包括”和/或“包含”规定所陈述的特征、整数、步骤、操作、单元和/或组件的存在,而不排除存在或添加一个或更多其他特征、整数、步骤、操作、单元、组件和/或其组合。
下面结合附图和实施例对本申请作进一步说明。
如图1所示,本申请实施例提供了一种图像解压缩方法,包括
101、获取图像压缩数据。
本实施例中,图像压缩数据是指原始的图像数据经压缩后得到的压缩数据。压缩过程可以包括DCT变换、量化和编码。其中,DCT变换又称离散余弦变换,其目的是将空域信号变换到频域信号,有效地去除信号的相关性,并使大部分能量集中到低频区域,然后有选择的编码部分显著的低频域信号,丢弃不显著的高频域信号,达到提高压缩效率的目的。
在N×M空间的DCT变换公式如下:
Figure PCTCN2019117926-appb-000013
二维DCT变换等价于先对图像数据进行行变换,再进行列变换,也即对每行或每列N个元素分别与N个不同频率的变换基做内积,因此DCT变换公式可以等效于:Y=C*X*CT,C为DCT变换基。
其中,DCT变换基C为:
Figure PCTCN2019117926-appb-000014
量化是指将信号的连续取值(或者大量可能的离散取值)近似为有限多个(或较少的)离散值的过程。基于预设的量化因素Q,将DCT变换后的数据进行量化。
编码是将信息由一种格式或形式转换为另一种形式的过程。量化后的数据经编码得到图像压缩数据。
102、基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数。
本实施例中,在获取图像压缩数据后,可先对图像压缩数据进行解码。解码是将信息从已经编码的形式恢复到编码前原状的过程。
进而,基于预设的反量化因素,对解码后的图像压缩数据进行反量化。其中,反量化因素是根据图像压缩过程中的DCT变换基C和量化因素Q预设计算并设置的。
具体地,反量化因素的计算方法包括:
获取图像压缩过程中的DCT变换基和量化因素;
获取所述DCT变换基中的小数部分;
将所述小数部分左移预设位数,获得整数;
将获得的整数与所述量化因素相乘后取整,获得所述反量化因素。
需要说明的是,DCT变换基C和量化因素Q均为矩阵,DCT变换基C中的每个数据均包括整数部分和小数部分,提取DCT变换基 C中的每个数据的小数部分,构成小数矩阵A。将小数矩阵A左移预设位数f,即相当于将小数矩阵A放大2的f次方,变成整数,将该整数与量化因素Q相结合取整,即可获得反量化因素V。其中,小数矩阵A可以为8行8列的矩阵,量化因素Q可以为8行8列的矩阵,预设位数f可以为8行8列的矩阵,分别如下:
A11 A12 A13 A14 A15 A16 A17 A18
A21 A22 A23 A24 A25 A26 A27 A28
A31 A32 A33 A34 A35 A36 A37 A38
A41 A42 A43 A44 A45 A46 A47 A48
A51 A52 A53 A54 A55 A56 A57 A58
A61 A62 A63 A64 A65 A66 A67 A68
A71 A72 A73 A74 A75 A76 A77 A78
A81 A82 A83 A84 A85 A86 A87 A88
Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18
Q21 Q22 Q23 Q24 Q25 Q26 Q27 Q28
Q31 Q32 Q33 Q34 Q35 Q36 Q37 Q38
Q41 Q42 Q43 Q44 Q45 Q46 Q47 Q48
Q51 Q52 Q53 Q54 Q55 Q56 Q57 Q58
Q61 Q62 Q63 Q64 Q65 Q66 Q67 Q68
Q71 Q72 Q73 Q74 Q75 Q76 Q77 Q78
Q81 Q82 Q83 Q84 Q85 Q86 Q87 Q88
f11 f12 f13 f14 f15 f16 f17 f18
f21 f22 f23 f24 f25 f26 f27 f28
f31 f32 f33 f34 f35 f36 f37 f38
f41 f42 f43 f44 f45 f46 f47 f48
f51 f52 f53 f54 f55 f56 f57 f58
f61 f62 f63 f64 f65 f66 f67 f68
f71 f72 f73 f74 f75 f76 f77 f78
f81 f82 f83 f84 f85 f86 f87 f88
反量化因素V的计算公式如下:
V=floor(A*Q*2 f)
其中,*为点乘,floor为取整。
由于小数矩阵A和量化因素Q为固定值,因此反量化因素V的计算可以在线下进行,计算获得的反量化因素V写入寄存器,在反量化时直接从寄存器中读取使用。
在反量化时,本实施例采用反量化因素V代替现有技术中的量化因素Q,对解码后的图像压缩数据进行反量化,从而不增加反量化的运算。
103、对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
本实施例中,反量化数据为n行n列的矩阵,n>1,且矩阵中的每个数据均为整数。对整数矩阵进行DCT反变换可以仅使用移位运算和加法运算,而避免使用乘法运算,有效降低运算复杂度,提高DCT反变换的处理效率。
具体地,所述对所述反量化数据进行DCT反变换,获得图像数据,具体包括:
对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵;所述变换运算包括移位运算和加法运算;
对所述行变换矩阵的每一列数据进行变换运算,获得列变换矩阵;
将所述列变换矩阵右移所述预设位数,获得所述图像数据。
需要说明的是,对于反量化数据这一n行n列的矩阵,先从第一行开始进行变换运算,依次变换至第n行。n行数据变换完成后,即可获得行变换矩阵,该行变换矩阵仍为n行n列的矩阵。然后,对于 行变换矩阵,先从第一列开始进行变换运算,依次变换至第n列。N列数据变换完成后,即可获得列变换矩阵,该列变换矩阵仍为n行n列的矩阵。其中,每一行的变换运算与每一列的变换运算的原理相同。
具体地,所述对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵,具体包括:
分别将所述反量化数据中的每一行数据作为目标矩阵,并将所述目标矩阵中的奇数位数据构成奇数位矩阵,将所述目标矩阵中的偶数位数据构成偶数位矩阵;
对所述奇数位矩阵进行第一运算,获得第一运算矩阵;所述第一运算包括移位运算和加法运算;
对所述偶数位矩阵进行第二运算,获得第二运算矩阵;所述第二运算包括移位运算和加法运算;
计算所述第一运算矩阵与所述第二运算矩阵之和,获得第一变换矩阵;
计算所述第一运算矩阵与所述第二运算矩阵的差值,获得第二变换矩阵;
将所述第一变换矩阵中的数据与所述第二变换矩阵中的数据合并为所述目标矩阵对应的目标变换矩阵;所述反量化数据中的n行数据对应的目标变换矩阵构成所述行变换矩阵。
本实施例中,对反量化数据每一行的变换运算与对行变换矩阵每一列的变换运算的原理相同。如图2所示,先针对反量化数据,设置反量化数据的行数i,令i=1,从第一行开始进行变换运算,即获取反 量化数据中的第i行数据,将第i行数据划分为奇数位矩阵和偶数位矩阵,分别对奇数位矩阵进行第一运算和偶数位矩阵进行第二运算,该第一运算和第二运算均包括移位运算和加法运算,对应获得第一运算矩阵和第二运算矩阵,进而将第一运算矩阵和第二运算矩阵进行加法运算,此处的加法运算包括第一运算矩阵与第二运算矩阵的相加和相减两个运算,将两个运算的运算结果合并,如将相加运算的结果顺序排列,将相减运算的结果倒序排列在相加运算结果之后,即可构成变换后的第i行数据。将变换后的第i行数据缓存,同时i++,若此时i≤8,则继续获取反量化数据中的第i行数据,并对第i行数据进行变换运算;若此时i>8,则将缓存的所有行数据按照原始的行顺序排列,构成行变换矩阵。
进而,针对行变换矩阵,设置行变换矩阵的列数j,另j=0,从第一列开始进行变换运算,即获取行变换矩阵中的第j列数据,将第j列数据划分为奇数位矩阵和偶数位矩阵,分别对奇数位矩阵进行第一运算和偶数位矩阵进行第二运算,该第一运算和第二运算均包括移位运算和加法运算,对应获得第一运算矩阵和第二运算矩阵,进而将第一运算矩阵和第二运算矩阵进行加法运算,此处的加法运算包括第一运算矩阵与第二运算矩阵的相加和相减两个运算,将两个运算的运算结果交替排列,如将相加运算的结果顺序排列,将相减运算的结果倒序排列在相加运算结果之后,即可构成变换后的第j列数据。将变换后的第j列数据缓存,同时j++,若此时j≤8,则继续获取行变换矩阵中的第j列数据,并对第j列数据进行变换运算;若此时j>8, 则将缓存的所有列数据按照原始的列顺序排列,构成列变换矩阵。
例如,反量化数据为8行8列的矩阵,将某一行的数据作为目标矩阵,该目标矩阵中的数据依次为da1、da2、da3、da4、da5、da6、da7、da8。其中,da1、da3、da5、da7为奇数位数据,构成奇数位矩阵
Figure PCTCN2019117926-appb-000015
da2、da4、da6、da8为偶数位数据,构成偶数位矩阵
Figure PCTCN2019117926-appb-000016
对奇数位矩阵进行第一运算,获得第一运算矩阵Y_1C,第一运算为:
Figure PCTCN2019117926-appb-000017
奇数位矩阵中的数据乘以2表示向左移动一位,数据乘以1表示不移位,因此第一运算中只有移位运算和加法运算。对偶数位矩阵进行第二运算,获得第二运算矩阵Y_2C,第二运算为:
Figure PCTCN2019117926-appb-000018
偶数位矩阵中的数据乘以4表示向左移动两位,数据乘以2表示向左移动一位,数据乘以1表示不移位,因此第二运算中只有移位运算和加法运算。
进而,计算第一运算矩阵Y_1C和第二运算矩阵Y_2C之和,即第一变换矩阵I_1C=Y_1C+Y_2C,同时计算第一运算矩阵Y_1C和第二运算矩阵Y_2C的差值,即第二变换矩阵I_2C=Y_1C-Y_2C。其中,将第一变换矩阵I_1C中的数据作为顺序排列,将第二变换矩 阵I_2C中的数据倒序排列在第一变换矩阵I_1C中的数据之后,构成目标矩阵对应的目标变换矩阵I_Y(i)=[I_1C(1) I_1C(2) I_1C(3) I_1C(4) I_2C(4) I_2C(3) I_2C(2) I_2C(1)]。
在获取列变换矩阵后,由于在计算反量化因素时DCT变换基中的小数部分左移预设位数f,则此时需对列变换矩阵中的数据右移预设位数f,即将列变换矩阵中的数据除以2 f,获得原始的图像数据。
本申请实施例能够基于整数的反量化因素对图像压缩数据进行反量化,获得反量化数据,进而基于移位运算和加法运算对反量化数据进行DCT反变换,获得图像数据,使得图像解压缩过程中无浮点运算和乘法运算,有效提高解压缩的处理效率,保证解压缩的实时处理。
相应地,本申请实施例还提供一种图像解压缩装置,能够实现上述实施例中图像解压缩方法的所有流程。
如图3所示,本申请实施例提供的图像解压缩装置,包括:
数据获取模块1,用于获取图像压缩数据;
反量化模块2,用于基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;以及,
反变换模块3,用于对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
进一步地,所述装置还包括:
因素获取模块,用于获取图像压缩过程中的DCT变换基和量化因素;
小数获取模块,用于获取所述DCT变换基中的小数部分;
左移模块,用于将所述小数部分左移预设位数,获得整数;以及,
取整模块,用于将获得的整数与所述量化因素相乘后取整,获得所述反量化因素。
进一步地,所述反量化数据为n行n列的矩阵,n>1;
所述反变换模块具体包括:
行变换单元,用于对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵;所述变换运算包括移位运算和加法运算;
列变换单元,用于对所述行变换矩阵的每一列数据进行变换运算,获得列变换矩阵;
右移单元,用于将所述列变换矩阵右移所述预设位数,获得所述图像数据。
进一步地,所述行变换单元具体包括:
矩阵获取子单元,用于分别将所述反量化数据中的每一行数据作为目标矩阵,并将所述目标矩阵中的奇数位数据构成奇数位矩阵,将所述目标矩阵中的偶数位数据构成偶数位矩阵;
第一运算子单元,用于对所述奇数位矩阵进行第一运算,获得第一运算矩阵;所述第一运算包括移位运算和加法运算;
第二运算子单元,用于对所述偶数位矩阵进行第二运算,获得第二运算矩阵;所述第二运算包括移位运算和加法运算;
第一计算子单元,用于计算所述第一运算矩阵与所述第二运算矩阵之和,获得第一变换矩阵;
第二计算子单元,用于计算所述第一运算矩阵与所述第二运算矩阵的差值,获得第二变换矩阵;以及,
合并子单元,用于将所述第一变换矩阵中的数据与所述第二变换矩阵中的数据合并为所述目标矩阵对应的目标变换矩阵;所述反量化数据中的n行数据对应的目标变换矩阵构成所述行变换矩阵。
进一步地,所述反量化数据为8行8列的矩阵,所述目标矩阵为1行8列的矩阵;
所述第一运算为:
Figure PCTCN2019117926-appb-000019
其中,Y_1C为第一运算矩阵,
Figure PCTCN2019117926-appb-000020
为奇数位矩阵,da1、da3、da5、da7为目标矩阵中的奇数位数据;
所述第二运算为:
Figure PCTCN2019117926-appb-000021
其中,Y_2C为第二运算矩阵,
Figure PCTCN2019117926-appb-000022
为偶数位矩阵,da2、da4、da6、da8为目标矩阵中的偶数位数据。
本申请实施例能够基于整数的反量化因素对图像压缩数据进行反量化,获得反量化数据,进而基于移位运算和加法运算对反量化数 据进行DCT反变换,获得图像数据,使得图像解压缩过程中无浮点运算和乘法运算,有效提高解压缩的处理效率,保证解压缩的实时处理。
另外,本申请实施例还提供一种显示终端,该显示终端可以是智能手机、平板电脑、电视等设备。如图4所示,显示终端400包括处理器401、存储器402。其中,处理器401与存储器402电性连接。
处理器401是显示终端400的控制中心,利用各种接口和线路连接整个显示终端的各个部分,通过运行或加载存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行显示终端的各种功能和处理数据,从而对显示终端进行整体监控。
在本实施例中,显示终端400中的处理器401会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器402中,并由处理器401来运行存储在存储器402中的应用程序,从而实现各种功能:
获取图像压缩数据;
基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;
对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
请参阅图5,图5为本申请实施例提供的显示终端的结构示意图。该显示终端300可以包括RF电路310、包括有一个或一个以上计算机可读存储介质的存储器320、输入单元330、显示单元340、传感器350、 音频电路360、扬声器361、传声器362、传输模块370、包括有一个或者一个以上处理核心的处理器380、以及电源390等部件。本领域技术人员可以理解,图5中示出的显示终端结构并不构成对显示终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
RF电路310用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯。RF电路310可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。RF电路310可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。上述的无线网络可以使用各种通信标准、协议及技术,包括但并不限于全球移动通信系统(Global System for Mobile Communication,GSM)、增强型移动通信技术(Enhanced Data GSM Environment,EDGE),宽带码分多址技术(Wideband Code Division Multiple Access,WCDMA),码分多址技术(Code Division Access,CDMA)、时分多址技术(Time Division Multiple Access,TDMA),无线保真技术(Wireless Fidelity,Wi-Fi)(如美国电气和电子工程师协会标准IEEE 802.11a,IEEE 802.11b,IEEE802.11g和/或IEEE 802.11n)、网络电话(Voice over Internet Protocol,VoIP)、全球微波互联接入(Worldwide Interoperability for Microwave Access,Wi-Max)、其他用于邮件、即时通讯及短消息的协议,以及任何其他 合适的通讯协议,甚至可包括那些当前仍未被开发出来的协议。
存储器320可用于存储软件程序以及模块,如上述实施例中图像解压缩装置、方法对应的程序指令/模块,处理器380通过运行存储在存储器320内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现前置摄像头拍照自动补光的功能。存储器320可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器320可进一步包括相对于处理器380远程设置的存储器,这些远程存储器可以通过网络连接至显示终端300。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入单元330可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元330可包括触敏表面331以及其他输入设备332。触敏表面331,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面331上或在触敏表面331附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面331可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器380,并能接收处理器380发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏 表面331。除了触敏表面331,输入单元330还可以包括其他输入设备332。具体地,其他输入设备332可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元340可用于显示由用户输入的信息或提供给用户的信息以及显示终端300的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元340可包括显示面板341,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板341。进一步的,触敏表面331可覆盖显示面板341,当触敏表面331检测到在其上或附近的触摸操作后,传送给处理器380以确定触摸事件的类型,随后处理器380根据触摸事件的类型在显示面板341上提供相应的视觉输出。虽然在图5中,触敏表面331与显示面板341是作为两个独立的部件来实现输入和输出功能,但是在某些实施例中,可以将触敏表面331与显示面板341集成而实现输入和输出功能。
显示终端300还可包括至少一种传感器350,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板341的亮度,接近传感器可在显示终端300移动到耳边时,关闭显示面板341和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游 戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于显示终端300还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路360、扬声器361和传声器362,传声器362可提供用户与显示终端300之间的音频接口。音频电路360可将接收到的音频数据转换后的电信号,传输到扬声器361,由扬声器361转换为声音信号输出;另一方面,传声器362将收集的声音信号转换为电信号,由音频电路360接收后转换为音频数据,再将音频数据输出处理器380处理后,经RF电路310以发送给比如另一终端,或者将音频数据输出至存储器320以便进一步处理。音频电路360还可能包括耳塞插孔,以提供外设耳机与显示终端300的通信。
显示终端300通过传输模块370(例如Wi-Fi模块)可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图5示出了传输模块370,但是可以理解的是,其并不属于显示终端300的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器380是显示终端300的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器320内的软件程序和/或模块,以及调用存储在存储器320内的数据,执行显示终端300的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器380可包括一个或多个处理核心;在一些实施例中,处理器380可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、 用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器380中。
显示终端300还包括给各个部件供电的电源390(比如电池),在一些实施例中,电源可以通过电源管理系统与处理器380逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源390还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
尽管未示出,显示终端300还可以包括摄像头(如前置摄像头、后置摄像头)、蓝牙模块等,在此不再赘述。具体在本实施例中,显示终端的显示单元是触摸屏显示器,显示终端还包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行一个或者一个以上程序包含用于进行以下操作的指令:
获取图像压缩数据;
基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;
对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施可参见前面的方法实施例,在此不再赘述。
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。为此,本发明实施例提供一种存储介质,其中存储有多条指令,该指令能够被处理器进行加载,以执行本发明实施例所提供的任一种图像解压缩方法中的步骤。
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
由于该存储介质中所存储的指令,可以执行本发明实施例所提供的任一种图像解压缩方法中的步骤,因此,可以实现本发明实施例所提供的任一种图像解压缩方法所能实现的有益效果,详见前面的实施例,在此不再赘述。
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。综上所述,虽然本申请已以优选实施例揭露如上,但上述优选实施例并非用以限制本申请,本领域的普通技术人员,在不脱离本申请的精神和范围内,均可作各种更动与润饰,因此本申请的保护范围以权利要求界定的范围为准。

Claims (15)

  1. 一种图像解压缩方法,其中,包括:
    获取图像压缩数据;
    基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;
    对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
  2. 如权利要求1所述的图像解压缩方法,其中,在所述基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据之前,还包括:
    获取图像压缩过程中的DCT变换基和量化因素;
    获取所述DCT变换基中的小数部分;
    将所述小数部分左移预设位数,获得整数;
    将获得的整数与所述量化因素相乘后取整,获得所述反量化因素。
  3. 如权利要求2所述的图像解压缩方法,其中,所述反量化数据为n行n列的矩阵,n>1;
    所述对所述反量化数据进行DCT反变换,获得图像数据,具体包括:
    对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵;所述变换运算包括移位运算和加法运算;
    对所述行变换矩阵的每一列数据进行变换运算,获得列变换矩阵;
    将所述列变换矩阵右移所述预设位数,获得所述图像数据。
  4. 如权利要求3所述的图像解压缩方法,其中,所述对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵,具体包括:
    分别将所述反量化数据中的每一行数据作为目标矩阵,并将所述目标矩阵中的奇数位数据构成奇数位矩阵,将所述目标矩阵中的偶数位数据构成偶数位矩阵;
    对所述奇数位矩阵进行第一运算,获得第一运算矩阵;所述第一运算包括移位运算和加法运算;
    对所述偶数位矩阵进行第二运算,获得第二运算矩阵;所述第二运算包括移位运算和加法运算;
    计算所述第一运算矩阵与所述第二运算矩阵之和,获得第一变换矩阵;
    计算所述第一运算矩阵与所述第二运算矩阵的差值,获得第二变换矩阵;
    将所述第一变换矩阵中的数据与所述第二变换矩阵中的数据合并为所述目标矩阵对应的目标变换矩阵;所述反量化数据中的n行数据对应的目标变换矩阵构成所述行变换矩阵。
  5. 如权利要求4所述的图像解压缩方法,其中,所述反量化数据为8行8列的矩阵,所述目标矩阵为1行8列的矩阵;
    所述第一运算为:
    Figure PCTCN2019117926-appb-100001
    其中,Y_1C为第一运算矩阵,
    Figure PCTCN2019117926-appb-100002
    为奇数位矩阵,da1、da3、da5、da7为目标矩阵中的奇数位数据;
    所述第二运算为:
    Figure PCTCN2019117926-appb-100003
    其中,Y_2C为第二运算矩阵,
    Figure PCTCN2019117926-appb-100004
    为偶数位矩阵,da2、da4、da6、da8为目标矩阵中的偶数位数据。
  6. 一种图像解压缩装置,其中,包括:
    数据获取模块,用于获取图像压缩数据;
    反量化模块,用于基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;以及,
    反变换模块,用于对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
  7. 如权利要求6所述的图像解压缩装置,其中,所述装置还包括:
    因素获取模块,用于获取图像压缩过程中的DCT变换基和量化因素;
    小数获取模块,用于获取所述DCT变换基中的小数部分;
    左移模块,用于将所述小数部分左移预设位数,获得整数;以及,
    取整模块,用于将获得的整数与所述量化因素相乘后取整,获得所述反量化因素。
  8. 如权利要求7所述的图像解压缩装置,其中,所述反量化数据为n行n列的矩阵,n>1;
    所述反变换模块具体包括:
    行变换单元,用于对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵;所述变换运算包括移位运算和加法运算;
    列变换单元,用于对所述行变换矩阵的每一列数据进行变换运算,获得列变换矩阵;
    右移单元,用于将所述列变换矩阵右移所述预设位数,获得所述图像数据。
  9. 如权利要求8所述的图像解压缩装置,其中,所述行变换单元具体包括:
    矩阵获取子单元,用于分别将所述反量化数据中的每一行数据作为目标矩阵,并将所述目标矩阵中的奇数位数据构成奇数位矩阵,将所述目标矩阵中的偶数位数据构成偶数位矩阵;
    第一运算子单元,用于对所述奇数位矩阵进行第一运算,获得第一运算矩阵;所述第一运算包括移位运算和加法运算;
    第二运算子单元,用于对所述偶数位矩阵进行第二运算,获得第二运算矩阵;所述第二运算包括移位运算和加法运算;
    第一计算子单元,用于计算所述第一运算矩阵与所述第二运算矩阵之和,获得第一变换矩阵;
    第二计算子单元,用于计算所述第一运算矩阵与所述第二运算矩阵的差值,获得第二变换矩阵;以及,
    合并子单元,用于将所述第一变换矩阵中的数据与所述第二变换矩阵中的数据合并为所述目标矩阵对应的目标变换矩阵;所述反量化数据中的n行数据对应的目标变换矩阵构成所述行变换矩阵。
  10. 如权利要求9所述的图像解压缩装置,其中,所述反量化数据为8行8列的矩阵,所述目标矩阵为1行8列的矩阵;
    所述第一运算为:
    Figure PCTCN2019117926-appb-100005
    其中,Y_1C为第一运算矩阵,
    Figure PCTCN2019117926-appb-100006
    为奇数位矩阵,da1、da3、da5、da7为目标矩阵中的奇数位数据;
    所述第二运算为:
    Figure PCTCN2019117926-appb-100007
    其中,Y_2C为第二运算矩阵,
    Figure PCTCN2019117926-appb-100008
    为偶数位矩阵,da2、da4、da6、da8为目标矩阵中的偶数位数据。
  11. 一种显示终端,其中,包括处理器和存储器,所述存储器用 于存储指令和数据,所述处理器用于执行以下步骤:
    获取图像压缩数据;
    基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据;所述反量化因素为整数;
    对所述反量化数据进行DCT反变换,获得图像数据;所述DCT反变换包括移位运算和加法运算。
  12. 如权利要求11所述的显示终端,其中,在所述基于预设的反量化因素,对所述图像压缩数据进行反量化,获得反量化数据之前,还包括:
    获取图像压缩过程中的DCT变换基和量化因素;
    获取所述DCT变换基中的小数部分;
    将所述小数部分左移预设位数,获得整数;
    将获得的整数与所述量化因素相乘后取整,获得所述反量化因素。
  13. 如权利要求12所述的显示终端,其中,所述反量化数据为n行n列的矩阵,n>1;
    所述对所述反量化数据进行DCT反变换,获得图像数据,具体包括:
    对所述反量化数据的每一行数据进行变换运算,获得行变换矩阵;所述变换运算包括移位运算和加法运算;
    对所述行变换矩阵的每一列数据进行变换运算,获得列变换矩阵;
    将所述列变换矩阵右移所述预设位数,获得所述图像数据。
  14. 如权利要求13所述的显示终端,其中,所述对所述反量化 数据的每一行数据进行变换运算,获得行变换矩阵,具体包括:
    分别将所述反量化数据中的每一行数据作为目标矩阵,并将所述目标矩阵中的奇数位数据构成奇数位矩阵,将所述目标矩阵中的偶数位数据构成偶数位矩阵;
    对所述奇数位矩阵进行第一运算,获得第一运算矩阵;所述第一运算包括移位运算和加法运算;
    对所述偶数位矩阵进行第二运算,获得第二运算矩阵;所述第二运算包括移位运算和加法运算;
    计算所述第一运算矩阵与所述第二运算矩阵之和,获得第一变换矩阵;
    计算所述第一运算矩阵与所述第二运算矩阵的差值,获得第二变换矩阵;
    将所述第一变换矩阵中的数据与所述第二变换矩阵中的数据合并为所述目标矩阵对应的目标变换矩阵;所述反量化数据中的n行数据对应的目标变换矩阵构成所述行变换矩阵。
  15. 如权利要求14所述的显示终端,其中,所述反量化数据为8行8列的矩阵,所述目标矩阵为1行8列的矩阵;
    所述第一运算为:
    Figure PCTCN2019117926-appb-100009
    其中,Y_1C为第一运算矩阵,
    Figure PCTCN2019117926-appb-100010
    为奇数位矩阵,da1、da3、da5、da7为目标矩阵中的奇数位数据;
    所述第二运算为:
    Figure PCTCN2019117926-appb-100011
    其中,Y_2C为第二运算矩阵,
    Figure PCTCN2019117926-appb-100012
    为偶数位矩阵,da2、da4、da6、da8为目标矩阵中的偶数位数据。
PCT/CN2019/117926 2019-10-22 2019-11-13 图像解压缩方法、装置及显示终端 Ceased WO2021077489A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/625,336 US11436759B2 (en) 2019-10-22 2019-11-13 Image decompression method, device and display terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911004402.8 2019-10-22
CN201911004402.8A CN110856000B (zh) 2019-10-22 2019-10-22 图像解压缩方法及装置

Publications (1)

Publication Number Publication Date
WO2021077489A1 true WO2021077489A1 (zh) 2021-04-29

Family

ID=69596671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117926 Ceased WO2021077489A1 (zh) 2019-10-22 2019-11-13 图像解压缩方法、装置及显示终端

Country Status (3)

Country Link
US (1) US11436759B2 (zh)
CN (1) CN110856000B (zh)
WO (1) WO2021077489A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030210744A1 (en) * 2002-05-09 2003-11-13 Porikli Fatih M. Method and apparatus for decoding video bitstreams to reduced spatial resolutions
CN101184234A (zh) * 2007-10-24 2008-05-21 上海广电(集团)有限公司中央研究院 基于avs的整数变换量化和整数反变换反量化方法
CN101511011A (zh) * 2009-02-19 2009-08-19 浙江大学 图像降采样快速解码显示方法和装置
CN102036075A (zh) * 2010-12-29 2011-04-27 东南大学 一种图像及数字视频编码及解码方法
CN102595112A (zh) * 2011-01-12 2012-07-18 北京大学 视频编码中编码和重建图像块的方法
CN109359267A (zh) * 2018-10-18 2019-02-19 哈尔滨工程大学 一种基于动态截位的低复杂度无乘法器定点fft优化方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2914226B2 (ja) * 1995-06-16 1999-06-28 日本電気株式会社 可逆変換を可能にするディジタル信号の変換符号化方式
US6681052B2 (en) * 2000-01-15 2004-01-20 Sony Corporation Methods and systems for performing inverse quantization and inverse weighting of DV video
US7082450B2 (en) * 2001-08-30 2006-07-25 Nokia Corporation Implementation of a transform and of a subsequent quantization
JP2005210502A (ja) * 2004-01-23 2005-08-04 Nec Corp 画像再圧縮装置および画像再圧縮方法
CN100433837C (zh) * 2004-03-18 2008-11-12 华中科技大学 视频编码的整数变换方法
US20050213835A1 (en) 2004-03-18 2005-09-29 Huazhong University Of Science & Technology And Samsung Electronics Co., Ltd. Integer transform matrix selection method in video coding and related integer transform method
CN1286322C (zh) * 2004-08-06 2006-11-22 联合信源数字音视频技术(北京)有限公司 一种低复杂度整数4×4离散余弦变换量化实现方法
DE112006003459B4 (de) * 2005-12-21 2015-02-05 Konica Minolta, Inc. Ultraschalldiagnosevorrichtung
CN100562111C (zh) * 2006-03-28 2009-11-18 华为技术有限公司 离散余弦逆变换方法及其装置
JP2012054818A (ja) * 2010-09-02 2012-03-15 Sony Corp 画像処理装置と画像処理方法
CN102413331A (zh) * 2011-12-01 2012-04-11 上海大学 图像或视频的编码方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030210744A1 (en) * 2002-05-09 2003-11-13 Porikli Fatih M. Method and apparatus for decoding video bitstreams to reduced spatial resolutions
CN101184234A (zh) * 2007-10-24 2008-05-21 上海广电(集团)有限公司中央研究院 基于avs的整数变换量化和整数反变换反量化方法
CN101511011A (zh) * 2009-02-19 2009-08-19 浙江大学 图像降采样快速解码显示方法和装置
CN102036075A (zh) * 2010-12-29 2011-04-27 东南大学 一种图像及数字视频编码及解码方法
CN102595112A (zh) * 2011-01-12 2012-07-18 北京大学 视频编码中编码和重建图像块的方法
CN109359267A (zh) * 2018-10-18 2019-02-19 哈尔滨工程大学 一种基于动态截位的低复杂度无乘法器定点fft优化方法

Also Published As

Publication number Publication date
US11436759B2 (en) 2022-09-06
CN110856000A (zh) 2020-02-28
CN110856000B (zh) 2020-10-27
US20210407138A1 (en) 2021-12-30

Similar Documents

Publication Publication Date Title
US10986332B2 (en) Prediction mode selection method, video encoding device, and storage medium
US10714049B2 (en) Electronic display border gain systems and methods
CN104954631B (zh) 一种视频处理方法、装置和系统
CN108205398B (zh) 网页动画适配屏幕的方法和装置
CN111612093A (zh) 一种视频分类方法、视频分类装置、电子设备及存储介质
EP2975846B1 (en) Image frame transmission method, mobile terminal and smart television
CN107277399A (zh) 电视终端及hdr图像转为sdr的方法和计算机可读存储介质
WO2019169997A1 (zh) 视频运动估计方法、装置、终端及存储介质
CN103488450A (zh) 一种投射图片的方法、装置及终端设备
CN114422781A (zh) 图像处理方法、智能终端及存储介质
US11183155B2 (en) Adaptive image data bit-depth adjustment systems and methods
US11651719B2 (en) Enhanced smoothness digital-to-analog converter interpolation systems and methods
CN111369926A (zh) 显示面板的充电方法及装置
CN107845074A (zh) 一种图像渲染方法和移动终端
CN112532958B (zh) 图像处理方法、装置、电子设备以及可读存储介质
CN111132216B (zh) 信息上报方法、终端及网络设备
WO2021077489A1 (zh) 图像解压缩方法、装置及显示终端
WO2025098523A2 (zh) 图像处理方法、处理设备及存储介质
EP4657852A1 (en) Processing method, processing device and storage medium
US20260045231A1 (en) Display overdrive control method and apparatus, and terminal device and storage medium
CN107124638B (zh) 数据传输方法、装置及系统
CN105184750A (zh) 一种在移动终端对实时视频图像去噪的方法和装置
US20190362466A1 (en) Content adaptive rendering
WO2018223793A1 (zh) 一种传输网页图片的方法、装置和系统
CN115422986A (zh) 处理方法、处理设备及存储介质

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

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

Country of ref document: EP

Kind code of ref document: A1