WO2019128443A1 - 一种图像解码方法及解码器 - Google Patents

一种图像解码方法及解码器 Download PDF

Info

Publication number
WO2019128443A1
WO2019128443A1 PCT/CN2018/112328 CN2018112328W WO2019128443A1 WO 2019128443 A1 WO2019128443 A1 WO 2019128443A1 CN 2018112328 W CN2018112328 W CN 2018112328W WO 2019128443 A1 WO2019128443 A1 WO 2019128443A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
decoding
sub
common location
information
Prior art date
Application number
PCT/CN2018/112328
Other languages
English (en)
French (fr)
Inventor
张志明
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019128443A1 publication Critical patent/WO2019128443A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present application relates to the field of video and image coding and decoding technologies, and in particular, to an image decoding method and a decoder.
  • Video codec technology is widely used in the fields of Internet, television broadcasting, storage media, and communication.
  • New generation video codec protocols such as H.264, H.265 and AVS2.0 have motion prediction modes such as DIRECT mode and SKIP mode.
  • the decoding process of the coding block of the motion prediction mode is: first, the decoder obtains the decoding information of the common location block in the common location image corresponding to the current coding sub-block, and obtains a corresponding calculation result, and secondly, the decoder acquires and The decoding information of the currently encoded sub-blocks of the current sub-block is encoded.
  • the decoder decodes the current coding sub-block according to the calculation result and the decoding information of the current coding block to obtain decoding information of the current coding sub-block, and the decoding information.
  • the method includes: an encoding mode of the reference coding block, a motion vector, and a reference image index.
  • the coding block of the motion prediction mode is divided into N blocks (N ⁇ 2) to obtain N coded sub-blocks, and the decoder performs the above decoding process to decode the N coded sub-blocks one by one to complete Decoding of the coding block of the above motion prediction mode.
  • M (2 ⁇ M ⁇ N) computing units are integrated on the decoder to decode the N coded sub-blocks in parallel.
  • the hardware overhead of the decoder is increased due to the increase in the number of parallel computing units, and cooperative computing is required between the M computing units. This will further increase the complexity of the decoder hardware device.
  • the application provides an image decoding method and a decoder for optimizing a decoding algorithm, reducing decoder hardware overhead and improving decoder performance.
  • the first aspect of the present application provides an image decoding method, including:
  • auxiliary information of a common location image of the first coded sub-block where the common location image is an image having the same coordinate information as a current image block in which the first coded sub-block is located, where the current image block includes the first a coded sub-block and a second coded sub-block, wherein the second coded sub-block is a decoded coded sub-block in the current image block, where the common location image includes a first common location block and a second common location block
  • the coordinate information of the first common position block is the same as the coordinate information of the first coded sub block
  • the coordinate information of the second common position block is the same as the coordinate information of the second coded sub block;
  • auxiliary information of the common location image indicates that the decoding information of the first common location block and the second common location block are the same, acquiring a decoding auxiliary value of the second encoded subblock as the first encoding a decoding auxiliary value of the block, where the decoding auxiliary value of the second coding sub-block is calculated according to the decoding information of the second common location block;
  • decoding the first coded sub-block according to the decoding auxiliary value of the first coded sub-block to obtain decoding information of the first coded sub-block, where the target decoding information is the first code-sub- Decoding information of adjacent coded sub-blocks of the block.
  • the present application has the following advantages:
  • the decoder can directly copy or read the decoding auxiliary value of the previously saved second coding sub-block, which can simplify the decoding operation, and more importantly, the calculation process of decoding the auxiliary value is extremely complicated
  • the image decoding method in the embodiment of the present application can greatly shorten the decoding duration, thereby saving the computing resources of the decoder and improving the decoding efficiency of the decoder. Eventually, the decoding performance of the decoder is improved.
  • the method before the acquiring the auxiliary information of the common location image of the first coded sub-block, the method further includes:
  • the determination result is stored as auxiliary information of the common position image.
  • the corresponding auxiliary information is automatically generated and saved, which can improve the decoding efficiency of subsequent images, save computing resources, and improve decoding performance of the decoder.
  • the method after acquiring the auxiliary information of the common location image of the first coding sub-block, the method also includes:
  • auxiliary information of the common location image indicates that the decoding information of the first common location block and the second common location block are not the same, acquiring the first information calculated according to the decoding information of the first common location block Encoding the auxiliary value of the sub-block, such that the first encoded sub-block is decoded according to a decoding auxiliary value of the first encoded sub-block to obtain decoding information of the first encoded sub-block.
  • the first possible implementation of the first aspect, or the second possible implementation of the first aspect in a third possible implementation of the first aspect of the present application, Decoding the first coded sub-block according to the decoding auxiliary value of the first coded sub-block, including:
  • decoding auxiliary value of the first coding sub-block is within the first preset range, determining decoding information of the first common location block as decoding information of the first coding sub-block;
  • decoding the first coding sub-block If the decoding auxiliary value of the first coding sub-block is in the second preset range, decoding the first coding sub-block according to decoding information of the coding sub-block adjacent to the first coding sub-block, Obtaining decoding information of the first coded sub-block.
  • the decoding information includes: an encoding mode, a motion vector, and a common location image index. At least one of them.
  • an embodiment of the present application provides a decoder, which has a function of implementing a decoder behavior in the foregoing method embodiment.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • an embodiment of the present application provides a computer readable storage medium, configured to store computer operation instructions used by the decoder, and when executed on a computer, enable the computer to perform any one of the foregoing first aspects.
  • the embodiment of the present application provides a computer program product comprising instructions, which when executed on a computer, enable the computer to perform the image decoding method according to any one of the above first aspects.
  • FIG. 1 is a schematic diagram of dividing a coding block into multiple coding sub-blocks in the embodiment of the present application;
  • FIG. 2 is a schematic diagram of an embodiment of an image decoding method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of dividing a 16 ⁇ 16 coding block into 16 4 ⁇ 4 coding sub-blocks according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of an embodiment of a decoder in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another embodiment of a decoder in an embodiment of the present application.
  • FIG. 6 is a hardware structural diagram of a decoder in an embodiment of the present application.
  • the application provides an image decoding method and a decoder for optimizing a decoding algorithm, reducing decoder hardware overhead and improving decoder performance.
  • the image in the video is compression-encoded by a video codec protocol to obtain a coded block, and an image is compression-encoded into a coded block, such as a macro block (MB).
  • a video codec protocol such as a macro block (MB).
  • the decoder decodes the MB according to the video codec protocol, and finally obtains corresponding decoding information, thereby obtaining an image carried therein. Since the amount of data carried in the compressed and encoded MB is large, when decoding the decoder, the decoder first divides the MB into multiple coded sub-blocks, and then the decoder decodes the divided coded sub-blocks one by one.
  • FIG. 1 is a schematic diagram of dividing a 16 ⁇ 16 coded block MB into 16 4 ⁇ 4 coded sub-blocks (a0-a15), wherein the position of the coded sub-block may be arbitrary, and only the ones shown in the figure are shown therein. One.
  • the coding mode, the motion vector and the parametric image index of the common position block corresponding to the coded sub-block obtained by the coding block division obtained by the motion prediction mode coding are in many cases Is the same, or, in many cases, the coding mode, the motion vector, and the reference image index of the common location block corresponding to the partial coding sub-blocks are the same, wherein the common location block has the same coordinate information as the coding sub-block and The coded block that has been decoded.
  • the coding modes, motion vectors, and reference image indexes of the 16 common location blocks corresponding to a0-a15 are the same, or 8 corresponding to a0-a7.
  • the coding mode, motion vector, and reference image index of the common location block are the same, and the coding modes, motion vectors, and reference image indexes of the other 8 common location blocks corresponding to a8-a15 are also the same.
  • the video codec protocols such as protocols such as H.264, H.265, and AVS2.0
  • the different coding sub-blocks correspond to each other.
  • the coding mode, motion vector, and reference picture index of the location block may be the same. Therefore, in order to improve the decoding efficiency of the decoder, complex decoding such as the coding operation of the common position block, the motion vector and the reference image index may be simplified.
  • the calculation method is to reduce the calculation steps, shorten the calculation time, and save the computing resources of the decoder.
  • the present application is based on the analysis of the above two aspects, and the optimized decoding method obtains the image decoding method in the embodiment of the present application to reduce the decoding time, save the decoder computing resources, and improve the decoding efficiency of the decoder.
  • an embodiment of an image decoding method in this embodiment of the present application includes:
  • the decoder stores auxiliary information of the common location image.
  • the common location image is an image that has been decoded before decoding the current image block and has the same coordinate information as the current image block.
  • the decoder stores the decoded information of the common location image and simultaneously stores the auxiliary information of the common location image, wherein the decoded information includes at least one of an encoding mode, a motion vector, and a reference image index.
  • the auxiliary information of the common location image is used to indicate an encoding sub-block having the same decoding information in the common location image and an encoding sub-block having different decoding information. Decoding, by the decoder, decoding information of all coded sub-blocks in the common location image, and/or decoding information of at least two or more specific location coded sub-blocks in the common location image;
  • the decoder sets the flag bit to 1. If not, the decoder sets the flag bit to 0 to obtain the tag result. Finally, the decoder uses the tag result as the auxiliary information of the common location image, and It is stored to cause the decoder to decode the encoded sub-blocks in the current image block using the auxiliary information of the common location image.
  • the decoder acquires auxiliary information of a common location image of the first encoded sub-block.
  • the first coding sub-block is a coding sub-block to be decoded in the current image block, and the decoder divides the current image block into a plurality of coding sub-blocks, including a first coding sub-block and a second coding sub-block, and a second coding sub-block Is the encoded sub-block that has been decoded.
  • the decoder determines a common position image having the same coordinate information as the current image block based on the coordinate information of the current image block, and extracts the auxiliary information of the common position image. Further, the decoder determines, according to the coordinate information of the first coded sub-block, a first common position block having the same coordinate information as the first coded sub-block in the common position image.
  • the common location image further includes a second common location block having the same coordinate information as the second encoded sub-block, and the encoding, the motion vector, and the reference image index of the second common location block are stored in the decoder, and The decoding assistance value of the second coded sub-block calculated from the decoding information of the second common position block is also stored.
  • the decoder sets the motion vector of the common location block to 0, the reference image index to -1, and further, the decoder according to the video encoding and decoding protocol such as H. 264.
  • the calculation method specified by H.265 and AVS2.0 calculates the motion vector and the reference image index of the common location block to obtain the decoding auxiliary value of the second coding subblock; if the coding mode of the second common location block is the inter coding mode And for the forward prediction reference, having the forward motion vector and the forward reference image index, the decoder sets the motion vector of the second common position block to the forward motion vector, and the reference image index is set to the forward reference image index And further, the decoder calculates the motion vector of the second common position block and the reference image index according to a calculation method specified by the video codec protocol, such as H.264, H.265, and AVS2.0, to obtain decoding assistance of the second coded sub-block.
  • the video codec protocol such as H.264, H.265, and AVS2.0
  • the coder sets the motion vector of the common position block to the above backward motion vector, and the reference image index is set to the backward reference image index.
  • the decoder is configured according to video codec protocols such as H.264, H.265, and AVS2.0.
  • the calculation method calculates the motion vector and the reference image index of the second common position block to obtain the decoding auxiliary value of the second coded sub-block.
  • the calculation process of the auxiliary decoding value of the second coding sub-block having the same coordinate information as the second common location block is calculated by the decoder according to the decoding information of the second common location block, which requires a large amount of decoders. Calculation resources and calculation duration.
  • the decoder acquires the decoding auxiliary value of the second encoded subblock as the decoding auxiliary value of the first encoded subblock.
  • the decoder determines that the decoding auxiliary value of the first coding subblock is the same as the decoding assistance value of the second coding subblock, and further a decoder extracts a decoding auxiliary value of the second encoded sub-block from a storage space storing a decoding auxiliary value of the second encoded sub-block, and the decoder uses the decoding auxiliary value of the second encoded sub-block as the first encoded sub-block
  • the decoding auxiliary value decodes the first encoded sub-block to obtain decoding information of the first encoded sub-block.
  • the decoder calculates, according to the decoding information of the first common location block, the decoding assistance of the first coding subblock. value.
  • the decoder calculates the decoding auxiliary value of the first coding subblock according to the decoding information of the first common location block,
  • the first coded sub-block is decoded by the decoder to use the decoding auxiliary value of the first coded sub-block to obtain decoding information of the first coded sub-block.
  • the method for calculating the decoding auxiliary value of the first coded sub-block is similar to the method for calculating the decoding auxiliary value of the second coded sub-block described in the above step 203, and details are not described herein again.
  • the decoder decodes the first coded sub-block according to the decoding auxiliary value of the first common location block to obtain decoding information of the first coded sub-block.
  • the decoder determines that the decoding information of the first coding sub-block is the same as the decoding information of the first common location block, and further, the decoder will use the first common location
  • the decoding information of the block is determined as the decoding information of the first encoded sub-block.
  • the decoder acquires decoding information of the encoded sub-block adjacent to the first encoded sub-block in the current image block and has been decoded. Further, the decoder decodes the first coded sub-block according to the decoding information of the coded sub-block adjacent to the first coded sub-block and has been decoded to obtain the decoding information of the first coded sub-block.
  • the decoder when the decoding auxiliary value of the first coding sub-block is within the second preset range, the decoder performs a decoding calculation on the first coding sub-block by using a spatial prediction algorithm to obtain decoding information of the first coding sub-block.
  • the decoder determines whether the coded sub-block adjacent to the first coded sub-block is valid according to the coding mode, and secondly, if valid, the decoder calculates the first calculation method according to the video coding and decoding protocol.
  • the median filtering algorithm calculates the decoding information of the first coding sub-block, and if not, the decoder calculates the target decoding information according to the second calculation method specified by the video coding and decoding protocol. The decoding information of the encoded sub-block.
  • the decoder determines that the coding sub-block adjacent to the first coding sub-block is invalid, if the foregoing and the first coding
  • the coding mode of the coding sub-block adjacent to the sub-block is the intra coding mode, and the decoder determines that the coding sub-block corresponding to the target decoding information is valid.
  • first calculation method and the second calculation method need to be further determined according to different video coding and decoding protocols, such as H.264, H.265, and AVS2.0, and the specific first calculation method and For the calculation method of the second calculation method, refer to the related contents in the above H.264, H.265, and AVS2.0 protocols, and details are not described herein again.
  • first preset range and the second preset range are calculated according to a correlation calculation method in a video codec protocol, and are used to determine decoding information of the first coded sub-block and the first common location block.
  • the decoder directly uses the decoding information of the first common location block as the decoding information of the first coding sub-block to complete the Decoding of a coded sub-block; when the decoding auxiliary value of the first coded sub-block is within the second preset range, the decoder needs to re-based the decoding information of the coded sub-block adjacent to the first code block in the current image block.
  • the decoding information of the first coded sub-block is obtained by correlation calculation between the first calculation method and the second calculation method.
  • the calculation manners are different in different video codec protocols, so that in different video codec protocols
  • the first preset range and the second preset range may also be different.
  • the related descriptions of the first preset range and the second preset range refer to the description of related parts in the related video codec protocol. This will not be repeated here.
  • the decoder stores auxiliary information of the current image block.
  • the decoder After decoding all the encoded sub-blocks in the current image block, the decoder acquires and stores the auxiliary information of the current image block to assist the decoder in decoding the subsequent image.
  • This step 206 is similar to the above step 201, and details are not described herein again.
  • the decoder does not need to calculate the decoding auxiliary value of the first coding sub-block again, and the decoder can directly copy or read the decoding auxiliary value of the previously saved second coding sub-block, which can simplify the decoding operation and, more importantly, the decoding assistance.
  • the calculation process of the value is extremely complicated and takes a long time, and is relatively large in the entire decoding duration. Therefore, the image decoding method in the embodiment of the present application can greatly shorten the decoding duration, thereby saving the computing resources of the decoder and improving. The decoding efficiency of the decoder ultimately improves the decoding performance of the decoder.
  • the image decoding method in the present application optimizes the decoding operation process in a large amount, and improves the decoding performance of the decoder, it is not necessary to use multiple computing units for parallel processing, and a single computing unit can perform decoding calculation, so the image decoding in this application
  • the method reduces the hardware overhead of the decoder, thereby saving the cost of the decoder.
  • Application Scenario 1 To simplify the description, the H.264 protocol, full frame coding, and full spatial motion prediction mode are taken as an example. As shown in FIG. 3, a 16x16 MB is divided into 16 in the above protocol and coding mode. 4x4 coding block (b0-b15), only one arrangement is shown in the figure, and other arrangements may be used. This application does not impose any restrictions; according to the relevant provisions of the H.264 protocol, the current 16x16MB coding block is used.
  • the decoding information is divided into 16 4x4 encoding blocks (b0-b15) for information storage, and the encoding mode, motion vector and reference image index of each of the encoding sub-blocks in b0-b15 are stored.
  • Bit0 If the encoding mode, motion vector and reference image index of all 4x4 blocks in the MB are the same, it is 1, otherwise 0;
  • Bit1 If b0, b5, b10, b15 are all intra coding modes, or both have forward prediction and the forward motion vector and the reference image index are consistent, it is 1, otherwise 0;
  • Bit2 If b0, b5, b10, and b15 are all inter coding modes, there is no forward prediction, and the backward motion vector and the reference image index are consistent, which is 1, otherwise 0;
  • Bit3 If the encoding modes of b0, b5, b10, and b15, the forward and backward motion vectors and the reference image index are all the same, it is 1, otherwise 0;
  • Bit4 If b0, b1, b2, b3 are all intra coding modes, or both have forward prediction and the forward motion vector and the reference image index are consistent, it is 1, otherwise 0;
  • Bit5 If b0, b1, b2, and b3 are all inter coding modes, there is no forward prediction, and the backward motion vector and the reference image index are consistent, which is 1, otherwise 0;
  • Bit6 If the encoding mode of b0, b1, b2, b3, the forward and backward motion vectors and the reference image index are all the same, it is 1, otherwise it is 0;
  • Bit7 If b4, b5, b6, and b7 are all intra coding modes, or both have forward prediction and the forward motion vector and the reference image index are consistent, it is 1, otherwise 0;
  • Bit8 If b4, b5, b6, and b7 are all inter coding modes, there is no forward prediction, and the backward motion vector and the reference image index are consistent, which is 1, otherwise 0;
  • Bit9 If the encoding modes of b4, b5, b6, and b7, the forward and backward motion vectors and the reference image index are all the same, it is 1, otherwise 0;
  • Bit10 If b8, b9, b10, b11 are all intra coding modes, or both have forward prediction and the forward motion vector and the reference image index are consistent, it is 1, otherwise 0;
  • Bit11 If b8, b9, b10, and b11 are all inter coding modes, there is no forward prediction, and the backward motion vector and the reference image index are consistent, which is 1, otherwise 0;
  • Bit12 If the encoding mode of b8, b9, b10, b11, the forward and backward motion vectors and the reference image index are all the same, it is 1, otherwise it is 0;
  • Bit13 If b12, b13, b14, b15 are all intra coding modes, or both have forward prediction and the forward motion vector and the reference image index are consistent, it is 1, otherwise 0;
  • Bit14 If b12, b13, b14, b15 are all inter coding modes, there is no forward prediction, and the backward motion vector and the reference image index are consistent, which is 1, otherwise 0;
  • Bit15 If the encoding modes of b12, b13, b14, and b15, the forward and backward motion vectors and the reference image index are all the same, it is 1, otherwise it is 0.
  • Application scenario 2 Taking the coding block in the application scenario 1 as an example, the image decoding mode in the embodiment of the present application is described in detail, as follows:
  • S100 The 16x16 MB is divided into 16 4x4 coding blocks b0-b15 according to the H.264 protocol, and the following calculations of S101 to S110 are sequentially performed according to the decoding order of b0, b1, b2, b3, ..., b14, b15.
  • step S102 If the currently decoded sub-block is b0, the jump performs the following step S102; if the currently-coded sub-block is the encoded sub-block of b1 to b15, the following step S101 is sequentially performed.
  • the above common location image is decoded when the current image is decoded, and the decoder has stored the coding mode, motion vector and reference image index of each of the coded sub-blocks in the common location image, and also stores the common Auxiliary information for the location image.
  • step S102 If the coded sub-block currently being decoded is b0, the jump proceeds to step S104; otherwise, the auxiliary information G is extracted, and according to the auxiliary information G, it is determined whether the currently coded sub-block being decoded is decoded with the current MB-coded block.
  • the encoded sub-blocks have the same motion pattern, motion vector, and reference image index.
  • step S103 If they are the same, copy the motion mode, the motion vector, and the reference image index according to the common position block of the decoded coded sub-block, and calculate the calculation result according to the H.264 protocol, denoted as R, and jump to step S106. If not, the process proceeds to step S104.
  • step S105 According to the coordinates obtained in step 104, in the information stored in the common location image, the coding mode, the motion vector, and the reference image index of the common location block are addressed, and the calculation result calculated according to the H.264 protocol is recorded as R, and R is stored, the specific calculation method can refer to the above step S103, which will not be described here.
  • step S106 If the coded sub-block currently being decoded is b0, step S107 is performed in sequence; if the coded sub-block currently being decoded is any one of b1 to b15, the process proceeds to step S108.
  • the coding mode, the motion vector, and the reference image index of the adjacent coding block obtained according to the foregoing calculation result R and the step S107 are calculated by using a correlation calculation procedure specified by the H.264 protocol, to obtain a motion vector and a reference of the current coding sub-block. Image index.
  • step S110 If b0-b15 are all decoded, and the 16x16MB needs to be stored and optimized for subsequent image decoding operations, it is determined whether the coding modes, motion vectors, and reference image indexes of the 16 coded sub-blocks b0-b15 are consistent. And generating, according to the judgment result, corresponding auxiliary information, and determining, according to the H.264 protocol, whether the coding mode, the motion vector, and the reference image index of the coding sub-blocks at the specific positions of the 16 coding sub-blocks are consistent. And the corresponding auxiliary information is generated according to the judgment result. For the specific judgment process, refer to the application scenario 1 above, which is not described here. If the decoding is not completed, the jump proceeds to step S101 to continue the decoding.
  • the decoder 40 includes: a first obtaining module 401, a second obtaining module 402, and a decoding module 403;
  • the first obtaining module 401 can perform the operation process described in the foregoing step 202;
  • the second obtaining module 402 can perform the operation process described in the foregoing step 203;
  • the decoding module 403 can perform the operation process described in the above step 205.
  • the decoder 50 shown in FIG. 5 includes, in addition to the modules shown in FIG. 4 above, the decoder 50 further includes: a determining module 504, a storage module 505, and a computing module 506; wherein, the determining module The 504 and the storage module 505 can be configured to perform the decoding operations described in the foregoing steps 201 and 206, and perform the related operations of acquiring and storing the auxiliary information in the application scenario 1; the calculating module 506 can be used to jointly perform the foregoing step 204. Describe the operation process.
  • the above decoder may also be a decoding chip.
  • the decoder may be implemented by hardware, or may be implemented by hardware, where the hardware and software include modules corresponding to one or more of the above functions.
  • FIG. 6 is a hardware structure of a decoder in the embodiment of the present application, and the decoder 60 includes:
  • a portion of the memory 602 may also include a non-volatile random access memory (NVRAM).
  • Memory 602 stores the following elements, executable modules or data structures, or subsets thereof, or their extended sets:
  • Operational instructions including various operational instructions for implementing various operations; operating system: including various system programs for implementing various basic services and processing hardware-based tasks.
  • the processor 601 may also be referred to as a central processing unit (CPU).
  • CPU central processing unit
  • the image decoding method disclosed in the above embodiment of the present application may be applied to the processor 601 or implemented by the processor 601.
  • Processor 601 may be an integrated circuit chip with decoding capabilities. In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 601 or an instruction in a form of software.
  • the processor 601 may be a general-purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or Other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP digital signal processing
  • ASIC application specific integrated circuit
  • FPGA field-programmable gate array
  • Other programmable logic devices discrete gates or transistor logic devices, discrete hardware components.
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the image decoding method disclosed in the embodiment of the present application may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory
  • the processor 601 performs the decoding operation of the decoder described in the method embodiment corresponding to FIG. 2 above by calling the operation instruction stored in the memory 602.
  • the embodiment of the present application provides a computer readable storage medium for storing computer operation instructions used by the decoder, and when executed on a computer, enables the computer to perform image decoding in the embodiment corresponding to FIG. 2 above. method.
  • the embodiment of the present application provides a computer program product including instructions, which when executed on a computer, enable the computer to execute the image decoding method in the embodiment corresponding to FIG. 2 above.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program code. .

