WO2021056433A1 - 预测值的确定方法、解码器以及计算机存储介质 - Google Patents

预测值的确定方法、解码器以及计算机存储介质 Download PDF

Info

Publication number
WO2021056433A1
WO2021056433A1 PCT/CN2019/108598 CN2019108598W WO2021056433A1 WO 2021056433 A1 WO2021056433 A1 WO 2021056433A1 CN 2019108598 W CN2019108598 W CN 2019108598W WO 2021056433 A1 WO2021056433 A1 WO 2021056433A1
Authority
WO
WIPO (PCT)
Prior art keywords
template
current block
matching
block
reference area
Prior art date
Application number
PCT/CN2019/108598
Other languages
English (en)
French (fr)
Inventor
王军
梁凡
张恒
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to EP19947394.3A priority Critical patent/EP4037314A4/en
Priority to KR1020227013644A priority patent/KR20220065059A/ko
Priority to PCT/CN2019/108598 priority patent/WO2021056433A1/zh
Priority to JP2022519101A priority patent/JP7471399B2/ja
Priority to CN201980100394.9A priority patent/CN114424533A/zh
Publication of WO2021056433A1 publication Critical patent/WO2021056433A1/zh
Priority to US17/704,870 priority patent/US20220217335A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • 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/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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/117Filters, e.g. for pre-processing or post-processing
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • 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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/523Motion estimation or motion compensation with sub-pixel accuracy

