WO2025007830A1 - 帧内预测方法、装置及设备 - Google Patents

帧内预测方法、装置及设备 Download PDF

Info

Publication number
WO2025007830A1
WO2025007830A1 PCT/CN2024/102805 CN2024102805W WO2025007830A1 WO 2025007830 A1 WO2025007830 A1 WO 2025007830A1 CN 2024102805 W CN2024102805 W CN 2024102805W WO 2025007830 A1 WO2025007830 A1 WO 2025007830A1
Authority
WO
WIPO (PCT)
Prior art keywords
template
pixels
target
intra
image block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2024/102805
Other languages
English (en)
French (fr)
Inventor
周川
吕卓逸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Publication of WO2025007830A1 publication Critical patent/WO2025007830A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/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/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/182Methods 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 a pixel

Definitions

  • the present application belongs to the field of coding and decoding technology, and specifically relates to an intra-frame prediction method, device and equipment.
  • the decoder applies horizontal and vertical Sobel filters to the pixels in the template with a width of N around the block to perform gradient histogram calculation, then converts the direction of the gradient into the intra angle prediction mode, and accumulates the intensity of the gradient as the amplitude of the corresponding intra angle mode, and derives the intra prediction mode by comparing the amplitude in the gradient histogram. Due to the diversity of image textures in real video scenes, the amplitude in the histogram calculated based on the above method will be relatively scattered, and it is difficult to obtain the main texture direction in the histogram, resulting in low prediction accuracy of the prediction mode determined based on the histogram.
  • DIMD decoder-side intra mode derivation
  • the embodiments of the present application provide an intra-frame prediction method, apparatus and device, which can solve the problem of low prediction accuracy of the prediction mode determined based on the histogram in the prior art.
  • an intra-frame prediction method comprising:
  • a target prediction value corresponding to the target image block is determined.
  • an intra-frame prediction device comprising:
  • a processing module configured to perform filtering processing on the template pixels corresponding to the target image block to obtain filtered template pixels, wherein the template pixels include at least part of the reconstructed pixels in the adjacent pixel area of the target image block;
  • a first acquisition module configured to acquire at least one intra-frame prediction mode and an amplitude of the at least one intra-frame prediction mode according to the filtered template pixels
  • a first determination module configured to determine a target intra-frame prediction mode in the at least one intra-frame prediction mode according to an amplitude of the at least one intra-frame prediction mode
  • the second determination module is used to determine a target prediction value corresponding to the target image block according to the target intra-frame prediction mode.
  • an electronic device comprising a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions implementing the steps of the method described in the first aspect when executed by the processor.
  • an electronic device comprising a processor and a communication interface, wherein the processor is used to filter template pixels corresponding to a target image block to obtain filtered template pixels, wherein the template pixels include at least part of the reconstructed pixels in an adjacent pixel area of the target image block; based on the filtered template pixels, at least one intra-frame prediction mode and the amplitude of the at least one intra-frame prediction mode are obtained; based on the amplitude of the at least one intra-frame prediction mode, a target intra-frame prediction mode is determined in the at least one intra-frame prediction mode; and based on the target intra-frame prediction mode, a target prediction value corresponding to the target image block is determined.
  • a readable storage medium on which a program or instruction is stored.
  • the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
  • a chip comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
  • a computer program/program product is provided, wherein the computer program/program product is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.
  • the template pixels corresponding to the target image block are filtered to obtain filtered template pixels, the template pixels including at least part of the reconstructed pixels in the adjacent pixel area of the target image block; at least one intra-frame prediction mode and the amplitude of the at least one intra-frame prediction mode are obtained based on the filtered template pixels; the target intra-frame prediction mode is determined in the at least one intra-frame prediction mode based on the amplitude of the at least one intra-frame prediction mode; and the target prediction value corresponding to the target image block is determined based on the target intra-frame prediction mode.
  • filtering the template pixels can make the amplitude of the intra-frame prediction mode of the main texture direction of the template pixels more prominent, so that the target intra-frame prediction mode that can reflect the main texture direction of the target image block can be obtained based on the filtered template pixels, and then the prediction accuracy can be effectively improved based on the target intra-frame prediction mode.
  • FIG1 is a schematic diagram showing a flow chart of an intra-frame prediction method according to an embodiment of the present application.
  • FIG2 is a schematic diagram showing one of the template pixels after filtering in an embodiment of the present application.
  • FIG3 is a second schematic diagram showing template pixels after filtering in an embodiment of the present application.
  • FIG4 is a schematic diagram showing a first portion of pixels and a second portion of pixels in an embodiment of the present application
  • FIG5 is a schematic diagram showing modules of an intra-frame prediction device according to an embodiment of the present application.
  • FIG6 is a block diagram showing a structure of an electronic device according to an embodiment of the present application.
  • FIG. 7 is a block diagram showing a structure of a terminal according to an embodiment of the present application.
  • first, second, etc. of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by “first” and “second” are generally of one type, and the number of objects is not limited, for example, the first object can be one or more.
  • “or” in the present application represents at least one of the connected objects.
  • “A or B” covers three schemes, namely, Scheme 1: including A but not including B; Scheme 2: including B but not including A; Scheme 3: including both A and B.
  • the character "/" generally indicates that the objects associated with each other are in an "or” relationship.
  • indication in this application can be a direct indication (or explicit indication) or an indirect indication (or implicit indication).
  • a direct indication can be understood as the sender explicitly informing the receiver of specific information, operations to be performed, or request results in the sent indication;
  • an indirect indication can be understood as the receiver determining the corresponding information according to the indication sent by the sender, or making a judgment and determining the operation to be performed or the request result according to the judgment result.
  • LTE Long Term Evolution
  • LTE-A Long Term Evolution-Advanced
  • CDMA Code Division Multiple Access
  • TDMA Time Division Multiple Access
  • FDMA Frequency Division Multiple Access
  • OFDMA Orthogonal Frequency Division Multiple Access
  • SC-FDMA Single-carrier Frequency-Division Multiple Access
  • NR New Radio
  • 6G 6th Generation
  • a frame of image is divided into many macroblocks, and prediction blocks are obtained by intra-frame prediction or inter-frame prediction.
  • the difference between the original block and the prediction block is the residual block, which is then transformed, quantized, and entropy encoded.
  • Intra-frame prediction has many prediction modes to handle various types of textures in images, including direct current (DC), planar, and some angle prediction modes.
  • DC direct current
  • planar planar
  • some angle prediction modes Using the surrounding reconstructed pixels as input, the prediction value of the current prediction block is obtained through the specified prediction mode, achieving the purpose of removing spatial redundancy.
  • This specified prediction mode index can be obtained explicitly from the bitstream or implicitly inferred from the decoding end.
  • the DIMD mode is a technology for implicitly deriving intra-frame prediction modes.
  • horizontal and vertical Sobel filters are applied to the pixels in the template with a width of N around the block to perform gradient histogram calculation, and then the direction of the gradient is converted to the intra-frame angle prediction mode, and the intensity of the gradient is accumulated as the amplitude of the corresponding intra-frame angle mode.
  • the intra-frame prediction mode is derived by comparing the amplitude size in the gradient histogram.
  • the template pixels are at least part of the pixels in the pixel area adjacent to the target image block.
  • a histogram is used to derive up to 5 intra-frame prediction modes and their corresponding weights, as well as a planar mode (weight is fixed at 16/64), and up to 6 intra-frame prediction modes are fused to the final luminance prediction value.
  • the DIMD chroma mode uses the DIMD derivation method to derive the chroma intra prediction mode of the current block based on the adjacent reconstructed luminance and chroma (Cb and Cr) samples in the second adjacent rows and columns. Specifically, the horizontal gradient and vertical gradient are calculated based on the reconstructed luminance samples and reconstructed chroma samples at the same position of the current chroma block to construct a histogram.
  • an embodiment of the present application provides an intra-frame prediction method, including:
  • Step 101 filtering the template pixels corresponding to the target image block to obtain filtered template pixels, where the template pixels include at least part of the reconstructed pixels in the adjacent pixel area of the target image block.
  • the target image block is an image block that needs to be intra-predicted.
  • a distance between pixels in the adjacent pixel area and pixels of the target image block is less than or equal to a preset distance.
  • Step 102 Obtain at least one intra-frame prediction mode and an amplitude of the at least one intra-frame prediction mode according to the filtered template pixels.
  • At least one intra-frame prediction mode and an amplitude of the at least one intra-frame prediction mode are acquired based on the filtered template pixels.
  • At least one intra-frame prediction mode and an amplitude of the at least one intra-frame prediction mode are obtained based on the filtered template pixels and the unfiltered template pixels, or based on the filtered template pixels.
  • the filtered template pixel refers to the reconstructed pixel after filtering processing is performed on the template pixel
  • the unfiltered template pixel refers to the reconstructed pixel without filtering processing on the template pixel
  • Step 103 determining a target intra prediction mode in the at least one intra prediction mode according to the amplitude of the at least one intra prediction mode;
  • M intra-frame prediction modes with the largest amplitudes are selected from the at least two intra-frame prediction modes as the target intra-frame prediction modes, where M is a positive integer.
  • M is less than N
  • N refers to the number of intra-frame prediction modes determined based on unfiltered template pixels and used to predict the target image block
  • N is a positive integer
  • the intra-frame prediction mode of the main texture direction in the template pixel can be obtained, so that the purpose of prediction based on the main texture direction can be achieved, and the coding complexity can also be reduced.
  • Step 104 Determine a target prediction value corresponding to the target image block according to the target intra-frame prediction mode.
  • the target intra-frame prediction mode includes at least two prediction modes
  • a prediction value obtained by predicting the target image block based on each prediction mode is obtained; and a target prediction value of the target image block is obtained based on the at least two prediction values.
  • At least two prediction values are processed based on a preset algorithm to obtain a target prediction value of the target image block.
  • the preset algorithm may be a weighted averaging algorithm.
  • the template pixels corresponding to the target image block are filtered to obtain filtered template pixels, the template pixels including at least part of the reconstructed pixels in the adjacent pixel area of the target image block; at least one intra-frame prediction mode and the amplitude of the at least one intra-frame prediction mode are obtained based on the filtered template pixels; the target intra-frame prediction mode is determined in the at least one intra-frame prediction mode based on the amplitude of the at least one intra-frame prediction mode; the target prediction value corresponding to the target image block is determined based on the target intra-frame prediction mode.
  • filtering the template pixels can make the amplitude of the intra-frame prediction mode of the main texture direction of the template pixels more prominent, so that the target intra-frame prediction mode that can reflect the main texture direction of the target image block can be obtained based on the filtered template pixels, and then the prediction accuracy can be effectively improved based on the target intra-frame prediction mode.
  • obtaining at least one intra-frame prediction mode corresponding to the filtered template pixel and an amplitude of the at least one intra-frame prediction mode includes:
  • the at least one intra-frame prediction mode and the amplitude of the at least one intra-frame prediction mode are acquired according to the template pixel histogram.
  • a template pixel histogram is obtained based on the filtered template pixels.
  • a template pixel histogram is obtained based on the filtered template pixels and the template pixels that are not filtered.
  • the horizontal and vertical Sobel filters may be applied to the filtered template pixels to perform gradient histogram calculation, and then the direction of the gradient is converted to the intra-frame angle prediction mode, and the intensity of the gradient is accumulated as the amplitude of the corresponding intra-frame angle prediction mode.
  • the direction of the gradient is G x represents the horizontal gradient calculated based on the template pixels
  • G y represents the vertical gradient calculated based on the template pixels
  • the amplitude G
  • the main texture direction in the template pixels can be enhanced, so that the intra-frame prediction mode of the main texture direction can be obtained based on the filtered template pixels, making the prediction result more accurate.
  • filtering the template pixels corresponding to the target image block to obtain filtered template pixels includes:
  • the filter identifier corresponding to the target image block is a first filter identifier
  • filtering is performed on the template pixels corresponding to the target image block to obtain filtered template pixels, wherein the first filter identifier is used to indicate that filtering is performed on the template pixels corresponding to the target image block;
  • filtering is performed on the template pixel corresponding to the target image block to obtain a filtered template pixel
  • the first target parameter includes at least one of noise intensity, image energy, and image entropy.
  • the first filter identifier may be obtained from the bitstream or derived by the decoding end.
  • the filter identifier when the filter identifier is 1 (i.e., the first filter identifier), it indicates that the template pixels corresponding to the target image block are filtered, and when the filter identifier is 0 (the second filter identifier), it indicates that the template pixels corresponding to the target image block are not filtered.
  • the noise intensity can be obtained by the following method:
  • image energy can be obtained by the following methods:
  • the image energy is obtained by adding the square of each pixel value in the image and dividing the result by the total number of pixels.
  • the image entropy can be obtained by the following method:
  • the occurrence probability of each pixel value in the image is obtained, and the occurrence probability of each pixel value is multiplied by the logarithm of the probability to obtain the multiplication result. Multiple multiplication results are added together to obtain the image entropy.
  • filtering may cause the image to become distorted or unclear, making the histogram statistics inaccurate. Therefore, when the value of the first target parameter is less than or equal to the preset threshold, the template pixels are filtered to improve the accuracy of the histogram statistics.
  • the filter identifier in the embodiment of the present application can be at the frame level (ie, each image frame corresponds to a filter identifier) or at the block level (ie, one image block corresponds to a filter identifier).
  • the method of the embodiment of the present application further includes:
  • the filter identifier corresponding to the target image block is the first filter identifier.
  • the filter identifier corresponding to the target image block is the second filter identifier.
  • filtering the template pixels corresponding to the target image block to obtain filtered template pixels includes:
  • a target filter Determining a target filter according to a target filter strength identifier corresponding to the target image block, the target filter corresponding to the target filter strength identifier, or determining the target filter according to a value of a second target parameter of the template pixel, the second target parameter including at least one of noise intensity, image energy, and image entropy;
  • the template pixels corresponding to the target image block are filtered according to the target filter to obtain filtered template pixels.
  • the second target parameter in the embodiment of the present application may be the same as or different from the first target parameter.
  • the filter Since the filter will enhance the noise of the image, it is necessary to control the strength of the filter when using the filter to avoid excessive enhancement of the image.
  • the decoding end determines the target filter based on the target filter strength identifier, and the target filter strength identifier can be obtained from the bitstream or derived by the decoding end.
  • the method of the embodiment of the present application further includes:
  • a target filter strength identifier corresponding to the target image block is determined according to a second target parameter of the template pixel, wherein different noise intensities correspond to different target filter strength identifiers.
  • the filter strength indicator is 0, and the corresponding target filter is:
  • the filter strength indicator is 1, and the corresponding target filter is:
  • the filter strength indicator is 2, and the corresponding target filter is:
  • the decoding end directly determines the target filter based on the value of the second target parameter of the template pixel. Specifically, the image noise intensity is determined based on the value of the second target parameter, and the target filter is determined based on the image noise intensity.
  • filter F0 is selected; if the noise intensity is greater than threshold 1 and less than threshold 2, filter F1 is selected; if the noise intensity is greater than threshold 2, filter F2 is selected.
  • the target filter includes at least one of a high-pass filter and a low-pass filter.
  • the template pixels are filtered using the filter F1 to obtain a pixel template with S rows and S columns after filtering.
  • the gradient of the template pixels (first part of pixels) above the target image block can be calculated using the 2x3 operator.
  • the gradient of the template pixels (second part of pixels) on the left side of the template image block can be calculated using the 3x2 operator.
  • a high-pass filter may be used to filter the chrominance component and the luminance component, or a high-pass filter may be used to filter the luminance component and a low-pass filter may be used to filter the chrominance component.
  • a histogram is used to derive a maximum of M-1 intra-frame prediction modes and their corresponding weights as well as a planar mode (the weight is fixed at 16/64).
  • a maximum of M intra-frame prediction modes are fused to obtain a final brightness prediction value.
  • M is less than 5.
  • the reconstructed luminance samples are filtered with a low-pass filter.
  • the low-pass filter may be the following filter:
  • the features of chrominance components are usually composed of color changes and color textures in the image, these features usually do not have strong directionality in space.
  • the pixel values can be averaged to average the noise and details of the surrounding pixels, thereby reducing the noise and details in the image and making the image smoother.
  • filtering the template pixels corresponding to the target image block to obtain filtered template pixels includes:
  • the template position identifier of the template pixel is a first position identifier, filtering a first part of pixels in the template pixel to obtain filtered template pixels;
  • filtering is performed on a second part of pixels in the template pixel to obtain filtered template pixels
  • filtering is performed on a first part of pixels and a second part of pixels in the template pixel to obtain filtered template pixels;
  • the first part of pixels includes pixels in the template in a first direction of the target image block, and the second part of pixels includes pixels in the template in a second direction of the target image block.
  • the first direction is upward, and the second direction is leftward. That is, the first part of pixels includes pixels in the template that are located above the target image block, and the second part of pixels includes pixels in the template that are located on the left side of the target image block.
  • the template position identifier is 1 (first position identifier)
  • the first part of the pixels is filtered
  • the template position identifier is 0 (second position identifier)
  • the second part of the pixels is filtered
  • the template position identifier is 2 (third position identifier)
  • the noise intensity of the first part of pixels and the second part of pixels are calculated respectively. If the noise intensity of the first part of pixels is less than the noise intensity of the second part of pixels, the first part of pixels are filtered; if the noise intensity of the first part of pixels is greater than the noise intensity of the second part of pixels, the second part of pixels are filtered.
  • filtering is performed on a third part of pixels in the target pixel to obtain filtered template pixels
  • filtering is performed on a sixth portion of pixels in the target pixel to obtain filtered template pixels.
  • the third part of pixels includes pixels in the template in the third direction of the target image block
  • the fourth part of pixels includes pixels in the template in the fourth direction of the target image block
  • the fifth part of pixels includes pixels in the template in the fifth direction of the target image block
  • the sixth part of pixels includes pixels in the template in the sixth direction of the target image block
  • the sixth part of pixels includes pixels in the template in the seventh direction of the target image block.
  • the third direction may be specifically the upper left
  • the fourth direction may be specifically the right
  • the fifth direction may be specifically the bottom
  • the seventh direction may be the bottom right.
  • corresponding position identifiers may also be set to filter some pixels located in the upper right direction, the lower left direction, etc. of the target image, which will not be described in detail here.
  • a template pixel histogram is obtained based on the filtered template pixels; when the above-mentioned first part of pixels is filtered, a template pixel histogram can be obtained based on the filtered template pixels and unfiltered template pixels (such as the second part of template pixels); when the above-mentioned second part of pixels is filtered, a template pixel histogram can be obtained based on the filtered template pixels and unfiltered template pixels (such as the first part of template pixels).
  • filtering is performed on the template pixels corresponding to the target image block to obtain filtered template pixels, wherein the template pixels include at least part of the reconstructed pixels in the adjacent pixel area of the target image block; at least one intra-frame prediction mode and the amplitude of the at least one intra-frame prediction mode are obtained according to the filtered template pixels; According to the amplitude of the at least one intra-frame prediction mode, a target intra-frame prediction mode is determined in the at least one intra-frame prediction mode; according to the target intra-frame prediction mode, a target prediction value corresponding to the target image block is determined.
  • filtering the template pixels can make the amplitude of the intra-frame prediction mode of the main texture direction of the template pixels more prominent, so that the target intra-frame prediction mode that can reflect the main texture direction of the target image block can be obtained based on the filtered template pixels, and then based on the target intra-frame prediction mode, the prediction accuracy can be effectively improved.
  • the intra-frame prediction method provided in the embodiment of the present application can be performed by an intra-frame prediction device.
  • an intra-frame prediction device performing the intra-frame prediction method is taken as an example to illustrate the intra-frame prediction device provided in the embodiment of the present application.
  • an intra-frame prediction device 500 including:
  • a processing module 501 is used to perform filtering processing on template pixels corresponding to a target image block to obtain filtered template pixels, where the template pixels include at least part of the reconstructed pixels in an adjacent pixel area of the target image block;
  • a first acquisition module 502 configured to acquire at least one intra-frame prediction mode and an amplitude of the at least one intra-frame prediction mode according to the filtered template pixels;
  • a first determination module 503, configured to determine a target intra prediction mode in the at least one intra prediction mode according to an amplitude of the at least one intra prediction mode
  • the second determination module 504 is configured to determine a target prediction value corresponding to the target image block according to the target intra-frame prediction mode.
  • the first acquisition module includes:
  • a first acquisition submodule used to acquire a template pixel histogram according to the filtered template pixels, wherein the template pixel histogram is used to indicate a corresponding relationship between an identifier of at least one intra-frame prediction mode and an amplitude of the intra-frame prediction mode;
  • the second acquisition submodule is used to acquire the at least one intra-frame prediction mode and the amplitude of the at least one intra-frame prediction mode according to the template pixel histogram.
  • processing module is used to:
  • the filter identifier corresponding to the target image block is a first filter identifier
  • filtering is performed on the template pixels corresponding to the target image block to obtain filtered template pixels, wherein the first filter identifier is used to indicate that filtering is performed on the template pixels corresponding to the target image block;
  • filtering is performed on the template pixel corresponding to the target image block to obtain a filtered template pixel
  • the first target parameter includes at least one of noise intensity, image energy, and image entropy.
  • the device of the embodiment of the present application further includes:
  • a third determination module is configured to determine, when the value of the first target parameter of the template pixel is less than or equal to a preset threshold, that the filter identifier corresponding to the target image block is the first filter identifier.
  • the processing module includes:
  • a first determination submodule is used to determine a target filter according to a target filter strength identifier corresponding to the target image block, the target filter corresponding to the target filter strength identifier, or to determine the target filter according to a value of a second target parameter of the template pixel, the second target parameter including at least one of noise intensity, image energy, and image entropy;
  • the third acquisition submodule is used to filter the template pixels corresponding to the target image block according to the target filter. Processing to obtain the filtered template pixels.
  • the device of the embodiment of the present application further includes:
  • the fourth determination module is used to determine the target filter strength identifier corresponding to the target image block according to the second target parameter of the template pixel, wherein different noise intensities correspond to different target filter strength identifiers.
  • the target filter includes at least one of a high-pass filter and a low-pass filter.
  • processing module is used to:
  • the template position identifier of the template pixel is a first position identifier, filtering a first part of pixels in the template pixel to obtain filtered template pixels;
  • filtering is performed on a second part of pixels in the template pixel to obtain filtered template pixels
  • filtering is performed on a first part of pixels and a second part of pixels in the template pixel to obtain filtered template pixels;
  • the first part of pixels includes pixels in the template in a first direction of the target image block, and the second part of pixels includes pixels in the template in a second direction of the target image block.
  • the first determining module is used to:
  • M intra-frame prediction modes with the largest amplitudes are selected from the at least two intra-frame prediction modes as the target intra-frame prediction modes, where M is a positive integer.
  • the second determining module is used to:
  • the target intra-frame prediction mode includes at least two prediction modes, obtaining a prediction value obtained by predicting the target image block based on each of the prediction modes;
  • a target prediction value of the target image block is obtained according to at least two prediction values.
  • the template pixels corresponding to the target image block are filtered to obtain filtered template pixels, the template pixels including at least part of the reconstructed pixels in the adjacent pixel area of the target image block; at least one intra-frame prediction mode and the amplitude of the at least one intra-frame prediction mode are obtained based on the filtered template pixels; the target intra-frame prediction mode is determined in the at least one intra-frame prediction mode based on the amplitude of the at least one intra-frame prediction mode; and the target prediction value corresponding to the target image block is determined based on the target intra-frame prediction mode.
  • filtering the template pixels can make the amplitude of the intra-frame prediction mode of the main texture direction of the template pixels more prominent, so that the target intra-frame prediction mode that can reflect the main texture direction of the target image block can be obtained based on the filtered template pixels, and then the prediction accuracy can be effectively improved based on the target intra-frame prediction mode.
  • the intra-frame prediction device in the embodiment of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip.
  • the electronic device can be a terminal, or can be other devices other than a terminal.
  • Exemplary other devices can be servers, network attached storage (NAS), etc., which are not specifically limited in the embodiment of the present application.
  • the intra-frame prediction device provided in the embodiment of the present application can implement each process implemented by the method embodiment of FIG1 and achieve The same technical effects will not be described again here to avoid repetition.
  • an embodiment of the present application also provides an electronic device 600, including a processor 601 and a memory 602, and the memory 602 stores a program or instruction that can be executed on the processor 601.
  • the program or instruction is executed by the processor 601
  • the various steps of the above-mentioned intra-frame prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
  • An embodiment of the present application also provides an intra-frame prediction device, including a processor and a communication interface, the processor being configured to filter template pixels corresponding to a target image block to obtain filtered template pixels, the template pixels including at least a portion of reconstructed pixels in an adjacent pixel region of the target image block; obtaining at least one intra-frame prediction mode and an amplitude of the at least one intra-frame prediction mode based on the filtered template pixels; determining a target intra-frame prediction mode in the at least one intra-frame prediction mode based on the amplitude of the at least one intra-frame prediction mode; and determining a target prediction value corresponding to the target image block based on the target intra-frame prediction mode.
  • Figure 7 is a schematic diagram of the hardware structure of an intra-frame prediction device for implementing an embodiment of the present application.
  • the device can be specifically a terminal.
  • the terminal 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709 and at least some of the components of the processor 710.
  • the terminal 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, so as to implement functions such as managing charging, discharging, and power consumption management through the power management system.
  • a power source such as a battery
  • the terminal structure shown in FIG7 does not constitute a limitation on the terminal, and the terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently, which will not be described in detail here.
  • the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode.
  • the display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.
  • the user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072.
  • the touch panel 7071 is also called a touch screen.
  • the touch panel 7071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
  • the RF unit 701 can transmit the data to the processor 710 for processing; in addition, the RF unit 701 can send uplink data to the network side device.
  • the RF unit 701 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
  • the memory 709 can be used to store software programs or instructions and various data.
  • the memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
  • the memory 709 may include a volatile memory or a non-volatile memory.
  • the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EPROM), or an electrically erasable programmable read-only memory (EPROM).
  • ROM read-only memory
  • PROM programmable read-only memory
  • EPROM erasable programmable read-only memory
  • EPROM electrically erasable programmable read-only memory
  • EPROM electrically erasable programmable read-only memory
  • EPROM electrically erasable programmable read-only memory
  • EPROM electrically erasable programmable read-only memory
  • the volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM).
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDRSDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • DRRAM direct memory bus random access memory
  • the processor 710 may include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 710.
  • Processor 710 is used to filter the template pixels corresponding to the target image block to obtain filtered template pixels, where the template pixels include at least part of the reconstructed pixels in the adjacent pixel area of the target image block; obtain at least one intra-frame prediction mode corresponding to the filtered template pixels and the amplitude of the at least one intra-frame prediction mode; determine a target intra-frame prediction mode in the at least one intra-frame prediction mode according to the amplitude of the at least one intra-frame prediction mode; and determine a target prediction value corresponding to the target image block according to the target intra-frame prediction mode.
  • processor 710 is further configured to:
  • the at least one intra-frame prediction mode and the amplitude of the at least one intra-frame prediction mode are acquired according to the template pixel histogram.
  • processor 710 is further configured to:
  • the filter identifier corresponding to the target image block is a first filter identifier
  • filtering is performed on the template pixels corresponding to the target image block to obtain filtered template pixels, wherein the first filter identifier is used to indicate that filtering is performed on the template pixels corresponding to the target image block;
  • filtering is performed on the template pixel corresponding to the target image block to obtain a filtered template pixel
  • the first target parameter includes at least one of noise intensity, image energy, and image entropy.
  • processor 710 is further configured to:
  • the filter identifier corresponding to the target image block is the first filter identifier.
  • processor 710 is further configured to:
  • a target filter Determining a target filter according to a target filter strength identifier corresponding to the target image block, the target filter corresponding to the target filter strength identifier, or determining the target filter according to a value of a second target parameter of the template pixel, the second target parameter including at least one of noise intensity, image energy, and image entropy;
  • the template pixels corresponding to the target image block are filtered according to the target filter to obtain a filtered template pixel. board pixels.
  • processor 710 is further configured to:
  • a target filter strength identifier corresponding to the target image block is determined according to a second target parameter of the template pixel, wherein different noise intensities correspond to different target filter strength identifiers.
  • the target filter includes at least one of a high-pass filter and a low-pass filter.
  • processor 710 is further configured to:
  • the template position identifier of the template pixel is a first position identifier, filtering a first part of pixels in the template pixel to obtain filtered template pixels;
  • filtering is performed on a second part of pixels in the template pixel to obtain filtered template pixels
  • filtering is performed on a first part of pixels and a second part of pixels in the template pixel to obtain filtered template pixels;
  • the first part of pixels includes pixels in the template in a first direction of the target image block, and the second part of pixels includes pixels in the template in a second direction of the target image block.
  • processor 710 is further configured to:
  • M intra-frame prediction modes with the largest amplitudes are selected from the at least two intra-frame prediction modes as the target intra-frame prediction modes, where M is a positive integer.
  • processor 710 is further configured to:
  • the target intra-frame prediction mode includes at least two prediction modes, obtaining a prediction value obtained by predicting the target image block based on each of the prediction modes;
  • a target prediction value of the target image block is obtained according to at least two prediction values.
  • the template pixels corresponding to the target image block are filtered to obtain filtered template pixels, the template pixels including at least part of the reconstructed pixels in the adjacent pixel area of the target image block; at least one intra-frame prediction mode and the amplitude of the at least one intra-frame prediction mode are obtained based on the filtered template pixels; the target intra-frame prediction mode is determined in the at least one intra-frame prediction mode based on the amplitude of the at least one intra-frame prediction mode; and the target prediction value corresponding to the target image block is determined based on the target intra-frame prediction mode.
  • filtering the template pixels can make the amplitude of the intra-frame prediction mode of the main texture direction of the template pixels more prominent, so that the target intra-frame prediction mode that can reflect the main texture direction of the target image block can be obtained based on the filtered template pixels, and then the prediction accuracy can be effectively improved based on the target intra-frame prediction mode.
  • An 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 above-mentioned intra-frame prediction method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
  • the processor is the processor in the terminal described in the above embodiment.
  • the readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
  • the readable storage medium may be a non-transitory readable storage medium.
  • An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
  • the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
  • the embodiment of the present application further provides a computer program/program product, which is stored in a storage medium.
  • the computer program/program product is executed by at least one processor to implement the various processes of the above-mentioned intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