Landscapes

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

Abstract

本申请公开了一种图像解码方法及解码器,用于优化解码算法,降低解码器硬件开销同时提升解码器性能。本申请方法包括:获取第一编码子块的共同位置图像的辅助信息,所述共同位置图像为与所述第一编码子块所在的当前图像块具有相同坐标信息的图像;若所述共同位置图像的辅助信息指示所述第一共同位置块与所述第二共同位置块的解码信息相同,则获取所述第二编码子块的解码辅助值作为所述第一编码子块的的解码辅助值,所述第二编码子块的解码辅助值是根据所述第二共同位置块的解码信息计算得到的;根据所述第一编码子块的解码辅助值对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息。

Description

一种图像解码方法及解码器
本申请要求于2017年12月29日提交中国专利局、申请号为201711483149.X、发明名称为“一种图像解码方法及解码器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及视频、图像编解码技术领域,尤其涉及一种图像解码方法及解码器。
背景技术
视频编解码技术广泛应用于互联网,电视广播,存储媒体,通信等领域。新一代视频编解码协议如H.264、H.265和AVS2.0中均有如DIRECT模式和SKIP模式等运动预测模式。对运动预测模式的编码块的解码过程为:首先,解码器获取当前编码子块对应的共同位置图像中的共同位置块的解码信息进行计算,以得到相应的计算结果,其次,解码器获取与当前编码子块相邻的编码子块的解码信息,最终,解码器根据上述计算结果和当前编码块的解码信息对当前编码子块进行解码,以得到当前编码子块的解码信息,上述解码信息包括:参考编码块的编码模式、运动矢量和参考图像索引。
在相关解码技术中,将运动预测模式的编码块划分成N块(N≥2),以得到N个编码子块,解码器执行上述解码过程对这N个编码子块逐一进行解码,以完成对上述运动预测模式的编码块的解码。为了提高解码效率,在解码器上集成M(2≤M≤N)个计算单元对这N个编码子块并行解码。
在上述并行解码方案中,虽然提高了对运动预测模式的编码块的解码效率,但是由于并行计算单元数量的增加,会增加解码器的硬件开销,并且,M个计算单元之间需要协同计算,这将进一步增加解码器硬件设备的复杂度。
发明内容
本申请提供了一种图像解码方法及解码器,用于优化解码算法,降低解码器硬件开销同时提升解码器性能。
本申请第一方面提供了一种图像解码方法,包括:
获取第一编码子块的共同位置图像的辅助信息,所述共同位置图像为与所述第一编码子块所在的当前图像块具有相同坐标信息的图像,所述当前图像块中包括所述第一编码子块和第二编码子块,所述第二编码子块为所述当前图像块中已解码的编码子块,所述共同位置图像中包括第一共同位置块和第二共同位置块,其中,所述第一共同位置块的坐标信息与所述第一编码子块的坐标信息相同,所述第二共同位置块的坐标信息与所述第二编码子块的坐标信息相同;
若所述共同位置图像的辅助信息指示所述第一共同位置块与所述第二共同位置块的解码信息相同,则获取所述第二编码子块的解码辅助值作为所述第一编码子块的的解码辅助值,所述第二编码子块的解码辅助值是根据所述第二共同位置块的解码信息计算得到的;
根据所述第一编码子块的的解码辅助值对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息,所述目标解码信息为与所述第一编码子块的相邻的编码子块的解 码信息。
从以上技术方案可以看出,本申请具有以下优点:
在第一共同位置块与第二共同位置块的编码方式、运动矢量和参考图像索引相同的情况下,由于在解码第二编码子块的过程中已经根据上述视频编码协议对第二共同位置块的编码方式、运动矢量和参考图像索引进行了相关运算得到了第二共同位置块的解码辅助值,并将上述解码辅助值保存了下来,在解码第一编码子块时,解码器便无需再次计算第一编码子块的解码辅助值,解码器可以直接复制或读取之前保存的第二编码子块的解码辅助值,可以简化解码操作,更重要的是,解码辅助值的计算过程极为复杂,耗时较长,在整个解码时长中的占比较大,因此,本申请实施例中的图像解码方法可以大量缩短了解码时长,从而达到节省解码器的计算资源,提升解码器的解码效率,最终使得解码器的解码性能得以提升。
结合本申请第一方面,在第一方面的第一种可能的实现方式中,在所述获取第一编码子块的共同位置图像的辅助信息之前,所述方法还包括:
当所述共同位置图像中的所有编码子块解码完毕时,判断所述共同位置图像中所述第一共同位置块和所述第二共同位置块的解码信息是否相同,以得到判断结果;
将所述判断结果作为所述共同位置图像的辅助信息进行存储。
在图像解码完成后,自动生成并保存其对应的辅助信息,可以提高后续图像的解码效率,节约计算资源,提升解码器解码性能。
结合本申请的第一方面或第一种可能的实现方式,在本申请第一方面的第二种可能的实现方式中,在获取第一编码子块的共同位置图像的辅助信息之后,所述方法还包括:
若所述共同位置图像的辅助信息指示所述第一共同位置块与所述第二共同位置块的解码信息不相同,则获取根据所述第一共同位置块的解码信息计算得到所述第一编码子块的解码辅助值,以使得根据所述第一编码子块的解码辅助值对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息。
结合本申请的第一方面、第一方面的第一种可能的实现方式或第一方面的第二种可能的实现方式,在本申请的第一方面的第三种可能的实现方式中,所述根据所述第一编码子块的解码辅助值对所述第一编码子块进行解码,包括:
若所述第一编码子块的解码辅助值在第一预设范围内,则将所述第一共同位置块的解码信息确定为所述第一编码子块的解码信息;
若所述第一编码子块的解码辅助值在第二预设范围内,则根据与所述第一编码子块相邻的编码子块的解码信息对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息。
结合本申请的第一方面的第三种可能的实现方式,在本申请的第一方面的第四种可能的计算方式中,所述解码信息包括:编码模式、运动矢量和共同位置图像索引中的至少一种。
第二方面,本申请实施例提供一种解码器,该解码器具有实现上述方法实施例中解码器行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件 或软件包括一个或多个与上述功能相对应的模块。
第三方面,本申请实施例提供了一种计算机可读存储介质,用于储存为上述解码器所用的计算机操作指令,当其在计算机上运行时,使得计算机可以执行上述第一方面中任意一项所述的图像解码方法。
第四方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面中任意一项所述的图像解码方法。
另外,第二方面至第四方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。
附图说明
图1为本申请实施例中一个编码块划分为多个编码子块的示意图;
图2为本申请实施例中图像解码方法的一个实施例示意图;
图3为本申请实施例中将一个16x16编码块划分为16个4x4编码子块的示意图;
图4为本申请实施例中解码器的一个实施例示意图;
图5为本申请实施例中解码器的另一个实施例示意图;
图6为本申请实施例中解码器的一个硬件结构图。
具体实施方式
本申请提供了一种图像解码方法及解码器,用于优化解码算法,降低解码器硬件开销同时提升解码器性能。
下面将结合本申请中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
在视频码流中,视频中的图像经过视频编解码协议进行压缩编码得到编码块,一个图像被压缩编码为一个编码块,如宏块(macro block,MB)。在视频编解码系统中,MB从编码器传输到解码器后,解码器根据视频编解码协议对MB进行解码最终得到相应的解码信息,从而获得其中携带的图像。由于经过压缩编码后的MB中携带的数据量较大,在对其进行解码时,解码器先将MB划分为多个编码子块,进而,解码器对划分后的编码子块进行逐一解码,最终,解码器将MB中所有的编码子块解码完毕。如图1所示为将一个16x16的编码块MB划分为16个4x4的编码子块(a0-a15)的示意图,其中,编码子块的位置可以是任意的,图中所示出的只是其中一种。
一方面,通过对视频码流的模式分布的分析获知:由运动预测模式编码得到的编码块划分得到的编码子块对应的共同位置块的编码模式、运动矢量和参量图像索引在很多情况下都是一样的,或者,在很多情况下,其中部分编码子块对应的共同位置块的编码模式、运动矢量和参考图像索引是一样的,其中,共同位置块是与编码子块具有相同坐标信息并且已被解码的编码块。
以图1为例,编码块a0-a15中,可能存在a0-a15分别对应的16个共同位置块的编码模式、运动矢量和参考图像索引都是一样的,或者,a0-a7对应的8个共同位置块的编码模式、运动矢量和参考图像索引是一样的,并且a8-a15对应的另外8个共同位置块的编码模式、运动矢量和参考图像索引也是一样的。
另一方面,通过对各视频编解码协议(如H.264、H.265和AVS2.0等协议)的分析获知:在执行运动预测模式编码块的解码操作时,不同编码子块对应的共同位置块的编码模式、运动矢量和参考图像索引可能是相同,因此,为了提高解码器的解码效率,可以简化对共同位置块的编码模式、运动矢量和参考图像索引进行的缩放运算等复杂的解码计算方法,以减少计算步骤,缩短运算时长,同时节约解码器的计算资源。
本申请基于上述两个方面的分析,优化解码方法得到本申请实施例中的图像解码方法,以减少解码时间,节约解码器计算资源,提高解码器的解码效率。
为了便于理解,下面结合图2对本申请实施例中的图像解码方法进行详细说明,具体如下:
如图2所示,本申请实施例中图像解码方法的一个实施例,包括:
201、解码器存储共同位置图像的辅助信息。
共同位置图像是在解码当前图像块之前已经被解码的,并且与当前图像块具有相同坐标信息的图像。在共同位置图像解码完毕之后,解码器将共同位置图像的解码信息进行存储,并且同时存储共同位置图像的辅助信息,其中,解码信息包括编码方式、运动矢量和参考图像索引中的至少一项。
共同位置图像的辅助信息用于指示共同位置图像中解码信息相同的编码子块以及解码信息不相同的编码子块。解码器判断共同位置图像中的所有编码子块的解码信息,和/或,共同位置图像中至少两个以上特定位置编码子块的解码信息是否相同;
若相同,则解码器将标志比特为置为1,若不相同,则解码器将标志比特为置为0,以得到标记结果,最终,解码器将标记结果作为共同位置图像的辅助信息,并将其存储下来以使得解码器使用共同位置图像的辅助信息对当前图像块中的编码子块进行解码。
具体获取共同位置块的辅助信息的具体实施方式可参见下文中应用场景一中的相关描述,此处不再赘述。
202、解码器获取第一编码子块的共同位置图像的辅助信息。
第一编码子块为当前图像块中待解码的编码子块,解码器将当前图像块划分为多个编码子块,其中包括第一编码子块和第二编码子块,第二编码子块为已被解码完毕的编码子块。
解码器根据当前图像块的坐标信息确定与当前图像块具有相同坐标信息的共同位置图 像,并提取出共同位置图像的辅助信息。进一步,解码器根据第一编码子块的坐标信息确定共同位置图像中与第一编码子块具有相同坐标信息的第一共同位置块。
共同位置图像中还包括与第二编码子块具有相同坐标信息的第二共同位置块,并且,解码器中会将第二共同位置块的编码方式、运动矢量和参考图像索引进行存储,还会将根据第二共同位置块的解码信息计算得到的第二编码子块的解码辅助值也存储下来。
例如,如果第二共同位置块的编码方式为intra编码模式,则解码器将共同位置块的运动矢量置为0,参考图像索引置为-1,进而,解码器根据视频编解码协议如H.264、H.265和AVS2.0规定的计算方法对共同位置块的运动矢量和参考图像索引进行计算得到第二编码子块的解码辅助值;如果第二共同位置块的编码方式为inter编码模式,并且为前向预测参考,具有前向运动矢量和前向参考图像索引,则解码器将第二共同位置块的运动矢量置为上述前向运动矢量,参考图像索引置为前向参考图像索引,进而,解码器根据视频编解码协议如H.264、H.265和AVS2.0规定的计算方法对第二共同位置块的运动矢量和参考图像索引进行计算得到第二编码子块的解码辅助值;如果共同位置块的编码方式为inter编码模式,并且为后向预测参考,具有后向运动矢量和后向参考图像索引,则解码器将共同位置块的运动矢量置为上述后向运动矢量,参考图像索引置为后向参考图像索引,进而,解码器根据视频编解码协议如H.264、H.265和AVS2.0规定的计算方法对第二共同位置块的运动矢量和参考图像索引进行计算得到第二编码子块的解码辅助值。
需要说明的是,解码器根据第二共同位置块的解码信息计算得到与第二共同位置块具有相同坐标信息的第二编码子块的辅助解码值的计算过程较为复杂,需要耗费大量的解码器计算资源以及计算时长。
203、若共同位置图像的辅助信息指示第一共同位置块与第二共同位置块的解码信息相同,则解码器获取第二编码子块的解码辅助值作为第一编码子块的解码辅助值。
若共同位置图像的辅助信息指示第一共同位置块与第二共同位置块的解码信息相同,则解码器确定第一编码子块的解码辅助值与第二编码子块的解码辅助值相同,进而,解码器从存储第二编码子块的解码辅助值的存储空间中将第二编码子块的解码辅助值取出,并且解码器将第二编码子块的解码辅助值作为第一编码子块的解码辅助值对第一编码子块进行解码,以得到第一编码子块的解码信息。
204、若共同位置图像的辅助信息指示第一共同位置块与第二共同位置块的解码信息不相同,则解码器根据第一共同位置块的解码信息进行计算得到第一编码子块的解码辅助值。
若共同位置图像的辅助信息指示第一共同位置块与第二共同位置块的解码信息不相同,则解码器根据第一共同位置块的解码信息进行计算得到第一编码子块的解码辅助值,以使得解码器使用第一编码子块的解码辅助值对第一编码子块进行解码,以得到第一编码子块的解码信息。
其中,解码器对第一编码子块的解码辅助值的计算方法与上述步骤203中所述的第二编码子块的解码辅助值的计算方式类似,对此此处不再赘述。
205、解码器根据第一共同位置块的解码辅助值对第一编码子块进行解码,以得到第一编码子块的解码信息。
若第一共同位置块的解码辅助值在第一预设范围内,则解码器确定第一编码子块的解码信息与第一共同位置块的解码信息相同,进而,解码器将第一共同位置块的解码信息确定为第一编码子块的解码信息。
若第一编码子块的解码辅助值在第二预设范围内,则解码器获取当前图像块中与第一编码子块相邻并且已被解码的编码子块的解码信息。进一步,解码器根据上述与第一编码子块相邻并且已被解码的编码子块的解码信息对第一编码子块进行解码,以得到第一编码子块的解码信息。
例如,当第一编码子块的解码辅助值在第二预设范围内时,解码器采用空域预测算法对第一编码子块进行解码计算,得到第一编码子块的解码信息。在空域预测算法中,首先,解码器根据编码模式判断上述与第一编码子块相邻的编码子块是否有效,其次,若有效,则解码器根据视频编编解码协议规定的第一计算方法如中值滤波算法对目标解码信息进行计算得到第一编码子块的解码信息,再次,若无效,则解码器根据视频编编解码协议规定的第二计算方法对目标解码信息进行计算得到第一编码子块的解码信息。
具体的,当上述与第一编码子块相邻的编码子块的编码模式为inter编码模式,则解码器确定上述与第一编码子块相邻的编码子块无效,若上述与第一编码子块相邻的编码子块的编码模式为intra编码模式,则解码器确定目标解码信息对应的编码子块有效。
需要说明的是,上述第一计算方法与第二计算方法需要根据不同的视频编编解码协议如H.264、H.265和AVS2.0中的相关规定进一步确定,具体的第一计算方法与第二计算方法的计算方法可参阅上述H.264、H.265和AVS2.0协议中的相关内容,对此此处不再赘述。
还需要说明的是,上述第一预设范围和第二预设范围是根据视频编解码协议中的相关计算方法计算得到的,并用于判断第一编码子块与第一共同位置块的解码信息是否相同,其中,当第一编码子块的解码辅助值在第一预设范围内时,解码器直接将第一共同位置块的解码信息作为第一编码子块的解码信息,以完成对第一编码子块的解码;当第一编码子块的解码辅助值在第二预设范围内时,解码器需要重新根据当前图像块中与第一编码块相邻的编码子块的解码信息进行如上述第一计算方法与第二计算方法的相关计算得到第一编码子块的解码信息。
对于上述根据视频编解码协议中计算得到第一预设范围与第二预设范围的计算方法,在不同的视频编解码协议中其计算方式有所不同,以使得在不同的视频编解码协议中的第一预设范围和第二预设范围也会有所区别,对于上述第一预设范围和第二预设范围计算的相关描述,可参阅相关的视频编解码协议中相关部分的描述,对此此处不再赘述。
206、解码器存储当前图像块的辅助信息。
在对当前图像块中所有编码子块解码完成之后,解码器获取并存储当前图像块的辅助信息,以辅助解码器解码后续图像。
该步骤206与上述步骤201类似,对此此处不再赘述。
在本实施例中,在第一共同位置块与第二共同位置块的编码方式、运动矢量和参考图像索引相同的情况下,由于在解码第二编码子块的过程中已经根据上述视频编码协议对第二共同位置块的编码方式、运动矢量和参考图像索引进行了相关运算得到了第二共同位置 块的解码辅助值,并将上述解码辅助值保存了下来,在解码第一编码子块时,解码器便无需再次计算第一编码子块的解码辅助值,解码器可以直接复制或读取之前保存的第二编码子块的解码辅助值,可以简化解码操作,更重要的是,解码辅助值的计算过程极为复杂,耗时较长,在整个解码时长中的占比较大,因此,本申请实施例中的图像解码方法可以大量缩短了解码时长,从而达到节省解码器的计算资源,提升解码器的解码效率,最终使得解码器的解码性能得以提升。
进一步,由于本申请中的图像解码方法将解码运算过程大量优化,提升了解码器解码性能,无需使用多个计算单元进行并行处理,可以实现单个计算单元进行解码计算,因此本申请中的图像解码方法,降低了解码器的硬件开销,从而节约了解码器的成本。
为了便于理解上述步骤201以及步骤206,下面以具体的运用场景对共同位置图像的辅助信息的存储过程进行说明,具体如下:
应用场景一:为简化说明,以H.264协议下,全帧编码,全空间运动预测模式为例进行说明,如图3所示,为在上述协议及编码模式下将一个16x16MB划分为16个4x4编码块(b0-b15),图中仅仅示出了一种排列方式,还可以是其他排列方式,对此本申请不做任何限制;根据H.264协议的相关规定,将当前16x16MB编码块的解码信息划分为16个4x4编码块(b0-b15)进行信息存储,存储b0-b15中每一个编码子块的编码模式、运动矢量和参考图像索引。在对上述MB解码完毕后,根据H.264协议,判断b0-b15中所有编码子块,和特定位置的部分编码子块的编码模式、运动矢量和参考图像索引是否相同,根据判断结果对标志比特位进行赋值标记,并将完成赋值后的标志比特位存储下来。在图3所示的排列方式中,可以使用一个长度为16bit的标志位按照以下赋值方式得到辅助信息:
Bit0:如果MB内所有4x4块的编码模式、运动矢量和参考图像索引都一致,为1,否则为0;
Bit1:如果b0、b5、b10、b15均为intra编码模式,或均有前向预测且前向运动矢量和参考图像索引一致,为1,否则为0;
Bit2:如果b0、b5、b10、b15均为inter编码模式,均无前向预测,且后向运动矢量和参考图像索引一致,为1,否则为0;
Bit3:如果b0、b5、b10、b15的编码模式,前后向运动矢量和参考图像索引均一致,为1,否则为0;
Bit4:如果b0、b1、b2、b3均为intra编码模式,或均有前向预测且前向运动矢量和参考图像索引一致,为1,否则为0;
Bit5:如果b0、b1、b2、b3均为inter编码模式,均无前向预测,且后向运动矢量和参考图像索引一致,为1,否则为0;
Bit6:如果b0、b1、b2、b3的编码模式,前后向运动矢量和参考图像索引均一致,为1,否则为0;
Bit7:如果b4、b5、b6、b7均为intra编码模式,或均有前向预测且前向运动矢量和参考图像索引一致,为1,否则为0;
Bit8:如果b4、b5、b6、b7均为inter编码模式,均无前向预测,且后向运动矢量和 参考图像索引一致,为1,否则为0;
Bit9:如果b4、b5、b6、b7的编码模式,前后向运动矢量和参考图像索引均一致,为1,否则为0;
Bit10:如果b8、b9、b10、b11均为intra编码模式,或均有前向预测且前向运动矢量和参考图像索引一致,为1,否则为0;
Bit11:如果b8、b9、b10、b11均为inter编码模式,均无前向预测,且后向运动矢量和参考图像索引一致,为1,否则为0;
Bit12:如果b8、b9、b10、b11的编码模式,前后向运动矢量和参考图像索引均一致,为1,否则为0;
Bit13:如果b12、b13、b14、b15均为intra编码模式,或均有前向预测且前向运动矢量和参考图像索引一致,为1,否则为0;
Bit14:如果b12、b13、b14、b15均为inter编码模式,均无前向预测,且后向运动矢量和参考图像索引一致,为1,否则为0;
Bit15:如果b12、b13、b14、b15的编码模式,前后向运动矢量和参考图像索引均一致,为1,否则为0。
应用场景二:以应用场景一中的编码块为例,对本申请实施例中的图像解码方式进行详细说明,具体如下:
S100:根据H.264协议将16x16MB划分为16个4x4编码块b0-b15,按照b0、b1、b2、b3………、b14、b15的解码顺序,依次进行如下S101至S110的计算。
若当前正在解码的编码子块为b0时,则跳转执行下面的步骤S102;若当前正在解码的编码子块为b1至b15中的任意一个编码子块,则顺序执行下面的步骤S101。
S101、找到当前正在进行解码的编码子块对应的共同位置图像。
上述共同位置图像在解码当前图像时,已被解码完毕,并且解码器已将该共同位置图像中的每个编码子块的编码模式、运动矢量和参考图像索引进行了存储,同时也存储了共同位置图像的辅助信息。
S102、若当前正在进行解码的编码子块为b0,则跳转执行步骤S104;否则,提取辅助信息G,并根据辅助信息G判断当前正在解码的编码子块是否与当前MB编码块中已解码的编码子块具有相同的运动模式、运动矢量和参考图像索引。
S103、若相同,则复制根据已解码的编码子块的共同位置块的运动模式、运动矢量和参考图像索引,按照H.264协议计算得到的计算结果,记为R,并跳转执行步骤S106;若不相同,则跳转执行步骤S104。
S104、根据H.264协议,找到上述共同位置图像中对应的共同位置块的坐标。
S105、根据步骤104中得到的坐标,在上述共同位置图像存储的信息中,寻址到共同位置块的编码模式、运动矢量和参考图像索引,按照H.264协议计算得到的计算结果,记为R,并将R存储下来,具体计算方式可参阅上述步骤S103,对此此处不再赘述。
S106、若当前正在进行解码的编码子块为b0,则顺序执行步骤S107;若当前正在解码的编码子块为b1至b15中的任意一个编码子块,则跳转执行步骤S108。
S107、根据H.264协议确定与当前MB编码块相邻的编码块的编码模式、运动矢量和参考图像索引。
S108、根据上述计算结果R和步骤S107得到的相邻编码块的编码模式、运动矢量和参考图像索引,通过H.264协议规定的相关计算步骤进行计算,得到当前编码子块的运动矢量和参考图像索引。
S109、由H.264协议确定当前编码子块的编码模式、运动矢量和参考图像索引是否需要存储,若需要则,将其存储下来,用于作为后续图像的参考图像进行解码;若不需要,则不存储,直接跳转执行上述步骤S101-S108,对当前图像中的下一个编码子块进行解码。
S110、若b0-b15均被解码完成,并且该16x16MB需要进行存储并优化对后续图像解码运算,则判断b0-b15这16个编码子块的编码模式、运动矢量和参考图像索引是否都一致,并根据判断结果进行标记生成对应的辅助信息,和,根据H.264协议判断上述16个编码子块中某几个特定位置上的编码子块的编码模式、运动矢量和参考图像索引是否都一致,并根据判断结果进行标记生成对应的辅助信息,具体判断过程参见上述应用场景一,对此此处不再赘述。若没有解码完毕,则跳转执行步骤S101继续进行解码。
下面结合具体实施方式对本申请实施例中的解码器进行详细说明,具体如下:
如图4所示,本申请实施例中的一个解码器的一个实施例示意图,解码器40包括:第一获取模块401、第二获取模块402和解码模块403;
第一获取模块401,可以执行上述步骤202部分描述的操作过程;
第二获取模块402,可以执行上述步骤203中描述的操作过程;
解码模块403,可以执行上述步骤205中描述的操作过程。
在一种示例中,如图5所示的解码器50除包括上述图4中示出的模块之外,解码器50还包括:判断模块504、存储模块505和计算模块506;其中,判断模块504和存储模块505,可用于执行上述步骤201和步骤206中描述的解码操作,以及执行上述应用场景一中的获取并存储辅助信息的相关操作;计算模块506,可用于共同执行上述步骤204中描述的操作过程。
对于上述各模块的功能,可参阅上述图2对应的实施例、应用场景一和应用场景二中的相关描述进行理解,对此此处不再赘述。
上述解码器也可以是解码芯片。在实现方式上,解码器可以通过硬件实现,也可以通过硬件执行相应的软件实现,其中硬件和软件包括上述一个或多个功能对应的模块。
下面对本申请实施例中解码器的硬件结构进行详细说明,具体如下:
如图6所示为本申请实施例中解码器的一个硬件结构,解码器60包括:
处理器601和存储器602;其中,存储器602可以包括只读存储器和随机存取存储器,并向处理器601提供指令和数据。存储器602的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。存储器602存储了如下的元素,可执行模块或者数据结构,或者它们的子集,或者它们的扩展集:
操作指令:包括各种操作指令,用于实现各种操作;操作系统:包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。
处理器601还可以称为中央处理单元(central processing unit,CPU)。上述本申请实施例揭示的图像解码方法可以应用于处理器601中,或者由处理器601实现。处理器601可能是一种集成电路芯片,具有解码能力。在实现过程中,上述方法的各步骤可以通过处理器601中的硬件的集成逻辑电路或者软件形式的指令完成。
上述的处理器601可以是通用处理器、数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的图像解码方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。
处理器601通过调用存储器602中存储的操作指令,执行上述图2对应的方法实施例中所述的解码器的解码操作。
本申请实施例提供了一种计算机可读存储介质,用于储存为上述解码器所用的计算机操作指令,当其在计算机上运行时,使得计算机可以执行上述图2对应的实施例中的图像解码方法。
本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述图2对应的实施例中的图像解码方法。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出 来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案范围。

