WO2006047936A1 - A method for determining the condition in zero block prejudgment and for prejudging zero block - Google Patents

A method for determining the condition in zero block prejudgment and for prejudging zero block Download PDF

Info

Publication number
WO2006047936A1
WO2006047936A1 PCT/CN2005/001787 CN2005001787W WO2006047936A1 WO 2006047936 A1 WO2006047936 A1 WO 2006047936A1 CN 2005001787 W CN2005001787 W CN 2005001787W WO 2006047936 A1 WO2006047936 A1 WO 2006047936A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
zero
prediction residual
current
residual image
Prior art date
Application number
PCT/CN2005/001787
Other languages
French (fr)
Chinese (zh)
Inventor
Zhong Luo
Bin Song
Yilin Chang
Ningzhao Zhou
Original Assignee
Huawei Technologies 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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2006047936A1 publication Critical patent/WO2006047936A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock

Definitions

  • the present invention relates to video compression coding techniques in a multimedia communication system, and more particularly to a zero block pre-determination method in a compression coding process.
  • the H.264 compression coding standard is the most advanced international standard for video compression coding. Its full name is the International Telecommunication Union - Telecommunication Standardization Organization H.264 standard (ITU-T H.264 Recommendation, International Telecommunication
  • H.264 standard Union-Telecommunication H.264 Recommendation
  • ISO International Organization for Standardization
  • MPEG International Electrotechnical Commission's Moving Picture Experts Group
  • H.264 Compared with the previous video compression coding standard technologies such as H.263+, H.263++ and MPEG-4 Simple Profile, H.264 has greatly improved performance and functions. Among them, many coding tool options have been added to the function, which makes it suitable for more application types and a wider range of applications. In terms of performance, at the same code rate (bit-rate), the image quality is peak signal-noise. Ratio (PSNR, Peak Signal-to-Noise Ratio, referred to as Peak Signal-to-Noise Ratio) As a reference, the H.264 standard doubles the previous H.263+/H.263++, MPEG-4 Simple Profile standard.
  • PSNR Peak Signal-to-Noise Ratio
  • the PSNR is increased by 3dB; that is, the network bandwidth required by the H.264 standard is higher than that required by the H.264+/H.263++, MPEG-4 Simple Profile standard when the same PSNR is obtained. Network bandwidth is reduced by 50%.
  • the H.264 standard has been significantly improved in terms of function and performance compared to the prior art standards, and the cost is high.
  • the computational complexity of the H.264 standard for compression and decoding of video images is complicated. More computational complexity than standards such as H.263/H.263+ Adding several times, therefore, the premise of the large-scale popularization of the H.264 standard must be to develop a variety of processing methods with high processing efficiency to reduce the high computational intensity of the H.264 standard codec operation process. Calculate the computational complexity of the link so that the processing power of the multimedia processor required by the product can be reduced, thereby reducing the cost; or the multimedia processor can support higher encoding and decoding capabilities for a given processing capability, thereby improving product performance.
  • Inter-frame prediction Inter-frame prediction
  • Intra Intra
  • Context-Adaptive Binary Arithmetic Coding 1/4 pixel precision motion estimation (ME, Motion Estimation) and motion compensation (MC, Motion Compensation), multi-reference frame prediction (Multi- Hypothesis prediction ) and so on.
  • ME Motion Estimation
  • MC Motion Compensation
  • Multi- Hypothesis prediction Multi- Hypothesis prediction
  • the H.264 standard has a large processing strategy change with respect to the previous standards such as H.263/H.263+.
  • the H.264 standard allows for prediction processing for each macro block (Mac block, hereinafter referred to as MB) in the current frame of the video image.
  • the general prediction process first performs inter prediction, then performs intra prediction, and then compares the results of intra prediction and inter prediction, and selects the prediction mode with the highest coding efficiency, so that intra prediction and inter prediction are used.
  • Predictive techniques are organically combined to achieve higher prediction efficiency and compression efficiency.
  • intra prediction is a unique processing attribute of the H.264 standard.
  • intra prediction can maximize the spatial correlation of image data, thereby improving compression coding efficiency.
  • inter-prediction is more commonly used, and inter-frame prediction uses temporal correlation between video image sequences; however, many types of video images exist internally. Strong spatial correlation, so the H.264 standard designed the intra prediction method to make full use of the spatial correlation existing inside the video image to improve the compression coding efficiency.
  • Intra prediction in the H.264 standard refers to searching for a certain area (generally a rectangular block) currently to be encoded in a video image during encoding, and searching for the most similar and already encoded in the video image. Block, using the most similar block found in this search to predict the current encoding The block, the predicted result is the predicted residual.
  • the similarity between different blocks is measured by SAD, Sum of Absolute Differences, that is, the block corresponding to the minimum SAD calculated by the block currently to be coded is taken as the closest block.
  • the above image block may be a macroblock MB (ie, a block of 16 ⁇ 16 pixels size), or may be a smaller block than the macroblock MB, that is, the intra prediction in the H.264 standard is in MB or MB. On a smaller scale block.
  • the video image compression coding process whether it is inter-frame prediction or intra-frame prediction, it is based on MB or smaller-scale blocks (such as 16 x 8 blocks, 8 x 16 blocks, 8 x 8 blocks, 8 x 4 blocks, 4 X 8 blocks, 4 X 4 blocks, etc.) relative to the reference image block (ie, the image block used for prediction) to obtain a prediction residual (Presence Residue or Prediction Difference), the prediction residual result being an image of the same size Block; then transforming the prediction residual image block into a transform coefficient domain, and then quantizing the transform coefficients; and finally performing Zigzag scanning and entropy encoding on the quantized transform coefficients. It can be seen that if the optimization processing method is introduced in the process of transforming the prediction residual image block and quantizing the transformed transform coefficient, the image compression coding processing efficiency is greatly improved.
  • MB or smaller-scale blocks such as 16 x 8 blocks, 8 x 16 blocks, 8 x 8 blocks, 8 x 4 blocks, 4 X 8 blocks
  • the H.264 integer transform method is a transform method derived from the discrete cosine transform (DCT, Discrete Consine Transform) method, that is, the quotient of integers is used to approximate the DCT transform coefficients, thereby eliminating the floating point multiplication and division operations.
  • DCT discrete cosine transform
  • the transform efficiency can be greatly improved, and the transform process and the quantization process can be combined into one process.
  • the image block size processed by the H.264 integer transform method is 4 x 4 blocks, if the H.264 integer transform is used and the prediction residual image block size is not 4 x 4 blocks, then the residual residual image needs to be taken.
  • the block is divided into a plurality of 4 X 4 blocks, and then each 4 x 4 block is integer-transformed.
  • the so-called zero block is the abbreviation of the all-zero transform coefficient block, that is, the case where the transform coefficients of the 16 4 x 4 blocks in the MB are all zero
  • the prediction residual image block whose quantization result is zero has no influence on the image compression coding, so the transformation and quantization process for these zero blocks can be directly omitted, thereby improving the image pressure.
  • the efficiency of the coding is reduced; and since the current block is the same position as the previous frame (for convenience of presentation, it is denoted as (0,0), the meaning of 0 is to indicate the relative motion displacement of the front frame block and the current block in the horizontal direction and the vertical direction.
  • the prediction residuals are directly obtained between the corresponding blocks at positions 0, that is, the positions are exactly the same. Therefore, if the prediction residual image block transformation and the quantization result are all zeros, the subsequent motion search process can be avoided. Thereby, the motion search calculation amount of each image block can be saved, and the calculation amount of the entire inter prediction mode selection is saved correspondingly.
  • the zero-block pre-judging method applicable in the .263 standard is described as a cylinder.
  • a specific implementation of a zero block pre-determination method that can be used is as follows:
  • each DCT coefficient is pre-determined by zero, as defined by the DCT: 0
  • x(i, j) represents the number of the i-th row, the j-th column in the 8x8 block; i, j is a spatial domain indicator.
  • the quantized result of the DCT coefficient is: l U ) l / 22 integer quotient, ie if Then, it can be determined that the quantized result of the DCT coefficient TM) is zero.
  • The DCT coefficients of the entire 8x8 block ⁇ (7,0), ⁇ -(7,1), . . . , ⁇ (7,7) are quantized to be zero blocks in advance. Because the above prior art solutions are generally implemented only for the 263.263 standard, Combine 8 X 8 blocks, such as for each MB (16 X 16 blocks) in a P frame (predicted frame) or a B frame (backward predicted frame) in a video image sequence, after motion prediction, obtain prediction The residual image block is also 16 16 blocks, and then the block is divided into four 8 ⁇ 8 blocks, and then each block of 8 ⁇ 8 blocks is subjected to zero block pre-decision processing of the above process, and the corresponding zero block can be obtained in advance.
  • the ⁇ .263 standard uses the DCT method, and the ⁇ .264 standard uses the 4 4 integer conversion method; and the H.263 standard uses 8 x 8 blocks as the transformed unit image block, and the H.264 standard
  • the 4 x 4 block is used as the transformed unit image block, so the zero block pre-determination method applicable in the H.263 standard is not well suited for the H.264 standard.
  • the zero block pre-determination method applicable in the H.263 standard also does not propose a practical and effective solution to avoid the motion search process in prediction mode selection. Because in the H.263 standard, there is no complex prediction mode selection in the H.264 standard, only inter prediction mode selection exists. Therefore, the zero block pre-judgment in the H.263 standard can save only the DCT of the image block. And the amount of quantization calculations behind, and the amount of computation for the motion search process in front of the DCT is small. Summary of the invention
  • the technical problem to be solved by the present invention is to propose a method for determining a zero block pre-determination component and a zero block pre-determination method, which is suitable for zero block pre-determination processing in the H.264 standard compression coding process, and improves the H.264 standard. Compression coding efficiency.
  • the present invention proposes a method for determining a zero block pre-judging condition, which is used for
  • the determination of the zero block pre-judgment condition in the H.264 compression coding process including the steps:
  • the displacement estimate The value of each element value of the inter-predicted residual image block after the value search; in step C, the prediction residual image block is integer-transformed according to the following formula:
  • ⁇ 4 ⁇ 4 is the 4 x 4 block before the integer transformation
  • ⁇ 4" is an integer-transformed 4 x 4 block
  • is a 264.264 integer transformation matrix, which is a !! transposed matrix
  • the 3 ⁇ 4 AG value is determined by the following process:
  • A(Q , i,j) M ⁇ Q M , r), where i and j represent the rows and columns of the elements in the 4 x 4 block, respectively
  • M is a matrix:
  • the present invention also proposes a zero block pre-determination method for the zero block pre-determination process in the 264.264 compression coding process, including the steps:
  • the step (4) and (5) further includes the steps of: determining the absolute error in the step (4) and whether the zero block pre-judging condition is satisfied, and if yes, applying the current block to the current image frame
  • the location information is recorded in the zero block list; otherwise it is not recorded.
  • the location information refers to row and column coordinate information of the current block in the current image frame.
  • another zero block pre-determination method proposed by the present invention is used for zero block pre-determination processing in the H.264 compression coding process, including the steps:
  • (S6) determining, in the process of performing integer transform and quantization on the prediction residual image block between each current block and the previous reference frame in the current image frame, determining whether the location information of each 4x4 block divided by the current block is Both are recorded in the zero block list, and if so, the prediction residual image block between each 4x4 block divided by the current block and the corresponding reference 4x4 block of the previous frame is not subjected to integer transform and quantization; otherwise, the current block is Each of the divided 4x4 blocks is subjected to integer transform and quantization processing with respect to the prediction residual image block between the corresponding reference 4 ⁇ 4 blocks of the previous frame.
  • the steps (S5) and (S6) further include the steps: for the absolute error in the step (S5) and the 4x4 block satisfying the zero block pre-judging condition, the position information in the current image frame is recorded in the In the zero block list, 4x4 blocks that do not satisfy the zero block pre-judgment condition are not recorded.
  • the inter prediction mode described in the step (S2) includes Interl6x l6, Interl6 x 8, Inter8 x 16, Inter 8 x 8, Inter 4 x 8 and Inter 8 x 4;
  • the step (S5) and (S6) further includes the steps of: determining whether the inter prediction mode is Inter 8 8, Inter 4 ⁇ 8 and Inter 8 x 4, ⁇ is, go to step 3 ⁇ 4 (S6); No-j'J-->J--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  • the derivation of the determined zero block pre-judging condition can be well applied to the zero block pre-determination in the 4x4 integer transform process in the H.264 standard.
  • the judgment condition has good discriminant accuracy, which can better guarantee the image quality of H.264 video images.
  • the zero block pre-determination method proposed by the present invention according to the determined zero block pre-judging condition can be applied to any inter-prediction mode in the H.264 standard, and only the unit image block in the non-Inter 4x4 prediction mode is divided into 4x4.
  • the block is processed, and the reference 4x4 block reference 4 X 4 block of the previous frame initial position is found for each 4x4 block at present, and the absolute error and SAD of the prediction residual image block between the current block and the initial block are calculated, and the SAD is satisfied.
  • the motion search of the current 4x4 block is stopped; if the SAD does not satisfy the pre-judgment condition, the motion search of the current 4x4 block is continued until the reference block of the optimal position is found; for the SAD, the pre-judgment condition is satisfied.
  • 4x4 block the position information in the current frame is recorded in the zero block list, and the 4x4 block recorded in the zero block list is not subjected to integer transform for the prediction residual image block between the reference block and the corresponding reference block of the previous frame. And quantization processing (for all 4x4 block position information divided by unit image blocks in non-Inter 4x4 prediction mode, it is recorded in the zero block list.
  • the prediction residual image block between each 4x4 block and the corresponding reference block of the previous frame is not subjected to integer transform and quantization processing, which can save inter prediction mode selection and integer transform and quantization in the H.264 standard. Calculate the amount, which can improve the efficiency of compression coding in the H.264 standard.
  • FIG. 1 is a flow chart showing the main implementation principle of the method for determining the zero block pre-judging condition of the present invention
  • FIG. 2 is a flow chart showing the principle of the zero block pre-determination method of the present invention in the Inter 4x4 inter-frame prediction mode
  • FIG. 3 is a flow chart showing the implementation principle of the zero block pre-determination method of the present invention in Interl6 ⁇ 16, Inter 16 x 8, Inter8 x 16, Inter 8 x 8, Inter 4 x 8 and Inter 8 x 4 inter prediction modes. detailed description
  • the method for determining the zero block pre-judging condition of the present invention proposes a zero block pre-judging condition that can be applied to the H.264 standard 4 x 4 integer transform.
  • the proposed zero block pre-judging condition has the following requirements:
  • KL transform Kahunen-Loeve, a statistical transformation
  • whitening is to make its autocorrelation matrix into a diagonal matrix
  • the KL transform can be used to obtain the best approximate representation.
  • DCT discrete cosine transform
  • the DCT method is used for image transformation, and some of the transformation matrix elements are irrational. If floating point operation is used, the error between the transformation and the inverse transformation will be caused. Therefore, the H.263 standard requires DCT transform and inverse transform to have sufficient accuracy to ensure the recovery accuracy of the decoded image, and the computational complexity of both DCT transform and inverse transform is also large. Thus, the H.264 standard proposes to transform an image block using a 4 X 4 integer transform.
  • ⁇ 4x4 ⁇ 4 ⁇ 4 ⁇ ⁇
  • the H.264 standard quantizes the transform coefficients after integer transformation using the following quantization formula:
  • i and j represent the row and column coordinates of an element in a 4x4 block, respectively, where 0 ⁇ ⁇ ⁇ , _/ ⁇ ⁇ 3;
  • X T ( ) and X ⁇ 'j) respectively represent the integer transform coefficients before and after quantization Value; aW, > is
  • the quantized variation factor given by the H.264 standard whose value depends on the spatial position of the transform coefficient; and the value of the parameter f is selected by the video encoder, and the typical value of f is [0, 0.5], which The effect is to maintain the quantization accuracy in the truncation process (the truncation process is what is commonly referred to as rounding).
  • M is a 6x3 matrix, defined as follows: 13107,5243,8066
  • the quantization transformation factor is calculated from the value of (ij)
  • the process is: firstly r is calculated according to equation (7), and in accordance with formula (6) the query expression (8), to give Q values of the M rows of the matrix M, the first r columns of elements as the quantized transform factor).
  • FIG. 1 is a flow chart of the main implementation principle of the method for determining the condition of zero block pre-judgment of the present invention.
  • the main implementation process is as follows:
  • Step S10 obtaining a prediction residual image block between the video image 4x4 block and the previous frame reference 4x4 block;
  • Step S40 according to the integer transform property in the H.264 standard, the absolute value of the DC coefficient value r (0, 0) is the largest among the 4 ⁇ 4 integer transform coefficients, and it is assumed here that if the transform coefficients are quantized If the DC coefficient value (0,0) of the value X T ( ) is 0, then all the AC coefficient values in ⁇ ⁇ ( ) are also zero, that is, the transform coefficient value of the entire image block is all zero, and the block is zero. Piece. Therefore, according to this principle, as long as the quantized value of the DC coefficient value in the transform coefficient of one prediction residual image block is zero, the quantization result of the entire image block can be satisfied to be zero.
  • T ZB (lf) - 2 m ⁇ / A (Q M , 0, 0)
  • the decision condition of the above formula (10) can be used as the zero block pre-judgment condition of the integer transform in the H.264 standard.
  • the present invention further proposes a corresponding zero block pre-determination method, which is directed to the complex inter-prediction mode selection process in the 264.264 standard, using the above-determined zero block pre-judging condition,
  • the block decision processing is advanced (that is, not only after the inter-frame prediction is processed, but also before the transform processing, the zero-block decision is made, but the zero-block decision process is advanced to the inter-prediction mode selection process), so that Can save inter prediction mode
  • the calculation amount of the selection process further improves the compression coding efficiency of the H.264 standard.
  • the zero block pre-judgment condition in the H.264 standard is determined as The left item of the formula is 4 X
  • Inter 4 x 4 Predict the absolute error and SAD value of the residual image block. Therefore, for the Inter 4 x 4 inter prediction mode in the H.264 standard, only the SAD of the 4 x 4 prediction residual image block needs to be calculated, and the zero block pre-determination can be performed.
  • the current 4 x 4 block of the current frame first performs a motion search starting from the 4 x 4 reference block of the corresponding position of the previous frame, which is called the initial position.
  • the SAD of the prediction residual image block between the current 4 ⁇ 4 block and the 4 ⁇ 4 reference block of the previous frame initial position has met the above-described zero block pre-judgment condition, then even if the reference block of the initial position is not motion prediction
  • the optimal position does not matter, because the reference block relative to the optimal position of the previous frame has a smaller SAD than the SAD of the reference block relative to the initial position, so if the SAD of the reference block relative to the initial position can satisfy zero
  • the SAD of the reference block of the optimal position must also satisfy the zero block pre-judgment condition, and thus the prediction residual image block between the reference blocks of the current 4 ⁇ 4 block relative to the optimal position of the previous frame can be determined.
  • the prediction residual image block between the reference blocks relative to the initial position of the previous frame is quantized to be all zero blocks. Since the initial position and the optimal position are all zero blocks, there is no effect on the compression coding result, so the 4 x 4 reference block of the initial position of the previous frame can be used directly as the basis of the zero block prediction, without necessarily The reference block to find the optimal position of the previous frame. Therefore, as long as the SAD calculated with respect to the reference block of the initial position of the previous frame satisfies the zero block pre-judging condition, the operation of the current 4 X 4 block can be ended. The search is performed, and it is not necessary to search for the reference block of the optimal position of the previous frame, thereby completing the motion search process of the H.264 standard.
  • FIG. 2 is a flow chart of the implementation principle of the zero block pre-determination method in the inter 4x4 inter-frame prediction mode of the present invention.
  • the main implementation process is as follows:
  • Step S100 determining an absolute error corresponding to the prediction residual image block and the SAD according to the above process
  • Step S110 in the Inter4 4 inter prediction mode, find a reference 4x4 block of the initial position of the previous frame for the current 4x4 block in the current image frame;
  • Step S120 determining SAD 0 , 0 corresponding to the prediction residual image block between the current block and the initial position reference block;
  • step S130 the SAD obtained in step S120 is determined. ,. Whether the zero block pre-judgment condition SAD ⁇ T ZB is satisfied, if yes, step S140 is performed; otherwise, step S150 is performed;
  • Step S140 terminating the motion search process of the current 4x4 block, and recording the position information of the current 4x4 block in the current image frame in the zero block list 1 ⁇ , where x and y represent the row of the 4 ⁇ 4 block position in the current frame, Column coordinates, then step S180;
  • Step S150 for the current 4x4 block, continue to complete the motion search process of the previous frame, and find the reference 4 ⁇ 4 block of the optimal position of the previous frame;
  • Step S160 obtaining an SAD corresponding to the prediction residual image block between the current 4x4 block and the optimal position reference block;
  • Step S170 it is determined whether the SAD obtained in step S160 satisfies the zero block pre-judgment condition SAD ⁇ T ZB , and if yes, go to step S140; otherwise, the recording is not performed, and step S180 is continued;
  • Step S180 determining, in each of the 4x4 blocks, performing integer transform and quantization on the prediction residual image block between each 4x4 block in the current image frame and the corresponding reference block in the previous frame.
  • the position information is recorded in the block list Lx .y zero, the processing procedure for the information recorded in the zero position of the block in the list L w 4 X 4 block, the prediction residual between the current frame its corresponding reference block
  • the image block is not subjected to integer transform and quantization processing, and the all-zero value is directly taken to the 4 ⁇ 4 block; for the 4 ⁇ 4 block whose position information is not recorded in the zero block list 1 ⁇ , between the reference block corresponding to the previous frame
  • the prediction residual image block is subjected to integer transform and quantization processing.
  • the above-described zero block pre-determination method of the present invention can greatly reduce the number of calculations of the SAD in the 4 ⁇ 4 block motion search for the zero block pre-decision algorithm in the Inter 4 ⁇ 4 inter prediction mode in H.264, and also reduces the integer transform. And the amount of quantization, and has no effect on the coding performance of the Inter 4 ⁇ 4 inter prediction mode.
  • the optional inter prediction mode includes the following inter prediction modes in addition to the Inter 4 x 4 inter prediction mode: Interl6 ⁇
  • FIG. 3 is an implementation of the zero block pre-determination method of the present invention in Interl6 x16, Inter 16 x 8, Inter8 ⁇ 16, Inter 8 ⁇ 8, Inter 4 ⁇ 8 and Inter 8 x 4 inter prediction modes.
  • Principle flow chart; The main implementation process is as follows:
  • Step S230 respectively obtaining SAD ⁇ corresponding to the prediction residual image block between each 4x4 block and the corresponding initial position reference 4x4 block;
  • Step S240 determining whether the SAD G , Q obtained in step S230 satisfies the above-mentioned zero block pre-judgment condition SAD ⁇ T ZB , performing step S250 for the 4x4 block satisfying the condition; performing step S260 for the 4x4 block not satisfying the condition;
  • Step S250 for the 4x4 block that satisfies the condition, record the position information in the current image frame in the zero block list 1 ⁇ , where x and y represent the row and column coordinates of the 4x4 block position in the current frame, and then perform the steps.
  • Step S260 for each 4 ⁇ 4 block of SAD 0j0 that does not satisfy the above-mentioned zero block pre-judgment condition SAD ⁇ ⁇ , respectively complete the motion search process of its previous frame to find the reference 4 X 4 block of its previous frame optimal position. ;
  • Step S270 respectively obtaining the SAD corresponding to the prediction residual image block between each 4x4 block and the corresponding optimal position reference 4x4 block;
  • Step S280 it is judged whether the SAD obtained in step S270 satisfies the zero block pre-judgment condition SAD ⁇ T ZB , and for the 4x4 block satisfying the zero block pre-judgment condition, the process goes to step S250; for the case that the zero block pre-judgment condition is not satisfied 4x4 block is not recorded, directly executing step S290;
  • Step S290 in performing integer transform and quantization on the prediction residual image block between each current block and the corresponding reference block in the previous frame in the current image frame, determining each of the current block partitions.
  • step S300 Whether the location information of the X 4 block is recorded in the zero block list 1 ⁇ , and if so, step S300 is performed; Otherwise, step S310 is performed;
  • Step S300 terminating the motion search process for the current block, and performing the integer transform and quantization processing on the prediction residual image block between each 4 ⁇ 4 block and the corresponding reference block of the previous frame divided by the current block, directly taking Is an all-zero value; for example: In Inter 16 x 8 inter-frame prediction mode, if 8 4 4 4 blocks divided by each current 16 X 8 block in this mode satisfy the above-mentioned zero block pre-judgment condition, The current 16 x 8 block motion search process is terminated prematurely, that is, the 16 x 8 block can be directly judged to be an all zero block.
  • Step S310 Perform integer transform and quantization processing on the prediction residual image block between each 4 ⁇ 4 block that is divided by the current block and the corresponding reference block of the previous frame.
  • Step S290 it is also determined between steps S280 and S290 whether the current inter prediction mode is Inter 8 x 8 , Inter 4 x 8 and Inter 8 x 4, if Step S290 is performed; otherwise, the prediction residual image block between each 4 ⁇ 4 block divided by the current block and the corresponding reference block of the previous frame is separately subjected to integer transform and quantization processing.
  • Table 1 shows the experimental results of the zero block pre-determination method when using different quantization parameters QP in the Inter 4 ⁇ 4 inter prediction mode. It can be seen from the table that with the increase of QP, after using the method of the present invention, all zero 4 x 4 blocks can account for more than 80%, of course, the proportion of all zero blocks is still the content of the image sequence and the QP. Value related. In addition, after adopting the scheme of the present invention, the zero block false positive rate is very low, so that the coding performance of the .264 standard is basically unaffected. Table 1: Percentage of all zero blocks for different image sequences in Inter 4 x 4 inter prediction mode
  • Table 2 below gives experimental results of applying the zero block pre-determination method of the present invention to all inter prediction modes of the H.264 standard, which compares the use of the zero block pre-determination method and the zero block pre-determination method of the present invention. Coding performance, compression efficiency and coding speed.
  • Table 2 Improvement of coding speed after using the method of the invention Image sequence QP PSNR (dB) Number of coding bits (bits) Coding speed (frames/second) Coding speed is adopted before adoption, before adoption, after adoption, before use Percentage foreman 28 35.58 35.51 1604880 1567872 36.8 38.5 4.6% foreman 38 29.01 28.96 422728 431176 39.9 44.6 11.8% news 28 36.59 36.53 835312 805648 45.2 55.4 22.6% news 38 29.14 29.12 267944 263688 48.1 66.7 38.7% claire 28 39.85 39.78 409008 396424 48.3 71.2 47.4 % claire 38 33.07 32.98 202688 203544 52.6 83.3 58.4% As can be seen from Table 2, after using the method of the invention for all inter prediction modes, the coding speed can be increased by up to 58.4% compared with before the method of the invention is used; The average PSNR of the de
  • the coding speed of the H.264 standard will be greatly improved during the implementation process, which can reduce the cost of the multimedia communication product and improve the performance of the multimedia communication product, thereby improving The market competitiveness of multimedia communication products.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