Landscapes

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

Abstract

本申请公开了一种帧内预测方法、装置及设备,属于编解码技术领域,本申请实施例的方法包括:对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。

Description

帧内预测方法、装置及设备
相关申请的交叉引用
本申请主张在2023年07月04日在中国提交的中国专利申请No.202310818030.2的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于编解码技术领域,具体涉及一种帧内预测方法、装置及设备。
背景技术
相关解码端帧内预测模式推导(Decoder-side Intra Mode Derivation,DIMD)技术中,解码端对块周围宽度为N的模板中的像素应用水平和垂直索贝尔(Sobel)滤波器来执行梯度直方图计算,然后将梯度的方向转换为帧内角度预测模式,并累加梯度的强度作为对应帧内角度模式的振幅,通过比较梯度直方图中的振幅大小导出帧内预测模式。由于真实视频场景中图像纹理的多样性,基于上述方式统计的直方图中的振幅会比较分散,难以获取到直方图中的主纹理方向,从而导致基于该直方图确定的预测模式的预测准确度不高。
发明内容
本申请实施例提供一种帧内预测方法、装置及设备,能够解决现有技术中基于直方图确定的预测模式的预测准确度不高的问题。
第一方面,提供了一种帧内预测方法,包括:
对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;
根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;
根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;
根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。
第二方面,提供了一种帧内预测装置,包括:
处理模块,用于对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;
第一获取模块,用于根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;
第一确定模块,用于根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;
第二确定模块,用于根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。
第三方面,提供了一种电子设备,该终端包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。
第四方面,提供了一种电子设备,包括处理器及通信接口,其中,所述处理器用于对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。
第五方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。
第六方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。
第七方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤。
在本申请实施例中,对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。上述方案中,通过对模板像素进行滤波能够使得模板像素的主纹理方向的帧内预测模式的振幅更加突出,从而能够基于滤波后的模板像素获取能够体现目标图像块主纹理方向的目标帧内预测模式,进而基于该目标帧内预测模式能够有效提高预测准确性。
附图说明
图1表示本申请实施例的帧内预测方法的流程示意图;
图2表示本申请实施例中滤波后的模板像素的示意图之一;
图3表示本申请实施例中滤波后的模板像素的示意图之二;
图4表示本申请实施例中第一部分像素和第二部分像素的示意图;
图5表示本申请实施例的帧内预测装置的模块示意图;
图6表示本申请实施例的电子设备的结构框图;
图7表示本申请实施例的终端的结构框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本 领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。
本申请的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,本申请中的“或”表示所连接对象的至少其中之一。例如“A或B”涵盖三种方案,即,方案一:包括A且不包括B;方案二:包括B且不包括A;方案三:既包括A又包括B。字符“/”一般表示前后关联对象是一种“或”的关系。
本申请的术语“指示”既可以是一个直接的指示(或者说显式的指示),也可以是一个间接的指示(或者说隐含的指示)。其中,直接的指示可以理解为,发送方在发送的指示中明确告知了接收方具体的信息、需要执行的操作或请求结果等内容;间接的指示可以理解为,接收方根据发送方发送的指示确定对应的信息,或者进行判断并根据判断结果确定需要执行的操作或请求结果等。
值得指出的是,本申请实施例所描述的技术不限于长期演进型(Long Term Evolution,LTE)/LTE的演进(LTE-Advanced,LTE-A)系统,还可用于其他无线通信系统,诸如码分多址(Code Division Multiple Access,CDMA)、时分多址(Time Division Multiple Access,TDMA)、频分多址(Frequency Division Multiple Access,FDMA)、正交频分多址(Orthogonal Frequency Division Multiple Access,OFDMA)、单载波频分多址(Single-carrier Frequency-Division Multiple Access,SC-FDMA)或其他系统。本申请实施例中的术语“系统”和“网络”常被可互换地使用,所描述的技术既可用于以上提及的系统和无线电技术,也可用于其他系统和无线电技术。以下描述出于示例目的描述了新空口(New Radio,NR)系统,并且在以下大部分描述中使用NR术语,但是这些技术也可应用于NR系统以外的系统,如第6代(6th Generation,6G)通信系统。
为使本领域技术人员能够更好地理解本申请实施例,首先进行如下说明。
在视频编码中,一帧图像被分成很多宏块,利用帧内预测或者帧间预测获得预测块。原始块和预测块之间的差值为残差块,然后对残差块进行变换、量化、熵编码。
(1)帧内预测;
帧内预测有很多的预测模式来处理图像中多种类型的纹理,包括直流(Direct Current,DC)、平面(planar)和一些角度预测模式。用周围已重建像素作为输入,通过指定的预测模式来得到当前预测块的预测值,达到了去除空间冗余的目的。这个指定的预测模式索引可以是从码流中显式的得到,也可以从解码端隐式的推断出。
(2)DIMD;
DIMD模式是一种隐式导出帧内预测模式的技术。在解码端,对块周围宽度为N的模板中的像素应用水平和垂直Sobel滤波器来执行梯度直方图计算,然后将梯度的方向转换为帧内角度预测模式,并累加梯度的强度作为对应帧内角度模式的振幅,通过比较梯度直方图中振幅大小导出帧内预测模式。模板像素为与所述目标图像块相邻像素区域的至少部分像素。
对亮度分量,用直方图导出最多5个帧内预测模式及其对应的权重以及导出planar模式(权重固定为16/64),最多6个帧内预测模式做融合的到最终的亮度预测值。
对色度分量,DIMD色度模式使用DIMD推导方法,基于第二个相邻行和列中的相邻重建亮度和色度(Cb和Cr)样本,推导当前块的色度帧内预测模式。具体地,基于当前色度块的同位置的重建亮度样本以及重建色度样本计算水平梯度和垂直梯度,以构建直方图。
下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的帧内预测方法进行详细地说明。
如图1所示,本申请实施例提供了一种帧内预测方法,包括:
步骤101:对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素。
该目标图像块为需要进行帧内预测的图像块。
可选地,所述相邻像素区域内的像素与所述目标图像块的像素的距离小于或等于预设距离。
步骤102:根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅。
可选地,在对所述模板像素中的所有像素进行滤波的情况下,基于滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅。
在对所述模板像素中的部分像素进行滤波的情况下,基于滤波后的模板像素以及未进行滤波的模板像素,或者,基于滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅。
需要说明的是,本申请实施例中,滤波后的模板像素是指所述模板像素中进行滤波处理后的重建像素,所述未进行滤波的模板像素是指所述模板像素中未进行滤波处理的重建像素。
步骤103:根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;
作为一种实现方式,在所述至少两个帧内预测模式中选择振幅最大的M个帧内预测模式,作为所述目标帧内预测模式,其中,M为正整数。
可选地,M小于N,N是指基于未滤波的模板像素确定的且用于对目标图像块进行预测的帧内预测模式的数量,且N为正整数。
这里,基于振幅最大的M个帧内预测模式,能够获取模板像素中主纹理方向的帧内预测模式,能够实现基于主纹理方向进行预测的目的,同时也能降低编码复杂度。
步骤104:根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。
在所述目标帧内预测模式包括至少两个预测模式的情况下,获取基于每个所述预测模式对所述目标图像块进行预测得到的预测值;根据至少两个预测值,得到所述目标图像块的目标预测值。
例如,基于预设算法对至少两个预测值进行处理,得到目标图像块的目标预测值。该预设算法可以是加权求平均算法。
在本申请实施例中,对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。上述方案中,通过对模板像素进行滤波能够使得模板像素的主纹理方向的帧内预测模式的振幅更加突出,从而能够基于滤波后的模板像素获取能够体现目标图像块主纹理方向的目标帧内预测模式,进而基于该目标帧内预测模式能够有效提高预测准确性。
可选地,获取滤波后的模板像素对应的至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅,包括:
根据滤波后的模板像素,获取模板像素直方图,所述模板像素直方图用于指示至少一个帧内预测模式的标识与帧内预测模式的振幅之间的对应关系;
根据所述模板像素直方图,获取所述至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅。
可选地,在对所述模板像素中的所有像素进行滤波的情况下,基于滤波后的模板像素,获取模板像素直方图。在对所述模板像素中的部分像素进行滤波的情况下,基于滤波后的模板像素以及未进行滤波的模板像素,获取模板像素直方图。
示例性的,可对滤波后的模板像素应用水平和垂直Sobel滤波器来执行梯度直方图计算,然后将梯度的方向转换为帧内角度预测模式,并累加梯度的强度作为对应帧内角度预测模式的振幅。例如,梯度的方向为Gx表示基于模板像素计算得到的水平梯度,Gy表示基于模板像素计算得到的垂直梯度,振幅G=|Gx|+|Gy|。
通过对模板像素进行滤波能够增强模板像素中的主纹理方向,从而基于滤波后的模板像素能够获取主纹理方向的帧内预测模式,使得预测结果更加准确。
可选地,对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,包括:
在所述目标图像块对应的滤波标识为第一滤波标识的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述第一滤波标识用于指示对所述目标图像块对应的模板像素进行滤波处理;
或者,在所述模板像素的第一目标参数的值小于或等于预设阈值的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素;
其中,所述第一目标参数包括噪声强度、图像能量、图像熵中的至少一项。
本申请实施例中,上述第一滤波标识可以是从码流中获取的,也可以是解码端推导得到的。示例性的,在上述滤波标识为1(即第一滤波标识)的情况下,指示对所述目标图像块对应的模板像素进行滤波处理,在上述滤波标识为0(第二滤波标识)的情况下,指示对目标图像块对应的模板像素不进行滤波处理。
本申请实施例中可通过以下方式获取噪声强度:
对图像像素值进行统计分析,计算图像的均值、方差、标准差等指标,基于该指标来确定图像的噪声强度。
本申请实施例中可通过以下方式获取图像能量:
将图像中每个像素值的平方相加,并将相加得到的结果除以像素总数,得到图像能量。
本申请实施例中可通过以下方式获取图像熵:
获取图像中每个像素值的出现概率,将每个像素值的出现概率与概率的对数相乘后,得到相乘结果,将多个相乘结果相加,获取图像熵。
本申请实施例中,在上述第一目标参数的值大于预设阈值的情况下,滤波可能会导致图像变得失真或不清晰,使得直方图的统计不准确,所以在第一目标参数的值小于或等于预设阈值的情况下,才对模板像素进行滤波,提高直方图统计的准确度。
需要说明的是,本申请实施例中的滤波标识可以是帧级别的(即每个图像帧对应一个滤波标识),也可以是块级别的(即一个图像块对应一个滤波标识)。
可选地,本申请实施例的方法,还包括:
在所述模板像素的所述第一目标参数的值小于或等于预设阈值的情况下,确定所述目标图像块对应的滤波标识为所述第一滤波标识。
或者,在模板像素的第一目标参数的值大于或等于预设阈值的情况下,确定目标图像块对应的滤波标识为第二滤波标识。
可选地,所述对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,包括:
根据所述目标图像块对应的目标滤波强度标识确定目标滤波器,所述目标滤波器与所述目标滤波强度标识对应,或者,根据所述模板像素的第二目标参数的值,确定目标滤波器,所述第二目标参数包括噪声强度、图像能量、图像熵中的至少一项;
根据所述目标滤波器对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素。
本申请实施例中的第二目标参数与上述第一目标参数可以相同,也可以不同。
由于滤波器会增强图像的噪声,因此,在使用滤波器进行滤波时需要控制滤波器的强度,以避免出现图像过度增强的情况。
作为一种实现方式,解码端基于目标滤波强度标识来确定目标滤波器,该目标滤波强度标识可以是从码流中获取的,也可以是解码端推导到的。在上述目标滤波强度标识是解码端推导得到的情况下,可选地,本申请实施例的方法,还包括:
根据模板像素的第二目标参数,确定所述目标图像块对应的目标滤波强度标识,其中,不同的噪声强度对应不同的目标滤波强度标识。
例如,滤波强度标识为0,对应的目标滤波器为:
滤波强度标识为1,对应的目标滤波器为:
滤波强度标识为2,对应的目标滤波器为:
其中,滤波强度标识为0越小,对应的目标滤波器的滤波强度越大,即滤波器F0的滤波强度大于滤波器F1的滤波强度,滤波器F1的滤波强度大于滤波器F2的滤波强度。
作为另一种实现方式,解码端直接基于模板像素的第二目标参数的值,确定目标滤波器。具体的,基于上述第二目标参数的值确定图像噪声强度,基于图像噪声强度来确定目标滤波器。
例如,噪声强度小于阈值1,则选用滤波器F0,噪声强度如果大于阈值1且小于阈值2,则选用滤波器F1,噪声强度如果大于阈值2,则选用滤波器F2。
可选地,所述目标滤波器包括高通滤波器和低通滤波器中的至少一项。
上假设使用上述滤波器F1对模板像素进行滤波处理,得到S行S列滤波后的像素模板。在S=2的情况下,滤波后的像素模板如图2所示,在S=1的情况下,滤波后的像素模板如图3所示。
如图4所示,在得到滤波后的像素模板后,可以使用2x3算子计算目标图像块上方的模板像素(第一部分像素)的梯度。用3x2算子计算模板图像块左侧的模板像素(第二部分像素)的梯度。
示例性的,本申请实施例中,可以采用高通滤波器对色度分量和亮度分量进行滤波,也可以采用高通滤波器对亮度分量进行滤波,并采用低通滤波器对色度分量进行滤波。
具体的,对于亮度分量,用直方图导出最多M-1个帧内预测模式及其对应的权重以及planar模式(权重固定为16/64),最多M个帧内预测模式做融合得到最终的亮度预测值,可选地,M小于5。
对于色度分量,基于目标图像块对应的目标色度块的同位置的重建亮度样本计算水平梯度和垂直梯度之前,用低通滤波器对重建亮度样本进行滤波。
可选地,低通滤波器可以为如下滤波器:
由于色度分量的特征通常是由图像中的颜色变化和颜色纹理等构成的,这些特征在空间上通常没有强方向性。基于低通滤波器能够将像素值进行平均化,使周围像素的噪声和细节平均化,从而减少图像中的噪声和细节,并使图像变得更加平滑。
可选地,所述对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,包括:
在所述模板像素的模板位置标识为第一位置标识的情况下,对所述模板像素中的第一部分像素进行滤波处理,得到滤波后的模板像素;
或者,在所述模板像素的模板位置标识为第二位置标识的情况下,对所述模板像素中的第二部分像素进行滤波处理,得到滤波后的模板像素;
或者,在所述模板像素的模板位置标识为第三位置标识的情况下,对所述模板像素中的第一部分像素和第二部分像素进行滤波处理,得到滤波后的模板像素;
或者,对所述第一部分像素和第二部分像素中噪声强度较小的部分像素进行滤波,得到滤波后的模板像素;
其中,所述第一部分像素包括所述模板像素中在所述目标图像块第一方向的像素,所述第二部分像素包括所述模板像素中在所述目标图像块第二方向的像素。
作为一种示例,该第一方向为上方,该第二方向左侧。即上述第一部分像素包括所述模板像素中位于目标图像块上方的像素,所述第二部分像素包括所述模板像素中位于目标图像块左侧的像素。
例如,在模板位置标识为1(第一位置标识)的情况下,对第一部分像素进行滤波处理,在模板位置标识为0(第二位置标识)的情况下,对第二部分像素进行滤波处理,在模板位置标识为2(第三位置标识)的情况下,对第一部分像素和第二部分像素进行滤波处理。
又例如,分别计算第一部分像素和第二部分像素的噪声强度,若第一部分像素的噪声强度小于第二部分像素的噪声强度,则对第一部分像素进行滤波处理,若第一部分像素的噪声强度大于第二部分像素的噪声强度,则对第二部分像素进行滤波处理。
可选地,在所述模板像素的模板位置标识为第四位置标识的情况下,对所述目标像素中的第三部分像素进行滤波处理,得到滤波后的模板像素;
在所述模板像素的模板位置标识为第五位置标识的情况下,对所述目标像素中的第四部分像素进行滤波处理,得到滤波后的模板像素;
在所述模板像素的模板位置标识为第六位置标识的情况下,对所述目标像素中的第五部分像素进行滤波处理,得到滤波后的模板像素;
在所述模板像素的模板位置标识为第七位置标识的情况下,对所述目标像素中的第六部分像素进行滤波处理,得到滤波后的模板像素。
上述第三部分像素包括模板像素中在所述目标图像块第三方向的像素,上述第四部分像素包括模板像素中在所述目标图像块第四方向的像素,上述第五部分像素包括模板像素中在所述目标图像块第五方向的像素,上述第六部分像素包括模板像素中在所述目标图像块第六方向的像素,上述第六部分像素包括模板像素中在所述目标图像块第七方向的像素。
例如,上述第三方向可具体为左上,上述第四方向具体为右侧,第五方向具体为下方,第七方向为右下。当然,本申请实施例中还可以通过设置相应的位置标识,来对位于目标图像右上方向、左下方向等的部分像素进行滤波处理,此处不再具体说明。
示例性的,在对模板像素中的所有像素进行滤波处理的情况下,基于滤波后的模板像素,获取模板像素直方图;在对上述第一部分像素进行滤波处理的情况下,可以基于滤波后的模板像素和未滤波的模板像素(如第二部分模板像素),获取模板像素直方图;在对上述第二部分像素进行滤波处理的情况下,可以基于滤波后的模板像素和未滤波的模板像素(如第一部分模板像素),获取模板像素直方图。
本申请实施例的上述方案,对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;根 据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。上述方案中,通过对模板像素进行滤波能够使得模板像素的主纹理方向的帧内预测模式的振幅更加突出,从而能够基于滤波后的模板像素获取能够体现目标图像块主纹理方向的目标帧内预测模式,进而基于该目标帧内预测模式能够有效提高预测准确性。
本申请实施例提供的帧内预测方法,执行主体可以为帧内预测装置。本申请实施例中以帧内预测装置执行帧内预测方法为例,说明本申请实施例提供的帧内预测装置。
如图5所示,本申请实施例还提供了一种帧内预测装置500,包括:
处理模块501,用于对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;
第一获取模块502,用于根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;
第一确定模块503,用于根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;
第二确定模块504,用于根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。
可选地,所述第一获取模块包括:
第一获取子模块,用于根据滤波后的模板像素,获取模板像素直方图,所述模板像素直方图用于指示至少一个帧内预测模式的标识与帧内预测模式的振幅之间的对应关系;
第二获取子模块,用于根据所述模板像素直方图,获取所述至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅。
可选地,所述处理模块用于:
在所述目标图像块对应的滤波标识为第一滤波标识的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述第一滤波标识用于指示对所述目标图像块对应的模板像素进行滤波处理;
或者,在所述模板像素的第一目标参数的值小于或等于预设阈值的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素;
其中,所述第一目标参数包括噪声强度、图像能量、图像熵中的至少一项。
可选地,本申请实施例的装置,还包括:
第三确定模块,用于在所述模板像素的所述第一目标参数的值小于或等于预设阈值的情况下,确定所述目标图像块对应的滤波标识为所述第一滤波标识。
可选地,所述处理模块包括:
第一确定子模块,用于根据所述目标图像块对应的目标滤波强度标识确定目标滤波器,所述目标滤波器与所述目标滤波强度标识对应,或者,根据所述模板像素的第二目标参数的值,确定目标滤波器,所述第二目标参数包括噪声强度、图像能量、图像熵中的至少一项;
第三获取子模块,用于根据所述目标滤波器对所述目标图像块对应的模板像素进行滤波 处理,得到滤波后的模板像素。
可选地,本申请实施例的装置,还包括:
第四确定模块,用于根据模板像素的第二目标参数,确定所述目标图像块对应的目标滤波强度标识,其中,不同的噪声强度对应不同的目标滤波强度标识。
可选地,所述目标滤波器包括高通滤波器和低通滤波器中的至少一项。
可选地,所述处理模块用于:
在所述模板像素的模板位置标识为第一位置标识的情况下,对所述模板像素中的第一部分像素进行滤波处理,得到滤波后的模板像素;
或者,在所述模板像素的模板位置标识为第二位置标识的情况下,对所述模板像素中的第二部分像素进行滤波处理,得到滤波后的模板像素;
或者,在所述模板像素的模板位置标识为第三位置标识的情况下,对所述模板像素中的第一部分像素和第二部分像素进行滤波处理,得到滤波后的模板像素;
或者,对所述第一部分像素和第二部分像素中噪声强度较小的部分像素进行滤波,得到滤波后的模板像素;
其中,所述第一部分像素包括所述模板像素中在所述目标图像块第一方向的像素,所述第二部分像素包括所述模板像素中在所述目标图像块第二方向的像素。
可选地,所述第一确定模块用于:
在所述至少两个帧内预测模式中选择振幅最大的M个帧内预测模式,作为所述目标帧内预测模式,其中,M为正整数。
可选地,所述第二确定模块用于:
在所述目标帧内预测模式包括至少两个预测模式的情况下,获取基于每个所述预测模式对所述目标图像块进行预测得到的预测值;
根据至少两个预测值,得到所述目标图像块的目标预测值。
本申请实施例中,对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。上述方案中,通过对模板像素进行滤波能够使得模板像素的主纹理方向的帧内预测模式的振幅更加突出,从而能够基于滤波后的模板像素获取能够体现目标图像块主纹理方向的目标帧内预测模式,进而基于该目标帧内预测模式能够有效提高预测准确性。
本申请实施例中的帧内预测装置可以是电子设备,例如具有操作系统的电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的其他设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)等,本申请实施例不作具体限定。
本申请实施例提供的帧内预测装置能够实现图1的方法实施例实现的各个过程,并达到 相同的技术效果,为避免重复,这里不再赘述。
可选地,如图6所示,本申请实施例还提供一种电子设备600,包括处理器601和存储器602,存储器602上存储有可在所述处理器601上运行的程序或指令,该程序或指令被处理器601执行时实现上述帧内预测方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例还提供了一种帧内预测装置,包括处理器和通信接口,处理器用于对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。
具体地,图7为实现本申请实施例的一种帧内预测装置的硬件结构示意图,该装置可具体为终端,该终端700包括但不限于:射频单元701、网络模块702、音频输出单元703、输入单元704、传感器705、显示单元706、用户输入单元707、接口单元708、存储器709以及处理器710等中的至少部分部件。
本领域技术人员可以理解,终端700还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器710逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图7中示出的终端结构并不构成对终端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
应理解的是,本申请实施例中,输入单元704可以包括图形处理器(Graphics Processing Unit,GPU)7041和麦克风7042,图形处理器7041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元706可包括显示面板7061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板7061。用户输入单元707包括触控面板7071以及其他输入设备7072中的至少一种。触控面板7071,也称为触摸屏。触控面板7071可包括触摸检测装置和触摸控制器两个部分。其他输入设备7072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
本申请实施例中,射频单元701接收来自网络侧设备的下行数据后,可以传输给处理器710进行处理;另外,射频单元701可以向网络侧设备发送上行数据。通常,射频单元701包括但不限于天线、放大器、收发信机、耦合器、低噪声放大器、双工器等。
存储器709可用于存储软件程序或指令以及各种数据。存储器709可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器709可以包括易失性存储器或非易失性存储器。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM, EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器709包括但不限于这些和任意其它适合类型的存储器。
处理器710可包括一个或多个处理单元;可选地,处理器710集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器710中。
处理器710,用于对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;获取滤波后的模板像素对应的至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。
可选地,处理器710还用于:
根据滤波后的模板像素,获取模板像素直方图,所述模板像素直方图用于指示至少一个帧内预测模式的标识与帧内预测模式的振幅之间的对应关系;
根据所述模板像素直方图,获取所述至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅。
可选地,处理器710还用于:
在所述目标图像块对应的滤波标识为第一滤波标识的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述第一滤波标识用于指示对所述目标图像块对应的模板像素进行滤波处理;
或者,在所述模板像素的第一目标参数的值小于或等于预设阈值的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素;
其中,所述第一目标参数包括噪声强度、图像能量、图像熵中的至少一项。
可选地,处理器710还用于:
在所述模板像素的所述第一目标参数的值小于或等于预设阈值的情况下,确定所述目标图像块对应的滤波标识为所述第一滤波标识。
可选地,处理器710还用于:
根据所述目标图像块对应的目标滤波强度标识确定目标滤波器,所述目标滤波器与所述目标滤波强度标识对应,或者,根据所述模板像素的第二目标参数的值,确定目标滤波器,所述第二目标参数包括噪声强度、图像能量、图像熵中的至少一项;
根据所述目标滤波器对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模 板像素。
可选地,处理器710还用于:
根据模板像素的第二目标参数,确定所述目标图像块对应的目标滤波强度标识,其中,不同的噪声强度对应不同的目标滤波强度标识。
可选地,所述目标滤波器包括高通滤波器和低通滤波器中的至少一项。
可选地,处理器710还用于:
在所述模板像素的模板位置标识为第一位置标识的情况下,对所述模板像素中的第一部分像素进行滤波处理,得到滤波后的模板像素;
或者,在所述模板像素的模板位置标识为第二位置标识的情况下,对所述模板像素中的第二部分像素进行滤波处理,得到滤波后的模板像素;
或者,在所述模板像素的模板位置标识为第三位置标识的情况下,对所述模板像素中的第一部分像素和第二部分像素进行滤波处理,得到滤波后的模板像素;
或者,对所述第一部分像素和第二部分像素中噪声强度较小的部分像素进行滤波,得到滤波后的模板像素;
其中,所述第一部分像素包括所述模板像素中在所述目标图像块第一方向的像素,所述第二部分像素包括所述模板像素中在所述目标图像块第二方向的像素。
可选地,处理器710还用于:
在所述至少两个帧内预测模式中选择振幅最大的M个帧内预测模式,作为所述目标帧内预测模式,其中,M为正整数。
可选地,处理器710还用于:
在所述目标帧内预测模式包括至少两个预测模式的情况下,获取基于每个所述预测模式对所述目标图像块进行预测得到的预测值;
根据至少两个预测值,得到所述目标图像块的目标预测值。
本申请实施例中,对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。上述方案中,通过对模板像素进行滤波能够使得模板像素的主纹理方向的帧内预测模式的振幅更加突出,从而能够基于滤波后的模板像素获取能够体现目标图像块主纹理方向的目标帧内预测模式,进而基于该目标帧内预测模式能够有效提高预测准确性。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的终端中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。 在一些示例中,可读存储介质可以是非瞬态的可读存储介质。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。
本申请实施例另提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现上述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助计算机软件产品加必需的通用硬件平台的方式来实现,当然也可以通过硬件。该计算机软件产品存储在存储介质(如ROM、RAM、磁碟、光盘等)中,包括若干指令,用以使得终端或者网络侧设备执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式的实施方式,这些实施方式均属于本申请的保护之内。