Claims (12)

  1. 一种图像解码方法,其特征在于,包括:
    获取第一编码子块的共同位置图像的辅助信息,所述共同位置图像为与所述第一编码子块所在的当前图像块具有相同坐标信息的图像,所述当前图像块中包括所述第一编码子块和第二编码子块,所述第二编码子块为所述当前图像块中已解码的编码子块,所述共同位置图像中包括第一共同位置块和第二共同位置块,其中,所述第一共同位置块的坐标信息与所述第一编码子块的坐标信息相同,所述第二共同位置块的坐标信息与所述第二编码子块的坐标信息相同;
    若所述共同位置图像的辅助信息指示所述第一共同位置块与所述第二共同位置块的解码信息相同,则获取所述第二编码子块的解码辅助值作为所述第一编码子块的的解码辅助值,所述第二编码子块的解码辅助值是根据所述第二共同位置块的解码信息计算得到的;
    根据所述第一编码子块的解码辅助值对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息。
  2. 根据权利要求1所述的方法,其特征在于,在所述获取第一编码子块的共同位置图像的辅助信息之前,所述方法还包括:
    当所述共同位置图像中的所有编码子块解码完毕时,判断所述共同位置图像中所述第一共同位置块和所述第二共同位置块的解码信息是否相同,以得到判断结果;
    将所述判断结果作为所述共同位置图像的辅助信息进行存储。
  3. 根据权利要求1至2中任一项所述的方法,其特征在于,在获取第一编码子块的共同位置图像的辅助信息之后,所述方法还包括:
    若所述共同位置图像的辅助信息指示所述第一共同位置块与所述第二共同位置块的解码信息不相同,则根据所述第一共同位置块的解码信息计算得到所述第一编码子块的解码辅助值,以使得根据所述第一编码子块的解码辅助值对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述根据所述第一编码子块的解码辅助值对所述第一编码子块进行解码,包括:
    若所述第一编码子块的解码辅助值在第一预设范围内,则将所述第一共同位置块的解码信息确定为所述第一编码子块的解码信息;
    若所述第一编码子块的解码辅助值在第二预设范围内,则根据与所述第一编码子块相邻的编码子块的解码信息对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息。
  5. 根据权利要求4所述的方法,其特征在于,所述解码信息包括编码模式、运动矢量和共同位置图像索引中的至少一项。
  6. 一种解码器,其特征在于,包括:
    第一获取模块,用于获取第一编码子块的共同位置图像的辅助信息,所述共同位置图像为与所述第一编码子块所在的当前图像块具有相同坐标信息的图像,所述当前图像块中包括所述第一编码子块和第二编码子块,所述第二编码子块为所述当前图像块中已解码的 编码子块,所述共同位置图像中包括第一共同位置块和第二共同位置块,其中,所述第一共同位置块的坐标信息与所述第一编码子块的坐标信息相同,所述第二共同位置块的坐标信息与所述第二编码子块的坐标信息相同;
    第二获取模块,用于若所述共同位置图像的辅助信息指示所述第一共同位置块与所述第二共同位置块的解码信息相同,则获取所述第二编码子块的解码辅助值作为所述第一编码子块的的解码辅助值,所述第二编码子块的解码辅助值是根据所述第二共同位置块的解码信息计算得到的;
    解码模块,用于根据所述第一编码子块的解码辅助值对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息。
  7. 根据权利要求6所述的解码器,其特征在于,所述解码器还包括:
    判断模块,用于当所述共同位置图像中的所有编码子块解码完毕时,判断所述共同位置图像中所述第一共同位置块和所述第二共同位置块的解码信息是否相同,以得到判断结果;
    存储模块,用于将所述判断结果作为所述共同位置图像的辅助信息进行存储。
  8. 根据权利要求6或7所述的解码器,其特征在于,所述解码器还包括:
    计算模块,用于若所述共同位置图像的辅助信息指示所述第一共同位置块与所述第二共同位置块的解码信息不相同,则根据所述第一共同位置块的解码信息计算得到所述第一编码子块的解码辅助值,以使得根据所述第一编码子块的解码辅助值对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息。
  9. 根据权利要求6至8中任一项所述的解码器,其特征在于,所述解码模块具体用于:
    若所述第一编码子块的解码辅助值在第一预设范围内,则将所述第一共同位置块的解码信息确定为所述第一编码子块的解码信息;
    若所述第一编码子块的解码辅助值在第二预设范围内,则根据与所述第一编码子块相邻的编码子块的解码信息对所述第一编码子块进行解码,以得到所述第一编码子块的解码信息。
  10. 根据权利要求9所述的解码器,其特征在于,所述解码信息包括编码模式、运动矢量和共同位置图像索引中的至少一项。
  11. 一种解码器,其特征在于,包括:
    存储器和处理器;
    所述存储器用于存储操作指令;
    所述处理器用于通过调用所述操作指令,执行上述权利要求1至5中任一项所述的图像解码方法。
  12. 一种计算机可读存储介质,其特征在于,所述计算机存储介质用于存储计算机指令,当其在计算机上运行时,使得计算机可以执行上述权利要求1至5中任一项所述的图像解码方法。