Definitions

  • the first template wherein the first template contains the adjacent reconstructed pixels of the current block; the reference area of the current block is determined; in the reference area, the first template is determined according to the processing parameters of the reference template.
  • a template matching template wherein the reference template processing parameter is a parameter included in the decoding parameter and used to construct a matching template; according to the matching template, the matching block of the current block is determined; according to the matching Block, determine the predicted value of the current block.
  • FIG. 3 is a schematic flowchart of an optional method for determining a predicted value according to an embodiment of the application
  • the reconstructed pixels adjacent and left adjacent to the current block are used as the pixels of the first template.
  • the decoder will include all or part of the pixels that have been reconstructed in the image where the current block is located before decoding the current block, and determine it as the reference area; in another possibility In the embodiment, the decoder determines all or part of the pixels that have been reconstructed in images other than the image where the current block is located as the reference area.
  • the decoder obtains the rotation angle, and rotates the candidate template around the vertices of the candidate template according to the rotation angle, and the rotated
  • the reconstructed block beyond the reference area in the reconstructed block is intercepted, the intercepted reconstructed block is determined as a rotatable reconstruction block, and the pixel matrix of the rotatable reconstructed block is obtained, and then the pixel matrix of the rotatable reconstructed block is used to update the reconstructed block Pixel matrix.
  • Fig. 4 is a schematic diagram of the arrangement of templates in an optional rotating frame provided by an embodiment of the application.
  • B is the current block
  • b is the template of B
  • the pixel matrix of is P( ⁇ 0 ).
  • the rotated reconstruction block P and the template p of P just do not exceed the reference area, the upper row and the left row of P If the rotation will exceed the reference area, therefore, the height of the reconstruction block from the upper boundary downward is a reconstruction block area, and the height from the left boundary to the right is a reconstruction block area, and the remaining area after the interception is determined to be available Rotate the reconstruction block, and update the reconstruction block with the rotatable reconstruction block.
  • the reference template processing parameter may indicate the rotation angle of the template, for example, a clockwise rotation angle or a counterclockwise rotation angle, which is specifically selected according to actual conditions, and is not specifically limited in this embodiment.
  • FIG. 5 is a schematic flowchart of another optional method for determining a predicted value provided in an embodiment of this application.
  • the decoder determines the matching template of the first template in the reference area according to the reference template processing parameters, including:
  • the decoder constructs one or more candidate templates with the same shape as the first template according to the rotation angle.
  • the decoder uses a preset first filter to filter one or more reconstructed pixels in the reference area according to the rotation angle to obtain pixel values in the candidate template, where the first filter is a low-pass filter or an interpolation
  • the filter is specifically selected according to actual conditions, and this embodiment does not make specific limitations.
  • FIG. 6 is a schematic diagram of the arrangement of another optional rotating frame template provided by an embodiment of the application.
  • B is the current block
  • the vertex coordinates of B are ⁇ 0
  • P is For the image block matching the current block
  • the vertex coordinate of P is ⁇
  • the pixel matrix of B is denoted as P( ⁇ 0 ).
  • FIG. 7 is an embodiment of the application An optional structural schematic diagram of the pixels of the template in the rotated frame is provided, as shown in Figure 7, the dotted line is the template p before rotation, and the solid line is the template p after rotation, on the template p before rotation Obtain the pixel value f(a) of point a, the pixel value f(b) of point b, the pixel value f(c) of point c, and the pixel value f(d) of point d, and obtain the value of two adjacent pixels The pixel value of the point p (the rotated point b) is calculated by using the bilinear interpolation method.
  • Fig. 8 is a schematic structural diagram of some pixels of the template in the rotated frame in Fig. 7 provided by an embodiment of the application, such as
  • the decoder calculates the matching error between one or more candidate templates and the first template, and uses the candidate template with the smallest matching error as the matching template, where one or more candidate matching positions are preset in the reference area
  • One or more pixel positions of the pixel position, the pixel position is an integer pixel position or a fractional pixel position.
  • the decoder calculates the matching error between one or more candidate templates and the first template according to the matching error criterion, where the matching error criterion includes at least one of the following: sum of square errors, mean square error, sum of absolute errors, The average absolute error and structural similarity are specifically selected according to actual conditions, and this embodiment does not make specific limitations.
  • the decoder determines the candidate template corresponding to the first template, and rotates the candidate template according to the preset rotation angle in the reference area.
  • the template is rotated. Since the pixels in the template are reduced compared with the pixel points of the image block, the rotation of the template can reduce the calculation of the pixel value of each pixel in the template after the rotation. the amount.
  • the process of the decoder to determine the matching block of the current block according to the matching template is specifically as follows: the decoder uses the matching pixels in the area indicated by the matching template and having the same size as the current block as pixels in the matching block. ; Wherein, the relative position between the matching template and the matching block is the same as the relative position between the current block and the first template.
  • the decoder uses a preset second filter to filter one or more pixels in the reference area to obtain pixel values in the matching block, where the second filter is a low-pass filter or
  • the interpolation filter is specifically selected according to actual conditions, and this embodiment does not make specific limitations.
  • S106 Determine the predicted value of the current block according to the matched block.
  • the decoder uses the matching block as the predicted value of the current block; or, the decoder uses a linear model to weight the pixel values in the matching block to obtain the predicted value of the current block, where the linear model parameters are as follows One: the preset parameters, the parameters derived according to the preset rules, and the linear model parameters included in the decoding parameters are specifically selected according to actual conditions, and this embodiment does not make specific limitations.
  • the decoder parses the bitstream to obtain the prediction residual of the current block; after that, the decoder obtains the current block based on the predicted value and prediction residual of the current block. The reconstructed value of the pixels in the block.
  • the pixel matrix provided in this application may be a pixel matrix of chrominance values or a pixel matrix of luminance values, which is not specifically limited in the embodiment of the present application.
  • the rotating template mode from the code stream, and in the rotating template mode, obtaining the first template of the current block and determining the reference area of the current block, and in the reference area, according to the reference template processing parameters, determine The matching template of the first template, and then determine the matching block that matches the current block according to the matching template, and then determine the predicted value of the current block.
  • more templates can be obtained by processing the template of the image block, and more
  • the template is matched with the template of the current block, so that the matching block that best matches the current block can be found, which is conducive to more accurately determine the matching block that best matches the current block, and then determine the predicted value of the current block.
  • the calculation method of the rotating template can reduce the amount of calculation in the coding and decoding, thereby improving the coding and decoding efficiency.
  • FIG. 9 is a schematic flowchart of an optional method for determining a predicted value provided by an embodiment of the application, refer to FIG. 9 As shown, the method for determining the predicted value may include:
  • the encoder obtains the data correlation between the current block and the first template of the current block, where the first template contains adjacent reconstructed pixels of the current block.
  • the encoder obtains the adjacent reconstructed pixels of the current block and determines the adjacent reconstructed pixels of the current block as the first template of the current block. After that, the encoder obtains the data correlation between the current block and the first template of the current block.
  • FIG. 10 it is a schematic diagram of the structure between the current block and the first template of the current block, and the encoder obtains the data correlation between the current block and the first template of the current block.
  • the encoder determines the reference area of the current block.
  • the encoder determines the matching block of the current block according to the matching template.
  • the encoder determines the prediction value of the current block according to the matched block.
  • the encoder determines the prediction residual of the current block according to the predicted value of the current block and the acquired pixel value corresponding to the original image, and then calculates the prediction of the current block.
  • the residual and the decoding parameters indicating the use of the rotation template mode are written into the code stream, so that the decoder uses the same prediction value determination method as the encoder provided in this embodiment of the application to determine the prediction value of the current block.
  • FIG. 11 is a schematic flowchart of an example of an optional method for determining a predicted value provided by an embodiment of the application. As shown in FIG. 11, the method for determining a predicted value may include:
  • the encoder uses an intra-frame rotation template matching method to rotate the template of the reconstructed block; the encoder also uses an intra-frame angle prediction method;
  • the encoder After the encoder rotates the template of the reconstructed block, the encoder will traverse all the templates of the reconstructed block (obtained from the reconstructed block) that are the same size as the current block in the search range, and calculate the difference with the current template for each rotated template.
  • the square of the difference of the template of the block is rotated according to the initial value of 30 degrees, the step length is 30 degrees, and the angle value less than 360 degrees is the rotation angle to obtain the rotated template, and calculate the value of each rotation angle.
  • the encoder selects a template corresponding to the minimum sum of the square of the difference, and uses the pixel value of the reconstruction block to which the template belongs as the predicted value of the current block;
  • the encoder obtains the prediction residual according to the obtained prediction value, and obtains the cost cost1 of the intra-frame rotation template matching method according to quantization, change, and entropy coding; the encoder uses angle prediction, and also obtains a cost cost2;
  • S405 The encoder compares the size of cost1 and cost2. If cost1 is small, it will save the prediction information obtained by rotating template matching, and if cost2 is small, it will save the prediction information obtained by traditional angle prediction.
  • FIG. 12 is a schematic structural diagram 1 of a decoder 1 provided by an embodiment of this application.
  • the decoder 1 may include:
  • the parsing module 10 is configured to parse the code stream to obtain the decoding parameters of the current block, where the decoding parameters include parameters used in the process of decoding the current block;
  • the first obtaining module 11 is configured to obtain a first template of the current block when the decoding parameter indicates that the current block uses the rotation template mode, wherein the first template contains the neighbors of the current block Reconstruction pixel
  • the first determining module 12 is configured to determine a reference area of the current block; in the reference area, determine a matching template of the first template according to a reference template processing parameter, wherein the reference template processing parameter is all The parameters included in the decoding parameters and used to construct the matching template; the matching block of the current block is determined according to the matching template; the predicted value of the current block is determined according to the matching block.
  • the first acquisition module 11 is specifically configured to determine, according to the preset shape of the first template, the pixels that are included in the shape range among the reconstructed pixels adjacent to the current block As the pixels in the first template.
  • the first determining module 12 is specifically configured to determine all or part of the pixels that have been reconstructed in the image where the current block is located before decoding the current block as the reference area.
  • the first determining module 12 is specifically configured to determine all or part of the pixels that have been reconstructed in images other than the image where the current block is located as the reference area.
  • the reference template processing parameter indicates the rotation angle of the template.
  • the first determination module further includes: a first construction sub-module and a first calculation sub-module;
  • the first calculation sub-module is configured to calculate the matching error between the one or more candidate templates and the first template, and use the candidate template with the smallest matching error as the matching template.
  • the one or more candidate matching positions are preset one or more pixel positions in the reference area, wherein the pixel positions are integer pixel positions or fractional pixel positions.
  • the first construction sub-module is specifically configured to use the candidate matching position as a vertex, and after rotating a shape with the same size as the first template around the candidate matching point by the rotation angle, The pixels included in the range of the shape serve as the candidate template.
  • the first determining module 12 further includes a first filtering sub-module
  • the first filtering sub-module is configured to use a preset first filter to perform filtering processing on one or more reconstructed pixels in the reference area according to the rotation angle to obtain pixel values in the candidate template .
  • the first determining module 12 is further configured to use the matching pixels contained in the area with the same size as the current block at the position indicated by the matching template as the pixels in the matching block; wherein, The relative position between the matching template and the matching block is the same as the relative position between the current block and the first template.
  • the first filtering submodule is further configured to use a preset second filter to perform filtering processing on one or more pixels in the reference area to obtain pixel values in the matching block.
  • the matching error criterion includes at least one of the following: the sum of square errors, the mean square error, the sum of absolute errors, the average absolute error, and the structural similarity.
  • the parsing module 10 is also used for parsing the code stream to obtain the prediction residual of the current block
  • the first determining module 12 is further configured to obtain the reconstructed value of the pixel in the current block according to the prediction value and the prediction residual of the current block.
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, or it may also be non-modular.
  • the first storage medium 15 relies on the first processor 14 to perform operations through the first communication bus 16.
  • the method for determining the predicted value corresponding to the above-mentioned decoder is executed.
  • An embodiment of the present application provides a first computer storage medium that stores executable instructions.
  • the executable instructions are executed by one or more processors, the first processor executes one or more implementations described above.
  • FIG. 14 is a first structural diagram of an encoder 2 provided by an embodiment of this application.
  • the encoder 2 may include:
  • the second determining module further includes: a second construction sub-module and a second calculation sub-module;
  • the second filter is a low-pass filter or an interpolation filter.
  • the rotation angle is less than 360 degrees.
  • the encoder 2 further includes: a writing module
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, or it may also be non-modular.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this embodiment is essentially or It is said that the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • FIG. 15 is a second structural diagram of an encoder provided by an embodiment of the application. As shown in FIG. 15, an encoder 2 is provided in an embodiment of the present application.
  • It includes a second processor 23 and a second storage medium 24 storing executable instructions of the second processor 23.
  • the second storage medium 24 relies on the second processor 23 to perform operations through the second communication bus 25.
  • the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Synchronous Link Dynamic Random Access Memory
  • Synchlink DRAM Synchronous Link Dynamic Random Access Memory
  • DRRAM Direct Rambus RAM
  • the processor may be an integrated circuit chip with signal processing capabilities.
  • each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
  • the above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC application specific integrated circuit
  • FPGA ready-made programmable gate array
  • 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 may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the embodiments described herein can be implemented by hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more application specific integrated circuits (ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable Logic Device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, and others for performing the functions described in this application Electronic unit or its combination.
  • ASIC application specific integrated circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing equipment
  • PLD programmable Logic Device
  • PLD Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present application.
  • a terminal which may be a mobile phone, a computer, a server, or a network device, etc.
  • the code stream is parsed to obtain the decoding parameters of the current block, where the decoding parameters include the parameters used in the process of decoding the current block; when the decoding parameters indicate that the current block uses the rotation template mode, the first template of the current block is obtained , Where the first template contains the adjacent reconstructed pixels of the current block; the reference area of the current block is determined; in the reference area, the matching template of the first template is determined according to the reference template processing parameters, where the reference template processing parameter is decoding
  • the parameters included in the parameters are used to construct the matching template; according to the matching template, the matching block of the current block is determined; according to the matching block, the prediction value of the current block is determined; that is, in the embodiment of the present application, the Obtain the rotating template mode in the rotating template mode, and in the rotating template mode, obtain the first template of the current block and determine the reference area of the current block, and in the reference area, determine the matching template of the first template according to the reference template processing parameters, and then according to The matching template determines the matching

Landscapes

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

Abstract

本申请实施例提供了一种预测值的确定方法、解码器以及计算机存储介质,该方法应用于一解码器中,该方法包括:解析码流,获得当前块的解码参数,其中,解码参数包含解码当前块过程中使用的参数;当解码参数指示当前块使用旋转模板模式时,获取当前块的第一模板,其中,第一模板中包含当前块的相邻重建像素;确定当前块的参考区域;在参考区域中,根据参考模板处理参数,确定第一模板的匹配模板,其中,参考模板处理参数是解码参数中包含的、用于构造匹配模板的参数;根据匹配模板,确定当前块的匹配块;根据匹配块,确定当前块的预测值。

Description

预测值的确定方法、解码器以及计算机存储介质 技术领域
本申请实施例涉及视频编解码中帧内预测技术领域,尤其涉及一种预测值的确定方法、解码器以及计算机存储介质。
背景技术
现有的视频编解码标准中,H265/266中,常采用帧内基于块模板匹配技术进行帧内预测,在联合视频专家组(JEVT,Joint Video Exploration Team)-L0041中提出了一种旋转帧内块复制技术用于帧内预测。
其中,采用帧内基于块模板匹配技术进行帧内预测,是通过遍历所有重建块的模板,寻找重建块的模板与当前块的模板中相对应位置间的像素值的差值的平方和中的最小值,将最小值的模板所对应的重建块的像素值确定为当前块的预测值。
另外,相对于帧内基于块模板匹配技术,在帧内预测中,采用旋转帧内块复制技术是对整个块进行任意角度的旋转匹配,寻找重构图像快中顶点的像素值与当前块顶点的像素值之间的差值的平方和中最小值,并将最小值对应的重建块的像素值确定为当前块的预测值,显然,采用帧内基于块模板匹配技术是从已经编解码出重建块的模板中选出的预测值,这样,很难找出最相似的重建块,而采用旋转帧内块复制技术进行帧内预测,虽然增加了对重建块的旋转,但同时也增加了大量的计算量;由此可以看出,现有的视频图像的编解码中帧内预测所确定出的预测值,导致视频图像的编解码效率较低。
发明内容
有鉴于此,本申请实施例提供一种预测值的确定方法、解码器以及计算机存储介质,能够提高解码器的解码效率。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种预测值的确定方法,所述方法应用于一解码器中,所述方法包括:
解析码流,获得当前块的解码参数,其中,所述解码参数包含解码所述当前块过程中使用的参数;
当所述解码参数指示所述当前块使用旋转模板模式时,获取所述当前块的第一模板,其中,所述第一模板中包含所述当前块的相邻重建像素;
确定所述当前块的参考区域;
在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板,其中,所述参考模板处理参数是所述解码参数中包含的、用于构造匹配模板的参数;
根据所述匹配模板,确定所述当前块的匹配块;
根据所述匹配块,确定所述当前块的预测值。
第二方面,本申请实施例提供了一种预测值的确定方法,所述方法应用于一编码器中,所述方法包括:
获取当前块与所述当前块的第一模板之间的数据相关性,其中,所述第一模板中包 含所述当前块的相邻重建像素;
当所述数据相关性大于或者等于预设阈值时,使用旋转模板模式;
在所述旋转模板模式下,确定所述当前块的参考区域;
在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板;
根据所述匹配模板,确定所述当前块的匹配块;
根据所述匹配块,确定所述当前块的预测值。
第三方面,本申请实施例提供了一种解码器,所述解码器包括:
解析模块,用于解析码流,获得当前块的解码参数,其中,所述解码参数包含解码所述当前块过程中使用的参数;
第一获取模块,用于当所述解码参数指示所述当前块使用旋转模板模式时,获取所述当前块的第一模板,其中,所述第一模板中包含所述当前块的相邻重建像素;
第一确定模块,用于确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板,其中,所述参考模板处理参数是所述解码参数中包含的、用于构造匹配模板的参数;根据所述匹配模板,确定所述当前块的匹配块;根据所述匹配块,确定所述当前块的预测值。
第四方面,本申请实施例提供了一种解码器,所述解码器包括:
处理器以及存储有所述处理器可执行指令的存储介质,所述存储介质通过通信总线依赖所述处理器执行操作,当所述指令被所述处理器执行时,具体步骤为:
解析码流,获得当前块的解码参数,其中,所述解码参数包含解码所述当前块过程中使用的参数;当所述解码参数指示所述当前块使用旋转模板模式时,获取所述当前块的第一模板,其中,所述第一模板中包含所述当前块的相邻重建像素;确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板,其中,所述参考模板处理参数是所述解码参数中包含的、用于构造匹配模板的参数;根据所述匹配模板,确定所述当前块的匹配块;根据所述匹配块,确定所述当前块的预测值。
第五方面,本申请实施例提供了一种第一计算机存储介质,存储有可执行指令,当所述可执行指令被一个或多个处理器执行的时候,所述处理器执行上述任一项所述的预测值的确定方法。
第六方面,本申请实施例提供了一种编码器,所述编码器包括:
第二获取模块,用于获取当前块与所述当前块的第一模板之间的数据相关性,其中,所述第一模板中包含所述当前块的相邻重建像素;
第二确定模块,用于当所述数据相关性大于或者等于预设阈值时,使用旋转模板模式;在所述旋转模板模式下,确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板;根据所述匹配模板,确定所述当前块的匹配块;根据所述匹配块,确定所述当前块的预测值。
第七方面,本申请实施例提供了一种编码器,所述编码器包括:
第二处理器以及存储有所述第二处理器可执行指令的存储介质,所述存储介质通过通信总线依赖所述第二处理器执行操作,当所述指令被所述第二处理器执行时,具体步骤为:
获取当前块与所述当前块的第一模板之间的数据相关性,其中,所述第一模板中包含所述当前块的相邻重建像素;当所述数据相关性大于或者等于预设阈值时,使用旋转模板模式;在所述旋转模板模式下,确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板;根据所述匹配模板,确定所述当前块的匹配块;
根据所述匹配块,确定所述当前块的预测值。
第八方面,本申请实施例提供了一种第二计算机存储介质,存储有可执行指令,当所述可执行指令被一个或多个处理器执行的时候,所述处理器执行上述任一项所述的预测值的确定方法。
本申请实施例提供了一种预测值的确定方法、解码器以及计算机存储介质,该方法应用于一解码器中,该方法包括:解析码流,获得当前块的解码参数,其中,解码参数包含解码当前块过程中使用的参数;当解码参数指示当前块使用旋转模板模式时,获取当前块的第一模板,其中,第一模板中包含当前块的相邻重建像素;确定当前块的参考区域;在参考区域中,根据参考模板处理参数,确定第一模板的匹配模板,其中,参考模板处理参数是解码参数中包含的、用于构造匹配模板的参数;根据匹配模板,确定当前块的匹配块;根据匹配块,确定当前块的预测值;也就是说,在本申请实施例中,通过从码流中获取旋转模板模式,并在旋转模板模式下,获取当前块的第一模板并确定当前块的参考区域,并在参考区域中,根据参考模板处理参数,确定第一模板的匹配模板,进而根据匹配模板确定与当前块相匹配的匹配块,进而确定出当前块的预测值,如此,通过对图像块的模板的处理能够获得更多的模板,用更多的模板来与当前块的模板进行匹配,从而可以寻找到与当前块最匹配的匹配块,有利于更加精准的确定出与当前块最匹配的匹配块,进而确定出当前块的预测值,采用旋转模板的计算方式,可以减少编解码中的计算量,从而提高了编解码效率。
附图说明
图1为帧内基于块模板匹配的图像帧的排布示意图;
图2为旋转帧内块复制中图像帧的排布示意图;
图3为本申请实施例提供的一种可选的预测值的确定方法的流程示意图;
图4为本申请实施例提供的一种可选的旋转帧内模板的排布示意图;
图5为本申请实施例提供的另一种可选的预测值的确定方法的流程示意图;
图6为本申请实施例提供的另一种可选的旋转帧内模板的排布示意图;
图7为本申请实施例提供的一种可选的旋转帧内模板的像素点的结构示意图;
图8为本申请实施例提供的图7中旋转帧内模板的部分像素点的结构示意图;
图9为本申请实施例提供的再一种可选的预测值的确定方法的流程示意图;
图10为本申请实施例提供的一种可选的当前块和当前块的第一模板之间的结构示意图;
图11为本申请实施例提供的一种可选的预测值的确定方法的实例的流程示意图;
图12为本申请实施例提供的一种解码器的结构示意图一;
图13为本申请实施例提供的一种解码器的结构示意图二;
图14为本申请实施例提供的一种编码器的结构示意图一;
图15为本申请实施例提供的一种编码器的结构示意图二。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
在帧内预测中,采用帧内基于块模板匹配技术,图1为帧内基于块模板匹配的图像帧的排布示意图,如图1所示,针对当前块B来说,T c为B的模板,在编码B时,遍 历重建块中每个重建块的模板,计算每个重建块的模板与B的模板中相对应位置上像素值之差的平方和,将差的平方和的最小值的模板T r称之为与B相匹配的图像块的模板,T r对应的重建块P的像素值确定为B的预测值。
由于上述方法考虑到了重建块的模板,而重建块的数目相对较少,所以,很难寻找到与当前块相匹配的图像块,为了克服上述缺点,采用旋转帧内块复制技术,图2为旋转帧内块复制中图像帧的排布示意图,如图3所示,图2-(a)为重建块和当前块在旋转前的排布示意图,图2-(b)为重建块和当前块在旋转后的排布示意图,在图2-(a)和图2-(b)中,B为当前块,B的顶点坐标为х 0,假设P为最终确定出的与当前块相匹配的图像块,且P的顶点坐标为х,将B的像素矩阵即为P(х 0),编码器利用已经编码过的像素矩阵Ω(x 0)(相当于重建块的像素矩阵),去预测P(х 0),帧内块复制技术就是在Ω(x 0)中寻找顶点为х的重建块,使得P(х)和P(х 0)的各个像素点的像素值之差的平方和最小,从而可以找到P。
其中,旋转帧内复制技术允许图像块旋转一个任意的角度θ,用P θ(х)代表顶点为х的图像块旋转θ后得到的图像块的像素矩阵,寻找Ω(x 0)中的顶点为х的图像块,使得P θ(х)和P(х 0)的各个像素点的像素值之差的平方和最小,并将P θ(х)确定为B的预测值。
然而,上述旋转帧内复制技术是针对整个图像块的计算,计算复杂度较大,编解码效率低下,为了提高视频编解码的效率,本申请实施例提供一种预测值的确定的方法。
本申请实施例提供了一种预测值的确定方法,该方法应用于一解码器中,图3为本申请实施例提供的一种可选的预测值的确定方法的流程示意图,参考图3所示,该预测值的确定方法可以包括:
S101、解析码流,获得当前块的解码参数,其中,解码参数包含解码当前块过程中使用的参数。
在帧内预测过程中,编码器将包含解码当前块过程中使用的解码参数写入码流中,并将码流传输至解码器,解码器接收到码流后,从码流中解析出当前块的解码参数。
S102、当解码参数指示当前块使用旋转模板模式时,获取当前块的第一模板,其中,第一模板中包含当前块的相邻重建像素。
在本实施例中,解码参数可以为编码阶段所使用的预测模式标识,如,当flag(预测模式标识)=1时,表征编码阶段所使用的是旋转模板模式,当解码器确定出使用旋转模板模式时,解码器根据预设的第一模板的形状,将与当前块相邻的重建像素中,包含在形状范围内的像素作为第一模板中的像素。
示例性的,将与当前块上相邻和左相邻的重建像素作为第一模板的像素。
S103、确定当前块的参考区域。
为了确定当前块的参考区域,在一种可能的实施例中,解码器将包含在解码当前块之前,当前块所在图像中已经重建的全部或部分像素,确定为参考区域;在另一种可能的实施例中,解码器将当前块所在图像之外其他图像中已经重建的全部或部分像素,确定为参考区域。
其中,为了使得到的候选模板仍然处于参考区域中,在一种可选的实施例中,解码器获取旋转角度,并将候选模板按照旋转角度绕着候选模板的顶点进行旋转,将旋转后的重建块中超出参考区域的重建块进行截取,将截取后的重建块,确定为可旋转的重建块,得到可旋转的重建块的像素矩阵,再用可旋转的重建块的像素矩阵更新重建块的像素矩阵。
图4为本申请实施例提供的一种可选的旋转帧内模板的排布示意图,如图4所示,B为当前块,b为B的模板,B的顶点坐标х 0对应的图像块的像素矩阵为P(х 0),例如, 针对图5中的重建块P来说,经过旋转,旋转后的重建块P和P的模板p刚刚未超出参考区域,P的上一行和左一行若经过旋转均会超出参考区域,所以,将重建块从上边界向下截取高度为a重建块区域,从左边界向右截取高度为a重建块区域,将截取后的剩下区域确定为可旋转的重建块,并用可旋转的重建块更新重建块。
S104、在参考区域中,根据参考模板处理参数,确定第一模板的匹配模板,其中,参考模板处理参数是解码参数中包含的、用于构造匹配模板的参数。
为了寻找与当前块最为匹配的匹配块,这里,采用参考模板处理参数对第一模板对应的候选模板的像素矩阵进行处理,可以得到处理后的匹配模板,当参考模板处理参数包括多个时,可以得到多个匹配模板,这样,便可以得到多个匹配模板去与当前块的第一模板进行匹配。
其中,参考模板处理参数可以指示模板的旋转角度,例如顺时针旋转角度或者逆时针旋转角度,具体的根据实际情况进行选择,本实施例不做具体的限定。
另外,该参考模板处理参数还可以为移动参数,其中,该移动参数可以包括移动距离和移动方向,解码器根据移动距离和移动方向移动候选模板,得到匹配模板;例如,将候选模板向上平移或者向下平移等等,具体的根据实际情况进行选择,本实施例不做具体的限定。
在本实施例中,当参考模板处理参数为旋转角度时,在一可选的实施例中,图5为为本申请实施例提供的另一种可选的预测值的确定方法的流程示意图,如图5所示,解码器在参考区域中,根据参考模板处理参数,确定第一模板的匹配模板,包括:
S201、解码器对于参考区域中的一个或多个候选匹配位置,根据旋转角度,构造与第一模板形状相同的一个或多个候选模板。
在本实施例中,参考模板处理参数中包含初始角度值和间隔步长值;解码器将以初始角度为初始值与以间隔步长表示的间隔角度的和值作为旋转角度。
另外,旋转角度小于360度。
举例来说,当初始角度值为30度,间隔步长值为30度时,旋转角度可以包括:30度,60度,90度,120度,150度,180度,210度,240度,270度,300度和330度。
具体的,解码器以候选匹配位置为顶点,将与第一模板相同尺寸的形状绕候选匹配点旋转过旋转角度后,包含在该形状的范围内的像素作为候选模板。
解码器根据旋转角度,使用预设的第一滤波器对参考区域中的一个或多个重建像素进行滤波处理,得到候选模板中的像素值,其中,第一滤波器为低通滤波器或者插值滤波器,具体的根据实际情况进行选择,本实施例不做具体的限定。
其中,在获取到匹配模板之后,解码器根据候选模板中各个像素点的像素值、旋转角度和两个相邻像素点之间的距离,采用插值法计算得到候选模板。
举例来说,图6为本申请实施例提供的另一种可选的旋转帧内模板的排布示意图,如图6所示,B为当前块,B的顶点坐标为х 0,若P为与当前块相匹配的图像块,P的顶点坐标为х,将B的像素矩阵记为P(х 0),解码器利用已经编码过的像素矩阵Ω(x 0)去预测P(х 0),在预测之前,先将P的模板p按照预设的旋转角度θ绕着P的顶点进行旋转,得到如图7所示的P的旋转后的模板p,为了在Ω(x 0)中寻找到与顶点为х的图像块的模板相匹配的候选模板,即图7中为p,需使得p(х)和b(х 0)的各个像素点的像素值之差的平方和最小,从而可以找到P。
其中,在计算p(х)和b(х 0)的各个像素点的像素值之差的平方和之前,需要先确定p(х),为了确定p(х),图7为本申请实施例提供的一种可选的旋转帧内模板的像素点的结构示意图,如图7所示,虚线为没有旋转前的模板p,实线为旋转后的模板p,在没有旋转前的模板p上获取点a的像素值f(a),点b的像素值f(b),点c的像 素值f(c)和点d的像素值f(d),且获取相邻两个像素值之间的距离x,采用双线性插值法计算点p(旋转后的点b)的像素值,图8为本申请实施例提供的图7中旋转帧内模板的部分像素点的结构示意图,如图8所示,计算点p的像素值的公式如下:
则点p 1(图8所示)的像素值计算公式如下:
Figure PCTCN2019108598-appb-000001
则点p 2(图8所示)的像素值计算公式如下:
Figure PCTCN2019108598-appb-000002
最后点p的像素值计算公式如下:
Figure PCTCN2019108598-appb-000003
以此类推,最后可以得到旋转角度为θ时的候选模板的像素矩阵。
S202、解码器计算一个或多个候选模板与第一模板之间的匹配误差,将匹配误差最小的候选模板作为匹配模板,其中,一个或多个候选匹配位置是在参考区域中的预先设定的一个或多个像素位置,像素位置是整数像素位置或分数像素位置。
具体的,解码器根据匹配误差准则,计算一个或多个候选模板与第一模板之间的匹配误差,其中,匹配误差准则包括以下至少之一:平方误差和、均方误差、绝对误差和、平均绝对误差、结构相似性,具体的根据实际情况进行选择,本实施例不做具体的限定。
以处理参数为顺时针旋转角度为例来说,在实际应用中,解码器确定与第一模板对应的候选模板,并在参考区域中,根据预设的旋转角度对候选模板进行旋转,这里,与图像块进行旋转相比,对模板进行旋转,由于模板中的像素点相比于图像块的像素点减少,所以,对模板进行旋转,可以减少旋转后模板中各个像素点的像素值的计算量。
S105、根据匹配模板,确定当前块的匹配块。
在本实施例中,解码器根据匹配模板,确定当前块的匹配块的过程具体为:解码器将位于匹配模板指示位置的、与当前块大小相同区域内包含的匹配像素作为匹配块中的像素;其中,匹配模板和匹配块之间的相对位置与当前块和第一模板之间的相对位置相同。
在本实施例中,解码器使用预设的第二滤波器对参考区域内的一个或多个像素进行滤波处理,得到匹配块中的像素值,其中,第二滤波器为低通滤波器或者插值滤波器,具体的根据实际情况进行选择,本实施例不做具体的限定。
S106、根据匹配块,确定当前块的预测值。
本实施例中,解码器将匹配块作为当前块的预测值;或者,解码器使用线性模型对匹配块中的像素取值进行加权处理,得到当前块的预测值,其中,线性模型参数是以下之一:预设参数、按照预设规则推导得到的参数、解码参数中包含的线性模型参数,具体的根据实际情况进行选择,本实施例不做具体的限定。
进一步地,在解码器根据匹配块,确定出当前块的预测值之后,解码器解析码流,获得当前块的预测残差;之后,解码器根据当前块的预测值和预测残差,得到当前块中像素的重建值。
这里,需要说明的是,本申请所提供的像素矩阵可以为色度值的像素矩阵,也可以为亮度值的像素矩阵,本申请实施例对此不作具体限定。
可以理解的是,通过从码流中获取旋转模板模式,并在旋转模板模式下,获取当前块的第一模板并确定当前块的参考区域,并在参考区域中,根据参考模板处理参数,确定第一模板的匹配模板,进而根据匹配模板确定与当前块相匹配的匹配块,进而确定出 当前块的预测值,如此,通过对图像块的模板的处理能够获得更多的模板,用更多的模板来与当前块的模板进行匹配,从而可以寻找到与当前块最匹配的匹配块,有利于更加精准的确定出与当前块最匹配的匹配块,进而确定出当前块的预测值,采用旋转模板的计算方式,可以减少编解码中的计算量,从而提高了编解码效率。
本申请实施例还提供了一种预测值的确定方法,该方法应用于一编码器中,图9为本申请实施例提供的一种可选的预测值的确定方法的流程示意图,参考图9所示,该预测值的确定方法可以包括:
S301、编码器获取当前块与当前块的第一模板之间的数据相关性,其中,第一模板中包含当前块的相邻重建像素。
编码器获取当前块的相邻重建像素,并将当前块的相邻重建像素确定当前块的第一模板,之后,编码器获取当前块与当前块的第一模板之间的数据相关性。
示例性的,如图10所示,为当前块与当前块的第一模板之间的结构示意图,编码器获取当前块与当前块的第一模板之间的数据相关性。
S302、当数据相关性大于或者等于预设阈值时,编码器使用旋转模板模式。
编码器内部预先设置一个预设阈值,在获取到当前块与当前块的第一模板之间的数据相关性之后,编码器将数据相关性和预设阈值进行比较,当编码器判断出数据相关性大于或者等于预设阈值时,编码器使用旋转模板模式;进一步地,当编码器判断出数据相关性小于预设阈值时,编码器使用传统的角度预测模式。
S303、在旋转模板模式下,编码器确定当前块的参考区域。
需要说明的是,编码器执行S303与解码器执行S103的过程一致,在此不再赘述。
S304、编码器在参考区域中,根据参考模板处理参数,确定第一模板的匹配模板。
需要说明的是,编码器执行S304与解码器执行S104的过程一致,在此不再赘述。
S305、编码器根据匹配模板,确定当前块的匹配块。
需要说明的是,编码器执行S305与解码器执行S105的过程一致,在此不再赘述。
S306、编码器根据匹配块,确定当前块的预测值。
需要说明的是,编码器执行S306与解码器执行S106的过程一致,在此不再赘述。
进一步地,在编码器确定出当前块的预测值之后,编码器根据当前块的预测值与获取到的与原始图像相对应的像素值确定出当前块的预测残差,并将当前块的预测残差和指示使用旋转模板模式的解码参数写入码流中,以使解码器使用与本申请实施例提供的编码器相同的预测值的确定方法,确定出当前块的预测值。
可以理解的是,编码器确定当前块和当前块的第一模板之间的数据相关性,并当数据相关性大于或者等于预设阈值时,才使用旋转模板模式,由于当当前块和当前块的第一模板之间的数据相关性较低时,匹配到的匹配模板所对应的匹配块往往与当前块的相似性比较低,此时不适用于使用旋转模板模式,只有当当前块和当前块的第一模板之间的数据相关性较高时,使用旋转模板模式,能够减少搜索时间,提高搜索效率。
下面举实例来对上述一个或多个实施例所述的预测值的确定方法进行说明。
图11为本申请实施例提供的一种可选的预测值的确定方法的实例的流程示意图,如图11所示,该预测值的确定方法可以包括:
S401:编码器采用帧内旋转模板匹配的方法,对重建块的模板进行旋转;编码器还采用帧内角度预测的方法;
S402:编码器对重建块的模板进行旋转之后,编码器会遍历搜索范围内所有与当前块大小一样的重建块的模板(由重建块获得),对每一个旋转后的模板,计算其与当前块的模板的差的平方和,同时按照以30度为初始值,步长为30度,且小于360度的角度值为旋转角度进行旋转,得到旋转后的模板,并计算每一个旋转角度所对应的与当前 块的模板的差的平方和;
S403:编码器选取出将差的平方和最小值对应的模板,把该模板所属的重建块的像素值,作为当前块的预测值;
S404:编码器根据得到的预测值,得到预测残差,按照量化,变化,熵编码得到采用帧内旋转模板匹配的方法的代价cost1;编码器采用角度预测,也会得到一个代价cost2;
S405:编码器比较cost1和cost2的大小,若cost1小,则会保存旋转模板匹配所得到的预测信息,若cost2小,则会保存传统角度预测得到的预测信息。
基于前述实施例相同的发明构思,参见图12,图12为本申请实施例提供的一种解码器1的结构示意图一,该解码器1可以包括:
解析模块10,用于解析码流,获得当前块的解码参数,其中,所述解码参数包含解码所述当前块过程中使用的参数;
第一获取模块11,用于当所述解码参数指示所述当前块使用旋转模板模式时,获取所述当前块的第一模板,其中,所述第一模板中包含所述当前块的相邻重建像素;
第一确定模块12,用于确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板,其中,所述参考模板处理参数是所述解码参数中包含的、用于构造匹配模板的参数;根据所述匹配模板,确定所述当前块的匹配块;根据所述匹配块,确定所述当前块的预测值。
在上述方案中,所述第一获取模块11,具体用于根据预设的所述第一模板的形状,将与所述当前块相邻的重建像素中,包含在所述形状范围内的像素作为所述第一模板中的像素。
在上述方案中,所述第一确定模块12,具体用于将包含在解码所述当前块之前,所述当前块所在图像中已经重建的全部或部分像素,确定为所述参考区域。
在上述方案中,所述第一确定模块12,具体用于将所述当前块所在图像之外其他图像中已经重建的全部或部分像素,确定为所述参考区域。
在上述方案中,所述参考模板处理参数指示模板的旋转角度。
在上述方案中,所述第一确定模块还包括:第一构造子模块和第一计算子模块;
所述第一构造子模块,用于对于所述参考区域中的一个或多个候选匹配位置,根据所述旋转角度,构造与所述第一模板形状相同的一个或多个候选模板;
所述第一计算子模块,用于计算所述一个或多个候选模板与所述第一模板之间的匹配误差,将匹配误差最小的候选模板作为所述匹配模板。
在上述方案中,所述一个或多个候选匹配位置是在所述参考区域中的预先设定的一个或多个像素位置,其中,所述像素位置是整数像素位置或分数像素位置。
在上述方案中,所述第一构造子模块,具体用于以所述候选匹配位置为顶点,将与所述第一模板相同尺寸的形状绕所述候选匹配点旋转过所述旋转角度后,包含在该形状的范围内的像素作为所述候选模板。
在上述方案中,所述第一确定模块12还包括第一滤波子模块;
所述第一滤波子模块,用于根据所述旋转角度,使用预设的第一滤波器对所述参考区域中的一个或多个重建像素进行滤波处理,得到所述候选模板中的像素值。
在上述方案中,所述第一确定模块12,还用于将位于所述匹配模板指示位置的、与所述当前块大小相同区域内包含的匹配像素作为所述匹配块中的像素;其中,所述匹配模板和所述匹配块之间的相对位置与所述当前块和所述第一模板之间的相对位置相同。
在上述方案中,所述第一滤波子模块,还用于使用预设的第二滤波器对所述参考区域内的一个或多个像素进行滤波处理,得到所述匹配块中的像素值。
在上述方案中,所述第一滤波器是低通滤波器或插值滤波器。
在上述方案中,所述第二滤波器是低通滤波器或插值滤波器。
在上述方案中,所述参考模板处理参数中包含初始角度值和间隔步长值;将以所述初始角度为初始值与以所述间隔步长表示的间隔角度的和值作为所述旋转角度。
在上述方案中,所述旋转角度小于360度。
在上述方案中,所述第一计算子模块,还用于根据匹配误差准则,计算所述一个或多个候选模板与所述第一模板之间的匹配误差。
在上述方案中,所述匹配误差准则包括以下至少之一:平方误差和、均方误差、绝对误差和、平均绝对误差、结构相似性。
在上述方案中,所述第一确定模块12,还用于将所述匹配块作为所述当前块的预测值;或者,使用线性模型对所述匹配块中的像素取值进行加权处理,得到所述当前块的预测值,其中,所述线性模型参数是以下之一:预设参数、按照预设规则推导得到的参数、所述解码参数中包含的线性模型参数。
在上述方案中,所述解析模块10,还用于解析码流,获得所述当前块的预测残差;
所述第一确定模块12,还用于根据所述当前块的预测值和预测残差,得到所述当前块中像素的重建值。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。
另外,在本实施例中的各组成单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
图13为本申请实施例提供的一种解码器的结构示意图二,如图13所示,本申请实施例提供了一种解码器1,
包括第一处理器14以及存储有第一处理器14可执行指令的第一存储介质15,第一存储介质15通过第一通信总线16依赖第一处理器14执行操作,当指令被第一处理器14执行时,执行上述解码器对应的预测值的确定方法。
需要说明的是,实际应用时,终端中的各个组件通过第一通信总线16耦合在一起。可理解,第一通信总线16用于实现这些组件之间的连接通信。第一通信总线16除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图13中将各种总线都标为通信总线16。
本申请实施例提供了一种第一计算机存储介质,存储有可执行指令,当所述可执行指令被一个或多个处理器执行的时候,所述第一处理器执行上述一个或多个实施例所述编码器对应的预测值的确定方法。
基于前述实施例相同的发明构思,参见图14,图14为本申请实施例提供的一种编码器2的结构示意图一,该编码器2可以包括:
第二获取模块20,用于获取当前块与所述当前块的第一模板之间的数据相关性,其 中,所述第一模板中包含所述当前块的相邻重建像素;
第二确定模块21,用于当所述数据相关性大于或者等于预设阈值时,使用旋转模板模式;在所述旋转模板模式下,确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板;根据所述匹配模板,确定所述当前块的匹配块;根据所述匹配块,确定所述当前块的预测值。
在上述方案中,所述第二获取模块20,具体用于根据预设的所述第一模板的形状,将与所述当前块相邻的重建像素中,包含在所述形状范围内的像素作为所述第一模板中的像素。
在上述方案中,所述第二确定模块21,具体用于将包含在解码所述当前块之前,所述当前块所在图像中已经重建的全部或部分像素,确定为所述参考区域。
在上述方案中,所述第二确定模块21,具体用于将所述当前块所在图像之外其他图像中已经重建的全部或部分像素,确定为所述参考区域。
在上述方案中,所述参考模板处理参数指示模板的旋转角度。
在上述方案中,所述第二确定模块还包括:第二构造子模块和第二计算子模块;
所述第二构造子模块,用于对于所述参考区域中的一个或多个候选匹配位置,根据所述旋转角度,构造与所述第一模板形状相同的一个或多个候选模板;
所述第二计算子模块,用于计算所述一个或多个候选模板与所述第一模板之间的匹配误差,将匹配误差最小的候选模板作为所述匹配模板。
在上述方案中,所述一个或多个候选匹配位置是在所述参考区域中的预先设定的一个或多个像素位置,其中,所述像素位置是整数像素位置或分数像素位置。
在上述方案中,所述第二构造子模块,具体用于以所述候选匹配位置为顶点,将与所述第一模板相同尺寸的形状绕所述候选匹配点旋转过所述旋转角度后,包含在该形状的范围内的像素作为所述候选模板。
在上述方案中,所述第二确定模块21还包括第二滤波子模块;
所述第二滤波子模块,用于根据所述旋转角度,使用预设的第一滤波器对所述参考区域中的一个或多个重建像素进行滤波处理,得到所述候选模板中的像素值。
在上述方案中,所述第二确定模块21,还用于将位于所述匹配模板指示位置的、与所述当前块大小相同区域内包含的匹配像素作为所述匹配块中的像素;其中,所述匹配模板和所述匹配块之间的相对位置与所述当前块和所述第一模板之间的相对位置相同。
在上述方案中,所述第二滤波子模块,还用于使用预设的第二滤波器对所述参考区域内的一个或多个像素进行滤波处理,得到所述匹配块中的像素值。
在上述方案中,所述第一滤波器是低通滤波器或插值滤波器。
在上述方案中,所述第二滤波器是低通滤波器或插值滤波器。
在上述方案中,所述参考模板处理参数中包含初始角度值和间隔步长值;将以所述初始角度为初始值与以所述间隔步长表示的间隔角度的和值作为所述旋转角度。
在上述方案中,所述旋转角度小于360度。
在上述方案中,所述第二计算子模块,还用于根据匹配误差准则,计算所述一个或多个候选模板与所述第一模板之间的匹配误差。
在上述方案中,所述匹配误差准则包括以下至少之一:平方误差和、均方误差、绝对误差和、平均绝对误差、结构相似性。
在上述方案中,所述第二确定模块21,还用于将所述匹配块作为所述当前块的预测值;或者,使用线性模型对所述匹配块中的像素取值进行加权处理,得到所述当前块的预测值,其中,所述线性模型参数是以下之一:预设参数、按照预设规则推导得到的参数、所述解码参数中包含的线性模型参数。
在上述方案中,所述编码器2还包括:写入模块;
所述写入模块,用于将所述当前块的预测残差和指示使用所述旋转模板模式的解码参数写入码流中,所述预测残差根据所述当前块的预测值与获取到的与原始图像相对应的像素值确定的。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。
另外,在本实施例中的各组成单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
图15为本申请实施例提供的一种编码器的结构示意图二,如图15所示,本申请实施例提供了一种编码器2,
包括第二处理器23以及存储有第二处理器23可执行指令的第二存储介质24,第二存储介质24通过第二通信总线25依赖第二处理器23执行操作,当指令被第二处理器23执行时,执行上述编码器对应的预测值的确定方法。
需要说明的是,实际应用时,终端中的各个组件通过第二通信总线25耦合在一起。可理解,第二通信总线25用于实现这些组件之间的连接通信。第二通信总线25除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图15中将各种总线都标为第二通信总线25。
本申请实施例提供了一种第二计算机存储介质,存储有可执行指令,当所述可执行指令被一个或多个处理器执行的时候,所述处理器执行上述一个或多个实施例所述编码器对应的预测值的确定方法。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
而处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的 处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。
对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机、计算机、服务器、或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本申请的保护之内。
工业实用性
本申请实施例中,解析码流,获得当前块的解码参数,其中,解码参数包含解码当前块过程中使用的参数;当解码参数指示当前块使用旋转模板模式时,获取当前块的第一模板,其中,第一模板中包含当前块的相邻重建像素;确定当前块的参考区域;在参考区域中,根据参考模板处理参数,确定第一模板的匹配模板,其中,参考模板处理参数是解码参数中包含的、用于构造匹配模板的参数;根据匹配模板,确定当前块的匹配 块;根据匹配块,确定当前块的预测值;也就是说,在本申请实施例中,通过从码流中获取旋转模板模式,并在旋转模板模式下,获取当前块的第一模板并确定当前块的参考区域,并在参考区域中,根据参考模板处理参数,确定第一模板的匹配模板,进而根据匹配模板确定与当前块相匹配的匹配块,进而确定出当前块的预测值,如此,通过对图像块的模板的处理能够获得更多的模板,用更多的模板来与当前块的模板进行匹配,从而可以寻找到与当前块最匹配的匹配块,有利于更加精准的确定出与当前块最匹配的匹配块,进而确定出当前块的预测值,采用旋转模板的计算方式,可以减少编解码中的计算量,从而提高了编解码效率。

Claims (44)

  1. 一种预测值的确定方法,其中,所述方法应用于解码器中,所述方法包括:
    解析码流,获得当前块的解码参数,其中,所述解码参数包含解码所述当前块过程中使用的参数;
    当所述解码参数指示所述当前块使用旋转模板模式时,获取所述当前块的第一模板,其中,所述第一模板中包含所述当前块的相邻重建像素;
    确定所述当前块的参考区域;
    在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板,其中,所述参考模板处理参数是所述解码参数中包含的、用于构造匹配模板的参数;
    根据所述匹配模板,确定所述当前块的匹配块;
    根据所述匹配块,确定所述当前块的预测值。
  2. 根据权利要求1所述的方法,所述获取所述当前块的第一模板,包括:
    根据预设的所述第一模板的形状,将与所述当前块相邻的重建像素中,包含在所述形状范围内的像素作为所述第一模板中的像素。
  3. 根据权利要求1所述的方法,所述确定所述当前块的参考区域,包括:
    将包含在解码所述当前块之前,所述当前块所在图像中已经重建的全部或部分像素,确定为所述参考区域。
  4. 根据权利要求1所述的方法,所述确定所述当前块的参考区域,包括:
    将所述当前块所在图像之外其他图像中已经重建的全部或部分像素,确定为所述参考区域。
  5. 根据权利要求1所述的方法,所述参考模板处理参数指示模板的旋转角度。
  6. 根据权利要求5所述的方法,所述在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板,包括:
    对于所述参考区域中的一个或多个候选匹配位置,根据所述旋转角度,构造与所述第一模板形状相同的一个或多个候选模板;
    计算所述一个或多个候选模板与所述第一模板之间的匹配误差,将匹配误差最小的候选模板作为所述匹配模板。
  7. 根据权利要求6所述的方法,所述一个或多个候选匹配位置是在所述参考区域中的预先设定的一个或多个像素位置,其中,所述像素位置是整数像素位置或分数像素位置。
  8. 根据权利要求6所述的方法,所述根据所述旋转角度,构造与所述第一模板形状相同的一个或多个候选模板,包括:
    以所述候选匹配位置为顶点,将与所述第一模板相同尺寸的形状绕所述候选匹配点旋转过所述旋转角度后,包含在该形状的范围内的像素作为所述候选模板。
  9. 根据权利要求8所述的方法,所述方法还包括:
    根据所述旋转角度,使用预设的第一滤波器对所述参考区域中的一个或多个重建像素进行滤波处理,得到所述候选模板中的像素值。
  10. 根据权利要求1所述的方法,所述根据所述匹配模板,确定所述当前块的匹配块,包括:
    将位于所述匹配模板指示位置的、与所述当前块大小相同区域内包含的匹配像素作为所述匹配块中的像素;其中,所述匹配模板和所述匹配块之间的相对位置与所述当前块和所述第一模板之间的相对位置相同。
  11. 根据权利要求10所述的方法,所述方法还包括:
    使用预设的第二滤波器对所述参考区域内的一个或多个像素进行滤波处理,得到所述匹配块中的像素值。
  12. 根据权利要求9所述的方法,所述方法还包括:
    所述第一滤波器是低通滤波器或插值滤波器。
  13. 根据权利要求11所述的方法,所述方法还包括:
    所述第二滤波器是低通滤波器或插值滤波器。
  14. 根据权利要求5或6所述的方法,包括:
    所述参考模板处理参数中包含初始角度值和间隔步长值;
    将以所述初始角度为初始值与以所述间隔步长表示的间隔角度的和值作为所述旋转角度。
  15. 根据权利要求5或6所述的方法,包括:
    所述旋转角度小于360度。
  16. 根据权利要求6所述的方法,所述计算所述一个或多个候选模板与所述第一模板之间的匹配误差,包括:
    根据匹配误差准则,计算所述一个或多个候选模板与所述第一模板之间的匹配误差。
  17. 根据权利要求16所述的方法,包括:
    所述匹配误差准则包括以下至少之一:平方误差和、均方误差、绝对误差和、平均绝对误差、结构相似性。
  18. 根据权利要求1所述的方法,所述根据所述匹配块,确定所述当前块的预测值,包括:
    将所述匹配块作为所述当前块的预测值;或者,
    使用线性模型对所述匹配块中的像素取值进行加权处理,得到所述当前块的预测值,其中,所述线性模型参数是以下之一:预设参数、按照预设规则推导得到的参数、所述解码参数中包含的线性模型参数。
  19. 根据权利要求1所述的方法,所述根据所述匹配块,确定所述当前块的预测值之后,还包括:
    解析码流,获得所述当前块的预测残差;
    根据所述当前块的预测值和预测残差,得到所述当前块中像素的重建值。
  20. 一种预测值的确定方法,其中,所述方法应用于编码器中,所述方法包括:
    获取当前块与所述当前块的第一模板之间的数据相关性,其中,所述第一模板中包含所述当前块的相邻重建像素;
    当所述数据相关性大于或者等于预设阈值时,使用旋转模板模式;
    在所述旋转模板模式下,确定所述当前块的参考区域;
    在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板;
    根据所述匹配模板,确定所述当前块的匹配块;
    根据所述匹配块,确定所述当前块的预测值。
  21. 根据权利要求20所述的方法,所述获取所述当前块的第一模板,包括:
    根据预设的所述第一模板的形状,将与所述当前块相邻的重建像素中,包含在所述形状范围内的像素作为所述第一模板中的像素。
  22. 根据权利要求20所述的方法,所述确定所述当前块的参考区域,包括:
    将所述当前块所在图像中已经重建的全部或部分像素,确定为所述参考区域。
  23. 根据权利要求20所述的方法,所述确定所述当前块的参考区域,包括:
    将所述当前块所在图像之外其他图像中已经重建的全部或部分像素,确定为所述参考区域。
  24. 根据权利要求20所述的方法,所述参考模板处理参数指示模板的旋转角度。
  25. 根据权利要求24所述的方法,所述在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板,包括:
    对于所述参考区域中的一个或多个候选匹配位置,根据所述旋转角度,构造与所述第一模板形状相同的一个或多个候选模板;
    计算所述一个或多个候选模板与所述第一模板之间的匹配误差,将匹配误差最小的候选模板作为所述匹配模板。
  26. 根据权利要求25所述的方法,所述一个或多个候选匹配位置是在所述参考区域中的预先设定的一个或多个像素位置,其中,所述像素位置是整数像素位置或分数像素位置。
  27. 根据权利要求26所述的方法,所述根据所述旋转角度,构造与所述第一模板形状相同的一个或多个候选模板,包括:
    以所述候选匹配位置为顶点,将与所述第一模板相同尺寸的形状绕所述候选匹配点旋转过所述旋转角度后,包含在该形状的范围内的像素作为所述候选模板。
  28. 根据权利要求27所述的方法,所述方法还包括:
    根据所述旋转角度,使用预设的第一滤波器对所述参考区域中的一个或多个重建像素进行滤波处理,得到所述候选模板中的像素值。
  29. 根据权利要求20所述的方法,所述根据所述匹配模板,确定所述当前块的匹配块,包括:
    将位于所述匹配模板指示位置的、与所述当前块大小相同区域内包含的匹配像素作为所述匹配块中的像素;其中,所述匹配模板和所述匹配块之间的相对位置与所述当前块和所述第一模板之间的相对位置相同。
  30. 根据权利要求29所述的方法,所述方法还包括:
    使用预设的第二滤波器对所述参考区域内的一个或多个像素进行滤波处理,得到所述匹配块中的像素值。
  31. 根据权利要求28所述的方法,所述方法还包括:
    所述第一滤波器是低通滤波器或插值滤波器。
  32. 根据权利要求30所述的方法,所述方法还包括:
    所述第二滤波器是低通滤波器或插值滤波器。
  33. 根据权利要求24或25所述的方法,包括:
    所述参考模板处理参数中包含初始角度值和间隔步长值;
    将以所述初始角度为初始值与以所述间隔步长表示的间隔角度的和值作为所述旋转角度。
  34. 根据权利要求24或25所述的方法,包括:
    所述旋转角度小于360度。
  35. 根据权利要求25所述的方法,所述计算所述一个或多个候选模板与所述第一模板之间的匹配误差,包括:
    根据匹配误差准则,计算所述一个或多个候选模板与所述第一模板之间的匹配误差。
  36. 根据权利要求35所述的方法,包括:
    所述匹配误差准则包括以下至少之一:平方误差和、均方误差、绝对误差和、平均绝对误差、结构相似性。
  37. 根据权利要求20所述的方法,所述根据所述匹配块,确定所述当前块的预测值,包括:
    将所述匹配块作为所述当前块的预测值;或者,
    使用线性模型对所述匹配块中的像素取值进行加权处理,得到所述当前块的预测值,其中,所述线性模型参数是以下之一:预设参数、按照预设规则推导得到的参数。
  38. 根据权利要求20所述的方法,所述根据所述匹配块,确定所述当前块的预测值之后,所述方法还包括:
    将所述当前块的预测残差和指示使用所述旋转模板模式的解码参数写入码流中,所述预测残差根据所述当前块的预测值与获取到的与原始图像相对应的像素值确定的。
  39. 一种解码器,其中,所述解码器包括:
    解析模块,用于解析码流,获得当前块的解码参数,其中,所述解码参数包含解码所述当前块过程中使用的参数;
    第一获取模块,用于当所述解码参数指示所述当前块使用旋转模板模式时,获取所述当前块的第一模板,其中,所述第一模板中包含所述当前块的相邻重建像素;
    第一确定模块,用于确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板,其中,所述参考模板处理参数是所述解码参数中包含的、用于构造匹配模板的参数;根据所述匹配模板,确定所述当前块的匹配块;根据所述匹配块,确定所述当前块的预测值。
  40. 一种解码器,其中,所述解码器包括:
    处理器以及存储有所述处理器可执行指令的存储介质,所述存储介质通过通信总线依赖所述处理器执行操作,当所述指令被所述处理器执行时,具体步骤为:
    解析码流,获得当前块的解码参数,其中,所述解码参数包含解码所述当前块过程中使用的参数;当所述解码参数指示所述当前块使用旋转模板模式时,获取所述当前块的第一模板,其中,所述第一模板中包含所述当前块的相邻重建像素;确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板,其中,所述参考模板处理参数是所述解码参数中包含的、用于构造匹配模板的参数;根据所述匹配模板,确定所述当前块的匹配块;根据所述匹配块,确定所述当前块的预测值。
  41. 一种第一计算机存储介质,其中,存储有可执行指令,当所述可执行指令被一个或多个处理器执行的时候,所述处理器执行所述的权利要求1至19任一项所述的预测值的确定方法。
  42. 一种编码器,其中,所述编码器包括:
    第二获取模块,用于获取当前块与所述当前块的第一模板之间的数据相关性,其中,所述第一模板中包含所述当前块的相邻重建像素;
    第二确定模块,用于当所述数据相关性大于或者等于预设阈值时,使用旋转模板模式;在所述旋转模板模式下,确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板;根据所述匹配模板,确定所述当前块的匹配块;根据所述匹配块,确定所述当前块的预测值。
  43. 一种编码器,其中,所述编码器包括:
    第二处理器以及存储有所述第二处理器可执行指令的存储介质,所述存储介质通过通信总线依赖所述第二处理器执行操作,当所述指令被所述第二处理器执行时,具体步骤为:
    获取当前块与所述当前块的第一模板之间的数据相关性,其中,所述第一模板中包含所述当前块的相邻重建像素;当所述数据相关性大于或者等于预设阈值时,使用旋转 模板模式;在所述旋转模板模式下,确定所述当前块的参考区域;在所述参考区域中,根据参考模板处理参数,确定所述第一模板的匹配模板;根据所述匹配模板,确定所述当前块的匹配块;
    根据所述匹配块,确定所述当前块的预测值。
  44. 一种第二计算机存储介质,其中,存储有可执行指令,当所述可执行指令被一个或多个处理器执行的时候,所述处理器执行所述的权利要求20至38任一项所述的预测值的确定方法。
PCT/CN2019/108598 2019-09-27 2019-09-27 预测值的确定方法、解码器以及计算机存储介质 WO2021056433A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
EP19947394.3A EP4037314A4 (en) 2019-09-27 2019-09-27 PREDICTION VALUE DETERMINATION METHOD, DECODER AND COMPUTER STORAGE MEDIA
KR1020227013644A KR20220065059A (ko) 2019-09-27 2019-09-27 예측값의 확정 방법, 디코더 및 컴퓨터 저장 매체
PCT/CN2019/108598 WO2021056433A1 (zh) 2019-09-27 2019-09-27 预测值的确定方法、解码器以及计算机存储介质
JP2022519101A JP7471399B2 (ja) 2019-09-27 2019-09-27 予測値の確定方法、復号器及びコンピュータ記憶媒体
CN201980100394.9A CN114424533A (zh) 2019-09-27 2019-09-27 预测值的确定方法、解码器以及计算机存储介质
US17/704,870 US20220217335A1 (en) 2019-09-27 2022-03-25 Prediction value determination method and decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/108598 WO2021056433A1 (zh) 2019-09-27 2019-09-27 预测值的确定方法、解码器以及计算机存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/704,870 Continuation US20220217335A1 (en) 2019-09-27 2022-03-25 Prediction value determination method and decoder

Publications (1)

Publication Number Publication Date
WO2021056433A1 true WO2021056433A1 (zh) 2021-04-01

Family

ID=75166301

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/108598 WO2021056433A1 (zh) 2019-09-27 2019-09-27 预测值的确定方法、解码器以及计算机存储介质

Country Status (6)

Country Link
US (1) US20220217335A1 (zh)
EP (1) EP4037314A4 (zh)
JP (1) JP7471399B2 (zh)
KR (1) KR20220065059A (zh)
CN (1) CN114424533A (zh)
WO (1) WO2021056433A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4346200A1 (en) * 2022-09-27 2024-04-03 Beijing Xiaomi Mobile Software Co., Ltd. Encoding/decoding video picture data
EP4346201A1 (en) * 2022-09-27 2024-04-03 Beijing Xiaomi Mobile Software Co., Ltd. Encoding/decoding video picture data
CN116702571B (zh) * 2023-08-07 2023-10-20 中国空气动力研究与发展中心计算空气动力研究所 基于多重光滑度量因子的数值模拟方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104363449A (zh) * 2014-10-31 2015-02-18 华为技术有限公司 图像预测方法及相关装置
CN105338351A (zh) * 2014-05-28 2016-02-17 华为技术有限公司 基于模板匹配的帧内预测编、解码、阵列扫描方法及装置
CN106464870A (zh) * 2014-03-31 2017-02-22 英迪股份有限公司 用于对帧内画面进行编码和解码的基于模板匹配的方法和装置
US20170339404A1 (en) * 2016-05-17 2017-11-23 Arris Enterprises Llc Template matching for jvet intra prediction

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6379186B2 (ja) 2016-02-17 2018-08-22 テレフオンアクチーボラゲット エルエム エリクソン(パブル) ビデオピクチャを符号化および復号する方法および装置
CN110650349B (zh) * 2018-06-26 2024-02-13 中兴通讯股份有限公司 一种图像编码方法、解码方法、编码器、解码器及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106464870A (zh) * 2014-03-31 2017-02-22 英迪股份有限公司 用于对帧内画面进行编码和解码的基于模板匹配的方法和装置
CN105338351A (zh) * 2014-05-28 2016-02-17 华为技术有限公司 基于模板匹配的帧内预测编、解码、阵列扫描方法及装置
CN104363449A (zh) * 2014-10-31 2015-02-18 华为技术有限公司 图像预测方法及相关装置
US20170339404A1 (en) * 2016-05-17 2017-11-23 Arris Enterprises Llc Template matching for jvet intra prediction

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
See also references of EP4037314A4 *
Z. ZHANG, V. SZE (MIT): "Non-CE8: Rotate Intra Block Copy", 124. MPEG MEETING; 20181008 - 20181012; MACAO; (MOTION PICTURE EXPERT GROUP OR ISO/IEC JTC1/SC29/WG11), no. m44025, 14 September 2018 (2018-09-14), XP030190704 *

Also Published As

Publication number Publication date
JP2022553624A (ja) 2022-12-26
CN114424533A (zh) 2022-04-29
US20220217335A1 (en) 2022-07-07
EP4037314A4 (en) 2022-11-09
KR20220065059A (ko) 2022-05-19
JP7471399B2 (ja) 2024-04-19
EP4037314A1 (en) 2022-08-03

Similar Documents

Publication Publication Date Title
WO2021056433A1 (zh) 预测值的确定方法、解码器以及计算机存储介质
US20220295047A1 (en) Image prediction method and device
WO2015085945A1 (zh) 用于图像处理的方法和装置
JP6690061B2 (ja) 動き補償予測方法およびデバイス
WO2021196235A1 (zh) 帧间预测方法、编码器、解码器及存储介质
WO2020029187A1 (zh) 视频图像分量的预测方法、装置及计算机存储介质
JP6708374B2 (ja) 画像群内で修正可能要素のセットを決定するための方法、デバイス、プログラム、及び可読媒体
WO2021062772A1 (zh) 预测方法、编码器、解码器及计算机存储介质
WO2021120122A1 (zh) 图像分量预测方法、编码器、解码器以及存储介质
KR20210108389A (ko) 크로마 인트라 예측 방법, 장치 및 컴퓨터 저장 매체
JP7480170B2 (ja) 画像予測方法、エンコーダー、デコーダー及び記憶媒体
WO2018040869A1 (zh) 一种帧间预测编码方法及装置
WO2020181474A1 (zh) 预测值的确定方法、编码器以及计算机存储介质
WO2020181554A1 (zh) 预测值的确定方法、解码器以及计算机存储介质
CN112470468A (zh) 解码预测方法、装置及计算机存储介质
WO2020192109A1 (zh) 图像分量预测方法、编码器、解码器以及存储介质
WO2015196860A1 (zh) 一种图像处理方法、装置及系统
WO2021196228A1 (zh) 帧间预测方法、编码器、解码器以及存储介质
WO2020056767A1 (zh) 视频图像分量的预测方法、装置及计算机存储介质
KR20220066166A (ko) 현재 블록의 예측 방법 및 예측 장치, 디바이스, 저장 매체
JP2022528835A (ja) 画像予測方法、エンコーダ、デコーダ及び記憶媒体
AU2019417996A1 (en) Prediction decoding method, device and computer storage medium
WO2023123467A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
US11343508B2 (en) Method for determining prediction direction, decoder, and computer storage medium
WO2023193260A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质

Legal Events

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

Ref document number: 19947394

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022519101

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20227013644

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2019947394

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2019947394

Country of ref document: EP

Effective date: 20220428