Claims (20)

  1. 一种帧内预测方法,包括:
    对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;
    根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;
    根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;
    根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。
  2. 根据权利要求1所述的方法,其中,根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅,包括:
    根据滤波后的模板像素,获取模板像素直方图,所述模板像素直方图用于指示至少一个帧内预测模式的标识与帧内预测模式的振幅之间的对应关系;
    根据所述模板像素直方图,获取所述至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅。
  3. 根据权利要求1或2所述的方法,其中,对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,包括:
    在所述目标图像块对应的滤波标识为第一滤波标识的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述第一滤波标识用于指示对所述目标图像块对应的模板像素进行滤波处理;
    或者,在所述模板像素的第一目标参数的值小于或等于预设阈值的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素;
    其中,所述第一目标参数包括噪声强度、图像能量、图像熵中的至少一项。
  4. 根据权利要求3所述的方法,其中,所述方法还包括:
    在所述模板像素的所述第一目标参数的值小于或等于预设阈值的情况下,确定所述目标图像块对应的滤波标识为所述第一滤波标识。
  5. 根据权利要求1至4任一项所述的方法,其中,所述对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,包括:
    根据所述目标图像块对应的目标滤波强度标识确定目标滤波器,所述目标滤波器与所述目标滤波强度标识对应,或者,根据所述模板像素的第二目标参数的值,确定目标滤波器,所述第二目标参数包括噪声强度、图像能量、图像熵中的至少一项;
    根据所述目标滤波器对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素。
  6. 根据权利要求5所述的方法,其中,所述方法还包括:
    根据模板像素的第二目标参数,确定所述目标图像块对应的目标滤波强度标识,其中, 不同的噪声强度对应不同的目标滤波强度标识。
  7. 根据权利要求1至6任一项所述的方法,其中,所述对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,包括:
    在所述模板像素的模板位置标识为第一位置标识的情况下,对所述模板像素中的第一部分像素进行滤波处理,得到滤波后的模板像素;
    或者,在所述模板像素的模板位置标识为第二位置标识的情况下,对所述模板像素中的第二部分像素进行滤波处理,得到滤波后的模板像素;
    或者,在所述模板像素的模板位置标识为第三位置标识的情况下,对所述模板像素中的第一部分像素和第二部分像素进行滤波处理,得到滤波后的模板像素;
    或者,对所述第一部分像素和第二部分像素中噪声强度较小的部分像素进行滤波,得到滤波后的模板像素;
    其中,所述第一部分像素包括所述模板像素中在所述目标图像块第一方向的像素,所述第二部分像素包括所述模板像素中在所述目标图像块第二方向的像素。
  8. 根据权利要求1至7任一项所述的方法,其中,所述根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式,包括:
    在所述至少两个帧内预测模式中选择振幅最大的M个帧内预测模式,作为所述目标帧内预测模式,其中,M为正整数。
  9. 根据权利要求1至8任一项所述的方法,其中,所述根据所述目标帧内预测模式,确定所述目标图像块的目标预测值,包括:
    在所述目标帧内预测模式包括至少两个预测模式的情况下,获取基于每个所述预测模式对所述目标图像块进行预测得到的预测值;
    根据至少两个预测值,得到所述目标图像块的目标预测值。
  10. 一种帧内预测装置,包括:
    处理模块,用于对目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述模板像素包括所述目标图像块的相邻像素区域内的至少部分重建像素;
    第一获取模块,用于根据滤波后的模板像素,获取至少一个帧内预测模式以及所述至少一个帧内预测模式的振幅;
    第一确定模块,用于根据所述至少一个帧内预测模式的振幅,在所述至少一个帧内预测模式中确定目标帧内预测模式;
    第二确定模块,用于根据所述目标帧内预测模式,确定所述目标图像块对应的目标预测值。
  11. 根据权利要求10所述的装置,其中,所述第一获取模块包括:
    第一获取子模块,用于根据滤波后的模板像素,获取模板像素直方图,所述模板像素直方图用于指示至少一个帧内预测模式的标识与帧内预测模式的振幅之间的对应关系;
    第二获取子模块,用于根据所述模板像素直方图,获取所述至少一个帧内预测模式以 及所述至少一个帧内预测模式的振幅。
  12. 根据权利要求10或11所述的装置,其中,所述处理模块用于:
    在所述目标图像块对应的滤波标识为第一滤波标识的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素,所述第一滤波标识用于指示对所述目标图像块对应的模板像素进行滤波处理;
    或者,在所述模板像素的第一目标参数的值小于或等于预设阈值的情况下,对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素;
    其中,所述第一目标参数包括噪声强度、图像能量、图像熵中的至少一项。
  13. 根据权利要求12所述的装置,其中,所述装置还包括:
    第三确定模块,用于在所述模板像素的所述第一目标参数的值小于或等于预设阈值的情况下,确定所述目标图像块对应的滤波标识为所述第一滤波标识。
  14. 根据权利要求10至13任一项所述的装置,其中,所述处理模块包括:
    第一确定子模块,用于根据所述目标图像块对应的目标滤波强度标识确定目标滤波器,所述目标滤波器与所述目标滤波强度标识对应,或者,根据所述模板像素的第二目标参数的值,确定目标滤波器,所述第二目标参数包括噪声强度、图像能量、图像熵中的至少一项;
    第三获取子模块,用于根据所述目标滤波器对所述目标图像块对应的模板像素进行滤波处理,得到滤波后的模板像素。
  15. 根据权利要求14所述的装置,其中,所述装置还包括:
    第四确定模块,用于根据模板像素的第二目标参数,确定所述目标图像块对应的目标滤波强度标识,其中,不同的噪声强度对应不同的目标滤波强度标识。
  16. 根据权利要求10至15任一项所述的装置,其中,所述处理模块用于:
    在所述模板像素的模板位置标识为第一位置标识的情况下,对所述模板像素中的第一部分像素进行滤波处理,得到滤波后的模板像素;
    或者,在所述模板像素的模板位置标识为第二位置标识的情况下,对所述模板像素中的第二部分像素进行滤波处理,得到滤波后的模板像素;
    或者,在所述模板像素的模板位置标识为第三位置标识的情况下,对所述模板像素中的第一部分像素和第二部分像素进行滤波处理,得到滤波后的模板像素;
    或者,对所述第一部分像素和第二部分像素中噪声强度较小的部分像素进行滤波,得到滤波后的模板像素;
    其中,所述第一部分像素包括所述模板像素中在所述目标图像块第一方向的像素,所述第二部分像素包括所述模板像素中在所述目标图像块第二方向的像素。
  17. 根据权利要求10至16任一项所述的装置,其中,所述第一确定模块用于:
    在所述至少两个帧内预测模式中选择振幅最大的M个帧内预测模式,作为所述目标帧内预测模式,其中,M为正整数。
  18. 根据权利要求10至17任一项所述的装置,其中,所述第二确定模块用于:
    在所述目标帧内预测模式包括至少两个预测模式的情况下,获取基于每个所述预测模式对所述目标图像块进行预测得到的预测值;
    根据至少两个预测值,得到所述目标图像块的目标预测值。
  19. 一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至9任一项所述的帧内预测方法的步骤。
  20. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至9任一项所述的帧内预测方法的步骤。