PCT/CN2018/112328 2017-12-29 2018-10-29 一种图像解码方法及解码器 WO2019128443A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711483149.XA CN109996075B (zh) 2017-12-29 2017-12-29 一种图像解码方法及解码器
CN201711483149.X 2017-12-29

Publications (1)

Publication Number Publication Date
WO2019128443A1 true WO2019128443A1 (zh) 2019-07-04

Family

ID=67063018

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/112328 WO2019128443A1 (zh) 2017-12-29 2018-10-29 一种图像解码方法及解码器

Country Status (2)

Country Link
CN (1) CN109996075B (zh)
WO (1) WO2019128443A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113706573B (zh) * 2020-05-08 2024-06-11 杭州海康威视数字技术股份有限公司 一种运动物体的检测方法、装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012175332A (ja) * 2011-02-21 2012-09-10 Nippon Telegr & Teleph Corp <Ntt> 画像符号化装置,画像復号装置,画像符号化方法,画像復号方法,画像符号化プログラムおよび画像復号プログラム
US20130101216A1 (en) * 2011-10-19 2013-04-25 Electronics And Telecommunications Research Institute Method and device for image processing by image division
CN105637875A (zh) * 2013-10-18 2016-06-01 Lg电子株式会社 用于解码多视图视频的方法和设备
WO2017086738A1 (ko) * 2015-11-19 2017-05-26 한국전자통신연구원 영상 부호화/복호화 방법 및 장치

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IT1119091B (it) * 1979-06-05 1986-03-03 Cselt Centro Studi Lab Telecom Procedimento e dispositivo per la codifica e decodifica numerica del segnale televisivo pal composito
EP3525467B1 (en) * 2002-04-19 2021-02-24 Panasonic Intellectual Property Corporation of America Bitstream decoding method and apparatus
US8422555B2 (en) * 2006-07-11 2013-04-16 Nokia Corporation Scalable video coding
CN101605256A (zh) * 2008-06-12 2009-12-16 华为技术有限公司 一种视频编解码的方法及装置
JP2013077865A (ja) * 2010-02-10 2013-04-25 Mitsubishi Electric Corp 画像符号化装置、画像復号装置、画像符号化方法及び画像復号方法
CN102215396A (zh) * 2010-04-09 2011-10-12 华为技术有限公司 一种视频编解码方法和系统
CN106231336B (zh) * 2010-04-13 2020-06-12 Ge视频压缩有限责任公司 解码器、解码方法、编码器以及编码方法
KR101625910B1 (ko) * 2011-10-19 2016-05-31 한국전자통신연구원 영상 분할을 이용한 영상 처리 방법 및 장치
JP5722761B2 (ja) * 2011-12-27 2015-05-27 株式会社ソニー・コンピュータエンタテインメント 動画圧縮装置、画像処理装置、動画圧縮方法、画像処理方法、および動画圧縮ファイルのデータ構造
CN105791855A (zh) * 2012-01-18 2016-07-20 Jvc建伍株式会社 动图像解码装置以及动图像解码方法
KR20130107861A (ko) * 2012-03-23 2013-10-02 한국전자통신연구원 인터 레이어 인트라 예측 방법 및 장치
CN103716631B (zh) * 2012-09-29 2017-04-05 华为技术有限公司 用于图像处理的方法、装置、编码器和解码器
CN103716629B (zh) * 2012-09-29 2017-02-22 华为技术有限公司 用于图像处理的方法、装置、编码器和解码器
CN111200736B (zh) * 2013-06-14 2022-06-21 北京三星通信技术研究有限公司 一种视频编/解码中运动信息的获取方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012175332A (ja) * 2011-02-21 2012-09-10 Nippon Telegr & Teleph Corp <Ntt> 画像符号化装置,画像復号装置,画像符号化方法,画像復号方法,画像符号化プログラムおよび画像復号プログラム
US20130101216A1 (en) * 2011-10-19 2013-04-25 Electronics And Telecommunications Research Institute Method and device for image processing by image division
CN105637875A (zh) * 2013-10-18 2016-06-01 Lg电子株式会社 用于解码多视图视频的方法和设备
WO2017086738A1 (ko) * 2015-11-19 2017-05-26 한국전자통신연구원 영상 부호화/복호화 방법 및 장치

