WO2023051375A1 - 帧内预测方法及装置 - Google Patents

帧内预测方法及装置 Download PDF

Info

Publication number
WO2023051375A1
WO2023051375A1 PCT/CN2022/120535 CN2022120535W WO2023051375A1 WO 2023051375 A1 WO2023051375 A1 WO 2023051375A1 CN 2022120535 W CN2022120535 W CN 2022120535W WO 2023051375 A1 WO2023051375 A1 WO 2023051375A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction mode
intra
intra prediction
frame prediction
candidate
Prior art date
Application number
PCT/CN2022/120535
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 WO2023051375A1 publication Critical patent/WO2023051375A1/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/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/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
    • 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/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

Definitions

  • the present application belongs to the technical field of video coding and decoding standards, and in particular relates to an intra-frame prediction method and device.
  • Decoder-side Intra Mode Derivation at the decoder side calculates the texture direction of the adjacent areas above and to the left of the current coding block, and selects the two intra prediction modes with the largest amplitudes for deriving the current coding block The intra-frame prediction mode; but this way of directly selecting the intra-frame prediction mode will reduce the prediction accuracy when dealing with the complex texture of the adjacent area and the current coding block.
  • Embodiments of the present application provide an intra prediction method and device to improve prediction accuracy.
  • an intra prediction method including:
  • the set of candidate intra prediction modes includes at least one intra prediction mode in the gradient histogram except the first intra prediction mode and the first candidate intra prediction mode.
  • an intra prediction device including:
  • the first acquisition module is configured to acquire the gradient histogram of the intra prediction mode of the template corresponding to the coding unit to be decoded;
  • a second acquiring module configured to acquire the first intra-frame prediction mode and the first candidate intra-frame prediction mode in the gradient histogram
  • a third obtaining module configured to obtain a second intra prediction mode according to the first candidate intra prediction mode and the set of candidate intra prediction modes
  • a fourth obtaining module configured to obtain prediction samples of coding units to be decoded according to the first intra prediction mode and the second intra prediction mode;
  • the set of candidate intra prediction modes includes at least one intra prediction mode in the gradient histogram except the first intra prediction mode and the first candidate intra prediction mode.
  • an intra prediction device including a processor, a memory, and a program or instruction stored in the memory and operable on the processor, and the program or instruction is executed by the processor When realizing the steps of the method as described in the first aspect.
  • an intra prediction device including a processor and a communication interface, wherein the processor is configured to obtain a gradient histogram of an intra prediction mode of a template corresponding to a coding unit to be decoded;
  • the set of candidate intra prediction modes includes at least one intra prediction mode in the gradient histogram except the first intra prediction mode and the first candidate intra prediction mode.
  • a readable storage medium is provided, and a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented.
  • a sixth aspect provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method as described in the first aspect A step of.
  • a computer program product is provided, the computer program product is stored in a non-transitory storage medium, and the computer program product is executed by at least one processor to implement the method as described in the first aspect step.
  • an electronic device configured to execute the steps of the method described in the first aspect.
  • the embodiment of the present application first obtain the first intra prediction mode and the first candidate intra prediction mode according to the gradient histogram, and then according to the first candidate intra prediction mode and other intra prediction modes in the gradient histogram, Determine the second intra-frame prediction mode, and finally obtain the prediction samples of the coding unit to be decoded according to the first intra-frame prediction mode and the second intra-frame prediction mode; compared with the direct selection of the first intra-frame prediction mode and the prior art
  • the embodiment of the present application adds a second selection on the basis of the first selection, which can verify whether the first-selected intra-frame prediction mode is optimal, and ensure the finalized intra-frame prediction The mode is optimal so that the prediction accuracy can be improved.
  • FIG. 1 is a schematic flow chart of an intra prediction method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of the relationship between the coding unit to be decoded and the reference sample of the corresponding template and the reconstruction sample;
  • FIG. 3 is a schematic block diagram of an intra prediction device according to an embodiment of the present application.
  • FIG. 4 is a structural block diagram of an intra prediction device according to an embodiment of the present application.
  • Fig. 5 is a structural block diagram of a communication device according to an embodiment of the present application.
  • first, second and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein and that "first" and “second” distinguish objects. It is usually one category, and the number of objects is not limited. For example, there may be one or more first objects.
  • “and/or” in the description and claims means at least one of the connected objects, and the character “/” generally means that the related objects are an "or” relationship.
  • a frame of image is divided into many macroblocks, and intra-frame prediction or inter-frame prediction is used to obtain prediction blocks.
  • the difference between the original block and the predicted block is the residual block, and then the residual block is transformed, quantized, and entropy encoded.
  • Picture types in video standards generally include I pictures, P pictures and B pictures.
  • the I picture can be decoded independently without referring to other pictures
  • the P picture uses multiple pictures (past) before the current picture in the display order as reference pictures
  • the B picture can be displayed with the (past) picture before the current picture in the display order
  • Multiple (future) images sequentially located after the current image are used as reference images.
  • Intra prediction has many prediction modes to deal with multiple types of textures in images, including DC mode (Direct Current, DC), planar mode (planar) and some angle prediction modes.
  • DC mode Direct Current, DC
  • planar mode planar
  • some angle prediction modes The surrounding reconstructed pixels are used as input, and the prediction value of the current prediction block is obtained through the specified prediction mode, which achieves the purpose of removing spatial redundancy.
  • the specified prediction mode index can be obtained explicitly from the code stream, or implicitly inferred from the decoder.
  • MPM is a technique that explicitly derives the intra prediction mode. Considering that the current prediction block has a strong correlation with the surrounding adjacent blocks, the prediction modes of the adjacent blocks are used to construct a list of the most probable intra prediction mode candidates. If the optimal prediction mode is in the list, only the index of this mode in the list is written into the code stream, which can save the number of bits required for encoding the intra prediction mode.
  • DIMD mode is a technique for implicitly deriving intra prediction modes.
  • the gradient histogram calculation is performed by applying horizontal and vertical Sobel filters to the pixels in the template of width N around the block, and then the direction of the gradient is converted to the intra prediction mode, and the strength of the gradient is accumulated
  • the intra prediction mode is derived by comparing the magnitude of the amplitude in the gradient histogram. If the DIMD mode flag of the coding unit to be decoded is true, the derived intra prediction mode is used for intra prediction; if the DIMD mode is false, the derived intra prediction mode is used to construct the MPM list.
  • this embodiment of the present application provides an intra prediction method, including:
  • Step 101 obtaining the gradient histogram of the intra prediction mode of the template corresponding to the coding unit to be decoded
  • Step 102 acquiring a first intra prediction mode and a first candidate intra prediction mode in the gradient histogram
  • Step 103 Obtain a second intra prediction mode according to the first candidate intra prediction mode and the set of candidate intra prediction modes;
  • Step 104 according to the first intra-frame prediction mode and the second intra-frame prediction mode, obtain prediction samples of coding units to be decoded;
  • the set of candidate intra prediction modes includes at least one intra prediction mode in the gradient histogram except the first intra prediction mode and the first candidate intra prediction mode; further, Both the amplitude of the first intra prediction mode and the first candidate intra prediction mode are greater than or equal to the amplitude of each intra prediction mode in the set of candidate intra prediction modes.
  • the first intra-frame prediction mode is an intra-frame prediction mode with the largest (first largest) amplitude corresponding to the intra-frame prediction modes included in the gradient histogram;
  • the first candidate intra-frame prediction mode is the intra prediction mode with the second largest amplitude corresponding to the intra prediction mode included in the gradient histogram;
  • the first intra prediction mode and the first candidate intra prediction mode are obtained in the embodiment of the present application
  • the implementation method can be as follows: after obtaining the gradient histogram, sort all the intra prediction modes according to the order of amplitude from large to small, and select the two intra prediction modes whose sorting positions are at the top, which can be understood as In the histogram, the intra prediction modes with the first and second largest amplitudes are directly determined.
  • the amplitude of the first intra-frame prediction mode in this embodiment of the present application is greater than or equal to the first candidate intra-frame prediction mode.
  • the first intra prediction mode and the first candidate intra prediction mode are not directly used to obtain the prediction samples of the coding unit to be decoded, because the two intra prediction modes selected in this way may not be Optimally, the first candidate intra prediction mode is used as the undetermined intra prediction mode here, and if it is found that the first candidate intra prediction mode can be used directly in the subsequent comparison process, the first candidate intra prediction mode is used as For the second intra-frame prediction mode, if the first candidate intra-frame prediction mode cannot be directly used, select a directly usable intra-frame prediction mode from other compared intra-frame prediction modes as the second intra-frame prediction mode.
  • each frame image is processed, and the frame image is divided into multiple coding units for prediction, that is to say, the The coding unit to be decoded may be understood as the coding unit to be decoded that is currently being processed (may be referred to as the current coding unit to be decoded).
  • step 101 in the embodiment of the present application is as follows:
  • Gradient analysis is performed on the template to obtain a gradient histogram of an intra prediction mode corresponding to the coding unit to be decoded.
  • the current (Current) decoding unit (Coding Unit, CU) (Current CU) (Current CU) represents the current coding unit to be decoded
  • the area indicated by Templete represents the reconstructed sample of the template corresponding to the current coding unit to be decoded
  • the area indicated by Reference of the temple represents the reference sample of the template corresponding to the current coding unit to be decoded.
  • step 103 in the embodiment of the present application is:
  • Step 1031 using the reference samples of the template corresponding to the coding unit to be decoded respectively using the first candidate intra prediction mode and each intra prediction mode in the candidate intra prediction mode set to generate prediction samples of the template;
  • each intra prediction mode is used to obtain a prediction sample of a template.
  • Step 1032 performing a first operation on the reconstructed samples of the template and the predicted samples of the template
  • the first operation in the embodiment of the present application implements the comparison of two samples, which is mainly to obtain the difference between the two samples.
  • the first operation can be calculated at a cost; of course
  • the embodiment of the present application does not limit the specific form of the first operation, and any operation method that can obtain the difference between two samples belongs to the protection scope of the first operation.
  • Step 1033 according to the corresponding result of the first operation, determine a second intra prediction mode in the first candidate intra prediction mode and the set of candidate intra prediction modes;
  • step 1033 mainly realizes that according to the result corresponding to the first operation, the intra prediction mode whose result corresponding to the first operation indicates the difference or the smallest difference between the reconstructed sample and the predicted sample is selected as the second intra prediction mode .
  • step 1033 is as follows:
  • the first intra-frame prediction mode candidate and the intra-frame prediction mode with the smallest cost calculation result in the set of candidate intra-frame prediction modes are determined as the second intra-frame prediction mode.
  • the smallest difference or difference between the reconstructed sample and the predicted sample indicates that the result of cost calculation is the smallest.
  • the result of the cost calculation can be the sum of the absolute transformation difference, the sum of the absolute difference, etc.
  • the embodiment of the present application does not limit the specific form of the result of the cost calculation, any value that can reflect the difference between two samples Calculation results all belong to the scope of protection of cost calculation results.
  • the embodiment of the application can only perform the second intra prediction mode when the DIMD flag is true.
  • the DIMD flag may not be considered, that is, when obtaining prediction samples, directly use this method to first obtain the first intra-frame prediction mode and the second intra-frame prediction mode, and then obtain prediction samples.
  • the DIMD identifier needs to be obtained first.
  • the method for obtaining the DIMD identifier in this embodiment of the application is:
  • the intra-frame prediction information of the coding unit to be decoded is first obtained in the code stream, and the intra-frame prediction information includes: a decoding end Intra prediction mode DIMD flag is derived.
  • step 103 is as follows:
  • a second intra-frame prediction mode is acquired according to the first candidate intra-frame prediction mode and the set of candidate intra-frame prediction modes.
  • the DIMD flag when the DIMD flag is true, further judgment may be made further according to the image type of the image to which the coding unit to be decoded belongs, specifically, the image type of the image to which the coding unit to be decoded belongs
  • the second intra prediction mode is obtained according to the first candidate intra prediction mode and the set of candidate intra prediction modes.
  • the decoding end no longer uses the method of step 103 to obtain the second intra-frame prediction mode, but directly combines the first intra-frame prediction mode and the first Candidate intra prediction modes are added to the MPM list.
  • the method further includes one of the following:
  • the first intra-frame prediction mode and the first candidate intra-frame prediction mode are selected.
  • the prediction mode is added to the MPM list.
  • the second intra-frame prediction mode is a more accurate intra-frame prediction mode, in order to improve the prediction accuracy when the delay is allowed, the first intra-frame prediction mode and the second intra-frame prediction mode are added list of MPMs.
  • Step S101 Obtain the intra prediction information of the coding unit to be decoded currently from the code stream.
  • the intra prediction information includes the DIMD mode identifier, the MPM mode identifier, the MPM index value, the intra prediction mode index value, and the like.
  • Step S102 Obtain reconstructed samples of adjacent decoded pixels of the current coding unit to be decoded
  • Step S103 constructing a template, which includes reconstructed samples of decoded pixels in the upper row (or several rows) and/or the left column (or several columns) of the coding unit currently to be decoded;
  • Step S104 performing gradient analysis on the template to obtain a gradient histogram of the intra prediction mode
  • Step S105 from the gradient histogram, select the intra prediction mode with the largest amplitude value and the second largest as the first intra prediction mode and the first candidate intra prediction mode;
  • Step S106 According to the intra prediction information obtained in step S101, the intra prediction mode of the coding unit to be decoded is obtained, which specifically includes the following items:
  • the DIMD mode flag is false, and when using the MPM list, then the first intra-frame prediction mode and the first candidate intra-frame prediction mode that step S105 obtains are added in the MPM list;
  • the final second intra prediction mode is derived as follows, and the first intra prediction mode and the final second intra prediction mode are used as intra prediction modes of the current coding unit to be decoded.
  • the final derivation method of the second intra-frame prediction mode is:
  • the second candidate intra prediction mode and the first candidate intra prediction mode respectively use template reference samples to generate template prediction samples, and perform cost calculation on the template prediction samples and reconstruction samples corresponding to the second candidate intra prediction mode, Obtain the sum of absolute transformation differences corresponding to the second candidate intra prediction mode, perform cost calculation on the prediction samples and reconstruction samples of the template corresponding to the first candidate intra prediction mode, and obtain the absolute transformation difference corresponding to the first candidate intra prediction mode sum, compare the sum of absolute transformation differences corresponding to the second candidate intra prediction mode with the sum of absolute transformation differences corresponding to the first candidate intra prediction mode, if the sum of absolute transformation differences corresponding to the second candidate intra prediction mode is the smallest , then select the second candidate intra prediction mode as the final second intra prediction mode; if the sum of absolute transformation differences corresponding to the first candidate intra prediction mode is the smallest, then select the first candidate intra prediction mode as the final second intra prediction mode Two intra prediction modes.
  • Step S107 use the obtained intra prediction mode to calculate the prediction value of the current coding unit to be decoded
  • the intra prediction mode is the first intra prediction mode and the first candidate intra prediction mode, or the intra prediction mode is the first intra prediction mode and the second intra prediction mode, or the intra prediction
  • the mode may also be an intra-frame prediction mode obtained by other intra-frame prediction methods (for example, other methods than the DIMD mode mentioned in the embodiment of the present application).
  • Step S201 Obtain reconstructed samples of adjacent decoded pixels of the current coding unit to be decoded
  • Step S202 constructing a template, the template includes reconstructed samples of the decoded pixels of the upper row (or several rows) and/or the left column (or several columns) of the coding unit currently to be decoded;
  • Step S203 performing gradient analysis on the template to obtain a gradient histogram of the intra prediction mode
  • Step S204 from the gradient histogram, select the intra prediction mode with the largest amplitude value and the second largest as the first intra prediction mode and the first candidate intra prediction mode;
  • Step S205 from the gradient histogram, select an intra prediction mode with the third largest amplitude value as the second candidate intra prediction mode and an intra prediction mode with the fourth largest amplitude value as the third candidate intra prediction mode , comparing the selected intra-frame prediction mode with the first candidate intra-frame prediction mode, and selecting the final second intra-frame prediction mode;
  • the third candidate intra prediction mode and the first candidate intra prediction mode respectively use the reference samples of the template to generate the prediction samples of the template, and the prediction of the template corresponding to the second candidate intra prediction mode Perform cost calculation on samples and reconstruction samples, obtain the sum of absolute transformation differences corresponding to the second candidate intra prediction mode, perform cost calculation on the prediction samples and reconstruction samples of the template corresponding to the third candidate intra prediction mode, and obtain the third candidate frame
  • the sum of absolute transformation differences corresponding to the intra prediction mode calculate the cost of the prediction samples and reconstruction samples of the template corresponding to the first candidate intra prediction mode, obtain the sum of absolute transformation differences corresponding to the first candidate intra prediction mode, and compare The sum of the absolute transformation differences corresponding to the two candidate intra prediction modes, the sum of the absolute transformation differences corresponding to the third candidate intra prediction mode, and the sum of the absolute transformation differences corresponding to the first candidate intra prediction mode, if the second candidate intra prediction mode If the sum of absolute transformation differences corresponding to the prediction mode is the smallest, select the second candidate intra prediction mode as the final second intra
  • cost function may also be other calculation methods, which are not limited here.
  • Step S206 Obtain the intra prediction information of the coding unit to be decoded currently from the code stream, the intra prediction information includes: DIMD mode identifier, MPM mode identifier, MPM index value, intra prediction mode index value, etc.;
  • the first candidate intra prediction mode and the first intra prediction mode obtained in step 204 can be added to the MPM list in the first type of intra prediction mode Middle; in the second intra-frame prediction mode, add the first intra-frame prediction mode obtained in step 205 and the final second intra-frame prediction mode to the MPM list.
  • first type of intra prediction mode and the second type of intra prediction mode may be implicitly derived or may be explicitly identified, and there is no limitation here.
  • Step S301 Obtain the intra prediction information of the coding unit to be decoded currently from the code stream, the intra prediction information includes DIMD mode identifier, MPM mode identifier, MPM index value, intra prediction mode index value, etc.
  • Step S302 Obtain reconstructed samples of adjacent decoded pixels of the current coding unit to be decoded
  • Step S303 constructing a template, the template includes reconstructed samples of the decoded pixels of the upper row (or several rows) of the current coding unit to be decoded, and/or, the left column (or several columns);
  • Step S304 performing gradient analysis on the template to obtain a gradient histogram of the intra-frame angle prediction mode
  • Step S305 from the gradient histogram, select the intra prediction mode with the largest amplitude value and the second largest as the first intra prediction mode and the first candidate intra prediction mode;
  • Step S306. Obtain the intra prediction mode of the coding unit to be decoded according to the intra prediction information obtained in step S301, specifically the following item:
  • the first intra-frame prediction mode and the second candidate intra-frame prediction mode obtained in step S305 are added to the MPM list;
  • the final second intra-frame mode is derived as follows, and the first intra-frame prediction mode and the final second intra-frame prediction mode are used as the current coding unit to be decoded The intra prediction mode for .
  • the final derivation method of the second intra-frame prediction mode is:
  • the comparison method is as follows:
  • the second candidate intra prediction mode and the first candidate intra prediction mode respectively use template reference samples to generate template prediction samples, and perform cost calculation on the template prediction samples and reconstruction samples corresponding to the second candidate intra prediction mode, Obtain the sum of absolute transformation differences corresponding to the second candidate intra prediction mode, perform cost calculation on the prediction samples and reconstruction samples of the template corresponding to the first candidate intra prediction mode, and obtain the absolute transformation difference corresponding to the first candidate intra prediction mode sum, compare the sum of absolute transformation differences corresponding to the second candidate intra prediction mode with the sum of absolute transformation differences corresponding to the first candidate intra prediction mode, if the sum of absolute transformation differences corresponding to the second candidate intra prediction mode is the smallest , then select the second candidate intra prediction mode as the final second intra prediction mode; if the sum of absolute transformation differences corresponding to the first candidate intra prediction mode is the smallest, then select the first candidate intra prediction mode as the final second intra prediction mode Two intra prediction modes.
  • Step S307 using the obtained intra prediction mode to calculate the prediction value of the coding unit to be decoded currently.
  • the intra prediction mode is the first intra prediction mode and the first candidate intra prediction mode, or the intra prediction mode is the first intra prediction mode and the second intra prediction mode, or the intra prediction
  • the mode may also be an intra-frame prediction mode obtained by other intra-frame prediction methods (for example, other methods than the DIMD mode mentioned in the embodiment of the present application).
  • the embodiment of the present application can make the intra-frame prediction mode derived from the DIMD mode more accurate, can improve the prediction accuracy, and further improve the compression efficiency.
  • the intra-frame prediction method provided in the embodiment of the present application may be executed by an intra-frame prediction device, or a control module in the intra-frame prediction device for executing the intra-frame prediction method.
  • an intra prediction method performed by an intra prediction device is taken as an example to describe the intra prediction device provided in the embodiment of the present application.
  • an intra prediction device 300 including:
  • the first obtaining module 301 is configured to obtain the gradient histogram of the intra prediction mode of the template corresponding to the coding unit to be decoded;
  • the second obtaining module 302 is configured to obtain the first intra prediction mode and the first candidate intra prediction mode in the gradient histogram;
  • the third obtaining module 303 is configured to obtain a second intra prediction mode according to the first candidate intra prediction mode and the set of candidate intra prediction modes;
  • a fourth obtaining module 304 configured to obtain prediction samples of coding units to be decoded according to the first intra prediction mode and the second intra prediction mode;
  • the set of candidate intra prediction modes includes at least one intra prediction mode in the gradient histogram except the first intra prediction mode and the first candidate intra prediction mode.
  • the third obtaining module 303 includes:
  • a generating unit configured to use the first candidate intra prediction mode and each intra prediction mode in the candidate intra prediction mode set to generate prediction samples of the template by using the reference samples of the template corresponding to the coding unit to be decoded;
  • An operation unit configured to perform a first operation on the reconstructed samples of the template and the predicted samples of the template
  • a determining unit configured to determine a second intra-frame prediction mode in the first candidate intra-frame prediction mode and the set of candidate intra-frame prediction modes according to a corresponding result of the first operation.
  • the first operation is cost calculation
  • the determination unit is used for:
  • the first intra-frame prediction mode candidate and the intra-frame prediction mode with the smallest cost calculation result in the set of candidate intra-frame prediction modes are determined as the second intra-frame prediction mode.
  • the first acquiring module 301 acquires the gradient histogram of the intra prediction mode of the template corresponding to the coding unit to be decoded, it may further include:
  • the fifth acquisition module is configured to acquire intra-frame prediction information of the coding unit to be decoded in the code stream, where the intra-frame prediction information includes: the DIMD identifier of the intra-frame prediction mode derived by the decoding end;
  • the third acquiring module 303 is configured to:
  • a second intra-frame prediction mode is acquired according to the first candidate intra-frame prediction mode and the set of candidate intra-frame prediction modes.
  • the third obtaining module 303 is configured to:
  • a second intra prediction mode is acquired according to the first candidate intra prediction mode and the set of candidate intra prediction modes.
  • the device also includes:
  • a first processing module configured to add the first intra-frame prediction mode and the first candidate intra-frame prediction mode to a most probable intra-frame prediction mode MPM list when the DIMD flag is false.
  • the device also includes the following:
  • a second processing module configured to add the first intra prediction mode and the first candidate intra prediction mode to an MPM list
  • the third processing module is configured to add the first intra-frame prediction mode and the second intra-frame prediction mode into the MPM list.
  • amplitudes of the first intra prediction mode and the first candidate intra prediction mode are greater than or equal to the amplitude of each intra prediction mode in the set of candidate intra prediction modes.
  • the first intra-frame prediction mode is an intra-frame prediction mode with the largest amplitude corresponding to the intra-frame prediction modes included in the gradient histogram.
  • the first candidate intra prediction mode is an intra prediction mode with the second largest amplitude corresponding to the intra prediction modes included in the gradient histogram.
  • the first intra prediction mode and the first candidate intra prediction mode are obtained according to the gradient histogram, and then the second intra prediction mode is determined according to the first candidate intra prediction mode and other intra prediction modes in the gradient histogram.
  • Two intra-frame prediction modes and finally obtain the prediction samples of the coding unit to be decoded according to the first intra-frame prediction mode and the second intra-frame prediction mode; compared with the direct selection of the first intra-frame prediction mode and the second intra-frame prediction mode in the prior art
  • the embodiment of the present application adds a second selection on the basis of the first selection, and can verify whether the intra prediction mode selected for the first time is optimal, so as to ensure that the finally determined intra prediction mode is Optimum, so as to improve the prediction accuracy.
  • the intra prediction apparatus in this embodiment of the present application may be an apparatus, an apparatus having an operating system or an electronic device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus or electronic equipment may be a mobile terminal or a non-mobile terminal.
  • the mobile terminal may include but not limited to the types of terminals 11 listed above, and the non-mobile terminal may be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television ( Television, TV), teller machines or self-service machines, etc., are not specifically limited in this embodiment of the present application.
  • the intra prediction device provided by the embodiment of the present application can realize each process realized by the method embodiment in FIG. 1 and achieve the same technical effect. To avoid repetition, details are not repeated here.
  • the embodiment of the present application also provides an intra prediction device, including a processor and a communication interface, and the processor is configured to obtain a gradient histogram of an intra prediction mode of a template corresponding to a coding unit to be decoded;
  • the set of candidate intra prediction modes includes at least one intra prediction mode in the gradient histogram except the first intra prediction mode and the first candidate intra prediction mode.
  • FIG. 4 is a schematic diagram of a hardware structure of an intra prediction device implementing an embodiment of the present application.
  • the intra prediction device 400 includes but not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, and a processor 410 etc. at least some of the components.
  • the intra prediction device 400 may also include a power supply (such as a battery) for supplying power to each component, and the power supply may be logically connected to the processor 410 through the power management system, so that the management of charging, discharging, and power management functions.
  • a power supply such as a battery
  • the structure of the intra prediction device shown in FIG. 4 does not constitute a limitation to the device.
  • the intra prediction device may include more or less components than shown in the figure, or combine some components, or arrange different components. Here No longer.
  • the input unit 404 may include a graphics processor (Graphics Processing Unit, GPU) 4041 and a microphone 4042, and the graphics processor 4041 is used for the image capture device (such as the image data of the still picture or video obtained by the camera) for processing.
  • the display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 407 includes a touch panel 4071 and other input devices 4072 .
  • the touch panel 4071 is also called a touch screen.
  • the touch panel 4071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 4072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • the radio frequency unit 401 receives the downlink data from the network side device, and processes it to the processor 410; in addition, sends the uplink data to the network side device.
  • the radio frequency unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • the memory 409 can be used to store software programs or instructions as well as various data.
  • the memory 409 may mainly include a program or instruction storage area and a data storage area, wherein the program or instruction storage area may store an operating system, an application program or instructions required by at least one function (such as a sound playback function, an image playback function, etc.) and the like.
  • the memory 409 may include a high-speed random access memory, and may also include a nonvolatile memory, wherein the nonvolatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM) , PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • ROM Read-Only Memory
  • PROM programmable read-only memory
  • PROM erasable programmable read-only memory
  • Erasable PROM Erasable PROM
  • EPROM electrically erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory for example at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device.
  • the processor 410 may include one or more processing units; optionally, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, application programs or instructions, etc., Modem processors mainly handle wireless communications, such as baseband processors. It can be understood that the foregoing modem processor may not be integrated into the processor 410 .
  • processor 410 is used to implement:
  • the set of candidate intra prediction modes includes at least one intra prediction mode in the gradient histogram except the first intra prediction mode and the first candidate intra prediction mode.
  • the intra prediction device obtains the first intra prediction mode and the first candidate intra prediction mode according to the gradient histogram, and then obtains the first intra prediction mode according to the first candidate intra prediction mode and other intra prediction modes in the gradient histogram. Mode, determine the second intra-frame prediction mode, and finally obtain the prediction samples of the coding unit to be decoded according to the first intra-frame prediction mode and the second intra-frame prediction mode, compared with the direct selection of the first intra-frame prediction in the prior art mode and the second intra-frame prediction mode, the embodiment of the present application adds a second selection on the basis of the first selection, which can verify whether the first-selected intra-frame prediction mode is optimal, and ensure that the final frame The intra-prediction mode is optimal, so as to improve prediction accuracy.
  • processor 410 is used to implement:
  • a second intra-frame prediction mode is determined from the first candidate intra-frame prediction mode and the set of candidate intra-frame prediction modes.
  • the first operation is cost calculation
  • processor 410 is used to implement:
  • the first intra-frame prediction mode candidate and the intra-frame prediction mode with the smallest cost calculation result in the set of candidate intra-frame prediction modes are determined as the second intra-frame prediction mode.
  • processor 410 is also used to implement:
  • the intra-frame prediction information includes: the DIMD identifier of the intra-frame prediction mode derived by the decoding end;
  • the acquiring a second intra prediction mode according to the first candidate intra prediction mode and the set of candidate intra prediction modes includes:
  • a second intra-frame prediction mode is acquired according to the first candidate intra-frame prediction mode and the set of candidate intra-frame prediction modes.
  • processor 410 is also used to implement:
  • a second intra prediction mode is acquired according to the first candidate intra prediction mode and the set of candidate intra prediction modes.
  • processor 410 is also used to implement:
  • processor 410 is also configured to implement one of the following:
  • amplitudes of the first intra prediction mode and the first candidate intra prediction mode are greater than or equal to the amplitude of each intra prediction mode in the set of candidate intra prediction modes.
  • the first intra-frame prediction mode is an intra-frame prediction mode with the largest amplitude corresponding to the intra-frame prediction modes included in the gradient histogram.
  • the first candidate intra prediction mode is an intra prediction mode with the second largest amplitude corresponding to the intra prediction modes included in the gradient histogram.
  • the embodiment of the present application also provides an intra-frame prediction device, including a processor, a memory, and a program or instruction stored in the memory and operable on the processor.
  • an intra-frame prediction device including a processor, a memory, and a program or instruction stored in the memory and operable on the processor.
  • the program or instruction is executed by the processor, the Each process of the embodiment of the intra-frame prediction method can achieve the same technical effect, and will not be repeated here to avoid repetition.
  • the embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored.
  • a program or instruction is stored.
  • the program or instruction is executed by a processor, each process of the intra prediction method embodiment is realized, and the same technology can be achieved. Effect, in order to avoid repetition, will not repeat them here.
  • the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • this embodiment of the present application further provides a communication device 500, including a processor 501, a memory 502, and programs or instructions stored in the memory 502 and operable on the processor 501,
  • a communication device 500 including a processor 501, a memory 502, and programs or instructions stored in the memory 502 and operable on the processor 501
  • the communication device 500 is an intra-frame prediction device
  • the program or instruction is executed by the processor 501
  • each process of the above-mentioned intra-frame prediction method embodiment can be achieved, and the same technical effect can be achieved. To avoid repetition, it is not repeated here repeat.
  • the embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above-mentioned embodiment of the intra prediction method Each process, and can achieve the same technical effect, in order to avoid repetition, will not repeat them here.
  • chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
  • An embodiment of the present application further provides a computer program product, the computer program product is stored in a non-transitory storage medium, and the computer program product is executed by at least one processor to implement each of the above-mentioned intra prediction method embodiments. process, and can achieve the same technical effect, in order to avoid repetition, it will not be repeated here.
  • the embodiment of the present application further provides an electronic device, the electronic device is configured to execute each process of the above-mentioned intra prediction method embodiment, and can achieve the same technical effect. To avoid repetition, details are not repeated here.
  • the term “comprising”, “comprising” or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase “comprising a " does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
  • the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
  • the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present application.
  • a terminal which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

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