PCT/CN2024/102805 2023-07-04 2024-07-01 帧内预测方法、装置及设备 Ceased WO2025007830A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310818030.2A CN119277063A (zh) 2023-07-04 2023-07-04 帧内预测方法、装置及设备
CN202310818030.2 2023-07-04

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US19/436,475 Continuation US20260129193A1 (en) 2023-07-04 2025-12-30 Intra-prediction method and apparatus, and device

Publications (1)

Publication Number Publication Date
WO2025007830A1 true WO2025007830A1 (zh) 2025-01-09

Family

ID=94117546

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/102805 Ceased WO2025007830A1 (zh) 2023-07-04 2024-07-01 帧内预测方法、装置及设备

Country Status (2)

Country Link
CN (1) CN119277063A (zh)
WO (1) WO2025007830A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN121213361A (zh) * 2025-11-26 2025-12-26 上海壁仞科技股份有限公司 一种基于核函数选择的图像滤波方法、设备、介质和产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114868394A (zh) * 2020-06-30 2022-08-05 谷歌有限责任公司 用于图像压缩的梯度预测器
US20230090700A1 (en) * 2021-09-13 2023-03-23 FG Innovation Company Limited Device and method for intra predictions in video coding
CN115866263A (zh) * 2021-09-24 2023-03-28 维沃移动通信有限公司 视频解码方法、视频编码方法及相关设备
CN115883833A (zh) * 2021-09-28 2023-03-31 维沃移动通信有限公司 帧内预测方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114868394A (zh) * 2020-06-30 2022-08-05 谷歌有限责任公司 用于图像压缩的梯度预测器
US20230090700A1 (en) * 2021-09-13 2023-03-23 FG Innovation Company Limited Device and method for intra predictions in video coding
CN115866263A (zh) * 2021-09-24 2023-03-28 维沃移动通信有限公司 视频解码方法、视频编码方法及相关设备
CN115883833A (zh) * 2021-09-28 2023-03-31 维沃移动通信有限公司 帧内预测方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN121213361A (zh) * 2025-11-26 2025-12-26 上海壁仞科技股份有限公司 一种基于核函数选择的图像滤波方法、设备、介质和产品