This invention discloses a method for determining the condition in zero block prejudgment which comprises the steps of: obtaining the predictive difference image block between 4*4 block of current video image and the reference 4*4 block of preceding frame; calculating the sum of absolute difference corresponding to said predictive difference image block; according to the sum of absolute difference, calculating the quantization value of the DC coefficient which is integer transformed from the predictive difference image block by using integer transforming expression; obtaining the sufficient condition that the quantization value of said DC coefficient is equal to zero as the condition in zero block prejudgment. Accordingly, this invention also discloses a method for prejudging zero block. This invention can be applied to the processing of zero block prejudgment in H.264 compression encoding standard and can improve the compression encoding efficiency in H.264 standard.

Description

零块预判条件的确定方法及零块预先判定方法 技术领域  Method for determining zero block pre-judging condition and zero block pre-determination method
本发明涉及多媒体通信系统中的视频压缩编码技术, 尤其涉及一种压 缩编码过程中的零块预先判定方法。  The present invention relates to video compression coding techniques in a multimedia communication system, and more particularly to a zero block pre-determination method in a compression coding process.
背景技术 Background technique
H.264压缩编码标准是目前最先进的视频压缩编码国际标准, 其全称 是国际电信联盟 - 电信标准化组织 H.264 标准 ( ITU-T H.264 Recommendation , International Telecommunication The H.264 compression coding standard is the most advanced international standard for video compression coding. Its full name is the International Telecommunication Union - Telecommunication Standardization Organization H.264 standard (ITU-T H.264 Recommendation, International Telecommunication
Union-Telecommunication H.264 Recommendation ), 以下将其简称为 H.264标准。 H.264标准由 ITU-T和国际标准化组织 (ISO, International Organization for Standardization ) /国际电工委员会 ( IEC, International Electrotechnical Commission )的运动图像专家组 ( MPEG, Moving Picture Experts Group )共同合作开发制定。 该标准从 1999年开始研制, 由众多 国家的设备厂商, 软件开发商, 电信运营商, 大学和科研机构参加, 汇集 了当前世界上最先进的视频压缩编码技术,最终于 2003年正式成为 ITU-T 的国际标准。 Union-Telecommunication H.264 Recommendation), hereinafter referred to as the H.264 standard. The H.264 standard was developed by the ITU-T and the International Organization for Standardization (ISO) and the International Electrotechnical Commission's Moving Picture Experts Group (MPEG). The standard was developed in 1999 and is attended by equipment manufacturers, software developers, telecom operators, universities and scientific research institutions in many countries. It brings together the most advanced video compression coding technology in the world and finally became the ITU- in 2003. International standard for T.
H.264相对于在先的 H.263+、 H.263++以及 MPEG-4 Simple Profile等 视频压缩编码标准技术,在性能和功能上都有了很大提高。其中在功能上 增加了许多编码工具选项,使得可以适合更多的应用类型以及更加广阔的 应用领域; 在性能方面, 在相同的编码码率 (bit-rate)下, 图像质量以峰值 信号 -噪声比值( PSNR, Peak Signal-to-Noise Ratio, 简称峰值信噪比) 作为参考, H.264标准比在先的 H.263+/H.263++, MPEG-4 Simple Profile 标准提高了一倍, 即 PSNR增加了 3dB; 也就是说, 在得到相同 PSNR的 情况下, H.264 标准所需要的网络带宽相比 H.263+/H.263++, MPEG-4 Simple Profile标准所需的网络带宽降低了 50%。  Compared with the previous video compression coding standard technologies such as H.263+, H.263++ and MPEG-4 Simple Profile, H.264 has greatly improved performance and functions. Among them, many coding tool options have been added to the function, which makes it suitable for more application types and a wider range of applications. In terms of performance, at the same code rate (bit-rate), the image quality is peak signal-noise. Ratio (PSNR, Peak Signal-to-Noise Ratio, referred to as Peak Signal-to-Noise Ratio) As a reference, the H.264 standard doubles the previous H.263+/H.263++, MPEG-4 Simple Profile standard. , that is, the PSNR is increased by 3dB; that is, the network bandwidth required by the H.264 standard is higher than that required by the H.264+/H.263++, MPEG-4 Simple Profile standard when the same PSNR is obtained. Network bandwidth is reduced by 50%.
但是, H.264标准相对于在先技术标准在功能和性能方面都得到显著 提升的同时,其付出的代价也是高昂的,其中 H.264标准对视频图像进行 压缩编解码处理的运算复杂度要比 H.263/H.263+等标准的运算复杂度增 加几倍, 因此, H.264标准大规模普及应用的前提必须是开发多种处理效 率较高的运算处理方法,以降低 H.264标准编解码运算处理过程中的多个 计算强度非常高的计算环节的运算复杂度,这样才能降低产品所需多媒体 处理器的处理能力,从而降低成本;或者是多媒体处理器在给定的处理能 力上支持更高的编码及解码能力, 从而提高产品性能。 However, the H.264 standard has been significantly improved in terms of function and performance compared to the prior art standards, and the cost is high. The computational complexity of the H.264 standard for compression and decoding of video images is complicated. More computational complexity than standards such as H.263/H.263+ Adding several times, therefore, the premise of the large-scale popularization of the H.264 standard must be to develop a variety of processing methods with high processing efficiency to reduce the high computational intensity of the H.264 standard codec operation process. Calculate the computational complexity of the link so that the processing power of the multimedia processor required by the product can be reduced, thereby reducing the cost; or the multimedia processor can support higher encoding and decoding capabilities for a given processing capability, thereby improving product performance.
其中在 H.264标准的编解码处理过程中存在多处运算复杂度较高的 计算环节, 比如帧间预测编码 ( Inter-frame prediction, 简称 Inter )、 帧内 预测编码 (Intra-frame prediction , 简称 Intra )、 熵编码 (CABAC , Context-Adaptive Binary Arithmetic Coding ). 1/4 像素精度的运动估计 ( ME, Motion Estimation )和运动 ^卜偿(MC, Motion Compensation ), 多参考巾贞预测 ( Multi-hypothesis prediction )等等。  In the process of codec processing of the H.264 standard, there are multiple computational links with high computational complexity, such as Inter-frame prediction (Inter) and intra-frame prediction (Intra-frame prediction). Intra), Context-Adaptive Binary Arithmetic Coding. 1/4 pixel precision motion estimation (ME, Motion Estimation) and motion compensation (MC, Motion Compensation), multi-reference frame prediction (Multi- Hypothesis prediction ) and so on.
尤其是在帧内预测编码处理和帧间预测编码处理方面, H.264标准相 对于在先的 H.263/H.263+等标准有了很大的处理策略变化。 其中 H.264 标准在对视频图像进行编解码处理的过程中,对于视频图像当前帧中的每 个宏块(Macro block, 以下简称 MB ), 允许使用多种预测模式对其进行 预测处理。 一般预测处理首先是进行帧间预测, 然后再进行帧内预测, 继 而比较帧内预测和帧间预测的结果,选取编码效率最高的预测模式,这样 就把帧内预测和帧间预测这两种预测技术有机地结合起来了,可以达到更 高的预测效率和压缩效率。  Especially in the intra prediction coding process and the interframe prediction coding process, the H.264 standard has a large processing strategy change with respect to the previous standards such as H.263/H.263+. Among them, in the process of encoding and decoding video images, the H.264 standard allows for prediction processing for each macro block (Mac block, hereinafter referred to as MB) in the current frame of the video image. The general prediction process first performs inter prediction, then performs intra prediction, and then compares the results of intra prediction and inter prediction, and selects the prediction mode with the highest coding efficiency, so that intra prediction and inter prediction are used. Predictive techniques are organically combined to achieve higher prediction efficiency and compression efficiency.
其中,帧内预测是 H.264标准独有的处理属性,对于视频图像编码过 程,帧内预测能够最大限度地利用图像数据在空间上的相关性,从而提高 压缩编码效率。在一般的视频图像压缩编码处理方式中,较为普遍采用的 是帧间预测, 而帧间预测利用的是视频图像序列之间在时间上的相关性; 然而很多类型的视频图像其内部是存在很强的空间相关性的, 因此 H.264 标准设计了帧内预测方式以充分利用视频图像内部存在的空间相关性,以 进而提高压缩编码效率。  Among them, intra prediction is a unique processing attribute of the H.264 standard. For video image encoding process, intra prediction can maximize the spatial correlation of image data, thereby improving compression coding efficiency. In general video image compression coding processing, inter-prediction is more commonly used, and inter-frame prediction uses temporal correlation between video image sequences; however, many types of video images exist internally. Strong spatial correlation, so the H.264 standard designed the intra prediction method to make full use of the spatial correlation existing inside the video image to improve the compression coding efficiency.
H.264标准中的帧内预测是指在编码过程中,对于视频图像中当前要 编码的某一个区域(一般都是矩形的块), 在视频图像中搜索与其最相近 似的、且已经编码的块,用这个搜索到的最相近似的块来预测当前要编码 的块,预测结果即是预测的残差。其中不同块之间的相近似性是采用绝对 误差和(SAD, Sum of Absolute Differences )来度量的, 即与当前要编码 的块计算得到的最小 SAD所对应的块作为最相近似的块。 上述图像块可 以是宏块 MB(即 16 X 16象素大小的块),也可以是比宏块 MB更小的块, 也就是说 H.264标准中的帧内预测是在 MB或者比 MB更小尺度的块上 进行的。 Intra prediction in the H.264 standard refers to searching for a certain area (generally a rectangular block) currently to be encoded in a video image during encoding, and searching for the most similar and already encoded in the video image. Block, using the most similar block found in this search to predict the current encoding The block, the predicted result is the predicted residual. The similarity between different blocks is measured by SAD, Sum of Absolute Differences, that is, the block corresponding to the minimum SAD calculated by the block currently to be coded is taken as the closest block. The above image block may be a macroblock MB (ie, a block of 16×16 pixels size), or may be a smaller block than the macroblock MB, that is, the intra prediction in the H.264 standard is in MB or MB. On a smaller scale block.
在视频图像压缩编码过程中,无论是帧间预测还是帧内预测,都是基 于 MB或者更小尺度的块(如 16 x 8块, 8 x 16块, 8 x 8块, 8 x 4块, 4 X 8块, 4 X 4块等)相对于参考图像块 (即用于预测的图像块 )来求取预 测残差 ( Prediction Residue或者 Prediction Difference ), 该预测残差结果 是大小相同的一个图像块; 然后将该预测残差图像块变换到变换系数域, 然后对变换系数进行量化; 最后再对量化后的变换系数进行 Zigzag扫描 和熵编码。 由此可见,如果在对预测残差图像块进行变换和对变换后的变 换系数进行量化的过程中引入优化处理方法,则对图像压缩编码处理效率 会有很大程度的提高。  In the video image compression coding process, whether it is inter-frame prediction or intra-frame prediction, it is based on MB or smaller-scale blocks (such as 16 x 8 blocks, 8 x 16 blocks, 8 x 8 blocks, 8 x 4 blocks, 4 X 8 blocks, 4 X 4 blocks, etc.) relative to the reference image block (ie, the image block used for prediction) to obtain a prediction residual (Presence Residue or Prediction Difference), the prediction residual result being an image of the same size Block; then transforming the prediction residual image block into a transform coefficient domain, and then quantizing the transform coefficients; and finally performing Zigzag scanning and entropy encoding on the quantized transform coefficients. It can be seen that if the optimization processing method is introduced in the process of transforming the prediction residual image block and quantizing the transformed transform coefficient, the image compression coding processing efficiency is greatly improved.
现有 H.264标准中,在对预测残差图像块进行变换和对变换后的变换 系数进行量化的过程? )入优化处理方法主要从以下两方面来考虑:  In the existing H.264 standard, the process of transforming the prediction residual image block and quantizing the transformed transform coefficient is performed. The optimization process is mainly considered from the following two aspects:
( 1 )由于 H.264整数变换方法是一种从离散余弦变换(DCT, Discrete Consine Transform ) 方法近似导出的变换方法, 即采用整数的商来近似 DCT变换系数,从而消除浮点乘除运算,因此采用整数变换方式代替 DCT 方式,变换效率可以得到很大提高,并且能够将变换过程和量化过程结合 成一个过程。 同时由于 H.264整数变换方式所处理的图像块尺度是 4 x 4 块, 因此如果采用 H.264整数变换, 预测残差图像块大小不是 4 x 4块, 那么就需要把领测残差图像块划分成多个 4 X 4块,然后分别对每个 4 x 4 块进行整数变换。  (1) Since the H.264 integer transform method is a transform method derived from the discrete cosine transform (DCT, Discrete Consine Transform) method, that is, the quotient of integers is used to approximate the DCT transform coefficients, thereby eliminating the floating point multiplication and division operations. By using the integer transform method instead of the DCT method, the transform efficiency can be greatly improved, and the transform process and the quantization process can be combined into one process. At the same time, since the image block size processed by the H.264 integer transform method is 4 x 4 blocks, if the H.264 integer transform is used and the prediction residual image block size is not 4 x 4 blocks, then the residual residual image needs to be taken. The block is divided into a plurality of 4 X 4 blocks, and then each 4 x 4 block is integer-transformed.
( 2 )预先判断出整数变换量化后的零块(所谓零块即是全零变换系数 块的简称, 即 MB中的 16个 4 x 4块的变换系数全部为零的情况), 对于 变换和量化结果为零的预测残差图像块是对图像压缩编码没有任何影响 的,所以可以直接省略对这些零块的变换和量化过程,从而提高了图像压 缩编码的效率; 而且由于当前块是和前帧相同位置 (为表示方便, 记作 ( 0,0 ), 0的含义是说明该前帧块和当前块在水平方向和垂直方向的相对 运动位移都为 0, 即位置完全相同)位置上的对应块之间直接求取预测残 差的, 因此如果预测残差图像块变换和量化结果为全零,则后面的运动搜 索过程就可以避免了,从而可以节省每个图像块的运动搜索计算量,相应 节省了整个帧间预测模式选择的计算量。 (2) Predetermining the zero block after the integer transform quantization (the so-called zero block is the abbreviation of the all-zero transform coefficient block, that is, the case where the transform coefficients of the 16 4 x 4 blocks in the MB are all zero), The prediction residual image block whose quantization result is zero has no influence on the image compression coding, so the transformation and quantization process for these zero blocks can be directly omitted, thereby improving the image pressure. The efficiency of the coding is reduced; and since the current block is the same position as the previous frame (for convenience of presentation, it is denoted as (0,0), the meaning of 0 is to indicate the relative motion displacement of the front frame block and the current block in the horizontal direction and the vertical direction. The prediction residuals are directly obtained between the corresponding blocks at positions 0, that is, the positions are exactly the same. Therefore, if the prediction residual image block transformation and the quantization result are all zeros, the subsequent motion search process can be avoided. Thereby, the motion search calculation amount of each image block can be saved, and the calculation amount of the entire inter prediction mode selection is saved correspondingly.
由此可见,如果能够根据一定条件以一定概率(这里允许有一定小比 例的误判)预先判断一个预测残差图像块变换量化结果是否为零, 即预先 判断出整数变换后的零块,则可以避免大量零块的变换计算量和变换之前 的预测模式选择过程中的部分计算量。所以在 H.264标准中,零块的预先 判断处理对于提高视频图像压缩编码效率是十分重要的。  It can be seen that if it is possible to predetermine whether a quantized result of a prediction residual image block transformation is zero according to a certain condition with a certain probability (here, a certain small proportion of false positives is allowed), that is, the zero block after the integer transformation is determined in advance, It is possible to avoid a large number of zero-block transformation calculations and a partial calculation amount in the prediction mode selection process before the transformation. Therefore, in the H.264 standard, the pre-judgment processing of zero blocks is very important for improving the compression efficiency of video images.
上述变换量化后产生零块的原因主要是因为量化处理本质上是用一 个量化参数 ( QP, Quantization Parameter )的指数形式因子来除变换结果, 然后取整的过程, 因此只要被除数足 (dividend,或者 numerator)够小, 除数 (divisor,或者 denominator)足够大,就会得到零块。对各类视频图像大量的 统计表明, 在图像压缩编码过程中,零块是大量存在的(当然零块的多少 不但要取决于图像本身属性, 还要取决于 QP的大小, 即通常 QP越大则 产生零块越多), 因此零块预先判定技术对 H.264标准压缩编码效率的提 高作用是相当大的。  The reason why the above transform transforms to generate a zero block is mainly because the quantization process essentially uses an exponential form factor of a quantization parameter (QP, Quantization Parameter) to divide the transform result, and then rounds the process, so as long as the dividend is sufficient (dividend, or Numerator is small enough, divisor, or denominator is large enough to get zero blocks. A large number of statistics on various video images show that in the image compression coding process, zero blocks exist in a large amount (of course, the number of zero blocks depends not only on the properties of the image itself, but also on the size of the QP, that is, the larger the QP is usually The more zero blocks are generated, so the zero block pre-determination technique has a considerable effect on the H.264 standard compression coding efficiency.
具体而言, 目前在 H.264标准中,并没有完整的可实施的类似零块预 先判定技术,但是由于 H.264标准是从 H.263标准继承发展而来的, 因此 这里 4巴在 H.263标准中适用的零块预判方法作筒要叙述。  Specifically, there is currently no complete zero-block pre-determination technique that can be implemented in the H.264 standard, but since the H.264 standard is inherited from the H.263 standard, here 4 bar is in H. The zero-block pre-judging method applicable in the .263 standard is described as a cylinder.
在 H.263标准的某些实现中,可以采用的一种零块预先判定方法的具 体实现过程如下:  In some implementations of the H.263 standard, a specific implementation of a zero block pre-determination method that can be used is as follows:
根据 DCT的数学性质来对每一个 DCT系数进行零预先判定,由于根 据 DCT的定义: 0According to the mathematical properties of the DCT, each DCT coefficient is pre-determined by zero, as defined by the DCT: 0
Figure imgf000007_0001
,N—1 上式中, N表示进行 DCT的图像块大小, 即 DCT处理的图像块为 N xN块;在 H.263标准中,因为 DCT处理的图像块为 8x8块,因此 N=8。
Figure imgf000007_0001
, N-1 In the above formula, N denotes the image block size at which DCT is performed, that is, the image block processed by DCT is an N xN block; in the H.263 standard, since the image block processed by DCT is 8×8 blocks, N=8.
其中 中的 i=0,l,2, ,N-1, j=0,l,2, ,N-1; x(i,j) 表示 8x8块中第 i行, 第 j列处的数; i, j为空间域指标。  Where i = 0, l, 2, , N-1, j = 0, l, 2, , N-1; x(i, j) represents the number of the i-th row, the j-th column in the 8x8 block; i, j is a spatial domain indicator.
其中 X(k,F}中的 k=0, 1 ,2, ,Ν-1, 1=0, 1,2, ,N-1; X{k,l) 表示 DCT系数; k, 1为变换域指标。  Where k = 0, 1 , 2, , Ν -1, 1 = 0, 1, 2, , N-1 in X(k, F}; X{k, l) represents the DCT coefficient; k, 1 is the transformation Domain indicator.
才艮据以上关系, 可以推出如下关系: 0,1,2,…; 7,/ = 0,1,2,·..,7 ( 2 )
Figure imgf000007_0002
According to the above relationship, the following relationship can be introduced: 0,1,2,...; 7,/ = 0,1,2,·..,7 ( 2 )
Figure imgf000007_0002
上式用 ', 的绝对值表示出了对 绝对值的一个上界估计,因此 可以利用这个关系式,来给出 Η.263标准中 8 X 8块 DCT系数的零预判条 件:  The above formula uses the absolute value of ', which represents an upper bound estimate of the absolute value, so this relation can be used to give the zero pre-judgment condition of the 8 X 8 block DCT coefficient in the 263.263 standard:
设 Q表示 Η.263标准中的量化水平 ( Quantization Level ), 那么 8 x 8  Let Q denote the Quantization Level in the 263.263 standard, then 8 x 8
DCT 系数的量化结果是: l U)l/22的整数商, 即如果
Figure imgf000007_0003
, 则可以判定 DCT系数 T M)的量化结果为 0。
The quantized result of the DCT coefficient is: l U ) l / 22 integer quotient, ie if
Figure imgf000007_0003
Then, it can be determined that the quantized result of the DCT coefficient TM) is zero.
才艮据上述关系式 (2 ), 如果有:  According to the above relationship (2), if there is:
Figure imgf000007_0004
( 3 ) 就可以判定 DCT 系数 T t,/)的量化结果为 0; 同时因为 中的 k=0,l,2, ,7, 1=0,1,2, ,7, 所以只要上述关系式(3) 满足就可
Figure imgf000007_0004
(3) It can be determined that the quantized result of the DCT coefficient T t, /) is 0; and because k = 0, 1, 2, 7, 7, 0, 1, 2, 7, in the middle, so long as the above relationship (3) Satisfied
Λ-(0,0), (0,1), ..... ,χ(0,7)  Λ-(0,0), (0,1), ..... ,χ(0,7)
Λ(1,0),Λ(1,1), ....... ,x(l,7)  Λ(1,0),Λ(1,1), .......,x(l,7)
χ = 以预先判定整个 8x8块 Λ(7,0),Λ-(7,1), ....... ,χ(7,7) 的 DCT系数量化结果为 零块。 因为上述现有技术方案一般只是针对 Η.263标准而实现的,因此只适 合于 8 X 8块,如对于一个视频图像序列中的 P帧(预测帧)或者 B帧(后 向预测帧) 中的每一个 MB ( 16 X 16块), 在经过运动预测后, 获得预测 残差图像块也为 16 16块, 然后将该块分成 4个 8 X 8块, 再对每个 8 χ 8块分别进行上述过程的零块预先判决处理, 即可预先得到相应的零块。 χ = The DCT coefficients of the entire 8x8 block Λ(7,0), Λ-(7,1), . . . , χ(7,7) are quantized to be zero blocks in advance. Because the above prior art solutions are generally implemented only for the 263.263 standard, Combine 8 X 8 blocks, such as for each MB (16 X 16 blocks) in a P frame (predicted frame) or a B frame (backward predicted frame) in a video image sequence, after motion prediction, obtain prediction The residual image block is also 16 16 blocks, and then the block is divided into four 8×8 blocks, and then each block of 8 χ 8 blocks is subjected to zero block pre-decision processing of the above process, and the corresponding zero block can be obtained in advance.
显然,上述在 Η.263标准中适用的零块预先判定方法自身存在着如下 的缺陷:  Obviously, the zero-block pre-determination method described above in the Η.263 standard itself has the following drawbacks:
1 )由于 Η.263标准采用的是 DCT方式, 而 Η.264标准采用的是 4 4整数变换方式; 同时由于 H.263标准采用 8 x 8块作为变换的单位图像 块, 而 H.264标准采用 4 x 4块作为变换的单位图像块, 所以 H.263标准 中适用的零块预先判定方法不能很好地适用于 H.264标准。  1) Since the Η.263 standard uses the DCT method, and the Η.264 standard uses the 4 4 integer conversion method; and the H.263 standard uses 8 x 8 blocks as the transformed unit image block, and the H.264 standard The 4 x 4 block is used as the transformed unit image block, so the zero block pre-determination method applicable in the H.263 standard is not well suited for the H.264 standard.
2 ) H.263 标准中适用的零块预先判定方法也没有提出切实有效的可 以避免预测模式选择中的运动搜索过程的解决方案。 因为在 H.263 标准 中,不存在 H.264标准中的复杂预测模式选择,只存在帧间预测模式选择, 因此, H.263标准中的零块预先判决能够节省的只是该图像块的 DCT和 后面的量化计算量, 而对于 DCT前面的运动搜索过程计算量节省很小。 发明内容  2) The zero block pre-determination method applicable in the H.263 standard also does not propose a practical and effective solution to avoid the motion search process in prediction mode selection. Because in the H.263 standard, there is no complex prediction mode selection in the H.264 standard, only inter prediction mode selection exists. Therefore, the zero block pre-judgment in the H.263 standard can save only the DCT of the image block. And the amount of quantization calculations behind, and the amount of computation for the motion search process in front of the DCT is small. Summary of the invention
本发明要解决的技术问题在于提出一种零块预判奈件的确定方法及 零块预先判定方法, 以适合于 H.264标准压缩编码过程中的零块预先判定 处理, 提高 H.264标准中的压缩编码效率。  The technical problem to be solved by the present invention is to propose a method for determining a zero block pre-determination component and a zero block pre-determination method, which is suitable for zero block pre-determination processing in the H.264 standard compression coding process, and improves the H.264 standard. Compression coding efficiency.
为达上述目的, 本发明提出了一种零块预判条件的确定方法, 用于 In order to achieve the above object, the present invention proposes a method for determining a zero block pre-judging condition, which is used for
H.264压缩编码过程中零块预判条件的确定, 包括步骤: The determination of the zero block pre-judgment condition in the H.264 compression coding process, including the steps:
A. 求取视频图像 4 x 4块与前帧参考 4 x 4块之间的预测残差图像块; A. Obtaining a prediction residual image block between the video image 4 x 4 block and the previous frame reference 4 x 4 block;
B. 求取所述预测残差图像块对应的绝对误差和; B. obtaining an absolute error sum corresponding to the prediction residual image block;
C. 根据所述绝对误差和, 利用整数变换理论表达式, 求取所述预测残 差图像块整数变换后的直流系数值的量化值;  C. calculating, according to the absolute error sum, a quantized value of the DC coefficient value after the integer transform of the prediction residual image block by using an integer transform theoretical expression;
D.求取使所述直流系数值的量化值为零的充分条件作为零块预判决条  D. Finding a sufficient condition that the quantized value of the DC coefficient value is zero is taken as a zero block pre-decision strip
所述 表示位移估
Figure imgf000008_0001
值搜索后帧间预测残差图像块的各个元素值; 步驟 C中根据如下公式对所述预测残差图像块进行整数变换:
The displacement estimate
Figure imgf000008_0001
The value of each element value of the inter-predicted residual image block after the value search; in step C, the prediction residual image block is integer-transformed according to the following formula:
"1 1 1 1一 χ(0,ϊ) χ(0,2) χ(0,3) "1 2 1 1一 "1 1 1 1 χ (0, ϊ) χ (0, 2) χ (0, 3) "1 2 1 1
2 1 —1 -2 χ(1,2) χ(1,3) 1 1 -1 -22 1 —1 -2 χ(1,2) χ(1,3) 1 1 -1 -2
1 -1 -1 1 (2,0) 2,1) Α2,2) χ(2,3) 1 -1 — 1 21 -1 -1 1 (2,0) 2,1) Α2,2) χ(2,3) 1 -1 — 1 2
— 1 -2 2 一 1— 3,0) χ(3,ϊ) χ(3,2) λ3,3) — 1 一 2 1 一 1— 式中 Χ4χ4为整数变换前的 4 x 4块, Χ4"为整数变换后的 4 x 4块, Η 是 Η.264整数变换矩阵, 是!!的转置矩阵; — 1 -2 2 -1, 3,0) χ(3,ϊ) χ(3,2) λ3,3) — 1 2 2 1 1 1— where Χ 4χ4 is the 4 x 4 block before the integer transformation, Χ 4" is an integer-transformed 4 x 4 block, Η is a 264.264 integer transformation matrix, which is a !! transposed matrix;
步骤 C 中所述预测残差图像块整数变换后的直流系数值为  The DC coefficient value after integer conversion of the prediction residual image block in step C
∑x( ,n); 该直流系数值的量化值为 ∑x( ,n); the quantized value of the DC coefficient value is
/«=0 /«=0
Figure imgf000009_0001
Figure imgf000009_0001
式中 (0,0)表示直流系数值的量化值, QM≡QP"«? 6, QE ≡QP/6, QP Where (0,0) represents the quantized value of the DC coefficient value, Q M ≡QP"«? 6, Q E ≡ QP/6, QP
— 1, x<0 — 1, x<0
为量 参数且 QP e [0,51]; 函数 sign(x) = 0, x = 0 f值由视频编码器选择; The quantity parameter and QP e [0,51]; function sign(x) = 0, x = 0 f value is selected by the video encoder;
1, x>0 步骤 D中使所述直流系数值的量化值为零的充分条件是:
Figure imgf000009_0002
1, x>0 The sufficient condition for making the quantized value of the DC coefficient value zero in step D is:
Figure imgf000009_0002
其中所述 ¾ AG)值由下列过程确定:  The 3⁄4 AG) value is determined by the following process:
A(Q , i,j) = M{QM, r), 其中 i和 j分别表示 4 x 4块中元素的行、 列 A(Q , i,j) = M{Q M , r), where i and j represent the rows and columns of the elements in the 4 x 4 block, respectively
0对于 ( ) = {(0,0),(0,2),(2,0),(2,2)} 坐标,其中 0≤z',_ ≤3; r为 i, j的函数: r = 1对于 ( ) = {(U),(1,3),(3,1),(3,3)} ; 0 for ( ) = {(0,0),(0,2),(2,0),(2,2)} coordinates, where 0≤z', _ ≤3; r is a function of i, j: r = 1 for ( ) = {(U), (1, 3), (3, 1), (3, 3)};
2其它 13107,5243,8066 2 other 13107,5243,8066
11916,4660,7490  11916, 4660, 7490
10082,4194,6554  10082,4194,6554
M为矩阵: M =  M is a matrix: M =
9362,3647,5825  9362,3647,5825
8192,3355,5243  8192,3355,5243
7282,2893,4559  7282, 2893, 4559
由于 4 , 0,0)中 ( ) 为 (o,0),得到 r=0, 查询 M矩阵中第 QM行, 第 0列元素作为 βΜ,ο,ο)的值。 Since 4, 0, 0) ( ) is (o, 0) and r =0 is obtained, the Q M row in the M matrix is searched , and the 0th column element is used as the value of β Μ , ο, ο).
相应地, 本发明还提出了一种零块预先判定方法, 用于 Η.264压缩编 码过程中零块预先判定处理, 包括步骤:  Correspondingly, the present invention also proposes a zero block pre-determination method for the zero block pre-determination process in the 264.264 compression coding process, including the steps:
( 1 ) 确定预测残差 图像块对应 的绝对误差和 SAD < (1— /)·217+ / 2Μ,0,0)为零块预判条件; 其中 QM≡QP," 6, QE≡QP/6, QP 为量化参数且 QPe [0,51;], f值由视频编码器选择; (1) Determine the absolute error corresponding to the prediction residual image block and SAD < (1 - /) · 2 17+ / 2 Μ , 0, 0) are zero block pre-judgment conditions; where Q M≡ QP, " 6, Q E≡ QP/6, QP is the quantization parameter and QPe [0,51;], f value is selected by the video encoder;
( 2 )针对当前图像帧中的当前 4x4块,找到前帧初始位置的参考 4x4 块, 求取当前块和初始位置参考块之间的预测残差图像块对应的绝对误差 和;  (2) for the current 4x4 block in the current image frame, find the reference 4x4 block of the initial position of the previous frame, and obtain the absolute error sum corresponding to the prediction residual image block between the current block and the initial position reference block;
(3)判断所述绝对误差和是否满足所述零块预判条件, 如果是, 将当 前 4x4块在当前图像帧中的位置信息记录在零块列表中; 否则转至(4);  (3) determining whether the absolute error and the zero block pre-judging condition are satisfied, and if so, recording the position information of the current 4x4 block in the current image frame in the zero block list; otherwise, going to (4);
(4)针对该当前 4x4块, 在前帧完成运动搜索, 找到前帧最优位置的 参考 4x4块, 求取该当前块和最优位置参考块之间的预测残差图像块对 应的绝对误差和;  (4) For the current 4x4 block, complete the motion search in the previous frame, find the reference 4x4 block of the optimal position of the previous frame, and obtain the absolute error corresponding to the prediction residual image block between the current block and the optimal position reference block. with;
(5)在对当前图像帧中的每个 4x4块与前帧相应参考 4x4块之间的 预测残差图像块进行整数变换和量化过程中, 分别判断每个 4 X 4块的位 置信息是否记录在所述零块列表中, 对于位置信息记录在零块列表中的 4 x4块, 对其与前帧相应参考块之间的预测残差图像块不进行整数变换和 量化处理; 对于位置信息未记录在零块列表中的 4x4块, 对其与前帧相 应参考块之间的预测残差图像块进行整数变换和量化处理。  (5) In the process of performing integer transform and quantization on the prediction residual image block between each 4x4 block in the current image frame and the corresponding reference 4x4 block in the previous frame, respectively, determining whether the position information of each 4×4 block is recorded or not In the zero block list, for the 4×4 block whose position information is recorded in the zero block list, the prediction residual image block between the reference block and the corresponding reference block of the previous frame is not subjected to integer transform and quantization processing; The 4x4 block recorded in the zero block list is subjected to integer transform and quantization processing on the prediction residual image block between the corresponding reference block and the previous frame.
其中所述步骤(4)和(5)之间还包括步骤: 判断步驟(4) 中所述 绝对误差和是否满足所述零块预判条件, 如果是, 将该当前块在当前图像 帧申的位置信息记录在零块列表中; 否则不记录。 其中所述位置信息是指当前块在当前图像帧中的行、 列坐标信息。 相应地, 本发明提出的另一种零块预先判定方法, 用于 H.264压缩编 码过程中零块预先判定处理, 包括步骤: The step (4) and (5) further includes the steps of: determining the absolute error in the step (4) and whether the zero block pre-judging condition is satisfied, and if yes, applying the current block to the current image frame The location information is recorded in the zero block list; otherwise it is not recorded. The location information refers to row and column coordinate information of the current block in the current image frame. Correspondingly, another zero block pre-determination method proposed by the present invention is used for zero block pre-determination processing in the H.264 compression coding process, including the steps:
( S1 ) 确定预测残差 图像块对应的绝对误差和 SAD < (1— /) · 217+ I A(QM ,0,0)为零块预判条件; 其中 QM ≡ QP mod 6, QE ≡QP/6, QP 为量化参数且 QPs [0,51], f值由视频编码器选择; (S1) determining the absolute error corresponding to the prediction residual image block and SAD < (1 - /) · 2 17+ IA(Q M , 0, 0) is a zero block pre-judgment condition; wherein Q M ≡ QP mod 6, Q E ≡ QP/6, QP is the quantization parameter and QPs [0, 51], f value is selected by the video encoder;
( S2 )将当前图像帧在各种帧间预测模式下的当前块划分成 4 X 4块; (S2) dividing the current block of the current image frame into the 4×4 blocks in the current inter prediction mode;
(53)对于当前块划分出的每个 4x4块, 分别找到其在前帧初始位置 的参考 4 X 4块, 分别求取每个 4x4块和相应初始位置参考 4x4块之间 的预测残差图像块对应的绝对误差和; (53) For each 4x4 block divided by the current block, respectively find the reference 4 X 4 block of the previous frame initial position, and respectively obtain the prediction residual image between each 4x4 block and the corresponding initial position reference 4x4 block. The absolute error sum of the block;
(54)对于所述绝对误差和满足所述零块预判条件的 4x4块, 将其在 当前图像帧中的位置信息记录在零块列表中,对于所述绝对误差和不满足 所述零块预判条件的 4x4块执行步骤( S5 );  (54) for the absolute error and the 4x4 block satisfying the zero block pre-judgment condition, the position information in the current image frame is recorded in the zero block list, and the zero block is not satisfied for the absolute error Predicting the conditional 4x4 block execution step (S5);
( S5 )针对绝对误差和不满足所述零块预判条件的每个 4 X 4块, 分别 完成其在前帧的运动搜索, 找到其在前帧最优位置的参考 4x4块, 分别 求取每个 4x4块和相应最优位置参考 4x4块之间的预测残差图像块对应 的绝对误差和;  (S5) performing a motion search of the previous frame for each 4×4 block that does not satisfy the zero block pre-judging condition, and finds the reference 4x4 block of the previous frame optimal position, respectively, The absolute error sum corresponding to the prediction residual image block between each 4x4 block and the corresponding optimal position reference 4x4 block;
( S6 )在对当前图像帧中的每个当前块与前帧相应参考块之间的预测残 差图像块进行整数变换和量化过程中, 判断当前块划分出的每个 4x4块 的位置信息是否都记录在零块列表中, 如果是, 对该当前块划分出的每个 4x4块与前帧相应参考 4x4块之间的预测残差图像块不进行整数变换和 量化处理; 否则对该当前块划分出的每个 4x4块与前帧相应参考 4 X 4块 之间的预测残差图像块进行整数变换和量化处理。  (S6) determining, in the process of performing integer transform and quantization on the prediction residual image block between each current block and the previous reference frame in the current image frame, determining whether the location information of each 4x4 block divided by the current block is Both are recorded in the zero block list, and if so, the prediction residual image block between each 4x4 block divided by the current block and the corresponding reference 4x4 block of the previous frame is not subjected to integer transform and quantization; otherwise, the current block is Each of the divided 4x4 blocks is subjected to integer transform and quantization processing with respect to the prediction residual image block between the corresponding reference 4×4 blocks of the previous frame.
其中所述步骤(S5)和(S6)之间还包括步骤: 对于步骤(S5) 中绝 对误差和满足所述零块预判条件的 4x4块, 将其在当前图像帧中的位置 信息记录在零块列表中 ,对于绝对误差和不满足所述零块预判条件的 4x4 块不记录。  The steps (S5) and (S6) further include the steps: for the absolute error in the step (S5) and the 4x4 block satisfying the zero block pre-judging condition, the position information in the current image frame is recorded in the In the zero block list, 4x4 blocks that do not satisfy the zero block pre-judgment condition are not recorded.
其中步骤(S2) 中所述帧间预测模式包括 Interl6x l6、 Interl6 x 8、 Inter8 x 16、 Inter 8 x 8, Inter 4 x 8和 Inter 8 x 4; 所述步骤(S5)和 (S6)之间还包括步骤: 判断帧间预测模式是否为 Inter 8 8, Inter 4 χ 8和 Inter 8 x 4, ^口果是, 转至步 ¾ ( S6 ); 否贝' J分另 >J 对当前块划分出的每个 4x4块与前帧相应参考块之间的预测残差图像块 进行整数变换和量化处理。 The inter prediction mode described in the step (S2) includes Interl6x l6, Interl6 x 8, Inter8 x 16, Inter 8 x 8, Inter 4 x 8 and Inter 8 x 4; The step (S5) and (S6) further includes the steps of: determining whether the inter prediction mode is Inter 8 8, Inter 4 χ 8 and Inter 8 x 4, ^ is, go to step 3⁄4 (S6); No-j'J-->J-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
本发明能够达到如下的有益效果:  The invention can achieve the following beneficial effects:
1)本发明根据 H.264标准中 4x4整数变换的数学理论, 推导确定的 零块预判条件可以很好的适用于 H.264标准中的 4x4整数变换过程中的 零块预先判定,其预判条件具有很好的判别精确度,能够较好的保证 H.264 视频图像的图像质量。  1) According to the mathematical theory of 4x4 integer transform in the H.264 standard, the derivation of the determined zero block pre-judging condition can be well applied to the zero block pre-determination in the 4x4 integer transform process in the H.264 standard. The judgment condition has good discriminant accuracy, which can better guarantee the image quality of H.264 video images.
2)本发明根据确定的零块预判条件提出的零块预先判定方法可以适 用于 H.264标准中的任意帧间预测模式, 只需将非 Inter 4x4预测模式下 的单位图像块划分成 4x4块进行处理,对于当前每个 4x4块找到前帧初 始位置的参考 4x4块参考 4 X 4块, 计算当前块和初始块之间的预测残差 图像块的绝对误差和 SAD, 在得到 SAD满足预判条件的情况下, 停止当 前 4x4块的运动搜索; 在得到 SAD不满足预判条件的情况下, 继续当前 4x4块的运动搜索, 直至找到最优位置的参考块; 对于 SAD满足预判条 件的 4x4块, 将其在当前帧中的位置信息记录在零块列表中, 后续对于 零块列表中记录的 4x4块, 对其与前帧相应参考块之间的预测残差图像 块不进行整数变换和量化处理(对于非 Inter 4x4预测模式下的单位图像 块划分出的所有 4x4块的位置信息都要记录在零块列表中, 才对当前块 划分出的每个 4x4块与前帧相应参考块之间的预测残差图像块不进行整 数变换和量化处理), 这样可以节省 H.264标准中帧间预测模式选择和整 数变换及量化的计算量, 从而可以提高 H.264标准中压缩编码的效率。 附图说明  2) The zero block pre-determination method proposed by the present invention according to the determined zero block pre-judging condition can be applied to any inter-prediction mode in the H.264 standard, and only the unit image block in the non-Inter 4x4 prediction mode is divided into 4x4. The block is processed, and the reference 4x4 block reference 4 X 4 block of the previous frame initial position is found for each 4x4 block at present, and the absolute error and SAD of the prediction residual image block between the current block and the initial block are calculated, and the SAD is satisfied. In the case of a conditional condition, the motion search of the current 4x4 block is stopped; if the SAD does not satisfy the pre-judgment condition, the motion search of the current 4x4 block is continued until the reference block of the optimal position is found; for the SAD, the pre-judgment condition is satisfied. 4x4 block, the position information in the current frame is recorded in the zero block list, and the 4x4 block recorded in the zero block list is not subjected to integer transform for the prediction residual image block between the reference block and the corresponding reference block of the previous frame. And quantization processing (for all 4x4 block position information divided by unit image blocks in non-Inter 4x4 prediction mode, it is recorded in the zero block list. The prediction residual image block between each 4x4 block and the corresponding reference block of the previous frame is not subjected to integer transform and quantization processing, which can save inter prediction mode selection and integer transform and quantization in the H.264 standard. Calculate the amount, which can improve the efficiency of compression coding in the H.264 standard. DRAWINGS
图 1是本发明零块预判条件的确定方法的主要实现原理流程图; 图 2是本发明零块预先判定方法在 Inter 4x4帧间预测模式下的实现 原理流程图;  1 is a flow chart showing the main implementation principle of the method for determining the zero block pre-judging condition of the present invention; FIG. 2 is a flow chart showing the principle of the zero block pre-determination method of the present invention in the Inter 4x4 inter-frame prediction mode;
图 3是本发明零块预先判定方法在 Interl6 χ 16、 Inter 16 x 8、 Inter8 x 16、 Inter 8 x 8, Inter 4 x 8和 Inter 8 x 4帧间预测模式下的实现原理流程图。 具体实施方式 3 is a flow chart showing the implementation principle of the zero block pre-determination method of the present invention in Interl6 χ 16, Inter 16 x 8, Inter8 x 16, Inter 8 x 8, Inter 4 x 8 and Inter 8 x 4 inter prediction modes. detailed description
首先, 本发明零块预判条件的确定方法提出一种可以适用于 H.264标 准 4 x 4整数变换的零块预判条件, 对于提出的这个零块预判条件要有如 下要求:  First, the method for determining the zero block pre-judging condition of the present invention proposes a zero block pre-judging condition that can be applied to the H.264 standard 4 x 4 integer transform. The proposed zero block pre-judging condition has the following requirements:
简单实用, 判决精确度要高, 零块误判率要低; 而对于误判存在两种 情况: 一种是把本来应该是零块的图像块, 未判成零块 (即漏判), 这种误 判使得编码效率提高程度受到影响; 另外一种是把本来不是零块的图像 块, 误判为零块, 这种误判会导致图像质量明显下降, 因此应该要求提出 的零块预判条件能够最大限度的避免这两种误判情况的出现。  Simple and practical, the judgment accuracy is high, and the zero block false positive rate is low; and there are two cases for false positives: one is to take the image block which should be zero block, and it is not judged to be zero block (ie, missed judgment). This kind of misjudgment makes the degree of improvement of coding efficiency affected. The other is to misjudge the image block which is not zero block, and the misjudgment will lead to a significant drop in image quality. Therefore, the proposed zero block pre-requirement should be required. Judging conditions can minimize the occurrence of these two misjudgments.
下面结合各个附图对本发明零块预判条件的确定方法的具体实施方 式进行详细阐述。  The specific implementation of the method for determining the pre-judging condition of the zero block of the present invention will be described in detail below with reference to the accompanying drawings.
因为在 H.263 等基于块的视频图像编码标准中, 通常使用接近最佳 K-L ( Kahunen-Loeve, 一种统计变换)进行图像变换, 对于一个随机矢量 (图像块即是一种随机矢量),通过该 K-L变换,便可以进行 "白化"( "白 化"就是使其自相关矩阵变成对角矩阵); 对于任意图像块来说, 利用 K-L 变换, 可以获得其最佳的近似表示。 但是在实际应用中, 因为 K-L变换计 算比较复杂, 因此通常用离散余弦变换(DCT )来代替 K-L变换, 并理论 证明在一定条件下(一般图像都满足), DCT是 K-L变换的最优近似。 但 是利用 DCT方式进行图像变换, 其变换矩阵元素有些却是无理数, 如果 采用浮点运算就会引起变换和反变换之间的误差。 因此 H.263 标准要求 DCT变换和反变换都要有足够的精确度, 来保证解码图像的恢复精度, 并 同时 DCT变换和反变换的运算量也都比较大。由此 H.264标准提出采用 4 X 4整数变换来对图像块进行变换。  Because in block-based video image coding standards such as H.263, image conversion is usually performed using near-optimal KL (Kahunen-Loeve, a statistical transformation), for a random vector (the image block is a random vector), Through the KL transform, "whitening" can be performed ("whitening" is to make its autocorrelation matrix into a diagonal matrix); for any image block, the KL transform can be used to obtain the best approximate representation. However, in practical applications, because the K-L transform is more complicated, the discrete cosine transform (DCT) is usually used instead of the K-L transform, and it is proved that under certain conditions (general images are satisfied), DCT is the optimal approximation of the K-L transform. However, the DCT method is used for image transformation, and some of the transformation matrix elements are irrational. If floating point operation is used, the error between the transformation and the inverse transformation will be caused. Therefore, the H.263 standard requires DCT transform and inverse transform to have sufficient accuracy to ensure the recovery accuracy of the decoded image, and the computational complexity of both DCT transform and inverse transform is also large. Thus, the H.264 standard proposes to transform an image block using a 4 X 4 integer transform.
其中, 在 H.264 标准中, 对于 4 x 4 整数变换的定义如下:  Among them, in the H.264 standard, the definition of 4 x 4 integer transform is as follows:
1 1 1 1 x(0,0) x(0,l) χ(0,2) χ(0,3) 1 1 1 1 x(0,0) x(0,l) χ(0,2) χ(0,3)
2 1 -1 -2 | xiiO) χ(1,ϊ) χ(1,2) χ(1 )  2 1 -1 -2 | xiiO) χ(1,ϊ) χ(1,2) χ(1 )
^4x4 =Η·Χ4χ4 ·ΗΤ ^4x4 =Η·Χ 4χ4 ·Η Τ
1 -1 -1 1 χ(2,0) χ(2,1) λ 2,2) χ(2,3) 1 一 1 — 1  1 -1 -1 1 χ(2,0) χ(2,1) λ 2,2) χ(2,3) 1 1-1 1
1 -2 2 -1 ¾0) χ(3,ΐ) χ(3,2) χ(3,3) 1 一 2 1 上式中 (变换前系数块)和 Χ (变换后系数块)分别表示帧间 预测残差值变换前和变换后的系数矩阵, Η是 Η.264标准中的整数变换矩 阵, 7是11的转置矩阵。 从上式可以看出, Η.264标准中的 4x4整数变 换运算过程中没有乘法, 只有加法和移位运算, 避免了正反变换过程中浮 点运算的精度匹配问题, 降低了解码器的运算复杂度。 此外, Η.264标准 中的 4x4整数变换有利于使用单指令多数据流(SIMD, Single Instruction Multiple Data )技术来对算法进行并行处理的优化。 1 -2 2 -1 3⁄40) χ(3,ΐ) χ(3,2) χ(3,3) 1 1-2 1 In the above formula (the coefficient block before transformation) and Χ (the coefficient block after transformation) respectively represent the coefficient matrix before and after the inter prediction residual value transformation, Η is the integer transformation matrix in the 264.264 standard, 7 is 11 Transpose matrix. It can be seen from the above formula that there is no multiplication in the 4x4 integer transform operation in the 264.264 standard, only the addition and shift operations avoid the precision matching problem of floating-point operations in the forward and reverse transforms, and reduce the operation of the decoder. the complexity. In addition, the 4x4 integer transform in the 264.264 standard facilitates the optimization of parallel processing of algorithms using Single Instruction Multiple Data (SIMD).
同时为了避免量化过程中的除法运算, H.264标准使用下面的量化公 式对整数变换后的变换系数进行量化:  At the same time, in order to avoid division in the quantization process, the H.264 standard quantizes the transform coefficients after integer transformation using the following quantization formula:
Xq (i, j) = sign {XT (i, j)} |xr (, j]A{QM, i, j) + 217+&)» (l7 + QE )] QE ≡QP/6, Qp为量化参数且 QPe[ ,51J , 函 X q (i, j) = sign {X T (i, j)} |x r (, j]A{Q M , i, j) + 2 17+ &)» (l7 + Q E )] Q E ≡ QP/6, Qp is the quantization parameter and QPe[ ,51J , letter
Figure imgf000014_0001
number
Figure imgf000014_0001
其中 i和 j分别表示 4x4块中某个元素的行、列坐标,其中 0≤ζ·,_/·≤3; XT( )和 X^'j)分别表示整数变换系数量化前和量化后的值; aW, >是Where i and j represent the row and column coordinates of an element in a 4x4 block, respectively, where 0 ≤ ζ ·, _/· ≤ 3; X T ( ) and X^'j) respectively represent the integer transform coefficients before and after quantization Value; aW, > is
H.264标准给出的量化变化因子, 它的取值依赖于变换系数的空间位置; 而参数 f的取值由视频编码器来进行选择, f的典型取值是 [0,0.5], 其作用 是在截断处理(截断处理就是通常所说的四舍五入) 时保持量化精度。 The quantized variation factor given by the H.264 standard, whose value depends on the spatial position of the transform coefficient; and the value of the parameter f is selected by the video encoder, and the typical value of f is [0, 0.5], which The effect is to maintain the quantization accuracy in the truncation process (the truncation process is what is commonly referred to as rounding).
其中 ^ = M QM' (6) 上式(6) 中 r是 i, j的 函数, 定义如下: Where ^ = M Q M ' (6) where r is a function of i, j in the above equation (6), defined as follows:
0对于 ( ) = {(0,0),(0,2),(2,0),(2,2)}  0 for ( ) = {(0,0),(0,2),(2,0),(2,2)}
r = 1对于 ( ) = {(1,1), (1,3), (3,1), (3,3)}  r = 1 for ( ) = {(1,1), (1,3), (3,1), (3,3)}
、2其它 ( 7 ) , 2 other ( 7 )
M是一个 6x3的矩阵, 定义如下: 13107,5243,8066 M is a 6x3 matrix, defined as follows: 13107,5243,8066
11916,4660,7490  11916, 4660, 7490
10082,4194,6554  10082,4194,6554
M =  M =
9362,3647,5825  9362,3647,5825
8192,3355,5243  8192,3355,5243
7282,2893,4559  7282, 2893, 4559
(8)  (8)
因此根据 (ij) 的值计算量化变换因子
Figure imgf000015_0001
的过程是: 首先根 据式(7)计算 r, 然后根据式(6)查询式(8), 得到 M矩阵的第 QM行, 第 r列元素作为量化变换因子 )的值。
Therefore, the quantization transformation factor is calculated from the value of (ij)
Figure imgf000015_0001
The process is: firstly r is calculated according to equation (7), and in accordance with formula (6) the query expression (8), to give Q values of the M rows of the matrix M, the first r columns of elements as the quantized transform factor).
上述已经介绍了 H.264标准中的 4x4整数变换的标准变换过程和量 化过程。 请继续参阅图 1, 该图是本发明零块预判条件的确定方法的主要 实现原理流程图; 其主要实现过程如下:  The standard conversion process and the quantization process of the 4x4 integer transform in the H.264 standard have been described above. Please refer to FIG. 1, which is a flow chart of the main implementation principle of the method for determining the condition of zero block pre-judgment of the present invention; the main implementation process is as follows:
步骤 S10, 求取视频图像 4x4块与前帧参考 4x4块之间的预测残差 图像块;  Step S10, obtaining a prediction residual image block between the video image 4x4 block and the previous frame reference 4x4 block;
步骤 S20, 求取上述预测残差图像块对应的绝对误差和 SAD, SAD = 其中 (" θ表示位移估值搜索后帧间预测残差图像块的各个
Figure imgf000015_0002
元素值; 步驟 S30, 根据步骤 S20中求取的预测残差图像块对应的 SAD, 利用 前述整数变换理论表达式,求取步骤 S10中得到的预测残差图像块整数变 换后的直流系数值 然后继续求取该直流系数
Figure imgf000015_0003
值; ^(0,0)的量化值为:
Figure imgf000015_0004
Step S20, obtaining an absolute error corresponding to the prediction residual image block and SAD, SAD = where (" θ represents each of the inter prediction residual image blocks after the displacement estimation search
Figure imgf000015_0002
Step S30, according to the SAD corresponding to the prediction residual image block obtained in step S20, using the foregoing integer transformation theoretical expression, obtaining the DC coefficient value after the integer transformation of the prediction residual image block obtained in step S10 Continue to find the DC coefficient
Figure imgf000015_0003
Value; the quantized value of ^(0,0) is:
Figure imgf000015_0004
步骤 S40,根据 H.264标准中的整数变换性质,在 4 X 4整数变换系数 中, 其直流系数值 r(0,0)的绝对值最大, 这里假定如果变换系数量化前的 值 X T( )的直流系数值 (0,0)为 0, 则 Χτ( )中所有的交流系数值也均为 零, 即整个图像块的变换系数值为全零,该块即为零块。 因此依据此原理, 只要保证一个预测残差图像块的变换系数中直流系数值的量化值为零, 就 可以满足整个图像块量化结果为零。由前述式( 5 )可知,直流系数值 ^(0,0) 的量化值为零的充分条件是:
Figure imgf000016_0001
又由于 ΣΣΛ'("ζ," < ∑∑ \x{m, n , 因此可以得到直流系数值 Χτ (0,0)的量
Step S40, according to the integer transform property in the H.264 standard, the absolute value of the DC coefficient value r (0, 0) is the largest among the 4×4 integer transform coefficients, and it is assumed here that if the transform coefficients are quantized If the DC coefficient value (0,0) of the value X T ( ) is 0, then all the AC coefficient values in Χ τ( ) are also zero, that is, the transform coefficient value of the entire image block is all zero, and the block is zero. Piece. Therefore, according to this principle, as long as the quantized value of the DC coefficient value in the transform coefficient of one prediction residual image block is zero, the quantization result of the entire image block can be satisfied to be zero. It can be seen from the above formula (5) that the sufficient condition that the quantized value of the DC coefficient value ^(0, 0) is zero is:
Figure imgf000016_0001
And because ΣΣ Λ '("ζ,"< ∑∑ \x{m, n , the amount of DC coefficient value Χ τ (0,0) can be obtained.
//=0 w/=0 Η=0 /"=0 化值为零的充分条件为: ( ,"〗<(l- /)'217+ /A{QM,0,0) (10) 不等式 (10)中不等号右边的量其实是一个阈值, 可以用一个符号 TZB 来表示, ZB表示零块(Zero Block), 即 //=0 w/=0 Η=0 /"=0 The sufficient condition that the value is zero is: ( , "〗 <(l- /)'2 17+ /A{Q M ,0,0) (10 The amount to the right of the inequality in inequality (10) is actually a threshold, which can be represented by a symbol TZB, and ZB represents a Zero Block.
TZB=(l-f)-2m^/A(QM,0,0) T ZB = (lf) - 2 m ^ / A (Q M , 0, 0)
上述不等式之间替换放大, 条件加强, 即如果式(9)是直流系数值 (0,0)的量化值为零的充分条件, 则式 (10)也是其充分条件。  The above inequality is replaced by amplification, and the condition is strengthened. That is, if the equation (9) is a sufficient condition that the quantized value of the DC coefficient value (0, 0) is zero, the equation (10) is also a sufficient condition.
根据上述叙述原理,这里即可以将上述式( 10)的判决条件作为 H.264 标准中整数变换的零块预判条件。 利用上述已经推导确定的用于 H.264标准中整数变换的零块预判条件 j x{m,n]<{l-f)-2m& /A{Qm,0,6) According to the above description principle, the decision condition of the above formula (10) can be used as the zero block pre-judgment condition of the integer transform in the H.264 standard. Using the zero block pre-judgment condition jx{m,n]<{lf)-2 m& /A{Q m ,0,6) determined for the integer transform in the H.264 standard determined above.
«=o-= ,本发明进而又提出了相应的零块预先判 定方法, 该方法针对于 Η.264标准中复杂的帧间预测模式选择过程, 利用 上述确定的零块预判条件, 将零块判决处理环节提前(即不是仅在帧间预 测都处理完成后, 并在变换处理之前进行零块判决, 而是要将零块判决过 程提前到帧间预测模式选择过程当中去), 这样就可以节省帧间预测模式 选择过程的计算量, 进一步提高 H.264标准的压缩编码效率。 «=o-=, the present invention further proposes a corresponding zero block pre-determination method, which is directed to the complex inter-prediction mode selection process in the 264.264 standard, using the above-determined zero block pre-judging condition, The block decision processing is advanced (that is, not only after the inter-frame prediction is processed, but also before the transform processing, the zero-block decision is made, but the zero-block decision process is advanced to the inter-prediction mode selection process), so that Can save inter prediction mode The calculation amount of the selection process further improves the compression coding efficiency of the H.264 standard.
下面再结合各个附图对本发明零块预先判定方法的具体实施过程进 行详细的阐述。  The specific implementation process of the zero block pre-determination method of the present invention will be described in detail below with reference to the accompanying drawings.
通过上述过程的推导, 确定了在 H.264 标准中的零块预判条件为
Figure imgf000017_0001
式的左边项即为 4 X
Through the derivation of the above process, the zero block pre-judgment condition in the H.264 standard is determined as
Figure imgf000017_0001
The left item of the formula is 4 X
4预测残差图像块的绝对误差和 SAD值。 因此,对于 H.264标准中的 Inter 4 x 4帧间预测模式, 只需要计算 4 x 4预测残差图像块的 SAD, 就可以进 行零块预先判决了。在 Inter 4 x 4运动预测中, 当前帧的当前 4 x 4块首先 从前帧对应位置的 4 x 4参考块开始进行运动搜索, 该位置叫做初始位置。 如果在初始位置, 当前 4 X 4块和前帧初始位置的 4 x 4参考块之间的预测 残差图像块的 SAD 已经符合上述零块预判条件, 那么即使初始位置的参 考块不是运动预测的最优位置, 也没有关系, 因为相对于前帧最优位置的 参考块, 其 SAD比相对于初始位置的参考块的 SAD更小, 所以如果相对 于初始位置的参考块的 SAD能够满足零块预判条件, 则最优位置的参考 块的 SAD也一定满足零块预判条件, 于是就可以确定当前 4 X 4块相对于 前帧最优位置的参考块之间的预测残差图像块量化后为全零块, 而相对于 前帧初始位置的参考块之间的预测残差图像块量化后也为全零块。 既然相 对于初始位置和最优位置都是全零块, 对于压缩编码结果都无影响, 因此 就可以直接用前帧初始位置的 4 x 4参考块来作为零块预判的基础, 而不 必一定要找到前帧最优位置的参考块。 因此, 只要相对于前帧初始位置的 参考块计算出的 SAD满足零块预判条件, 就可以结束对当前 4 X 4块的运 动搜索了, 不必要搜索到前帧最优位置的参考块, 由此可以筒化 H.264标 准的运动搜索过程。 4 Predict the absolute error and SAD value of the residual image block. Therefore, for the Inter 4 x 4 inter prediction mode in the H.264 standard, only the SAD of the 4 x 4 prediction residual image block needs to be calculated, and the zero block pre-determination can be performed. In Inter 4 x 4 motion prediction, the current 4 x 4 block of the current frame first performs a motion search starting from the 4 x 4 reference block of the corresponding position of the previous frame, which is called the initial position. If at the initial position, the SAD of the prediction residual image block between the current 4×4 block and the 4×4 reference block of the previous frame initial position has met the above-described zero block pre-judgment condition, then even if the reference block of the initial position is not motion prediction The optimal position does not matter, because the reference block relative to the optimal position of the previous frame has a smaller SAD than the SAD of the reference block relative to the initial position, so if the SAD of the reference block relative to the initial position can satisfy zero The block pre-judgment condition, the SAD of the reference block of the optimal position must also satisfy the zero block pre-judgment condition, and thus the prediction residual image block between the reference blocks of the current 4×4 block relative to the optimal position of the previous frame can be determined. After quantization, it is an all-zero block, and the prediction residual image block between the reference blocks relative to the initial position of the previous frame is quantized to be all zero blocks. Since the initial position and the optimal position are all zero blocks, there is no effect on the compression coding result, so the 4 x 4 reference block of the initial position of the previous frame can be used directly as the basis of the zero block prediction, without necessarily The reference block to find the optimal position of the previous frame. Therefore, as long as the SAD calculated with respect to the reference block of the initial position of the previous frame satisfies the zero block pre-judging condition, the operation of the current 4 X 4 block can be ended. The search is performed, and it is not necessary to search for the reference block of the optimal position of the previous frame, thereby completing the motion search process of the H.264 standard.
请参阅图 2, 该图是本发明零块预先判定方法在 Inter 4x4帧间预测 模式下的实现原理流程图; 其主要实现过程如下:  Please refer to FIG. 2, which is a flow chart of the implementation principle of the zero block pre-determination method in the inter 4x4 inter-frame prediction mode of the present invention; the main implementation process is as follows:
步骤 S 100 ,按照上述过程确定预测残差图像块对应的绝对误差和 SAD
Figure imgf000018_0001
Step S100, determining an absolute error corresponding to the prediction residual image block and the SAD according to the above process
Figure imgf000018_0001
块预判条件; 式中 QM≡QP"w^6, QE≡QP/6, QP为量化参数且 QP e [0,51], f值由视频编码器选择, 其他参数的确定参照上述描述; Block pre-judgment condition; where Q M ≡QP"w^6, Q E ≡QP/6, QP is the quantization parameter and QP e [0,51], f value is selected by the video encoder, and other parameters are determined by reference to the above description;
步骤 S110, 在 Inter4 4帧间预测模式下, 针对当前图像帧中的当前 4x4块, 找到前帧初始位置的参考 4x4块;  Step S110, in the Inter4 4 inter prediction mode, find a reference 4x4 block of the initial position of the previous frame for the current 4x4 block in the current image frame;
步骤 S120,求取当前块和初始位置参考块之间的预测残差图像块对应 的 SAD0,0; Step S120, determining SAD 0 , 0 corresponding to the prediction residual image block between the current block and the initial position reference block;
步骤 S130,判断步骤 S120求得的 SAD。,。是否满足零块预判条件 SAD < TZB, 如果是, 执行步骤 S140; 否则执行步驟 S150; In step S130, the SAD obtained in step S120 is determined. ,. Whether the zero block pre-judgment condition SAD < T ZB is satisfied, if yes, step S140 is performed; otherwise, step S150 is performed;
步骤 S140,终止当前 4x4块的运动搜索过程,将当前 4x4块在当前 图像帧中的位置信息记录在零块列表1^中, 其中 x、 y表示在当前帧中 4 X 4块位置的行、 列坐标, 然后执行步骤 S180; Step S140, terminating the motion search process of the current 4x4 block, and recording the position information of the current 4x4 block in the current image frame in the zero block list 1 ^, where x and y represent the row of the 4×4 block position in the current frame, Column coordinates, then step S180;
步驟 S150,针对该当前 4x4块,继续完成其在前帧的运动搜索过程, 找到前帧最优位置的参考 4 X 4块;  Step S150, for the current 4x4 block, continue to complete the motion search process of the previous frame, and find the reference 4×4 block of the optimal position of the previous frame;
步骤 S160, 求取该当前 4x4块和最优位置参考块之间的预测残差图 像块对应的 SAD;  Step S160, obtaining an SAD corresponding to the prediction residual image block between the current 4x4 block and the optimal position reference block;
步骤 S170, 判断步骤 S160中求得的 SAD是否满足所述零块预判条 件 SAD< TZB, 如果是, 转至执行步骤 S140; 否则不进行记录, 继续执行 步骤 S180; Step S170, it is determined whether the SAD obtained in step S160 satisfies the zero block pre-judgment condition SAD<T ZB , and if yes, go to step S140; otherwise, the recording is not performed, and step S180 is continued;
步驟 S180, 在对当前图像帧中的每个 4x4块与其前帧相应参考块之 间的预测残差图像块进行整数变换和量化过程中, 分别判断每个 4x4块 的位置信息是否记录在上述的零块列表 Lx.y中, 处理过程是对于位置信息 记录在零块列表 Lw中的 4 X 4块,对其与前帧相应参考块之间的预测残差 图像块不进行整数变换和量化处理, 直接对该 4 X 4块取全零值; 对于位 置信息未记录在零块列表1 ^中的 4 X 4块,对其与前帧相应参考块之间的 预测残差图像块要进行整数变换和量化处理。 Step S180, determining, in each of the 4x4 blocks, performing integer transform and quantization on the prediction residual image block between each 4x4 block in the current image frame and the corresponding reference block in the previous frame. The position information is recorded in the block list Lx .y zero, the processing procedure for the information recorded in the zero position of the block in the list L w 4 X 4 block, the prediction residual between the current frame its corresponding reference block The image block is not subjected to integer transform and quantization processing, and the all-zero value is directly taken to the 4×4 block; for the 4×4 block whose position information is not recorded in the zero block list 1 ^, between the reference block corresponding to the previous frame The prediction residual image block is subjected to integer transform and quantization processing.
上述本发明零块预先判定方法针对 H.264中的 Inter 4 χ 4帧间预测模 式下的零块预先判决算法可以大大减少 4 X 4块运动搜索时 SAD的计算次 数, 同时还减少了整数变换和量化的运算量, 且对 Inter 4 χ 4帧间预测模 式的编码性能基本没有任何影响。  The above-described zero block pre-determination method of the present invention can greatly reduce the number of calculations of the SAD in the 4×4 block motion search for the zero block pre-decision algorithm in the Inter 4 χ 4 inter prediction mode in H.264, and also reduces the integer transform. And the amount of quantization, and has no effect on the coding performance of the Inter 4 χ 4 inter prediction mode.
由于 Η.264标准支持不同大小和形状的编码块, 因此可选的帧间预测 模式除 Inter 4 x 4帧间预测模式外, 还包括以下帧间预测模式: Interl6 χ  Since the Η.264 standard supports coded blocks of different sizes and shapes, the optional inter prediction mode includes the following inter prediction modes in addition to the Inter 4 x 4 inter prediction mode: Interl6 χ
16、 Interl6 x 8, Inter8 x 16、 Inter 8 ^ 8, Inter 4 x 8和 Inter 8 x 4。 但是这 些帧间预测模式的预测过程和 Inter 4 x 4帧间预测模式的预测过程是类似 的, 都存在前帧从一个初始位置出发进行搜索的过程, 因此如果能够在初 始位置上进行零块预先判决, 都可以才 据判决结果决定是否终止对当前块 的搜索过程。 由此, 可以借助于上述 Inter 4 x 4帧间预测模式下的零块预 先判定方法, 把其他帧间预测模式下的大于 4 x 4的块, 分割成多个 4 x 4 块, 然后对其中的每个 4 x 4 块, 分别应用上述零块预判条件 SAD =
Figure imgf000019_0001
来进行判决。 请参阅图 3, 该图是本发明零块预先判定方法在 Interl6 x 16、 Inter 16 x 8、 Inter8 χ 16、 Inter 8 χ 8 , Inter 4 χ 8和 Inter 8 x 4帧间预测模式下的实 现原理流程图; 其主要实现过程如下:
16, Interl6 x 8, Inter8 x 16, Inter 8 ^ 8, Inter 4 x 8 and Inter 8 x 4. However, the prediction process of these inter prediction modes and the prediction process of the Inter 4 x 4 inter prediction mode are similar, and there is a process in which the previous frame is searched from an initial position, so if the zero block advance can be performed at the initial position In the judgment, it is possible to decide whether to terminate the search process for the current block according to the judgment result. Therefore, the block larger than 4×4 in other inter prediction modes can be divided into a plurality of 4×4 blocks by means of the zero block pre-determination method in the Inter 4×4 inter prediction mode described above, and then For each 4 x 4 block, apply the above zero block pre-judgment condition SAD =
Figure imgf000019_0001
To make a judgment. Please refer to FIG. 3, which is an implementation of the zero block pre-determination method of the present invention in Interl6 x16, Inter 16 x 8, Inter8 χ 16, Inter 8 χ 8, Inter 4 χ 8 and Inter 8 x 4 inter prediction modes. Principle flow chart; The main implementation process is as follows:
〉:〉1·^(" 】 步骤 S200,确定预测残差图像块对应的绝对误差和 SAD = "=。"'=。 ' < (1- /)·217+¾ /A(QM, 0,0) = 2 ^为 H 264整数变换过程中的零块预判条件;式 中 QM≡QP"«^6, QE≡QP/65 Qp为量化参数且 QPe [0,51], f值由视频编码 器选择, 其他参数的确定参照上述描述; 步骤 S210, 在上述非 Inter4x4帧间预测模式下, 将当前图像帧在各 种帧间预测模式下的当前块一律划分成多个 4x4块, 这样就可以对不同 帧间预测模式下的每个 4x4块使用上述零块预判条件进行预先零判决; 步驟 S220, 对于当前块划分出的每个 4x4块, 分别找到其在前帧初 始位置的参考 4x4块; 〉:〉1·^(" ” Step S200, determining the absolute error corresponding to the prediction residual image block and SAD = "=."'=.' < (1- /)·2 17+3⁄4 /A(Q M , 0,0) = 2 ^ is the zero block pre-judgment condition in the H 264 integer transform process; where Q M ≡QP"«^6, Q E ≡QP/6 5 Qp is a quantization parameter and QPe [0, 51], f value is selected by the video encoder, and other parameters are determined by referring to the above description; Step S210, in the above non-Inter4x4 inter prediction mode, the current image is The current block of the frame in various inter prediction modes is uniformly divided into a plurality of 4x4 blocks, so that each of the 4x4 blocks in different inter prediction modes can be pre-zeroed using the above-described zero block pre-judging condition; Step S220, For each 4x4 block divided by the current block, respectively find the reference 4x4 block at the initial position of the previous frame;
步骤 S230,分别求取每个 4x4块和相应初始位置参考 4x4块之间的 预测残差图像块对应的 SAD^;  Step S230, respectively obtaining SAD^ corresponding to the prediction residual image block between each 4x4 block and the corresponding initial position reference 4x4 block;
步驟 S240,判断步骤 S230中所求得的 SADG,Q是否满足上述零块预判 条件 SAD < TZB , 对于满足条件的 4x4块执行步骤 S250; 对于不满足条 件的 4x4块执行步骤 S260; Step S240, determining whether the SAD G , Q obtained in step S230 satisfies the above-mentioned zero block pre-judgment condition SAD < T ZB , performing step S250 for the 4x4 block satisfying the condition; performing step S260 for the 4x4 block not satisfying the condition;
步骤 S250, 对于满足条件的 4x4块, 将其在当前图像帧中的位置信 息记录在零块列表1 ^中, 其中 x、 y表示在当前帧中 4x4块位置的行、 列坐标, 然后执行步骤 S290; Step S250, for the 4x4 block that satisfies the condition, record the position information in the current image frame in the zero block list 1 ^, where x and y represent the row and column coordinates of the 4x4 block position in the current frame, and then perform the steps. S290;
步骤 S260,针对 SAD0j0不满足上述零块预判条件 SAD < ^的每个 4 χ4块, 分别完成其在前帧的运动搜索过程, 以找到其在前帧最优位置的 参考 4 X 4块; Step S260, for each 4 χ 4 block of SAD 0j0 that does not satisfy the above-mentioned zero block pre-judgment condition SAD < ^, respectively complete the motion search process of its previous frame to find the reference 4 X 4 block of its previous frame optimal position. ;
步骤 S270,分別求取每个 4x4块和相应最优位置参考 4x4块之间的 预测残差图像块对应的 SAD;  Step S270, respectively obtaining the SAD corresponding to the prediction residual image block between each 4x4 block and the corresponding optimal position reference 4x4 block;
步骤 S280, 判断步骤 S270中所求得的 SAD是否满足零块预判条件 SAD < TZB , 对于满足零块预判条件的 4x4块, 转至执行步骤 S250; 对 于不满足零块预判条件的 4x4块不进行记录, 直接执行步骤 S290; Step S280, it is judged whether the SAD obtained in step S270 satisfies the zero block pre-judgment condition SAD < T ZB , and for the 4x4 block satisfying the zero block pre-judgment condition, the process goes to step S250; for the case that the zero block pre-judgment condition is not satisfied 4x4 block is not recorded, directly executing step S290;
步骤 S290,在对当前图像帧中的每个当前块与前帧相应参考块之间的 预测残差图像块进行整数变换和量化过程中, 判断当前块划分出的每个 4  Step S290, in performing integer transform and quantization on the prediction residual image block between each current block and the corresponding reference block in the previous frame in the current image frame, determining each of the current block partitions.
X 4块的位置信息是否都记录在零块列表1^中, 如果是, 执行步骤 S300; 否则执行步骤 S310; Whether the location information of the X 4 block is recorded in the zero block list 1 ^, and if so, step S300 is performed; Otherwise, step S310 is performed;
步骤 S300,终止对当前块的运动搜索过程,对该当前块划分出的每个 4 x 4 块与其前帧相应参考块之间的预测残差图像块不再进行整数变换和 量化处理, 直接取为全零值; 例如: 在 Inter 16 x 8帧间预测模式下, 如果 在该模式下每个当前 16 X 8块划分出的 8个 4 X 4块均满足上述零块预判 条件, 则可以提前终止当前 16 x 8块的运动搜索过程, 即可以直接判决该 16 x 8块为全零块。  Step S300, terminating the motion search process for the current block, and performing the integer transform and quantization processing on the prediction residual image block between each 4×4 block and the corresponding reference block of the previous frame divided by the current block, directly taking Is an all-zero value; for example: In Inter 16 x 8 inter-frame prediction mode, if 8 4 4 4 blocks divided by each current 16 X 8 block in this mode satisfy the above-mentioned zero block pre-judgment condition, The current 16 x 8 block motion search process is terminated prematurely, that is, the 16 x 8 block can be directly judged to be an all zero block.
步驟 S310 , 对该当前块划分出的每个 4 x 4块与其前帧相应参考块之 间的预测残差图像块进行整数变换和量化处理。  Step S310: Perform integer transform and quantization processing on the prediction residual image block between each 4×4 block that is divided by the current block and the corresponding reference block of the previous frame.
这里,为了更近一步确保 H.264图像的编码质量,在步骤 S280和 S290 之间还要判断当前的帧间预测模式是否是 Inter 8 x 8 , Inter 4 x 8和 Inter 8 x 4, 如果是, 才执行步骤 S290; 否则还要分别对当前块划分出的每个 4 X 4块与其前帧相应参考块之间的预测残差图像块进行整数变换和量化处 理。  Here, in order to further ensure the encoding quality of the H.264 image, it is also determined between steps S280 and S290 whether the current inter prediction mode is Inter 8 x 8 , Inter 4 x 8 and Inter 8 x 4, if Step S290 is performed; otherwise, the prediction residual image block between each 4×4 block divided by the current block and the corresponding reference block of the previous frame is separately subjected to integer transform and quantization processing.
为了验证本发明方案的技术效果, 下面使用三个典型的标准视频图像 序列 "foreman" (运动程度剧烈)、 "news" (中等程度运动)、 "claire" (运 动程度较小)共 300个图像帧进行测试, 图像格式统一采用 QCIF ( Quarter Common Interchange Format ), Y:U:V是 4:2:0; 实验平台是 Pentium IV、 主频为 2GHz的计算机, 其中参数 f的取值选为 0.79。  In order to verify the technical effect of the inventive scheme, three typical standard video image sequences "foreman" (sports intensity), "news" (medium exercise), "claire" (small degree of motion) are used. The frame is tested. The image format is uniformly QCIF (Quarter Common Interchange Format), Y:U:V is 4:2:0; the experimental platform is Pentium IV, the computer with the main frequency is 2GHz, and the value of parameter f is chosen to be 0.79. .
下表 1给出了在 Inter 4 χ 4帧间预测模式下,使用不同的量化参数 QP 时, 零块预先判定方法的实验结果。 从该表可以看出, 随着 QP的增大, 使用本发明方法后, 全零 4 x 4块最多可占 80%以上, 当然全零块所占比 例还是与图像序列的内容和 QP的取值相关的。 另外采用本发明方案后, 零块误判率非常低, 这样对 .264标准的编码性能基本是没有影响的。 表 1: 不同图像序列在 Inter 4 x 4帧间预测模式下的全零块所占百分比  Table 1 below shows the experimental results of the zero block pre-determination method when using different quantization parameters QP in the Inter 4 χ 4 inter prediction mode. It can be seen from the table that with the increase of QP, after using the method of the present invention, all zero 4 x 4 blocks can account for more than 80%, of course, the proportion of all zero blocks is still the content of the image sequence and the QP. Value related. In addition, after adopting the scheme of the present invention, the zero block false positive rate is very low, so that the coding performance of the .264 standard is basically unaffected. Table 1: Percentage of all zero blocks for different image sequences in Inter 4 x 4 inter prediction mode
QP Claire News Foreman 18 46.41% 23.42% 2.1% QP Claire News Foreman 18 46.41% 23.42% 2.1%
28 72.22% 48.87% 21.14%  28 72.22% 48.87% 21.14%
38 87.35% 68.29% 41.76% 由表 1可见, 图^:动程度越剧烈, 全零块所占比例越小 (因为帧间 预测的全零残差图像块代表前后帧对应块之间的变化非常小, 这说明图像 运动程度不大)。 在视频图像中, 除了动作电影视频外, 其他视频图像运 动量都是中等, 甚至是偏低的, 但即使是动作电影视频, 其中真正大运动 量的镜头也只是其中的一部分, 而如一般的多媒体视频图像, 如视频会议 等, 都是运动量比较低的视频图像。 也就是说, 对于一般的视频应用, 视 频图像序列中都有比较多的全零块存在。  38 87.35% 68.29% 41.76% As can be seen from Table 1, Figure ^: The more intense the degree of motion, the smaller the proportion of all zero blocks (because the all-zero residual image block of inter prediction represents the change between the corresponding blocks of the preceding and succeeding frames. Small, this means that the image is not moving much). In the video image, except for the action movie video, the amount of motion of other video images is medium or even low, but even for action movie video, the lens with a really large amount of motion is only a part of it, like a general multimedia video. Images, such as video conferences, are video images with a low amount of motion. That is to say, for a general video application, there are many all-zero blocks in the video image sequence.
下表 2给出了将本发明零块预先判定方法应用于 H.264标准的所有帧 间预测模式的实验结果, 该表比较了不使用零块预先判定和使用本发明零 块预先判定方法后的编码性能, 压缩效率和编码速度。 表 2: 采用本发明方法后编码速度的提高效果 图像序列 QP PSNR(dB) 编码比特数 (bits) 编码速度 (帧 /秒) 编码速度提 采用前 采用后 采用前 采用后 采用前 采用后 高的百分比 foreman 28 35.58 35.51 1604880 1567872 36.8 38.5 4.6% foreman 38 29.01 28.96 422728 431176 39.9 44.6 11.8% news 28 36.59 36.53 835312 805648 45.2 55.4 22.6% news 38 29.14 29.12 267944 263688 48.1 66.7 38.7% claire 28 39.85 39.78 409008 396424 48.3 71.2 47.4% claire 38 33.07 32.98 202688 203544 52.6 83.3 58.4% 从表 2可以看出, 对于所有的帧间预测模式采用本发明方法后, 与采 用本发明方法前相比, 编码速度最多可提高 58.4%; 另外, 解码恢复图像 的平均 PSNR下降不到 O.ldB, 即从保持图像质量来说, 几乎没有降低, 而编码比特数还会略有减少 (即压缩编码效率会略有提高)。 由此可见, 采用本发明方法后, 将使得 H.264标准在实现过程中, 编 码速度会有比较大的提高, 这将能够降低多媒体通信产品的成本, 且提高 多媒体通信产品的性能, 从而提高了多媒体通信产品的市场竟争力。 Table 2 below gives experimental results of applying the zero block pre-determination method of the present invention to all inter prediction modes of the H.264 standard, which compares the use of the zero block pre-determination method and the zero block pre-determination method of the present invention. Coding performance, compression efficiency and coding speed. Table 2: Improvement of coding speed after using the method of the invention Image sequence QP PSNR (dB) Number of coding bits (bits) Coding speed (frames/second) Coding speed is adopted before adoption, before adoption, after adoption, before use Percentage foreman 28 35.58 35.51 1604880 1567872 36.8 38.5 4.6% foreman 38 29.01 28.96 422728 431176 39.9 44.6 11.8% news 28 36.59 36.53 835312 805648 45.2 55.4 22.6% news 38 29.14 29.12 267944 263688 48.1 66.7 38.7% claire 28 39.85 39.78 409008 396424 48.3 71.2 47.4 % claire 38 33.07 32.98 202688 203544 52.6 83.3 58.4% As can be seen from Table 2, after using the method of the invention for all inter prediction modes, the coding speed can be increased by up to 58.4% compared with before the method of the invention is used; The average PSNR of the decoded restored image is less than O.ldB, that is, from the preservation of the image quality, there is almost no decrease, and the number of encoded bits is slightly reduced (i.e., the compression coding efficiency is slightly improved). It can be seen that, after adopting the method of the invention, the coding speed of the H.264 standard will be greatly improved during the implementation process, which can reduce the cost of the multimedia communication product and improve the performance of the multimedia communication product, thereby improving The market competitiveness of multimedia communication products.
以上所述仅是本发明的优选实施方式, 应当指出, 对于本技术领域的 普通技术人员来说, 在不脱离本发明原理的前提下, 还可以做出若干改进 和润饰, 这些改进和润饰也应视为本发明的保护范围。  The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.

Claims

权 利 要 求 Rights request
1、 一种零块预判条件的确定方法, 用于 H.264压缩编码过程中零块预 判条件的确定, 其特征在于, 包括步骤:  A method for determining a zero block pre-judgment condition for determining a zero block pre-judging condition in an H.264 compression coding process, comprising:
A. 求取视频图像 4x4块与前帧参考 4x4块之间的预测残差图像块; A. Obtaining a prediction residual image block between the 4x4 block of the video image and the 4x4 block of the previous frame reference;
B. 求取所述预测残差图像块对应的绝对误差和; B. obtaining an absolute error sum corresponding to the prediction residual image block;
C. 根据所述绝对误差和, 利用整数变换理论表达式, 求取所述预测残 差图像块整数变换后的直流系数值的量化值;  C. calculating, according to the absolute error sum, a quantized value of the DC coefficient value after the integer transform of the prediction residual image block by using an integer transform theoretical expression;
D. 求取使所述直流系数值的量化值为零的充分条件作为零块预判决条 件。  D. A sufficient condition for zeroing the quantized value of the DC coefficient value is obtained as a zero block pre-judgment condition.
2、 根据权利要求 1所述的零块预判条件的确定方法, 其特征在于, 步骤 B中所述绝对误差和为 (m,«, ,所述; c(m,")表示位移估值搜索 后帧间预测残差图像块的各个元署°¾°;  2. The method for determining a zero block pre-judgment condition according to claim 1, wherein the absolute error sum in step B is (m, «, ,; c(m, ") represents a displacement estimate. Searching for each of the inter-frame prediction residual image blocks °3⁄4°;
步骤 C中根据如下公式对所述预测残差图像块进行整数变换:  In step C, the prediction residual image block is integer-transformed according to the following formula:
χ(0,2) χ(0,3) "1 2 1 1一 χ(12) χ(1,3) 1 1 — 1 一 2 χ(2,2) Χ2,3) 1 — 1 -1 2
Figure imgf000024_0001
(3,2) ^(3,3) — 1 一 2 1 一 1— 式中 Χ4χ4为整数变换前的 4x4块, χ4χ4为整数变换后的 4x4块, Η是 Η.264整数变换矩阵, # 是11的转置矩阵; 步骤 c
χ(0,2) χ(0,3) "1 2 1 1 χ(12) χ(1,3) 1 1 — 1 22 χ(2,2) Χ2,3) 1 — 1 -1 2
Figure imgf000024_0001
(3,2) ^(3,3) - 1 - 2 1 -1 - where Χ 4χ4 is the 4x4 block before the integer transform, χ 4χ4 is the 4x4 block after the integer transform, Η is the 264.264 integer transform matrix, #是11的转置矩阵; Step c
Figure imgf000024_0002
该直流系数值的量化值为:
Figure imgf000024_0003
Figure imgf000024_0002
The quantized value of the DC coefficient value is:
Figure imgf000024_0003
式中: v(0,0)表示直流系数值的量 ^^Q?mod6 , QE≡QP/6, QP 为量化参数且 QP€ [0,51]; 函数^^ =| 0, Λ- = 0 ,· f值由视频编码器选择; 步驟 D中使所述直流系数值的量匕¼为^的充分条件是: ½n,n) < (1 - /).217 /A(QM,0,0)。Where: v(0,0) represents the amount of DC coefficient value ^^Q?mod6 , Q E ≡QP/6, QP is the quantization parameter and QP€ [0,51]; Function ^^ =| 0, Λ- = 0, · f value is selected by the video encoder; the sufficient condition for making the amount of the DC coefficient value ^1⁄4 in step D is: 1⁄2n,n) < (1 - /).2 17 /A(Q M ,0,0).
Figure imgf000025_0001
Figure imgf000025_0001
3、 根据权利要求 2所述的零块预判条件的确定方法, 其特征在于, 所 述 A(QM,G,G)值由下列过程确定: 3. The method for determining a zero block pre-judgment condition according to claim 2, wherein the A(Q M , G, G) value is determined by the following process:
A(Qm, i,j) = M(Q , r), 其中 i和 j分别表示 4x4块中元素的行、 列坐 A(Q m , i,j) = M(Q , r), where i and j represent the rows and columns of the elements in the 4x4 block, respectively
0对于 ( ') = {(0,0),(0,2),(2,0),(2,2)} 标, 其中 0≤z'J≤3; r为 i, j的函数: V- 1对于 ( ')-{(U),(1,3),(3,1),(3,3)} 0 for ( ') = {(0,0),(0,2),(2,0),(2,2)}, where 0≤z'J≤3; r is a function of i, j: V-1 for ( ')-{(U), (1,3), (3,1), (3,3)}
2其它  2 other
13107,5243,8066  13107,5243,8066
11916,4660,7490  11916, 4660, 7490
10082,4194,6554  10082,4194,6554
M为矩阵: M =  M is a matrix: M =
9362,3647,5825  9362,3647,5825
8192,3355,5243  8192,3355,5243
7282,2893,4559
Figure imgf000025_0002
查询 M矩阵中第 QM行, 第 0列元素作为 (gM,o,o)的值。
7282, 2893, 4559
Figure imgf000025_0002
Query the first matrix Q M M line, the first element as 0 (g M, o, o) values.
4、 一种零块预先判定方法, 用于 H.264压缩编码过程中零块预先判定 处理, 其特征在于, 包括步骤: 4. A zero block pre-determination method for zero block pre-determination processing in the H.264 compression coding process, characterized in that it comprises the steps of:
( 1 )确定预测残差图像块对应的绝对误差和 SAD < (ΐ- )·217+¾ / A(QM, 0,0) 为零块预判条件; 其中 QM ≡QPm0i/6, QE ≡QP/6 , QP 为量化参数且 QPe[0,5l], f值由视频编码器选择; (1) Determine the absolute error corresponding to the prediction residual image block and the SAD < (ΐ- )· 2 17+ 3⁄4 / A(Q M , 0,0) is a zero block pre-judgment condition; where Q M ≡ QPm 0i /6 , Q E ≡ QP/6 , QP is the quantization parameter and QPe[0, 5l], f value is selected by the video encoder;
(2)针对当前图像帧中的当前 4x4块, 找到前帧初始位置的参考 4x4 块, 求取当前块和初始位置参考块之间的预测残差图像块对应的绝对误差 和;  (2) For the current 4x4 block in the current image frame, find the reference 4x4 block of the initial position of the previous frame, and obtain the absolute error sum corresponding to the prediction residual image block between the current block and the initial position reference block;
(3)判断所述绝对误差和是否满足所述零块预判条件, 如果是, 将当前 4x4块在当前图像帧中的位置信息记录在零块列表中; 否则转至(4); (3) determining whether the absolute error and the zero block pre-judging condition are satisfied, and if so, recording the position information of the current 4x4 block in the current image frame in the zero block list; otherwise, going to (4);
(4)针对该当前 4x4块, 在前帧完成运动搜索, 找到前帧最优位置的参 考 4 X 4块,求取该当前块和最优位置参考块之间的预测残差图像块对应的 绝对误差和; (4) For the current 4x4 block, complete the motion search in the previous frame, find the reference 4×4 block of the optimal position of the previous frame, and obtain the corresponding prediction residual image block between the current block and the optimal position reference block. Absolute error sum;
(5)在对当前图像帧中的每个 4x4块与前帧相应参考 4x4块之间的预 测残差图像块进行整数变换和量化过程中,分别判断每个 4x4块的位置信 息是否记录在所述零块列表中, 对于位置信息记录在零块列表中的 4x4 块, 对其与前帧相应参考块之间的预测残差图像块不进行整数变换和量化 处理; 对于位置信息未记录在零块列表中的 4x4块, 对其与前帧相应参考 块之间的预测残差图像块进行整数变换和量化处理。 (5) Pre-reference between the 4x4 block and the previous frame in the current image frame. In the process of integer transform and quantization, the residual image block is respectively determined whether the position information of each 4x4 block is recorded in the zero block list, and the position information is recorded in the 4x4 block in the zero block list, and the previous frame is The prediction residual image block between the corresponding reference blocks is not subjected to integer transform and quantization processing; for the 4x4 block whose position information is not recorded in the zero block list, the prediction residual image block between the reference block and the corresponding reference block of the previous frame is performed. Integer transform and quantization processing.
5、 根据权利要求 4所述的零块预先判定方法, 其特征在于, 所述步骤 (4)和(5)之间还包括步骤: 判断步骤(4) 中所述绝对误差和是否满足 所述零块预判条件, 如果是, 将该当前块在当前图像帧中的位置信息记录 在零块列表中; 否则不记录。  The zero block pre-determination method according to claim 4, wherein the step (4) and (5) further comprise the step of: determining whether the absolute error in the step (4) and the Zero block pre-judgment condition, if yes, the position information of the current block in the current image frame is recorded in the zero block list; otherwise, it is not recorded.
6、 根据权利要求 4或 5所述的零块预先判定方法, 其特征在于, 步骤 The zero block pre-determination method according to claim 4 or 5, characterized in that the step
(I) 中零块预判条件的建立过程包括步驟: (I) The establishment process of the zero-block pre-judgment condition includes the following steps:
(II) 求取视频图像 4 X 4块与前帧参考 4x4块之间的预测残差图像块; ( 12 ) 求取所述预测残差图像块对应的绝对误差和;  (II) obtaining a prediction residual image block between the video image 4 X 4 block and the previous frame reference 4x4 block; (12) obtaining an absolute error sum corresponding to the prediction residual image block;
( 13)根据所述绝对误差和, 利用整数变换理论表达式, 求取所述预测残 差图像块整数变换后的直流系数值的量化值;  (13) determining, according to the absolute error sum, a quantized value of the DC coefficient value after the integer transform of the prediction residual image block by using an integer transform theoretical expression;
( 14)求取使所述直流系数值的量化值为零的充分条件作为零块预判决条 件。  (14) A sufficient condition for making the quantized value of the DC coefficient value zero is obtained as a zero block pre-judgment condition.
7、 根据权利要求 4或 5所述的零块预先判定方法, 其特征在于, 所述 位置信息是指当前块在当前图像帧中的行、 列坐标信息。  The zero block pre-determination method according to claim 4 or 5, wherein the position information refers to row and column coordinate information of the current block in the current image frame.
8、 一种零块预先判定方法, 用于 H.264压缩编码过程中零块预先判定 处理, 其特征在于, 包括步骤:  8. A zero block pre-determination method for zero block pre-determination processing in the H.264 compression coding process, characterized in that the method comprises the steps of:
( S1 ) 确 定预测残差 图 像块对应 的绝对误差和 SAD < (1-/).217+ /4δΜ,0,0)为零块预判条件; 其中 QM≡QP"iOi/6, QE≡QP/6, QP 为量化参数且 QPe [0,51], f值由视频编码器选择; (S1) determining the absolute error corresponding to the prediction residual image block and SAD < (1-/).2 17+ /4δ Μ , 0, 0) are zero block pre-judging conditions; wherein Q M ≡ QP"iOi/6, Q E ≡QP/6, QP is the quantization parameter and QPe [0,51], f value is selected by the video encoder;
(S2)将当前图像帧在各种帧间预测模式下的当前块划分成 4x4块; (S2) dividing the current block of the current image frame into various 4x4 blocks in the various inter prediction modes;
(S3)对于当前块划分出的每个 4x4块, 分别找到其在前帧初始位置的 参考 4 X 4块,分别求取每个 4x4块和相应初始位置参考 4x4块之间的预 测残差图像块对应的绝对误差和; (S3) For each 4x4 block divided by the current block, respectively find the reference 4 X 4 block of the previous frame initial position, and respectively obtain the prediction residual image between each 4x4 block and the corresponding initial position reference 4x4 block. The absolute error sum of the block;
( S4 )对于所述绝对误差和满足所述零块预判条件的 4 X 4块, 将其在当 前图像帧中的位置信息记录在零块列表中, 对于所述绝对误差和不满足所 述零块预判条件的 4x4块执行步骤( S5 ); (S4) for the absolute error and the 4 X 4 block satisfying the zero block pre-judgment condition, The position information in the pre-image frame is recorded in the zero block list, and the step (S5) is performed for the absolute error and the 4x4 block that does not satisfy the zero block pre-judgment condition;
( S5 )针对绝对误差和不满足所述零块预判条件的每个 4 X 4块, 分别完 成其在前帧的运动搜索, 找到其在前帧最优位置的参考 4x4块, 分别求取 每个 4x4块和相应最优位置参考 4x 4块之间的预测残差图像块对应的绝 对误差和;  (S5) performing a motion search of the previous frame for each 4×4 block that does not satisfy the zero block pre-judging condition, and finds the reference 4x4 block of the previous frame optimal position, respectively, The absolute error sum corresponding to the prediction residual image block between each 4x4 block and the corresponding optimal position reference 4x4 block;
( S6 )在对当前图像帧中的每个当前块与前帧相应参考块之间的预测残 差图像块进行整数变换和量化过程中,判断当前块划分出的每个 4 X 4块的 位置信息是否都记录在零块列表中, 如果是, 对该当前块划分出的每个 4 X 4块与前帧相应参考 4x4块之间的预测残差图像块不进行整数变换和量 化处理; 否则对该当前块划分出的每个 4x4块与前帧相应参考 4x4块之 间的预测残差图像块进行整数变换和量化处理。  (S6) determining, in the integer transform and quantization process, the prediction residual image block between each current block and the previous reference frame in the current image frame, determining the position of each 4×4 block divided by the current block Whether information is recorded in the zero block list, and if so, the prediction residual image block between each 4×4 block divided by the current block and the corresponding reference 4x4 block of the previous frame is not subjected to integer transform and quantization; otherwise An integer transform and quantization process is performed on each of the 4x4 blocks divided by the current block and the prediction residual image block between the corresponding reference 4x4 blocks of the previous frame.
9、 根据权利要求 8所述的零块预先判定方法, 其特征在于, 所述步骤 (S5)和(S6)之间还包括步骤: 对于步骤(S5) 中绝对误差和满足所述 零块预判条件的 4x4块,将其在当前图像帧中的位置信息记录在零块列表 中, 对于绝对误差和不满足所述零块预判条件的 4x4块不记录。  9. The zero block pre-determination method according to claim 8, wherein the step (S5) and (S6) further comprises the steps of: for the absolute error in the step (S5) and satisfying the zero block pre- The conditional 4x4 block is recorded in the zero block list for its position information in the current image frame, and is not recorded for the absolute error and the 4x4 block that does not satisfy the zero block pre-judgment condition.
10、 根据权利要求 8或 9所述的零块预先判定方法, 其特征在于, 步 骤(S1) 中零块预判条件的建立过程包括:  The zero block pre-determination method according to claim 8 or 9, wherein the establishing process of the zero block pre-judging condition in the step (S1) comprises:
( S 11 )求取视频图像 4 X 4块与前帧参考 4x4块之间的预测残差图像块; (S12)求取所述预测残差图像块对应的绝对误差和;  (S11) obtaining a prediction residual image block between the video image 4 X 4 block and the previous frame reference 4x4 block; (S12) obtaining an absolute error sum corresponding to the prediction residual image block;
(513)根据所述绝对误差和, 利用整数变换理论表达式, 求取所述预测残 差图像块整数变换后的直流系数值的量化值;  (513) calculating, according to the absolute error sum, a quantized value of the DC coefficient value after the integer transform of the prediction residual image block by using an integer transform theoretical expression;
(514)求取使所述直流系数值的量化值为零的充分条件作为零块预判决条 件。  (514) A sufficient condition for zeroing the quantized value of the DC coefficient value is obtained as a zero block pre-judgment condition.
11、 根据权利要求 8或 9所述的零块预先判定方法, 其特征在于, 所 述位置信息是指 4 X 4块在当前图像帧中的行、 列坐标信息。  The zero block pre-determination method according to claim 8 or 9, wherein the position information refers to row and column coordinate information of the 4 X 4 block in the current image frame.
12、 根据权利要求 8或 9所述的零块预先判定方法, 其特征在于, 步 骤(S2) 中所述帧间预测模式包括 Interl6x l6、 Interl6x8、 Inter8 x 16、 Inter 8 x 8, Inter 4 x 8和 Inter 8 x 4; 所述步骤(S5)和 (S6)之间还包括步骤: 判断帧间预测模式是否为 Inter 8x 8, Inter 4 x 8和 Inter 8 x 4, 如果是, 转至步骤(S6); 否则分别对 当前块划分出的每个 4x4 块与前帧相应参考块之间的预测残差图像块进 行整数变换和量化处理。 The zero block pre-determination method according to claim 8 or 9, wherein the inter prediction mode in the step (S2) comprises Interl6x l6, Interl6x8, Inter8 x 16, Inter 8 x 8, Inter 4 x 8 and Inter 8 x 4; The step (S5) and (S6) further includes the steps of: determining whether the inter prediction mode is Inter 8x 8, Inter 4 x 8 and Inter 8 x 4, if yes, proceeding to step (S6); The prediction residual image block between each 4x4 block divided by the current block and the corresponding reference block of the previous frame is subjected to integer transform and quantization processing.
PCT/CN2005/001787 2004-11-02 2005-10-28 A method for determining the condition in zero block prejudgment and for prejudging zero block WO2006047936A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200410086869.9 2004-11-02
CN 200410086869 CN1770863A (en) 2004-11-02 2004-11-02 Method for confirming zero block pre-determination condition and zero block pre-determination method

Publications (1)

Publication Number Publication Date
WO2006047936A1 true WO2006047936A1 (en) 2006-05-11

Family

ID=36318881

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2005/001787 WO2006047936A1 (en) 2004-11-02 2005-10-28 A method for determining the condition in zero block prejudgment and for prejudging zero block

Country Status (2)

Country Link
CN (1) CN1770863A (en)
WO (1) WO2006047936A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7751631B2 (en) 2006-12-22 2010-07-06 Sony Corporation Bypass using sum of absolute transformed differences value (SATD) in a video coding process
US8102913B2 (en) 2006-12-22 2012-01-24 Sony Corporation DCT/Q/IQ/IDCT bypass algorithm in MPEG to AVC/H.264 transcoding
WO2019109906A1 (en) * 2017-12-04 2019-06-13 北京金山云网络技术有限公司 Video encoding method, encoder, electronic device and medium
CN112135129A (en) * 2019-06-25 2020-12-25 华为技术有限公司 Inter-frame prediction method and device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4787100B2 (en) * 2006-07-27 2011-10-05 パナソニック株式会社 Image encoding device
CN101795404A (en) * 2009-10-21 2010-08-04 深圳市融创天下科技发展有限公司 Quantized step size based zero block threshold value determination method and zero block prejudging method
US9521410B2 (en) * 2012-04-26 2016-12-13 Qualcomm Incorporated Quantization parameter (QP) coding in video coding
CN102685499B (en) * 2012-05-07 2015-01-07 西安交通大学 All-zero-block detection method based on energy conservation law
WO2015013850A1 (en) * 2013-07-29 2015-02-05 北京大学深圳研究生院 Transformation and quantization method in hevc video coding and video coding device
CN104202599B (en) * 2014-09-23 2017-07-28 浙江工商大学 A kind of all-zero blocks method applied to HEVC interframe encodes

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0918879A (en) * 1995-06-29 1997-01-17 Matsushita Electric Ind Co Ltd Moving image encoding method and moving image communication device
CN1172382A (en) * 1996-06-14 1998-02-04 大宇电子株式会社 Run Length encoder
JPH11272842A (en) * 1998-03-19 1999-10-08 Seiko Epson Corp Device and method for encoding moving picture consisting of multicolor image and device and method for decoding moving picture consisting of multicolor image
JP2003174561A (en) * 2001-12-06 2003-06-20 Canon Inc Image processor, image processing method, program and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0918879A (en) * 1995-06-29 1997-01-17 Matsushita Electric Ind Co Ltd Moving image encoding method and moving image communication device
CN1172382A (en) * 1996-06-14 1998-02-04 大宇电子株式会社 Run Length encoder
JPH11272842A (en) * 1998-03-19 1999-10-08 Seiko Epson Corp Device and method for encoding moving picture consisting of multicolor image and device and method for decoding moving picture consisting of multicolor image
JP2003174561A (en) * 2001-12-06 2003-06-20 Canon Inc Image processor, image processing method, program and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7751631B2 (en) 2006-12-22 2010-07-06 Sony Corporation Bypass using sum of absolute transformed differences value (SATD) in a video coding process
US8102913B2 (en) 2006-12-22 2012-01-24 Sony Corporation DCT/Q/IQ/IDCT bypass algorithm in MPEG to AVC/H.264 transcoding
WO2019109906A1 (en) * 2017-12-04 2019-06-13 北京金山云网络技术有限公司 Video encoding method, encoder, electronic device and medium
CN112135129A (en) * 2019-06-25 2020-12-25 华为技术有限公司 Inter-frame prediction method and device

Also Published As

Publication number Publication date
CN1770863A (en) 2006-05-10

Similar Documents

Publication Publication Date Title
WO2006047936A1 (en) A method for determining the condition in zero block prejudgment and for prejudging zero block
KR101521336B1 (en) Template matching for video coding
TWI401961B (en) Video encoding by filter selection
KR100955152B1 (en) Multi-dimensional neighboring block prediction for video encoding
CN101889405B (en) Method and apparatus for performing motion estimation
US8150172B2 (en) Video coding mode selection using estimated coding costs
US20090052534A1 (en) Direction detection algorithms for h.264/avc intra prediction
WO2009052742A1 (en) An interframe prediction encoding/decoding method and apparatus
JP2008523724A (en) Motion estimation technology for video coding
JP2005354686A (en) Method and system for selecting optimal coding mode for each macroblock in video
TW200952499A (en) Apparatus and method for computationally efficient intra prediction in a video coder
KR101166732B1 (en) Video coding mode selection using estimated coding costs
WO2004056125A1 (en) Video encoding with skipping motion estimation for selected macroblocks
WO2023131059A1 (en) Image encoding method, image encoding apparatus, electronic device, and readable storage medium
WO2011124157A1 (en) Video coding and decoding method for local luminance compensation and device thereof
WO2011047520A1 (en) Method for determing threshold of zero blocks based on quantization step and method for judging zero blocks in advance
KR20110073263A (en) Method and apparatus for encoding and decoding for intra prediction
US20070133689A1 (en) Low-cost motion estimation apparatus and method thereof
US20220337837A1 (en) Architecture for rate estimation in video coding
CN109495745B (en) Lossless compression decoding method based on inverse quantization/inverse transformation
US10148954B2 (en) Method and system for determining intra mode decision in H.264 video coding
KR100987581B1 (en) Method of Partial Block Matching for Fast Motion Estimation
US11425393B1 (en) Hardware optimization of rate calculation in rate distortion optimization for video encoding
CN111901605B (en) Video processing method and device, electronic equipment and storage medium
US11909993B1 (en) Fractional motion estimation engine with parallel code unit pipelines

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KM KN KP KR KZ LC LK LR LS LT LU LV LY MA MD MG MK MN MW MX MZ NA NG NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU LV MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 05801966

Country of ref document: EP

Kind code of ref document: A1