Abstract

本申请公开了一种帧内预测方法及装置,属于视频编解码标准技术领域,本申请实施例的帧内预测方法包括:获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式;根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;其中,候选帧内预测模式集合包括梯度直方图中除第一帧内预测模式和第一候选帧内预测模式之外的至少一个帧内预测模式。

Description

帧内预测方法及装置
相关申请的交叉引用
本申请主张在2021年09月28日在中国提交的中国专利申请No.202111144070.0的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于视频编解码标准技术领域,特别涉及一种帧内预测方法及装置。
背景技术
解码端导出帧内预测模式(Decoder-side Intra Mode Derivation,DIMD)通过计算当前编码块上方和左侧相邻区域的纹理方向,选择两个振幅最大的帧内预测模式,用于导出当前编码块的帧内预测模式;但是此种直接选择帧内预测模式的方式,在处理相邻区域和当前编码块的纹理较复杂的情况时,会降低预测准确度。
发明内容
本申请实施例提供一种帧内预测方法及装置,提高预测准确度。
第一方面,提供了一种帧内预测方法,包括:
获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;
获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;
根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式;
根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;
其中,所述候选帧内预测模式集合包括所述梯度直方图中除所述第一帧内预测模式和所述第一候选帧内预测模式之外的至少一个帧内预测模式。
第二方面,提供了一种帧内预测装置,包括:
第一获取模块,用于获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;
第二获取模块,用于获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;
第三获取模块,用于根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式;
第四获取模块,用于根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;
其中,所述候选帧内预测模式集合包括所述梯度直方图中除所述第一帧内预测模式和所述第一候选帧内预测模式之外的至少一个帧内预测模式。
第三方面,提供了一种帧内预测装置,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。
第四方面,提供了一种帧内预测装置,包括处理器及通信接口,其中,所述处理器用于获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;
获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;
根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式;
根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;
其中,所述候选帧内预测模式集合包括所述梯度直方图中除所述第一帧内预测模式和所述第一候选帧内预测模式之外的至少一个帧内预测模式。
第五方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。
第六方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法的步骤。
第七方面,提供了一种计算机程序产品,所述计算机程序产品被存储在 非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤。
第八方面,提供一种电子设备,被配置为执行如第一方面所述的方法的步骤。
在本申请实施例中,通过先依据梯度直方图获取第一帧内预测模式和第一候选帧内预测模式,然后根据第一候选帧内预测模式以及梯度直方图中的其他帧内预测模式,确定第二帧内预测模式,最后再根据第一帧内预测模式和第二帧内预测模式获取待解码的编码单元的预测样本;相比与现有技术的直接选择第一帧内预测模式和第二帧内预测模式的方式,本申请实施例在首次选择的基础上,又增加了二次选择,能够对首次选择的帧内预测模式进行是否最优的验证,保证最终确定的帧内预测模式是最优的,以此能够提升预测准确度。
附图说明
图1是本申请实施例的帧内预测方法的流程示意图;
图2是当前待解码的编码单元与其对应的模板的参考样本以及重建样本的关系示意图;
图3是本申请实施例的帧内预测装置的模块示意图;
图4是本申请实施例的帧内预测装置的结构框图;
图5是本申请实施例的通信设备的结构框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描 述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。
下面对与本申请相关的现有技术进行简单介绍如下。
在视频编码中,一帧图像被分成很多宏块,利用帧内预测或者帧间预测获得预测块。原始块和预测块之间的差值为残差块,然后对残差块进行变换、量化、熵编码。
视频标准中图像类型通常包括I图像、P图像和B图像。I图像无需参考其他图像便可独立进行解码,P图像用显示顺序上位于当前图像之前的(过去的)多幅图像做参考图像,B图像可用显示顺序位于当前图像之前的(过去的)和显示顺序位于当前图像之后的(将来的)多幅图像做参考图像。
1、帧内预测
帧内预测有很多的预测模式来处理图像中多种类型的纹理,包括直流模式(Direct Current,DC)、平面模式(planar)和一些角度预测模式。用周围已重建像素作为输入,通过指定的预测模式来得到当前预测块的预测值,达到了去除空间冗余的目的。这个指定的预测模式索引可以是从码流中显式的得到,也可以从解码端隐式的推断出。
2、最可能的帧内预测模式(Most Probably Mode,MPM)
MPM是一种显式导出帧内预测模式的技术。考虑到当前预测块和周围邻近块有很强的相关性,利用邻近块的预测模式来构建一个最可能的帧内预测模式候选列表。如果最优的预测模式在列表中,只需要把这个模式在列表中的索引写入码流,可以节省编码帧内预测模式所需的比特数。
3、解码端导出帧内预测模式(Decoder-side Intra Mode Derivation,DIMD)
DIMD模式是一种隐式导出帧内预测模式的技术。在解码端,对块周围宽度为N的模板中的像素应用水平和垂直索贝尔(Sobel)滤波器来执行梯度直方图计算,然后将梯度的方向转换为帧内预测模式,并累加梯度的强度作为对应帧内预测模式的振幅,通过比较梯度直方图中振幅大小导出帧内预测模式。如果当前待解码的编码单元的DIMD模式标识为真,利用导出的帧内 预测模式进行帧内预测;如果DIMD模式为假,导出的帧内预测模式用于构建MPM列表。
下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的帧内预测方法及装置进行详细地说明。
如图1所示,本申请实施例提供一种帧内预测方法,包括:
步骤101,获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;
步骤102,获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;
步骤103,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式;
步骤104,根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;
其中,所述候选帧内预测模式集合包括所述梯度直方图中除所述第一帧内预测模式和所述第一候选帧内预测模式之外的至少一个帧内预测模式;更进一步地,所述第一帧内预测模式和所述第一候选帧内预测模式的振幅均大于或等于所述候选帧内预测模式集合中的每一个帧内预测模式的振幅。
可选地,所述第一帧内预测模式为所述梯度直方图中所包含的帧内预测模式对应的振幅最大(第一大)的帧内预测模式;所述第一候选帧内预测模式为所述梯度直方图中所包含的帧内预测模式对应的振幅第二大的帧内预测模式;需要说明的是本申请实施例中获取第一帧内预测模式和第一候选帧内预测模式的实现方式可以为:在获取到梯度直方图后,将所有帧内预测模式按照振幅由大到小的顺序进行排序,选择排序位置在最前面的两个帧内预测模式,可以理解为在梯度直方图中直接确定振幅第一大和第二大的帧内预测模式。
可选地,本申请实施例中的第一帧内预测模式的振幅大于或等于第一候选帧内预测模式。
本申请中并不是直接利用第一帧内预测模式和第一候选帧内预测模式进行待解码的编码单元的预测样本的获取,因用此种方式选择出来的两个帧内 预测模式可能并不是最优的,这里将第一候选帧内预测模式作为待定的帧内预测模式,若后续比对过程中发现该第一候选帧内预测模式能够直接使用,则将第一候选帧内预测模式作为第二帧内预测模式,若第一候选帧内预测模式不能够直接使用,则在比对的其他帧内预测模式选择一个能够直接使用的帧内预测模式作为第二帧内预测模式。
需要说明的是,因为在进行视频编解码时,是针对每一帧图像进行处理的,而帧图像又划分为多个编码单元,进行预测,也就是说,本申请实施例中所提到的待解码的编码单元可以理解为是当前正在处理的待解码的编码单元(可以称为当前待解码的编码单元)。
具体地,本申请实施例中的步骤101的实现方式为:
获取待解码的编码单元的相邻的已解码像素的重建样本;
根据所述重建样本,构建待解码的编码单元对应的模板;
对所述模板进行梯度分析,获取待解码的编码单元对应的帧内预测模式的梯度直方图。
例如,如图2所示,当前(Current)解码单元(Coding Unit,CU)(Current CU)表示当前待解码的编码单元,Templete所指示的区域表示当前待解码的编码单元对应的模板的重建样本,Reference of the templete所指示的区域表示当前待解码的编码单元对应的模板的参考样本。
可选地,本申请实施例的步骤103的一种可以采用的实现方式为:
步骤1031,对待解码的编码单元对应的模板的参考样本分别利用第一候选帧内预测模式以及候选帧内预测模式集合中的每一个帧内预测模式,生成所述模板的预测样本;
需要说明的是,此步骤是分别利用每一个帧内预测模式获取一个模板的预测样本。
步骤1032,对所述模板的重建样本以及与所述模板的预测样本进行第一运算;
需要说明的是,本申请实施例中的所述第一运算实现的是两个样本的比对,其主要是进行两个样本差值的获取,例如,该第一运算可以为代价计算;当然本申请实施例中并不对第一运算的具体形式进行限定,凡是能得到两个 样本差值的运算方式均属于第一运算的保护范围。
步骤1033,根据所述第一运算对应的结果,在所述第一候选帧内预测模式以及候选帧内预测模式集合中确定第二帧内预测模式;
需要说明的是,步骤1033主要实现的是,根据第一运算对应的结果,选择第一运算对应的结果指示重建样本与预测样本的差别或差异最小的帧内预测模式作为第二帧内预测模式。
可选地,在第一运算为代价计算的情况下,步骤1033的实现方式为:
将所述第一候选帧内预测模式以及候选帧内预测模式集合中对应的代价计算的结果最小的帧内预测模式,确定为第二帧内预测模式。
也就是说,重建样本与预测样本的差别或差异最小即表明代价计算的结果最小。
可选地,该代价计算的结果可以为绝对变换差之和、绝对差之和等,当然本申请实施例中并不对代价计算的结果的具体形式进行限定,凡是能体现两个样本差值的计算结果均属于代价计算的结果的保护范围。
需要说明的是,因本申请获取的是解码端导出的帧内预测模式,可选地,本申请实施例可以仅在DIMD标识为真的情况下进行第二帧内预测模式,当然本申请实施例也可以不考虑DIMD标识,即在进行预测样本获取时,直接利用此种方式先获取第一帧内预测模式和第二帧内预测模式,然后再获取预测样本。
需要说明的是,在考虑DIMD标识的情况下,需要先获取DIMD标识,可选地,本申请实施例的获取DIMD标识的方式为:
在所述获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图之前,先在码流中获取待解码的编码单元的帧内预测信息,所述帧内预测信息包括:解码端导出帧内预测模式DIMD标识。
进一步地,步骤103的实现方式为:
在所述DIMD标识为真的情况下,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
可选地,在所述DIMD标识为真的情况下,还可以进一步根据待解码的编码单元所属的图像的图像类型进行进一步地判断,具体地,在待解码的编 码单元所属的图像的图像类型为I图像的情况下,再根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
可选地,在所述DIMD标识为假的情况下,则解码端不再利用步骤103的方式获取第二帧内预测模式,而是直接将所述第一帧内预测模式和所述第一候选帧内预测模式加入到MPM列表中。
可选地,在不考虑DIMD标识的情况下,所述方法还包括以下一项:
A11、将所述第一帧内预测模式和所述第一候选帧内预测模式加入MPM列表中;
需要说明的是,因获取第二帧内预测模式需要经过一定的处理时间,在时延不允许的情况下,为了提升预测速率,选择将第一帧内预测模式和所述第一候选帧内预测模式加入MPM列表。
A12、将所述第一帧内预测模式和第二帧内预测模式加入MPM列表中;
需要说明的是,因第二帧内预测模式为较为准确的帧内预测模式,在时延允许的情况下,为了提升预测准确度,将第一帧内预测模式和第二帧内预测模式加入MPM列表。
下面对本申请的具体应用进行举例说明如下。
具体应用情况一的主要实现过程为:
步骤S101、从码流中获取当前待解码的编码单元的帧内预测信息,所述帧内预测信息包括DIMD模式标识、MPM模式标识,MPM索引值,帧内预测模式索引值等。
步骤S102、获得当前待解码的编码单元的相邻已解码像素的重建样本;
步骤S103、构建模板,模板包含当前待解码的编码单元的上方一行(或几行),和/或,左侧一列(或几列)已解码像素的重建样本;
步骤S104、对模板进行梯度分析,得到帧内预测模式的梯度直方图;
步骤S105、从梯度直方图中,选出振幅值最大的和第二大的帧内预测模式作为第一帧内预测模式和第一候选帧内预测模式;
步骤S106、根据步骤S101中获得的帧内预测信息获得当前待解码的编码单元的帧内预测模式,具体包括以下一项:
如果DIMD模式标识为假,且用到MPM列表时,则将步骤S105得到的 第一帧内预测模式和第一候选帧内预测模式加入到MPM列表中;
如果DIMD模式标识为真,则按照如下方式导出最终的第二帧内预测模式,将第一帧内预测模式和最终的第二帧内预测模式作为当前待解码的编码单元的帧内预测模式。
具体地,最终的第二帧内预测模式的导出方式为:
从梯度直方图中,选出振幅值第三大的一个帧内预测模式作为第二候选帧内预测模式,与第一候选帧内预测模式进行比较,选出最终的第二帧内预测模式;
比较方式如下:
对于第二候选帧内预测模式和第一候选帧内预测模式,分别使用模板的参考样本生成模板的预测样本,将第二候选帧内预测模式对应的模板的预测样本和重建样本进行代价计算,获取第二候选帧内预测模式对应的绝对变换差之和,将第一候选帧内预测模式对应的模板的预测样本和重建样本进行代价计算,获取第一候选帧内预测模式对应的绝对变换差之和,比较第二候选帧内预测模式对应的绝对变换差之和与第一候选帧内预测模式对应的绝对变换差之和,若第二候选帧内预测模式对应的绝对变换差之和最小,则选择第二候选帧内预测模式作为最终的第二帧内预测模式;若第一候选帧内预测模式对应的绝对变换差之和最小,则选择第一候选帧内预测模式作为最终的第二帧内预测模式。
步骤S107:使用获得的帧内预测模式计算得到当前待解码的编码单元的预测值;
具体地,该帧内预测模式为第一帧内预测模式和第一候选帧内预测模式,或者该帧内预测模式为第一帧内预测模式和第二帧内预测模式,或者该帧内预测模式也可以是其他帧内预测方式(例如,除本申请实施例中所提到的DIMD模式之外的其他方式)获取得到的帧内预测模式。
具体应用情况二的主要实现过程为:
步骤S201、获得当前待解码的编码单元的相邻已解码像素的重建样本;
步骤S202、构建模板,模板包含当前待解码的编码单元的上方一行(或几行),和/或,左侧一列(或几列)已解码像素的重建样本;
步骤S203、对模板进行梯度分析,得到帧内预测模式的梯度直方图;
步骤S204、从梯度直方图中,选出振幅值最大的和第二大的帧内预测模式作为第一帧内预测模式和第一候选帧内预测模式;
步骤S205、从梯度直方图中,选出振幅值第三大的一个帧内预测模式作为第二候选帧内预测模式以及振幅值第四大的一个帧内预测模式作为第三候选帧内预测模式,将选出的帧内预测模式与第一候选帧内预测模式进行比较,选出最终的第二帧内预测模式;
比较方式如下:
对于第二候选帧内预测模式、第三候选帧内预测模式和第一候选帧内预测模式,分别使用模板的参考样本生成模板的预测样本,将第二候选帧内预测模式对应的模板的预测样本和重建样本进行代价计算,获取第二候选帧内预测模式对应的绝对变换差之和,将第三候选帧内预测模式对应的模板的预测样本和重建样本进行代价计算,获取第三候选帧内预测模式对应的绝对变换差之和,将第一候选帧内预测模式对应的模板的预测样本和重建样本进行代价计算,获取第一候选帧内预测模式对应的绝对变换差之和,比较第二候选帧内预测模式对应的绝对变换差之和、第三候选帧内预测模式对应的绝对变换差之和与第一候选帧内预测模式对应的绝对变换差之和,若第二候选帧内预测模式对应的绝对变换差之和最小,则选择第二候选帧内预测模式作为最终的第二帧内预测模式;若第一候选帧内预测模式对应的绝对变换差之和最小,则选择第一候选帧内预测模式作为最终的第二帧内预测模式;若第三候选帧内预测模式对应的绝对变换差之和最小,则选择第三候选帧内预测模式作为最终的第二帧内预测模式。
需要说明的是,代价函数还可以是其他计算方法,在此不做限制。
步骤S206:从码流中获得当前待解码的编码单元的帧内预测信息,所述帧内预测信息包括:包括DIMD模式标识、MPM模式标识,MPM索引值,帧内预测模式索引值等;
需要说明的是,对于用到MPM列表的帧内预测方法,可以在第一类帧内预测方式中,将步骤204得到的第一候选帧内预测模式和第一帧内预测模式加入到MPM列表中;在第二类帧内预测方式中,将步骤205得到的第一 帧内预测模式和最终的第二帧内预测模式加入到MPM列表中。
需要说明的是,所述第一类帧内预测方式和第二类帧内预测方式,可以隐式导出也可显示标识,在此不做限制。
具体应用情况三的主要实现过程为:
步骤S301、从码流中获取当前待解码的编码单元的帧内预测信息,所述帧内预测信息包括DIMD模式标识、MPM模式标识,MPM索引值,帧内预测模式索引值等。
步骤S302、获得当前待解码的编码单元的相邻已解码像素的重建样本;
步骤S303、构建模板,模板包含当前待解码的编码单元的上方一行(或几行),和/或,左侧一列(或几列)已解码像素的重建样本;
步骤S304、对模板进行梯度分析,得到帧内角度预测模式的梯度直方图;
步骤S305、从梯度直方图中,选出振幅值最大的和第二大的帧内预测模式作为第一帧内预测模式和第一候选帧内预测模式;
步骤S306、根据步骤S301中获得的帧内预测信息获得当前待解码的编码单元的帧内预测模式,具体以下一项:
如果DIMD模式标识为假,且用到MPM列表时,则将步骤S305得到的第一帧内预测模式和第二候选帧内预测模式加入到MPM列表中;
如果DIMD模式标识为真且当前图像类型为I图像,则按照如下方式导出最终的第二帧内模式,将第一帧内预测模式和最终的第二帧内预测模式作为当前待解码的编码单元的帧内预测模式。
具体地,最终的第二帧内预测模式的导出方式为:
从梯度直方图中,选出振幅值第三大的一个帧内预测模式作为候选帧内预测模式,和第一候选帧内预测模式比较,选出最终的第二帧内预测模式;
比较方法如下:
对于第二候选帧内预测模式和第一候选帧内预测模式,分别使用模板的参考样本生成模板的预测样本,将第二候选帧内预测模式对应的模板的预测样本和重建样本进行代价计算,获取第二候选帧内预测模式对应的绝对变换差之和,将第一候选帧内预测模式对应的模板的预测样本和重建样本进行代价计算,获取第一候选帧内预测模式对应的绝对变换差之和,比较第二候选 帧内预测模式对应的绝对变换差之和与第一候选帧内预测模式对应的绝对变换差之和,若第二候选帧内预测模式对应的绝对变换差之和最小,则选择第二候选帧内预测模式作为最终的第二帧内预测模式;若第一候选帧内预测模式对应的绝对变换差之和最小,则选择第一候选帧内预测模式作为最终的第二帧内预测模式。
步骤S307、使用获得的帧内预测模式计算得到当前待解码的编码单元的预测值。
具体地,该帧内预测模式为第一帧内预测模式和第一候选帧内预测模式,或者该帧内预测模式为第一帧内预测模式和第二帧内预测模式,或者该帧内预测模式也可以是其他帧内预测方式(例如,除本申请实施例中所提到的DIMD模式之外的其他方式)获取得到的帧内预测模式。
需要说明的是,本申请实施例可以使DIMD模式导出的帧内预测模式更加精确,可以提高预测精度,进而提高压缩效率。
需要说明的是,本申请实施例提供的帧内预测方法,执行主体可以为帧内预测装置,或者,该帧内预测装置中的用于执行帧内预测方法的控制模块。本申请实施例中以帧内预测装置执行帧内预测方法为例,说明本申请实施例提供的帧内预测装置。
如图3所示,本申请实施例提供一种帧内预测装置300,包括:
第一获取模块301,用于获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;
第二获取模块302,用于获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;
第三获取模块303,用于根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式;
第四获取模块304,用于根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;
其中,所述候选帧内预测模式集合包括所述梯度直方图中除所述第一帧内预测模式和所述第一候选帧内预测模式之外的至少一个帧内预测模式。
可选地,所述第三获取模块303,包括:
生成单元,用于对待解码的编码单元对应的模板的参考样本分别利用第一候选帧内预测模式以及候选帧内预测模式集合中的每一个帧内预测模式,生成所述模板的预测样本;
运算单元,用于对所述模板的重建样本以及与所述模板的预测样本进行第一运算;
确定单元,用于根据所述第一运算对应的结果,在所述第一候选帧内预测模式以及候选帧内预测模式集合中确定第二帧内预测模式。
可选地,所述第一运算为代价计算;
所述确定单元,用于:
将所述第一候选帧内预测模式以及候选帧内预测模式集合中对应的代价计算的结果最小的帧内预测模式,确定为第二帧内预测模式。
可选地,在所述第一获取模块301获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图之前,还包括:
第五获取模块,用于在码流中获取待解码的编码单元的帧内预测信息,所述帧内预测信息包括:解码端导出帧内预测模式DIMD标识;
所述第三获取模块303,用于:
在所述DIMD标识为真的情况下,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
可选地,所述第三获取模块303,用于:
在待解码的编码单元所属的图像的图像类型为I图像的情况下,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
可选地,所述装置,还包括:
第一处理模块,用于在所述DIMD标识为假的情况下,将所述第一帧内预测模式和所述第一候选帧内预测模式加入到最可能的帧内预测模式MPM列表中。
可选地,所述装置,还包括以下一项:
第二处理模块,用于将所述第一帧内预测模式和所述第一候选帧内预测模式加入MPM列表中;
第三处理模块,用于将所述第一帧内预测模式和第二帧内预测模式加入MPM列表中。
可选地,所述第一帧内预测模式和所述第一候选帧内预测模式的振幅均大于或等于所述候选帧内预测模式集合中的每一个帧内预测模式的振幅。
可选地,所述第一帧内预测模式为所述梯度直方图中所包含的帧内预测模式对应的振幅最大的帧内预测模式。
可选地,所述第一候选帧内预测模式为所述梯度直方图中所包含的帧内预测模式对应的振幅第二大的帧内预测模式。
需要说明的是,通过先依据梯度直方图获取第一帧内预测模式和第一候选帧内预测模式,然后根据第一候选帧内预测模式以及梯度直方图中的其他帧内预测模式,确定第二帧内预测模式,最后再根据第一帧内预测模式和第二帧内预测模式获取待解码的编码单元的预测样本;相比与现有技术的直接选择第一帧内预测模式和第二帧内预测模式的方式,本申请实施例在首次选择的基础上,又增加了二次选择,能够对首次选择的帧内预测模式进行是否最优的验证,保证最终确定的帧内预测模式是最优的,以此能够提升预测准确度。
本申请实施例中的帧内预测装置可以是装置,具有操作系统的装置或电子设备,也可以是终端中的部件、集成电路、或芯片。该装置或电子设备可以是移动终端,也可以为非移动终端。示例性的,移动终端可以包括但不限于上述所列举的终端11的类型,非移动终端可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(Personal Computer,PC)、电视机(Television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例提供的帧内预测装置能够实现图1的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例还提供一种帧内预测装置,包括处理器和通信接口,处理器用于获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;
获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;
根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二 帧内预测模式;
根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;
其中,所述候选帧内预测模式集合包括所述梯度直方图中除所述第一帧内预测模式和所述第一候选帧内预测模式之外的至少一个帧内预测模式。
该装置实施例是与上述装置侧方法实施例对应的,上述方法实施例的各个实施过程和实现方式均可适用于该装置实施例中,且能达到相同的技术效果。具体地,图4为实现本申请实施例的一种帧内预测装置的硬件结构示意图。
该帧内预测装置400包括但不限于:射频单元401、网络模块402、音频输出单元403、输入单元404、传感器405、显示单元406、用户输入单元407、接口单元408、存储器409、以及处理器410等中的至少部分部件。
本领域技术人员可以理解,帧内预测装置400还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器410逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图4中示出的帧内预测装置结构并不构成对装置的限定,帧内预测装置可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
应理解的是,本申请实施例中,输入单元404可以包括图形处理器(Graphics Processing Unit,GPU)4041和麦克风4042,图形处理器4041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元406可包括显示面板4061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板4061。用户输入单元407包括触控面板4071以及其他输入设备4072。触控面板4071,也称为触摸屏。触控面板4071可包括触摸检测装置和触摸控制器两个部分。其他输入设备4072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
本申请实施例中,射频单元401将来自网络侧设备的下行数据接收后,给处理器410处理;另外,将上行的数据发送给网络侧设备。通常,射频单 元401包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。
存储器409可用于存储软件程序或指令以及各种数据。存储器409可主要包括存储程序或指令区和存储数据区,其中,存储程序或指令区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器409可以包括高速随机存取存储器,还可以包括非易失性存储器,其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。
处理器410可包括一个或多个处理单元;可选的,处理器410可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序或指令等,调制解调处理器主要处理无线通信,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器410中。
其中,处理器410用于实现:
获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;
获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;
根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式;
根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;
其中,所述候选帧内预测模式集合包括所述梯度直方图中除所述第一帧内预测模式和所述第一候选帧内预测模式之外的至少一个帧内预测模式。
本申请实施例的帧内预测装置通过先依据梯度直方图获取第一帧内预测模式和第一候选帧内预测模式,然后根据第一候选帧内预测模式以及梯度直方图中的其他帧内预测模式,确定第二帧内预测模式,最后再根据第一帧内预测模式和第二帧内预测模式获取待解码的编码单元的预测样本,相比与现有技术的直接选择第一帧内预测模式和第二帧内预测模式的方式,本申请实 施例在首次选择的基础上,又增加了二次选择,能够对首次选择的帧内预测模式进行是否最优的验证,保证最终确定的帧内预测模式是最优的,以此能够提升预测准确度。
可选地,处理器410用于实现:
对待解码的编码单元对应的模板的参考样本分别利用第一候选帧内预测模式以及候选帧内预测模式集合中的每一个帧内预测模式,生成所述模板的预测样本;
对所述模板的重建样本以及与所述模板的预测样本进行第一运算;
根据所述第一运算对应的结果,在所述第一候选帧内预测模式以及候选帧内预测模式集合中确定第二帧内预测模式。
可选地,所述第一运算为代价计算;
进一步地,处理器410用于实现:
将所述第一候选帧内预测模式以及候选帧内预测模式集合中对应的代价计算的结果最小的帧内预测模式,确定为第二帧内预测模式。
可选地,处理器410还用于实现:
在码流中获取待解码的编码单元的帧内预测信息,所述帧内预测信息包括:解码端导出帧内预测模式DIMD标识;
所述根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式,包括:
在所述DIMD标识为真的情况下,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
可选地,处理器410还用于实现:
在待解码的编码单元所属的图像的图像类型为I图像的情况下,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
可选地,处理器410还用于实现:
在所述DIMD标识为假的情况下,将所述第一帧内预测模式和所述第一候选帧内预测模式加入到最可能的帧内预测模式MPM列表中。
可选地,处理器410还用于实现以下一项:
将所述第一帧内预测模式和所述第一候选帧内预测模式加入MPM列表中;
将所述第一帧内预测模式和第二帧内预测模式加入MPM列表中。
可选地,所述第一帧内预测模式和所述第一候选帧内预测模式的振幅均大于或等于所述候选帧内预测模式集合中的每一个帧内预测模式的振幅。
可选地,所述第一帧内预测模式为所述梯度直方图中所包含的帧内预测模式对应的振幅最大的帧内预测模式。
可选地,所述第一候选帧内预测模式为所述梯度直方图中所包含的帧内预测模式对应的振幅第二大的帧内预测模式。
优选的,本申请实施例还提供一种帧内预测装置,包括处理器,存储器,存储在存储器上并可在所述处理器上运行的程序或指令,该程序或指令被处理器执行时实现帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
可选的,如图5所示,本申请实施例还提供一种通信设备500,包括处理器501,存储器502,存储在存储器502上并可在所述处理器501上运行的程序或指令,例如,该通信设备500为帧内预测装置时,该程序或指令被处理器501执行时实现上述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
本申请实施例另提供了一种计算机程序产品,所述计算机程序产品存储在非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例另提供了一种电子设备,所述电子设备被配置为执行述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (22)

  1. 一种帧内预测方法,包括:
    获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;
    获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;
    根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式;
    根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;
    其中,所述候选帧内预测模式集合包括所述梯度直方图中除所述第一帧内预测模式和所述第一候选帧内预测模式之外的至少一个帧内预测模式。
  2. 根据权利要求1所述的方法,其中,所述根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式,包括:
    对待解码的编码单元对应的模板的参考样本分别利用第一候选帧内预测模式以及候选帧内预测模式集合中的每一个帧内预测模式,生成所述模板的对应的预测样本;
    对所述模板的重建样本以及与所述模板的预测样本进行第一运算;
    根据所述第一运算对应的结果,在所述第一候选帧内预测模式以及候选帧内预测模式集合中确定第二帧内预测模式。
  3. 根据权利要求2所述的方法,其中,所述第一运算为代价计算;
    所述根据所述第一运算对应的结果,在所述第一候选帧内预测模式以及候选帧内预测模式集合中确定第二帧内预测模式,包括:
    将所述第一候选帧内预测模式以及候选帧内预测模式集合中对应的代价计算的结果最小的帧内预测模式,确定为第二帧内预测模式。
  4. 根据权利要求1所述的方法,其中,在所述获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图之前,还包括:
    在码流中获取待解码的编码单元的帧内预测信息,所述帧内预测信息包括:解码端导出帧内预测模式DIMD标识;
    所述根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取 第二帧内预测模式,包括:
    在所述DIMD标识为真的情况下,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
  5. 根据权利要求4所述的方法,其中,所述根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式,包括:
    在待解码的编码单元所属的图像的图像类型为I图像的情况下,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
  6. 根据权利要求4所述的方法,其中,还包括:
    在所述DIMD标识为假的情况下,将所述第一帧内预测模式和所述第一候选帧内预测模式加入到最可能的帧内预测模式MPM列表中。
  7. 根据权利要求1所述的方法,其中,还包括以下一项:
    将所述第一帧内预测模式和所述第一候选帧内预测模式加入MPM列表中;
    将所述第一帧内预测模式和第二帧内预测模式加入MPM列表中。
  8. 根据权利要求1所述的方法,其中,所述第一帧内预测模式和所述第一候选帧内预测模式的振幅均大于或等于所述候选帧内预测模式集合中的每一个帧内预测模式的振幅。
  9. 根据权利要求1所述的方法,其中,所述第一帧内预测模式为所述梯度直方图中所包含的帧内预测模式对应的振幅最大的帧内预测模式。
  10. 根据权利要求1所述的方法,其中,所述第一候选帧内预测模式为所述梯度直方图中所包含的帧内预测模式对应的振幅第二大的帧内预测模式。
  11. 一种帧内预测装置,包括:
    第一获取模块,用于获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图;
    第二获取模块,用于获取所述梯度直方图中的第一帧内预测模式和第一候选帧内预测模式;
    第三获取模块,用于根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式;
    第四获取模块,用于根据所述第一帧内预测模式和所述第二帧内预测模式,获取待解码的编码单元的预测样本;
    其中,所述候选帧内预测模式集合包括所述梯度直方图中除所述第一帧内预测模式和所述第一候选帧内预测模式之外的至少一个帧内预测模式。
  12. 根据权利要求11所述的装置,其中,所述第三获取模块,包括:
    生成单元,用于对待解码的编码单元对应的模板的参考样本分别利用第一候选帧内预测模式以及候选帧内预测模式集合中的每一个帧内预测模式,生成所述模板的预测样本;
    运算单元,用于对所述模板的重建样本以及与所述模板的预测样本进行第一运算;
    确定单元,用于根据所述第一运算对应的结果,在所述第一候选帧内预测模式以及候选帧内预测模式集合中确定第二帧内预测模式。
  13. 根据权利要求12所述的装置,其中,所述第一运算为代价计算;
    所述确定单元,用于:
    将所述第一候选帧内预测模式以及候选帧内预测模式集合中对应的代价计算的结果最小的帧内预测模式,确定为第二帧内预测模式。
  14. 根据权利要求11所述的装置,其中,在所述第一获取模块获取待解码的编码单元对应的模板的帧内预测模式的梯度直方图之前,还包括:
    第五获取模块,用于在码流中获取待解码的编码单元的帧内预测信息,所述帧内预测信息包括:解码端导出帧内预测模式DIMD标识;
    所述第三获取模块,用于:
    在所述DIMD标识为真的情况下,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
  15. 根据权利要求14所述的装置,其中,所述第三获取模块,用于:
    在待解码的编码单元所属的图像的图像类型为I图像的情况下,根据所述第一候选帧内预测模式以及候选帧内预测模式集合,获取第二帧内预测模式。
  16. 根据权利要求14所述的装置,其中,还包括:
    第一处理模块,用于在所述DIMD标识为假的情况下,将所述第一帧内 预测模式和所述第一候选帧内预测模式加入到最可能的帧内预测模式MPM列表中。
  17. 根据权利要求11所述的装置,其中,还包括以下一项:
    第二处理模块,用于将所述第一帧内预测模式和所述第一候选帧内预测模式加入MPM列表中;
    第三处理模块,用于将所述第一帧内预测模式和第二帧内预测模式加入MPM列表中。
  18. 一种帧内预测装置,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,其中,所述程序或指令被所述处理器执行时实现如权利要求1至10任一项所述的帧内预测方法的步骤。
  19. 一种可读存储介质,所述可读存储介质上存储程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1至10任一项所述的帧内预测方法的步骤。
  20. 一种芯片,包括处理器和通信接口,所述通信接口和所述处理器耦合,其中,所述处理器用于运行程序或指令,实现如权利要求1至10任一项所述的帧内预测方法的步骤。
  21. 一种计算机程序产品,所述计算机程序产品被存储在非瞬态的可读存储介质中,其中,所述计算机程序产品被至少一个处理器执行以实现如权利要求1至10任一项所述的帧内预测方法的步骤。
  22. 一种电子设备,被配置为执行如权利要求1至10任一项所述的帧内预测方法的步骤。
PCT/CN2022/120535 2021-09-28 2022-09-22 帧内预测方法及装置 WO2023051375A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111144070.0 2021-09-28
CN202111144070.0A CN115883833A (zh) 2021-09-28 2021-09-28 帧内预测方法及装置

Publications (1)

Publication Number Publication Date
WO2023051375A1 true WO2023051375A1 (zh) 2023-04-06

Family

ID=85763528

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/120535 WO2023051375A1 (zh) 2021-09-28 2022-09-22 帧内预测方法及装置

Country Status (2)

Country Link
CN (1) CN115883833A (zh)
WO (1) WO2023051375A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724509A (zh) * 2012-06-19 2012-10-10 清华大学 视频序列的最优帧内编码模式选择方法及装置
US20200296356A1 (en) * 2019-03-12 2020-09-17 Ateme Method for image processing and apparatus for implementing the same
CN113170144A (zh) * 2020-02-28 2021-07-23 深圳市大疆创新科技有限公司 视频处理的方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724509A (zh) * 2012-06-19 2012-10-10 清华大学 视频序列的最优帧内编码模式选择方法及装置
US20200296356A1 (en) * 2019-03-12 2020-09-17 Ateme Method for image processing and apparatus for implementing the same
CN113170144A (zh) * 2020-02-28 2021-07-23 深圳市大疆创新科技有限公司 视频处理的方法及装置

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
C. ZHOU (VIVO), Z. LV (VIVO), J. ZHANG (VIVO): "EE2-related: Optimization on the second mode derivation of DIMD blending mode", 136. MPEG MEETING; 20211011 - 20211015; ONLINE; (MOTION PICTURE EXPERT GROUP OR ISO/IEC JTC1/SC29/WG11), 30 September 2021 (2021-09-30), XP030297708 *
X. LI (ALIBABA-INC), R.-L. LIAO (ALIBABA-INC), J. CHEN (ALIBABA-INC), Y. YE (ALIBABA): "EE2-related: A combination of CIIP and DIMD/TIMD", 23. JVET MEETING; 20210707 - 20210716; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 7 July 2021 (2021-07-07), XP030295930 *

Also Published As

Publication number Publication date
CN115883833A (zh) 2023-03-31

Similar Documents

Publication Publication Date Title
US11330285B2 (en) Picture prediction method and related device
US20220329845A1 (en) Image encoding method and apparatus, and image decoding method and apparatus
US9332271B2 (en) Utilizing a search scheme for screen content video coding
CN106412702B (zh) 一种视频片段的截取方法和装置
WO2022257970A1 (zh) 点云的几何信息编码处理方法、解码处理方法及相关设备
US20190230349A1 (en) Prediction mode selection method, video encoding device, and storage medium
CN110234008A (zh) 编码方法、解码方法及装置
CN112532975B (zh) 视频编码方法、装置、计算机设备及存储介质
WO2022257968A1 (zh) 点云编码方法、点云解码方法及终端
CN114079769A (zh) 视频编码方法、装置、设备及计算机可读存储介质
US20100158105A1 (en) Post-processing encoding system and method
JP5241743B2 (ja) デュアルステージイントラプレディクションビデオエンコーディングシステム及び方法
WO2023051375A1 (zh) 帧内预测方法及装置
US20140099039A1 (en) Image processing device, image processing method, and image processing system
CN116489385A (zh) 视频编码方法、解码方法、装置、电子设备及存储介质
CN115834906A (zh) 视频编解码方法、装置、电子设备及介质
KR20240006667A (ko) 점군 속성 정보 부호화 방법, 복호화 방법, 장치 및 관련 기기
CN117768650A (zh) 图像块的色度预测方法、装置、电子设备及存储介质
Loose et al. A hardware-friendly and configurable heuristic targeting vvc inter-frame prediction
US12058312B2 (en) Generative adversarial network for video compression
CN113038179A (zh) 视频编码方法、视频解码方法、装置及电子设备
WO2024212920A1 (zh) 联合帧间帧内的预测方法、装置、终端及可读存储介质
CN102300088B (zh) 画面内预测模式最佳化方法与图像压缩方法以及装置
CN118381936B (zh) 一种视频数据处理方法、装置、设备及存储介质
WO2023025024A1 (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: 22874761

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

Country of ref document: EP

Kind code of ref document: A1