Also Published As

Publication number Publication date
CN119277063A (zh) 2025-01-07

Similar Documents

Publication Publication Date Title
Park Edge-based intramode selection for depth-map coding in 3D-HEVC
US12432375B2 (en) Filtering method for removing blocking artifact and apparatus
CN108124154B (zh) 帧间预测模式的快速选择方法、装置及电子设备
US9967556B2 (en) Video coding method using at least evaluated visual quality and related video coding apparatus
JP6615346B2 (ja) 符号化処理におけるリアルタイムビデオノイズ低減のための方法、端末、および、不揮発性コンピュータ可読記憶媒体
JP2007208989A (ja) イントラ予測モード決定方法及び装置
WO2025007830A1 (zh) 帧内预测方法、装置及设备
CN110769255B (zh) 一种图像编码方法及装置
JP6415689B2 (ja) 映像解析装置
CN115866263A (zh) 视频解码方法、视频编码方法及相关设备
US20260129193A1 (en) Intra-prediction method and apparatus, and device
JP2012015914A (ja) 映像処理装置、映像処理方法及びコンピュータプログラム
CN116939171A (zh) 输电线路监控方法、装置和计算机设备
CN120812286A (zh) 预测模式的处理方法、装置及设备
KR101630167B1 (ko) Hevc를 위한 고속 화면내 부호화 모드 결정 방법
KR102163556B1 (ko) 압축 영역에서 야간 영상의 장면 전환 검출 방법 및 장치
CN120186339B (zh) 处理方法、处理设备及存储介质
CN117729338B (zh) 帧内预测方法、装置、计算机设备和存储介质
CN115280772A (zh) 有损压缩的二重标准块分割启发法
WO2024212888A1 (zh) 图像块预测方法、装置及电子设备
Lin et al. Coding unit partition prediction technique for fast video encoding in HEVC
CN117336548B (zh) 一种视频编码的处理方法、装置、设备及存储介质
CN120075472B (zh) 基于视频块误差的时域滤波方法、装置、设备及介质
CN120186339A (zh) 处理方法、处理设备及存储介质
US9860567B2 (en) Image processing apparatus, image processing method, and storage medium

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2024835311

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2024835311

Country of ref document: EP

Effective date: 20260204