Also Published As

Publication number Publication date
CN109996075A (zh) 2019-07-09
CN109996075B (zh) 2022-07-12

Similar Documents

Publication Publication Date Title
JP7237874B2 (ja) イメージ予測方法および装置
JP6595711B2 (ja) 階層的分割内でのブロックレベルの変換選択および黙示的シグナリングを伴う変換コーディングのための方法および装置
US10666977B2 (en) Methods and apparatuses for coding and decoding depth map
US10116934B2 (en) Image processing method and apparatus
CN107809642B (zh) 用于视频图像编码和解码的方法、编码设备和解码设备
JP2021182752A (ja) 画像予測方法および関連装置
KR102536704B1 (ko) 메모리 액세스가 감소된 fruc 모드에서 비디오 데이터를 인코딩 또는 디코딩하기 위한 방법 및 장치
WO2015124058A1 (zh) 编解码方法和装置
KR102206980B1 (ko) 이미지 인코딩 방법, 이미지 디코딩 방법, 인코딩 장치, 및 디코딩 장치
WO2020140218A1 (zh) 用于视频编码或解码的运动信息获取方法与装置
KR20110023863A (ko) 패치-기반의 샘플링 텍스쳐 합성을 사용하여 텍스쳐 압축을 위한 방법 및 장치
JP2022524916A (ja) 適応的な数の領域を伴う幾何学的分割のための形状適応離散コサイン変換
JP2023029596A5 (zh)
JP6781823B2 (ja) インターフレーム予測符号化方法および装置
JP7471399B2 (ja) 予測値の確定方法、復号器及びコンピュータ記憶媒体
JP2022523697A (ja) 適応的な数の領域を伴う幾何学的分割におけるインター予測
WO2019128443A1 (zh) 一种图像解码方法及解码器
JP7437426B2 (ja) インター予測方法および装置、機器、記憶媒体
CN112203091B (zh) 基于二次多项式的运动矢量预测方法、系统及计算机介质
CN111654696B (zh) 一种帧内的多参考行预测方法、装置、存储介质及终端
WO2021056215A1 (zh) 运动估计方法、系统和存储介质
US12003764B2 (en) Prediction method for current block and electronic device
JP2012147291A (ja) 画像符号化装置、画像符号化方法及びプログラム、画像復号装置、画像復号方法及びプログラム
Lei et al. Joint local and nonlocal progressive prediction for versatile video coding
Jubran et al. Sequence-level reference frames in video coding

Legal Events

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

Ref document number: 18894981

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18894981

Country of ref document: EP

Kind code of ref document: A1