CN116614623A - Predictive encoding method, predictive decoding method and terminal - Google Patents

Predictive encoding method, predictive decoding method and terminal Download PDF

Info

Publication number
CN116614623A
CN116614623A CN202210121689.8A CN202210121689A CN116614623A CN 116614623 A CN116614623 A CN 116614623A CN 202210121689 A CN202210121689 A CN 202210121689A CN 116614623 A CN116614623 A CN 116614623A
Authority
CN
China
Prior art keywords
index table
channel
information
coding
mode
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.)
Pending
Application number
CN202210121689.8A
Other languages
Chinese (zh)
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
Priority to CN202210121689.8A priority Critical patent/CN116614623A/en
Publication of CN116614623A publication Critical patent/CN116614623A/en
Pending 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application discloses a predictive coding method, a predictive decoding method and a terminal, which belong to the technical field of coding and decoding. The coding end obtains coding information of a block to be coded; the coding end determines a first index table corresponding to a block to be coded based on coding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string; and the coding end carries out predictive coding on the block to be coded according to the first index table.

Description

Predictive encoding method, predictive decoding method and terminal
Technical Field
The application belongs to the technical field of encoding and decoding, and particularly relates to a predictive encoding method, a predictive decoding method and a terminal.
Background
In the process of performing predictive coding on a block to be coded, a prediction mode needs to be determined first, and the process of determining the prediction mode is generally as follows: and expressing different prediction modes by using different binary symbol strings, determining the rate distortion cost corresponding to each prediction mode, and determining the prediction mode with the minimum rate distortion cost as the prediction mode for performing predictive coding on the block to be coded.
Currently, a prediction mode may be input into an index table for query, so as to obtain a binary symbol string corresponding to the prediction mode, so that the prediction mode is expressed by using the binary symbol string. However, the binary symbol strings in the index table are determined based on the selected probability of each prediction mode set by people, which may lead to unreasonable allocation of the binary symbol strings, lead to bit waste in the process of performing predictive coding on the block to be coded, and improve the storage space occupied by the coded code stream. In the process of predictive decoding of a code stream, binary symbol strings in the code stream are also determined based on the selected probability of each prediction mode set by people, which easily results in that reconstructed image blocks obtained by decoding occupy a large amount of storage space.
Disclosure of Invention
The embodiment of the application provides a predictive coding method, a predictive decoding method and a terminal, which can solve the technical problem that bits are wasted in the predictive coding process, and further improve the storage space occupied by a coded code stream.
In a first aspect, there is provided a predictive coding method, the method comprising:
the coding end obtains coding information of a block to be coded;
the coding end determines a first index table corresponding to the block to be coded based on the coding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string;
and the coding end carries out predictive coding on the block to be coded according to the first index table.
In a second aspect, there is provided a predictive decoding method, comprising:
the decoding end obtains decoding information of a code stream to be decoded and a target symbol string;
the decoding end determines a second index table corresponding to the code stream to be decoded based on the decoding information; the second index table is used for representing the mapping relation between the prediction mode and the symbol string;
the decoding end queries the target symbol string in the second index table to obtain a prediction mode corresponding to the code stream to be decoded;
And the decoding end decodes the code stream to be decoded by using the prediction mode to obtain a predicted value.
In a third aspect, there is provided a predictive coding apparatus including:
the first acquisition module is used for acquiring the coding information of the block to be coded;
the first determining module is used for determining a first index table corresponding to the block to be encoded based on the encoding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string;
and the coding module is used for carrying out predictive coding on the block to be coded according to the first index table.
In a fourth aspect, there is provided a predictive decoding apparatus including:
the third acquisition module is used for acquiring decoding information of the code stream to be decoded and a target symbol string;
a third determining module, configured to determine a second index table corresponding to the code stream to be decoded based on the decoding information; the second index table is used for representing the mapping relation between the prediction mode and the symbol string;
the query module is used for querying the target symbol string in the second index table to obtain a prediction mode corresponding to the code stream to be decoded;
and the decoding module is used for decoding the code stream to be decoded by using the prediction mode to obtain a predicted value.
In a fifth aspect, there is provided a terminal comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, performs the steps of the method according to the first aspect, or performs the steps of the method according to the second aspect.
In a sixth aspect, there is provided a readable storage medium having stored thereon a program or instructions which when executed by a processor, performs the steps of the method according to the first aspect or performs the steps of the method according to the second aspect.
In a seventh aspect, a chip is provided, the chip comprising a processor and a communication interface, the communication interface and the processor being coupled, the processor being configured to execute programs or instructions to implement the method according to the first aspect or to implement the method according to the second aspect.
In an eighth aspect, a computer program/program product is provided, stored in a storage medium, which is executed by at least one processor to implement the steps of the method as described in the first aspect, or to implement the steps of the method as described in the second aspect.
In the embodiment of the application, the coding information of the block to be coded is obtained; determining a first index table corresponding to a block to be coded based on coding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string; and carrying out predictive coding on the block to be coded according to the first index table. In the embodiment of the application, in the process of predictive coding, an index table is determined according to coding information of a block to be coded, that is, a symbol string in the index table is determined based on a selected probability corresponding to each prediction mode of the block to be coded under different coding information, so that the actual coding condition of the block to be coded is met, the bit waste is avoided in the process of predictive coding, and the storage space occupied by a coded code stream is released.
Drawings
FIG. 1 is a flow chart of a predictive coding method provided by an embodiment of the application;
fig. 2 is an application scenario diagram of a predictive coding method provided by an embodiment of the present application;
FIG. 3 is a flowchart of a predictive decoding method according to an embodiment of the present application;
fig. 4 is a block diagram of a predictive coding apparatus according to an embodiment of the present application;
fig. 5 is a block diagram of a predictive decoding apparatus according to an embodiment of the present application;
Fig. 6 is a block diagram of a communication device according to an embodiment of the present application;
fig. 7 is a schematic diagram of a hardware structure of a terminal according to an embodiment of the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the application, fall within the scope of protection of the application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. 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 otherwise described herein, and that the "first" and "second" distinguishing between objects generally are not limited in number to the extent that the first object may, for example, be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/" generally means a relationship in which the associated object is an "or" before and after.
The predictive coding Device corresponding to the predictive coding method and the predictive decoding Device corresponding to the predictive decoding method in the embodiment of the application may be terminals, which may also be referred to as terminal devices or User Equipment (UE), and the terminals may be mobile phones, tablet computers (Tablet Personal Computer), laptop computers (Laptop computers) or terminal side devices such as notebook computers, personal digital assistants (Personal Digital Assistant, PDA), palm computers, netbooks, ultra-mobile personal computers (ultra-mobile personal Computer, UMPC), mobile internet appliances (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) devices, robots, wearable devices (VUE), pedestrian terminals (PUE), smart home devices with wireless communication functions, such as refrigerators, televisions, washing machines or furniture, game machines, personal computers (personal Computer, PC), teller machines or self-service machines, and the like, and the Wearable devices include: intelligent wrist-watch, intelligent bracelet, intelligent earphone, intelligent glasses, intelligent ornament (intelligent bracelet, intelligent ring, intelligent necklace, intelligent anklet, intelligent foot chain etc.), intelligent wrist strap, intelligent clothing etc.. It should be noted that, the embodiment of the present application is not limited to a specific type of terminal.
For ease of understanding, some of the following descriptions are directed to embodiments of the present application:
in the process of performing predictive coding on a block to be coded, a prediction mode needs to be determined first, and the process of determining the prediction mode is generally as follows: and expressing different prediction modes by using different binary symbol strings, determining the rate distortion cost corresponding to each prediction mode, and determining the prediction mode with the minimum rate distortion cost as the prediction mode for performing predictive coding on the block to be coded.
Currently, prediction modes include, but are not limited to, the following: a point-by-point prediction mode 0, a point-by-point prediction mode 1, a point-by-point prediction mode 2, a point-by-point prediction mode 3, an intra-prediction_dc mode, an intra-prediction_angle mode 0, an intra-prediction_angle mode 1, an intra-prediction_angle mode 2, an intra-prediction_angle mode 3, an intra-prediction_angle mode 4, an intra-prediction_angle mode 5, an original value mode, an intra-block copy mode 0, an intra-block copy mode 1, and an intra-block copy mode 2. The binarization processing of the prediction modes can be achieved by expressing different prediction modes with binary symbol strings in the following manner:
the first way is a unary code:
the coding rule of the unitary code is that for the symbol x to be coded, x 1 are coded first, then 1 0 is added, and the binarization processing of the prediction mode is realized, wherein the symbol x to be coded is associated with the prediction mode.
For example, if the intra prediction_dc mode is associated with symbol 5, i.e., x is equal to 5, then the intra prediction_dc mode may be expressed with 111110.
The second way is to truncate the unary code:
the coding rule of the truncated unary code is as follows: on the basis of the unitary code, if 0< x < Max, adopting the unitary code for encoding; if x=max, the symbol string consists of 1, and the length of the symbol string is Max. Wherein, the Max is a preset value.
For example, intra prediction_dc mode is associated with symbol 5, i.e., x is equal to 5 and max is 5. In this case, the intra prediction_dc mode may be expressed with 11111.
The third way is k-th order exponential golomb coding:
the coding rule of the k-order exponential golomb coding is: the method comprises the steps of encoding by inquiring a preset k-order exponential golomb code table, wherein the k-order exponential golomb code is shown in a table I:
table one:
for example, in the case where the intra prediction_dc mode is associated with the symbol 5 and k=1, the intra prediction_dc mode may be represented using 0111 by referring to table one.
For example, in the case where the intra prediction_dc mode is associated with the symbol 5, and k=3, the intra prediction_dc mode may be represented using 1101 by referring to table one.
Currently, a variable length coding mode is generally adopted, and different prediction modes are expressed by binary symbol strings, so that binarization processing of the prediction modes is realized. An index table is preset and used for representing the mapping relation between the binary symbol strings and the prediction modes, wherein the binary symbol strings are determined according to the selected probability of each prediction mode set by people. Optionally, the index table may further include a code length corresponding to the binary symbol string.
The index table is shown in table two:
and (II) table:
illustratively, a look-up table two may be available and the intra prediction_dc mode may be expressed as 11.
However, the binary symbol strings in the index table are determined based on the selected probability of each prediction mode set by people, which may lead to unreasonable allocation of the binary symbol strings, lead to bit waste in the process of performing predictive coding on the block to be coded, and improve the storage space occupied by the coded code stream. In the process of predictive decoding of a code stream, binary symbol strings in the code stream are also determined based on the selected probability of each prediction mode set by people, which easily results in that reconstructed image blocks obtained by decoding occupy a large amount of storage space.
In order to solve the above possible technical problems, an embodiment of the present application provides a predictive coding method. The prediction encoding method provided by the embodiment of the application is described in detail below through some embodiments and application scenarios thereof with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart of a predictive coding method according to the present application. The predictive coding method provided by the embodiment comprises the following steps:
s101, the coding end obtains coding information of a block to be coded.
The block to be encoded is an image block currently subjected to predictive encoding, and the encoding information includes, but is not limited to, chrominance information, luminance information and encoding mode information of the block to be encoded. In the step, in the process of carrying out predictive coding on the block to be coded, the coding information of the block to be coded is obtained.
S102, the coding end determines a first index table corresponding to the block to be coded based on the coding information.
The first index table includes a prediction mode, i.e., an encoding mode for performing predictive encoding on a block to be encoded, and a symbol string, which may be a binary symbol string expressed in binary numbers. The first index table is used for representing the mapping relation between the prediction mode and the symbol string.
In this step, after obtaining the coding information of the block to be coded, optionally, a first index table corresponding to the block to be coded may be determined from a preset index table set, where the index table set includes at least one first index table. For a specific embodiment of determining the first index table, please refer to the following examples.
S103, the coding end carries out predictive coding on the block to be coded according to the first index table.
In this step, after obtaining a first index table corresponding to a block to be encoded, the block to be encoded is predictively encoded using the first index table. Specifically, after the first index table is obtained, calculating rate distortion cost corresponding to a prediction mode associated with each symbol string in the first index table; determining a prediction mode with the minimum rate distortion cost as a first prediction mode; and carrying out predictive coding on the block to be coded by using the first prediction mode to obtain a predicted value, wherein the predicted value can be called as a first predicted value.
In the embodiment of the application, the coding information of the block to be coded is obtained; determining a first index table corresponding to a block to be coded based on coding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string; and carrying out predictive coding on the block to be coded according to the first index table. In the embodiment of the application, in the process of predictive coding, an index table is determined according to coding information of a block to be coded, that is, a symbol string in the index table is determined based on a selected probability corresponding to each prediction mode of the block to be coded under different coding information, so that the actual coding condition of the block to be coded is met, the bit waste is avoided in the process of predictive coding, and the storage space occupied by a coded code stream is released.
For a convenient understanding of the technical effects produced by the embodiments of the present application, please refer to the following tables three and four:
table three:
wherein, table three shows the coding performance gain generated after using the predictive coding method provided by the embodiment of the application in the lossless coding mode. The BPP represents a Pixel depth (BPP), which is the number of Bits used to store each Pixel, wherein the smaller the value of Δbpp, the stronger the gain.
Table four:
wherein, table four shows the coding performance gain generated after using the predictive coding method provided by the embodiment of the application in the lossy coding mode. The MSE represents a mean square error (Mean Square Error, MSE), wherein the smaller the value of Δmse, the stronger the gain.
Optionally, the determining, based on the coding information, the first index table corresponding to the block to be coded includes:
the coding end determines an index table associated with a chromaticity channel in a preset index table set as the first index table under the condition that channel information represents the chromaticity channel;
and the coding end determines an index table associated with the brightness channel in the index table set as the first index table under the condition that the channel information represents the brightness channel.
In this embodiment, the encoded information includes channel information, where the channel information is chrominance channel information or luminance channel information. The preset index table set in this embodiment includes an index table associated with a chroma channel and an index table associated with a luma channel.
It should be appreciated that the color space of an image block includes a Y channel, a U channel, and a V channel, where the Y channel represents a gray scale value, also referred to as a luminance channel; the U-channel and V-channel represent color and saturation, also known as chroma channels.
It should be understood that, the symbol strings in the index table associated with the chroma channel are determined according to the selected probability corresponding to each prediction mode of the block to be encoded under the chroma channel, so that the selected probability corresponding to each prediction mode of the block to be encoded under the chroma channel can be reflected more accurately. The symbol strings in the index table associated with the brightness channel are determined according to the selected probability corresponding to each prediction mode of the block to be coded under the brightness channel, so that the selected probability corresponding to each prediction mode of the block to be coded under the brightness channel can be reflected more accurately.
An alternative embodiment is that the above-mentioned channel information is chroma channel information, i.e. the channel information characterizes the chroma channels, in which case the index table of the set of index tables associated with the chroma channels is determined as the first index table.
In another alternative embodiment, the channel information is luminance channel information, that is, the channel information characterizes a chrominance channel, in which case an index table associated with the chrominance channel in the set of index tables is determined as the first index table.
In this embodiment, according to a chrominance channel or a luminance channel of a block to be encoded, a corresponding first index table is determined, and then a symbol string corresponding to each prediction mode is determined based on the first index table, so that bit waste is avoided in the process of predictive encoding, and a storage space occupied by a code stream obtained by encoding is released.
Optionally, the determining, based on the coding information, the first index table corresponding to the block to be coded includes:
the coding end determines an index table associated with a lossless coding mode in a preset index table set as the first index table under the condition that configuration information represents the lossless coding mode;
and the coding end determines an index table associated with the lossy coding mode in the index table set as the first index table under the condition that the configuration information characterizes the lossy coding mode.
In this embodiment, the encoding information includes configuration information, where the configuration information may represent an encoding mode of a block to be encoded, and the encoding mode is a lossless encoding mode or a lossy encoding mode, where the lossless encoding mode refers to data information that does not damage the block to be encoded in an encoding process; the lossy coding mode refers to that part of data information of a block to be coded is lost in the coding process, so that video compression is realized to a greater extent. The index table set preset in this embodiment includes an index table associated with a lossless coding mode and an index table associated with a lossy coding mode.
It should be understood that, the symbol strings in the index table associated with the lossless coding mode are determined according to the selected probability corresponding to each prediction mode of the block to be coded in the lossless coding mode, so that the selected probability corresponding to each prediction mode of the block to be coded in the lossless coding mode can be reflected more accurately. The symbol strings in the index table associated with the lossy coding mode are determined according to the selected probability corresponding to each prediction mode of the block to be coded in the lossy coding mode, so that the selected probability corresponding to each prediction mode of the block to be coded in the lossy coding mode can be reflected more accurately.
An alternative embodiment is that the above configuration information characterizes the lossless coding mode, i.e. the block to be coded is coded using the lossless coding mode, in which case the index table of the set of index tables associated with the lossless coding mode is determined as the first index table.
In another alternative embodiment, the configuration information characterizes a lossy coding mode, i.e. the block to be coded is coded using the lossy coding mode, in which case the index table of the set of index tables associated with the lossy coding mode is determined as the first index table.
In this embodiment, a first index table corresponding to a block to be encoded in a lossy encoding mode or a lossless encoding mode is determined, and then a symbol string corresponding to each prediction mode is determined based on the first index table, so that bit waste is avoided in the process of predictive encoding, and the storage space occupied by a code stream obtained by encoding is released.
Optionally, the determining, based on the coding information, the first index table corresponding to the block to be coded includes:
the coding end determines an index table associated with the chroma channel and the lossless coding mode in a preset index table set as the first index table under the condition that channel information represents the chroma channel and configuration information represents the lossless coding mode;
the coding end determines an index table associated with a brightness channel and a lossless coding mode in the index table set as the first index table under the condition that channel information represents the brightness channel and configuration information represents the lossless coding mode;
the coding end determines an index table associated with the chroma channel and the lossy coding mode in the index table set as the first index table under the condition that channel information represents the chroma channel and configuration information represents the lossy coding mode;
And the coding end determines an index table associated with the brightness channel and the lossy coding mode in the index table set as the first index table under the condition that the channel information represents the brightness channel and the configuration information represents the lossy coding mode.
In this embodiment, the encoding information may further include channel information and configuration information, where the channel information is chrominance channel information or luminance channel information, and the configuration information may represent an encoding mode of a block to be encoded, as described above. The index table set preset in this embodiment includes an index table associated with the lossless coding mode and the chrominance channel information, an index table associated with the lossless coding mode and the luminance channel information, an index table associated with the lossy coding mode and the chrominance channel information, and an index table associated with the lossy coding mode and the luminance channel information.
An alternative embodiment is that the channel information characterizes a chroma channel and the configuration information characterizes a lossless coding mode, in which case an index table of the set of index tables associated with the lossless coding mode and the chroma channel is determined as the first index table.
The first index table may be as shown in table five:
Table five:
prediction mode Binary symbol string Decimal system Code length
0 Point-by-point prediction 0 1110 14 4
1 Point-by-point prediction 1 111110 62 6
2 Point-by-point prediction 2 111111 63 6
3 Point-by-point prediction 3 11110 30 5
4 Original value pattern 110 6 3
5 Intra block copy mode 0 0 0 1
6 Intra block copy mode 1 100 4 3
7 Intra block copy mode 2 101 5 3
In another alternative embodiment, the channel information characterizes a luminance channel, and the configuration information characterizes a lossless coding mode, in which case an index table associated with the lossless coding mode and the luminance channel in the set of index tables is determined as the first index table.
Illustratively, the first index table may be as shown in table six:
table six:
prediction mode Binary symbol string Decimal system Code length
0 Point-by-point prediction 0 01 1 2
1 Point-by-point prediction 1 110 6 3
2 Point-by-point prediction 2 11111 31 5
3 Point-by-point prediction 3 00 0 2
4 Original value pattern 100 4 3
5 Intra block copy mode 0 101 5 3
6 Intra block copy mode 1 11110 30 5
7 Intra block copy mode 2 1110 14 4
In another alternative embodiment, the channel information characterizes a chroma channel, and the configuration information characterizes a lossy coding mode, in which case an index table associated with the lossy coding mode and the chroma channel in the set of index tables is determined as the first index table.
Illustratively, the first index table may be as shown in table seven:
table seven:
prediction mode Binary symbol string Decimal system Code length
0 Point-by-point prediction 0 100 4 3
1 Point-by-point prediction 1 111110 62 6
2 Point-by-point prediction 2 1111111 127 7
3 Point-by-point prediction 3 010 2 3
4 Intra prediction_dc 00 0 2
5 Intra prediction_angle mode 4 101 5 3
6 Intra prediction_angle mode 5 11100 28 5
7 Intra prediction_angle mode 2 111010 58 6
8 Intra prediction_angle mode 3 111011 59 6
9 Original value pattern 1111110 126 7
10 Intra prediction_angle mode 0 111100 60 6
11 Intra prediction_angle mode 1 111101 61 6
12 Intra block copy mode 0 011 3 3
13 Intra block copy mode 1 1100 12 4
14 Intra block copy mode 2 1101 13 4
In another alternative embodiment, the channel information characterizes a luminance channel, and the configuration information characterizes a lossy coding mode, in which case an index table associated with the lossy coding mode and the luminance channel in the set of index tables is determined as the first index table.
Illustratively, the first index table may be as shown in table eight:
table eight:
in this embodiment, channel information and configuration information of a block to be encoded are determined, and a first index table corresponding to the block to be encoded is determined, so that a symbol string corresponding to each prediction mode is determined based on an actual encoding condition of the block to be encoded, bit waste is avoided in a prediction encoding process, and a storage space occupied by a code stream obtained by encoding is released.
The following describes how to construct the index table set:
Optionally, the method further comprises:
acquiring coding information of a reference coding block;
calculating the selected probability of each prediction mode corresponding to the reference coding block;
determining a symbol string corresponding to each prediction mode according to the selected probability of each prediction mode;
and constructing the first index table by using the symbol strings corresponding to each prediction mode.
In this embodiment, a reference coding block is preset, coding information of the reference coding block is obtained, and a selected probability of each prediction mode corresponding to the reference coding block is calculated according to the coding information of the reference coding block and a history selected record of each prediction mode. The selected probability of each prediction mode is the probability that the prediction mode appears relative to all prediction modes corresponding to the coding information. After obtaining the selected probability of each prediction mode, determining a symbol string corresponding to each prediction mode based on the selected probability, wherein the symbol string can represent the selected probability of the corresponding prediction mode. Further, a first index table is constructed, wherein the first index table corresponds to the prediction modes one by one, and the first index table comprises the prediction modes and symbol strings corresponding to the prediction modes.
For ease of understanding, please refer to the following examples:
in the case that the coding information of the reference coding block characterizes the luminance channel and the lossless coding mode, the selected probability of each prediction mode can be determined according to the historical selected record of each prediction mode corresponding to the reference coding block, wherein the selected probability corresponding to each prediction mode is shown in the following table nine:
table nine:
after obtaining the selected probability corresponding to each prediction mode, referring to fig. 2, as shown in fig. 2, a binary mode tree may be established based on the selected probability corresponding to each prediction mode, where a left node in the binary mode tree may be set to be 0, a right node may be set to be 1, and the probability of the first layer of the binary mode tree is 50%, that is, 0 or 1; the probability of the second layer of the binary pattern tree is 25%, namely 00,01,10 and 11; the third probability is 12.5%,000,001,010,011,100,101,110,111; and determining the selected probability corresponding to each prediction mode, and further determining the position of the prediction mode in the leaf node of the binary mode tree according to the selected probability of each prediction mode.
Further, an index table is constructed according to the position of each prediction mode at the leaf node of the binary mode tree, wherein the constructed index table is shown in a table ten on the basis of a table nine:
Table ten:
mode Binary symbol string Code length
0 Point-by-point prediction 0 00 2
1 Point-by-point prediction 1 110 3
2 Point-by-point prediction 2 11111 5
3 Point-by-point prediction 3 01 2
4 Original value pattern 100 3
5 Intra block copy mode 0 101 3
6 Intra block copy mode 1 11110 5
7 Intra block copy mode 2 1110 4
In other embodiments, the reference coding block may be a current block to be coded in the process of predictive coding, and the index table set is updated in real time by calculating a selection probability of each prediction mode corresponding to the block to be coded.
In this embodiment, an index table is established according to the coding information corresponding to the reference coding block, so that the symbol strings in the index table conform to the actual coding condition of the reference coding block, thereby avoiding bit waste in the process of predictive coding.
The prediction decoding method provided by the embodiment of the application is described in detail below through some embodiments and application scenarios thereof with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a flowchart of a predictive decoding method according to the present application. The predictive decoding method provided in this embodiment includes the following steps:
s301, a decoding end obtains decoding information of a code stream to be decoded and a target symbol string.
The code stream to be decoded is a current code stream for predictive decoding, the decoding information includes but is not limited to chrominance information, luminance information and coding mode information of the code stream to be decoded, and the target coincidence string representation performs predictive coding on the image block to obtain a prediction mode of the code stream to be decoded. In this step, in the process of performing predictive decoding on the code stream to be decoded, the decoding information and the target symbol string of the code stream to be decoded are obtained.
S302, the decoding end determines a second index table corresponding to the code stream to be decoded based on the decoding information.
The second index table includes a prediction mode and a symbol string, wherein the prediction mode performs prediction encoding on the image block to obtain an encoding mode of a code stream, and the symbol string may be a binary symbol string expressed in binary numbers. The second index table is used for representing the mapping relation between the prediction mode and the symbol string.
In this step, after obtaining the decoding information of the code stream to be decoded, optionally, a second index table corresponding to the code stream to be decoded may be determined from a preset index table set, where the index table set includes at least one second index table. For a specific embodiment of determining the second index table, please refer to the following examples.
S303, the decoding end queries the target symbol string in the second index table to obtain a prediction mode corresponding to the code stream to be decoded.
In this step, after obtaining a target symbol string corresponding to the code stream to be decoded and determining a second index table, the target symbol string is queried in the second index table to obtain a prediction mode corresponding to the code stream to be decoded, where the prediction mode is also referred to as a second prediction mode.
S304, the decoding end decodes the code stream to be decoded by using the prediction mode to obtain a predicted value.
In this step, after the second prediction mode is obtained, the code stream to be decoded is decoded using the second prediction mode, and a prediction value is obtained. Wherein the above-mentioned predicted value may be referred to as a second predicted value.
In the embodiment of the application, in the process of predictive decoding, an index table is determined according to the decoding information of the code stream to be decoded, that is, the symbol strings in the index table are determined based on the selected probabilities corresponding to each prediction mode under different decoding information, so that the actual coding condition of the code stream to be decoded is met, the bit waste is avoided in the process of predictive decoding, and the storage space occupied by the reconstructed image obtained by decoding is released.
Optionally, the determining, based on the decoding information, the second index table corresponding to the code stream to be decoded includes:
the decoding end determines an index table associated with the chromaticity channel in a preset index table set as the second index table under the condition that the channel information represents the chromaticity channel;
and the decoding end determines an index table associated with the brightness channel in the index table set as the second index table under the condition that the channel information represents the brightness channel.
In this embodiment, the decoding information includes channel information, where the channel information is chrominance channel information or luminance channel information.
An alternative embodiment is that the above-mentioned channel information is chroma channel information, i.e. the channel information characterizes the chroma channels, in which case the index table of the set of index tables associated with the chroma channels is determined as the second index table.
In another alternative embodiment, the channel information is luminance channel information, that is, the channel information characterizes a chrominance channel, in which case an index table associated with the chrominance channel in the set of index tables is determined as the second index table.
In this embodiment, according to the chroma channel or the luma channel of the code stream to be decoded, a corresponding second index table is determined, and then a prediction mode of the code stream to be decoded is determined based on the second index table, so that bit waste is avoided in the process of predicting and decoding, and the storage space occupied by the reconstructed image obtained by decoding is released.
Optionally, the determining, based on the decoding information, the second index table corresponding to the code stream to be decoded includes:
the decoding end determines an index table associated with the lossless coding mode in a preset index table set as the second index table under the condition that configuration information represents the lossless coding mode;
And the decoding end determines an index table associated with the lossy coding mode in the index table set as the second index table under the condition that the configuration information characterizes the lossy coding mode.
In this embodiment, the decoding information includes configuration information, where the configuration information may characterize an encoding mode of the image block, and the encoding mode is a lossless encoding mode or a lossy encoding mode.
An alternative embodiment is that the above configuration information characterizes the lossless coding mode, i.e. is coded using the lossless coding mode, in which case the index table of the set of index tables associated with the lossless coding mode is determined as the second index table.
In another alternative embodiment, the configuration information characterizes a lossy coding mode, i.e. is coded using a lossy coding mode, in which case an index table of the set of index tables associated with the lossy coding mode is determined as the second index table.
In this embodiment, a second index table corresponding to the code stream to be decoded in the lossy encoding mode or the lossless encoding mode is determined, and then a prediction mode of the code stream to be decoded is determined based on the second index table, so that bit waste is avoided in the process of predictive decoding, and the storage space occupied by the reconstructed image obtained by decoding is released.
Optionally, the determining, based on the decoding information, the second index table corresponding to the code stream to be decoded includes:
the decoding end determines an index table associated with the chroma channel and the lossless coding mode in a preset index table set as the second index table under the condition that channel information represents the chroma channel and configuration information represents the lossless coding mode;
the decoding end determines an index table associated with the brightness channel and the lossless coding mode in the index table set as the second index table under the condition that channel information represents the brightness channel and configuration information represents the lossless coding mode;
the decoding end determines an index table associated with the chroma channel and the lossy coding mode in the index table set as the second index table under the condition that channel information represents the chroma channel and configuration information represents the lossy coding mode;
and the decoding end determines an index table associated with the brightness channel and the lossy coding mode in the index table set as the second index table under the condition that the channel information represents the brightness channel and the configuration information represents the lossy coding mode.
In this embodiment, the decoding information may further include channel information and configuration information, where the channel information is chrominance channel information or luminance channel information, and the configuration information may characterize the encoding mode, as described above.
An alternative embodiment is that the channel information characterizes a chroma channel and the configuration information characterizes a lossless coding mode, in which case an index table of the set of index tables associated with the lossless coding mode and the chroma channel is determined as the second index table.
In another alternative embodiment, the channel information characterizes a luminance channel, and the configuration information characterizes a lossless coding mode, in which case an index table associated with the lossless coding mode and the luminance channel in the set of index tables is determined as the second index table.
In another alternative embodiment, the channel information characterizes a chroma channel, and the configuration information characterizes a lossy coding mode, in which case an index table associated with the lossy coding mode and the chroma channel in the set of index tables is determined as the second index table.
In another alternative embodiment, the channel information characterizes a luminance channel, and the configuration information characterizes a lossy coding mode, in which case an index table associated with the lossy coding mode and the luminance channel in the set of index tables is determined as the second index table.
Optionally, the method further comprises:
obtaining decoding information of a reference code stream;
calculating the selected probability of each prediction mode corresponding to the reference code stream;
determining a symbol string corresponding to each prediction mode according to the selected probability of each prediction mode;
and constructing the second index table by using the symbol strings corresponding to each prediction mode.
In this embodiment, a reference code stream is preset, decoding information of the reference code stream is obtained, and a selected probability of each prediction mode corresponding to the reference code is calculated according to the decoding information of the reference code and a history selected record of each prediction mode. The selected probability of each prediction mode is the probability that the prediction mode occurs relative to all prediction modes corresponding to the decoding information. After obtaining the selected probability of each prediction mode, determining a symbol string corresponding to each prediction mode based on the selected probability, wherein the symbol string can represent the selected probability of the corresponding prediction mode. Further, a second index table is constructed, wherein the second index table corresponds to the prediction modes one by one, and the second index table comprises the prediction modes and symbol strings corresponding to the prediction modes.
According to the predictive coding method provided by the embodiment of the application, the execution subject can be a predictive coding device. In the embodiment of the present application, a predictive coding method performed by a predictive coding device is taken as an example, and the predictive coding device provided in the embodiment of the present application is described.
As shown in fig. 4, the predictive coding apparatus 400 includes:
a first obtaining module 401, configured to obtain encoding information of a block to be encoded;
a first determining module 402, configured to determine, based on the encoding information, a first index table corresponding to the block to be encoded;
and the encoding module 403 is configured to perform predictive encoding on the block to be encoded according to the first index table.
Optionally, the first determining module 402 is specifically configured to:
under the condition that channel information represents a chromaticity channel, determining an index table associated with the chromaticity channel in a preset index table set as the first index table;
in the case where channel information characterizes a luminance channel, an index table of the set of index tables associated with the luminance channel is determined as the first index table.
Optionally, the first determining module 402 is further specifically configured to:
under the condition that configuration information represents a lossless coding mode, determining an index table associated with the lossless coding mode in a preset index table set as the first index table;
in the case where configuration information characterizes a lossy coding mode, an index table of the set of index tables associated with the lossy coding mode is determined as the first index table.
Optionally, the first determining module 402 is further specifically configured to:
under the condition that channel information represents a chroma channel and configuration information represents a lossless coding mode, determining an index table associated with the chroma channel and the lossless coding mode in a preset index table set as the first index table;
determining an index table associated with a luminance channel and a lossless coding mode in the index table set as the first index table under the condition that channel information represents the luminance channel and configuration information represents the lossless coding mode;
determining an index table associated with the chroma channel and the lossy coding mode in the index table set as the first index table in the case that channel information characterizes the chroma channel and configuration information characterizes the lossy coding mode;
in the case where channel information characterizes a luma channel and configuration information characterizes a lossy coding mode, an index table of the set of index tables associated with the luma channel and the lossy coding mode is determined as the first index table.
Optionally, the predictive coding apparatus 400 further includes:
the second acquisition module is used for acquiring the coding information of the reference coding block;
The first calculation module is used for calculating the selected probability of each prediction mode corresponding to the reference coding block;
the second determining module is used for determining a symbol string corresponding to each prediction mode according to the selected probability of each prediction mode;
and the first construction module is used for constructing the first index table by using the symbol strings corresponding to each prediction mode.
In the embodiment of the application, the coding information of the block to be coded is obtained; determining a first index table corresponding to a block to be coded based on coding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string; and carrying out predictive coding on the block to be coded according to the first index table. In the embodiment of the application, in the process of predictive coding, an index table is determined according to coding information of a block to be coded, that is, a symbol string in the index table is determined based on a selected probability corresponding to each prediction mode of the block to be coded under different coding information, so that the actual coding condition of the block to be coded is met, the bit waste is avoided in the process of predictive coding, and the storage space occupied by a coded code stream is released.
The predictive coding device provided by the embodiment of the application can realize each process realized by the embodiment of the predictive coding method of fig. 1 and achieve the same technical effects, and in order to avoid repetition, the description is omitted here.
According to the predictive decoding method provided by the embodiment of the application, the execution main body can be a predictive decoding device. In the embodiment of the present application, a predictive decoding method performed by a predictive decoding device is taken as an example, and the predictive decoding device provided in the embodiment of the present application is described.
As shown in fig. 5, the predictive decoding apparatus 500 includes:
a third obtaining module 501, configured to obtain decoding information of a code stream to be decoded and a target symbol string;
a third determining module 502, configured to determine, based on the decoding information, a second index table corresponding to the code stream to be decoded;
a query module 503, configured to query the target symbol string in the second index table, to obtain a prediction mode corresponding to the code stream to be decoded;
and the decoding module 504 is configured to decode the code stream to be decoded by using the prediction mode to obtain a predicted value.
Optionally, the third determining module 502 is specifically configured to:
under the condition that channel information represents a chromaticity channel, determining an index table associated with the chromaticity channel in a preset index table set as the second index table;
in the case where channel information characterizes a luminance channel, an index table of the set of index tables associated with the luminance channel is determined as the second index table.
Optionally, the third determining module 502 is further specifically configured to:
under the condition that configuration information represents a lossless coding mode, determining an index table associated with the lossless coding mode in a preset index table set as the second index table;
in the case where configuration information characterizes a lossy coding mode, an index table of the set of index tables associated with the lossy coding mode is determined to be the second index table.
Optionally, the third determining module 502 is further specifically configured to:
under the condition that channel information represents a chroma channel and configuration information represents a lossless coding mode, determining an index table associated with the chroma channel and the lossless coding mode in a preset index table set as the second index table;
determining an index table associated with the luminance channel and the lossless coding mode in the index table set as the second index table under the condition that channel information represents the luminance channel and configuration information represents the lossless coding mode;
determining an index table associated with the chroma channel and the lossy coding mode in the index table set as the second index table in the case that the channel information characterizes the chroma channel and the configuration information characterizes the lossy coding mode;
In the case where channel information characterizes a luma channel and configuration information characterizes a lossy coding mode, an index table of the set of index tables associated with the luma channel and the lossy coding mode is determined as the second index table.
Optionally, the predictive decoding device 500 further includes:
a fourth acquisition module, configured to acquire decoding information of the reference code stream;
the second calculation module is used for calculating the selected probability of each prediction mode corresponding to the reference code stream;
a fourth determining module, configured to determine, according to the selected probability of each prediction mode, a symbol string corresponding to each prediction mode;
and the second construction module is used for constructing the second index table by using the symbol strings corresponding to each prediction mode.
In the embodiment of the application, in the process of predictive decoding, an index table is determined according to the decoding information of the code stream to be decoded, that is, the symbol strings in the index table are determined based on the selected probabilities corresponding to each prediction mode under different decoding information, so that the actual coding condition of the code stream to be decoded is met, the bit waste is avoided in the process of predictive decoding, and the storage space occupied by the reconstructed image obtained by decoding is released.
The predictive coding device and the predictive decoding device in the embodiments of the present application may be electronic devices, for example, electronic devices with an operating system, or may be components in electronic devices, for example, integrated circuits or chips. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, terminals may include, but are not limited to, the types of terminals 11 listed above, other devices may be servers, network attached storage (Network Attached Storage, NAS), etc., and embodiments of the application are not specifically limited.
The predictive coding device provided by the embodiment of the application can realize each process realized by the method embodiment of fig. 1 and achieve the same technical effects, and in order to avoid repetition, the description is omitted here.
The predictive decoding device provided by the embodiment of the application can realize each process realized by the method embodiment of fig. 3 and achieve the same technical effects, and in order to avoid repetition, the description is omitted here.
Optionally, as shown in fig. 6, the embodiment of the present application further provides a communication device 600, including a processor 601 and a memory 602, where the memory 602 stores a program or an instruction that can be executed on the processor 601, for example, when the communication device 600 is a terminal, the program or the instruction is executed by the processor 601 to implement each step of the above-mentioned embodiment of the predictive coding method, and achieve the same technical effect, or implement each step of the above-mentioned embodiment of the predictive decoding method, and achieve the same technical effect.
The embodiment of the application also provides a terminal, which comprises a processor and a communication interface, wherein the processor 601 is used for executing the following operations:
acquiring coding information of a block to be coded;
determining a first index table corresponding to the block to be coded based on the coding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string;
and carrying out predictive coding on the block to be coded according to the first index table.
Alternatively, the processor 601 is configured to perform the following operations:
obtaining decoding information and a target symbol string of a code stream to be decoded;
determining a second index table corresponding to the code stream to be decoded based on the decoding information; the second index table is used for representing the mapping relation between the prediction mode and the symbol string;
inquiring the target symbol string in the second index table to obtain a prediction mode corresponding to the code stream to be decoded;
and decoding the code stream to be decoded by using the prediction mode to obtain a predicted value.
The terminal embodiment corresponds to the terminal-side method embodiment, and each implementation process and implementation manner of the method embodiment can be applied to the terminal embodiment, and the same technical effects can be achieved. Specifically, fig. 7 is a schematic diagram of a hardware structure of a terminal for implementing an embodiment of the present application.
The terminal 700 includes, but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 707, memory 709, and processor 710.
Those skilled in the art will appreciate that the terminal 700 may further include a power source (e.g., a battery) for powering the various components, and that the power source may be logically coupled to the processor 710 via a power management system so as to perform functions such as managing charging, discharging, and power consumption via the power management system. The terminal structure shown in fig. 7 does not constitute a limitation of the terminal, and the terminal may include more or less components than shown, or may combine certain components, or may be arranged in different components, which will not be described in detail herein.
It should be appreciated that in embodiments of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, with the graphics processor 7041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 706 may include a display panel 7061, and the display panel 7071 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also referred to as 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 (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
In the embodiment of the present application, after receiving downlink data from a network side device, the radio frequency unit 701 may transmit the downlink data to the processor 710 for processing; the radio frequency unit 701 may send uplink data to the network side device. Typically, the radio unit 701 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
The memory 709 may be used to store software programs or instructions and various data. The memory 709 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 709 may include volatile memory or nonvolatile memory, or the memory 709 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 709 in embodiments of the application includes, but is not limited to, these and any other suitable types of memory.
Processor 710 may include one or more processing units; optionally, processor 710 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, and the like, and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 710.
The processor 710 is configured to perform the following operations:
acquiring coding information of a block to be coded;
determining a first index table corresponding to the block to be coded based on the coding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string;
and carrying out predictive coding on the block to be coded according to the first index table.
In the embodiment of the application, the coding information of the block to be coded is obtained; determining a first index table corresponding to a block to be coded based on coding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string; and carrying out predictive coding on the block to be coded according to the first index table. In the embodiment of the application, in the process of predictive coding, an index table is determined according to coding information of a block to be coded, that is, a symbol string in the index table is determined based on a selected probability corresponding to each prediction mode of the block to be coded under different coding information, so that the actual coding condition of the block to be coded is met, the bit waste is avoided in the process of predictive coding, and the storage space occupied by a coded code stream is released.
Alternatively, the processor 710 is configured to perform the following operations:
obtaining decoding information and a target symbol string of a code stream to be decoded;
determining a second index table corresponding to the code stream to be decoded based on the decoding information; the second index table is used for representing the mapping relation between the prediction mode and the symbol string;
inquiring the target symbol string in the second index table to obtain a prediction mode corresponding to the code stream to be decoded;
and decoding the code stream to be decoded by using the prediction mode to obtain a predicted value.
In the embodiment of the application, in the process of predictive decoding, an index table is determined according to the decoding information of the code stream to be decoded, that is, the symbol strings in the index table are determined based on the selected probabilities corresponding to each prediction mode under different decoding information, so that the actual coding condition of the code stream to be decoded is met, the bit waste is avoided in the process of predictive decoding, and the storage space occupied by the reconstructed image obtained by decoding is released.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored, where the program or the instruction implements each process of the above-described embodiment of the predictive coding method or implements each process of the above-described embodiment of the predictive decoding method when executed by a processor, and the process can achieve the same technical effect, and is not repeated herein.
Wherein the processor is a processor in the terminal described in the above embodiment. The readable storage medium includes computer readable storage medium such as computer readable memory ROM, random access memory RAM, magnetic or optical disk, etc.
The embodiment of the application further provides a chip, which comprises a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used for running a program or instructions, realizing each process of the above-mentioned predictive coding method embodiment, or realizing each process of the above-mentioned predictive decoding method embodiment, and achieving the same technical effect, so that repetition is avoided, and no redundant description is provided here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, or the like.
The embodiments of the present application further provide a computer program/program product stored in a storage medium, where the computer program/program product is executed by at least one processor to implement each process of the above-described embodiment of the predictive coding method, or implement each process of the above-described embodiment of the predictive decoding method, and achieve the same technical effects, and are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (22)

1. A predictive coding method, comprising:
the coding end obtains coding information of a block to be coded;
the coding end determines a first index table corresponding to the block to be coded based on the coding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string;
and the coding end carries out predictive coding on the block to be coded according to the first index table.
2. The method of claim 1, wherein the encoding information comprises channel information, and wherein the determining the first index table corresponding to the block to be encoded based on the encoding information comprises:
the coding end determines an index table associated with a chromaticity channel in a preset index table set as the first index table under the condition that the channel information represents the chromaticity channel;
And the coding end determines an index table associated with the brightness channel in the index table set as the first index table under the condition that the channel information characterizes the brightness channel.
3. The method of claim 1, wherein the encoding information comprises configuration information, and wherein the determining the first index table corresponding to the block to be encoded based on the encoding information comprises:
the encoding end determines an index table associated with a lossless encoding mode in a preset index table set as the first index table under the condition that the configuration information represents the lossless encoding mode;
and the coding end determines an index table associated with the lossy coding mode in the index table set as the first index table under the condition that the configuration information characterizes the lossy coding mode.
4. The method of claim 1, wherein the encoding information comprises channel information and configuration information, and wherein determining the first index table corresponding to the block to be encoded based on the encoding information comprises:
the coding end determines an index table associated with the chroma channel and the lossless coding mode in a preset index table set as the first index table under the condition that the channel information represents the chroma channel and the configuration information represents the lossless coding mode;
The coding end determines an index table associated with the brightness channel and the lossless coding mode in the index table set as the first index table under the condition that the channel information represents the brightness channel and the configuration information represents the lossless coding mode;
the coding end determines an index table associated with the chroma channel and the lossy coding mode in the index table set as the first index table under the condition that the channel information represents the chroma channel and the configuration information represents the lossy coding mode;
and the coding end determines an index table associated with the brightness channel and the lossy coding mode in the index table set as the first index table under the condition that the channel information represents the brightness channel and the configuration information represents the lossy coding mode.
5. The method according to claim 1, wherein the method further comprises:
acquiring coding information of a reference coding block;
calculating the selected probability of each prediction mode corresponding to a reference coding block, wherein the selected probability is the probability of occurrence of the prediction mode relative to all prediction modes corresponding to the coding information;
Determining a symbol string corresponding to each prediction mode according to the selected probability of each prediction mode;
and constructing the first index table by using the symbol strings corresponding to each prediction mode.
6. A predictive decoding method, comprising:
the decoding end obtains decoding information of a code stream to be decoded and a target symbol string;
the decoding end determines a second index table corresponding to the code stream to be decoded based on the decoding information; the second index table is used for representing the mapping relation between the prediction mode and the symbol string;
the decoding end queries the target symbol string in the second index table to obtain a prediction mode corresponding to the code stream to be decoded;
and the decoding end decodes the code stream to be decoded by using the prediction mode to obtain a predicted value.
7. The method of claim 6, wherein the decoding information comprises channel information, and wherein the determining the second index table corresponding to the code stream to be decoded based on the decoding information comprises:
the decoding end determines an index table associated with the chromaticity channel in a preset index table set as the second index table under the condition that the channel information represents the chromaticity channel;
And the decoding end determines an index table associated with the brightness channel in the index table set as the second index table under the condition that the channel information characterizes the brightness channel.
8. The method of claim 6, wherein the decoding information comprises configuration information, and wherein the determining the second index table corresponding to the code stream to be decoded based on the decoding information comprises:
the decoding end determines an index table associated with the lossless coding mode in a preset index table set as the second index table under the condition that the configuration information represents the lossless coding mode;
and the decoding end determines an index table associated with the lossy coding mode in the index table set as the second index table under the condition that the configuration information characterizes the lossy coding mode.
9. The method of claim 6, wherein the decoding information comprises channel information and configuration information, and wherein determining the second index table corresponding to the code stream to be decoded based on the decoding information comprises:
the decoding end determines an index table associated with the chroma channel and the lossless coding mode in a preset index table set as the second index table under the condition that the channel information represents the chroma channel and the configuration information represents the lossless coding mode;
The decoding end determines an index table associated with the brightness channel and the lossless coding mode in the index table set as the second index table under the condition that the channel information represents the brightness channel and the configuration information represents the lossless coding mode;
the decoding end determines an index table associated with the chroma channel and the lossy coding mode in the index table set as the second index table under the condition that the channel information represents the chroma channel and the configuration information represents the lossy coding mode;
and the decoding end determines an index table associated with the brightness channel and the lossy coding mode in the index table set as the second index table under the condition that the channel information represents the brightness channel and the configuration information represents the lossy coding mode.
10. The method of claim 6, wherein the method further comprises:
obtaining decoding information of a reference code stream;
calculating the selected probability of each prediction mode corresponding to the reference code stream, wherein the selected probability is the probability of occurrence of the prediction mode relative to all prediction modes corresponding to the decoding information;
Determining a symbol string corresponding to each prediction mode according to the selected probability of each prediction mode;
and constructing the second index table by using the symbol strings corresponding to each prediction mode.
11. A predictive coding apparatus, comprising:
the first acquisition module is used for acquiring the coding information of the block to be coded;
the first determining module is used for determining a first index table corresponding to the block to be encoded based on the encoding information; the first index table is used for representing the mapping relation between the prediction mode and the symbol string;
and the coding module is used for carrying out predictive coding on the block to be coded according to the first index table.
12. The apparatus of claim 11, wherein the encoded information comprises channel information, and wherein the first determining module is specifically configured to:
under the condition that the channel information represents a chromaticity channel, determining an index table associated with the chromaticity channel in a preset index table set as the first index table;
in the case where the channel information characterizes a luminance channel, an index table associated with the luminance channel in the set of index tables is determined as the first index table.
13. The apparatus of claim 11, wherein the encoding information comprises configuration information, and wherein the first determining module is further specifically configured to:
under the condition that the configuration information characterizes a lossless coding mode, determining an index table associated with the lossless coding mode in a preset index table set as the first index table;
in the case that the configuration information characterizes a lossy coding mode, an index table of the set of index tables associated with the lossy coding mode is determined as the first index table.
14. The apparatus of claim 11, wherein the encoding information includes channel information and configuration information, and wherein the first determining module is further specifically configured to:
determining an index table associated with the chroma channel and the lossless coding mode in a preset index table set as the first index table under the condition that the channel information represents the chroma channel and the configuration information represents the lossless coding mode;
determining an index table associated with a luminance channel and a lossless coding mode in the index table set as the first index table in the case that the channel information characterizes the luminance channel and the configuration information characterizes a lossless coding mode;
Determining an index table associated with the chroma channel and the lossy coding mode in the set of index tables as the first index table in the case that the channel information characterizes the chroma channel and the configuration information characterizes the lossy coding mode;
and determining an index table associated with the luminance channel and the lossy coding mode in the index table set as the first index table in the case that the channel information characterizes the luminance channel and the configuration information characterizes the lossy coding mode.
15. The apparatus of claim 11, wherein the apparatus further comprises:
the second acquisition module is used for acquiring the coding information of the reference coding block;
the first calculation module is used for calculating the selected probability of each prediction mode corresponding to the reference coding block, wherein the selected probability is the probability of occurrence of the prediction mode relative to all the prediction modes corresponding to the coding information;
the second determining module is used for determining a symbol string corresponding to each prediction mode according to the selected probability of each prediction mode;
and the first construction module is used for constructing the first index table by using the symbol strings corresponding to each prediction mode.
16. A predictive decoding device, comprising:
the third acquisition module is used for acquiring decoding information of the code stream to be decoded and a target symbol string;
a third determining module, configured to determine a second index table corresponding to the code stream to be decoded based on the decoding information; the second index table is used for representing the mapping relation between the prediction mode and the symbol string;
the query module is used for querying the target symbol string in the second index table to obtain a prediction mode corresponding to the code stream to be decoded;
and the decoding module is used for decoding the code stream to be decoded by using the prediction mode to obtain a predicted value.
17. The apparatus of claim 16, wherein the decoding information comprises channel information, and wherein the third determining module is specifically configured to:
under the condition that the channel information represents a chromaticity channel, determining an index table associated with the chromaticity channel in a preset index table set as the second index table;
in the case where the channel information characterizes a luminance channel, an index table associated with the luminance channel in the set of index tables is determined as the second index table.
18. The apparatus of claim 16, wherein the decoding information comprises configuration information, and wherein the third determining module is further specifically configured to:
Under the condition that the configuration information characterizes a lossless coding mode, determining an index table associated with the lossless coding mode in a preset index table set as the second index table;
and determining an index table associated with the lossy coding mode in the index table set as the second index table in the condition that the configuration information characterizes the lossy coding mode.
19. The apparatus of claim 16, wherein the decoding information includes channel information and configuration information, and wherein the third determining module is further specifically configured to:
determining an index table associated with the chroma channel and the lossless coding mode in a preset index table set as the second index table under the condition that the channel information represents the chroma channel and the configuration information represents the lossless coding mode;
determining an index table associated with the luminance channel and the lossless coding mode in the index table set as the second index table in the case that the channel information characterizes the luminance channel and the configuration information characterizes the lossless coding mode;
determining an index table associated with the chroma channel and the lossy coding mode in the set of index tables as the second index table in the case that the channel information characterizes the chroma channel and the configuration information characterizes the lossy coding mode;
And determining an index table associated with the luminance channel and the lossy coding mode in the index table set as the second index table in the case that the channel information characterizes the luminance channel and the configuration information characterizes the lossy coding mode.
20. The apparatus of claim 16, wherein the apparatus further comprises:
a fourth acquisition module, configured to acquire decoding information of the reference code stream;
the second calculation module is used for calculating the selected probability of each prediction mode corresponding to the reference code stream, wherein the selected probability is the probability of occurrence of the prediction mode relative to all the prediction modes corresponding to the decoding information;
a fourth determining module, configured to determine, according to the selected probability of each prediction mode, a symbol string corresponding to each prediction mode;
and the second construction module is used for constructing the second index table by using the symbol strings corresponding to each prediction mode.
21. A terminal comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, performs the steps of the predictive coding method of any one of claims 1 to 5, or the steps of the predictive decoding method of any one of claims 6 to 10.
22. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the predictive coding method according to any of claims 1-5 or the steps of the predictive decoding method according to any of claims 6-10.
CN202210121689.8A 2022-02-09 2022-02-09 Predictive encoding method, predictive decoding method and terminal Pending CN116614623A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210121689.8A CN116614623A (en) 2022-02-09 2022-02-09 Predictive encoding method, predictive decoding method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210121689.8A CN116614623A (en) 2022-02-09 2022-02-09 Predictive encoding method, predictive decoding method and terminal

Publications (1)

Publication Number Publication Date
CN116614623A true CN116614623A (en) 2023-08-18

Family

ID=87680581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210121689.8A Pending CN116614623A (en) 2022-02-09 2022-02-09 Predictive encoding method, predictive decoding method and terminal

Country Status (1)

Country Link
CN (1) CN116614623A (en)

Similar Documents

Publication Publication Date Title
CN109151468B (en) Image data encoding and decoding methods and devices
CN110278443B (en) Context modeling method and device for dividing zone bits
CN110418209A (en) A kind of information processing method and terminal device applied to transmission of video
CN115474058A (en) Point cloud encoding processing method, point cloud decoding processing method and related equipment
CN116614623A (en) Predictive encoding method, predictive decoding method and terminal
CN113038179A (en) Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment
WO2024120323A1 (en) Attribute transformation coding method, attribute transformation decoding method, and terminal
WO2023098802A1 (en) Point cloud attribute encoding method, point cloud attribute decoding method, and terminal
WO2024120326A1 (en) Geometric coding method, geometric decoding method and terminal
WO2024120325A1 (en) Point cloud coding method, point cloud decoding method, and terminal
CN118338006A (en) Transform coefficient encoding method, transform coefficient decoding method and terminal
WO2023025024A1 (en) Point cloud attribute coding method, point cloud attribute decoding method and terminal
CN118338007A (en) Transform coefficient encoding method, transform coefficient decoding method and terminal
CN118175333A (en) Attribute transformation decoding method, attribute transformation encoding method and terminal
WO2023098801A1 (en) Point cloud attribute encoding method, point cloud decoding method, and terminal
CN116233389A (en) Point cloud coding processing method, point cloud decoding processing method and related equipment
WO2023098820A1 (en) Point cloud coding method and apparatus, point cloud decoding method and apparatus, and communication device
CN118301354A (en) List construction method and terminal
CN116320428A (en) Inter-frame prediction method and terminal
CN116233426B (en) Attribute quantization and inverse quantization methods, devices and equipment
WO2022257978A1 (en) Point cloud coding method and apparatus, and point cloud decoding method and apparatus
WO2023198144A1 (en) Inter-frame prediction method and terminal
CN116366841A (en) Loop filtering method and terminal
WO2022257970A1 (en) Point cloud geometric information encoding processing method, decoding processing method, and related device
CN115474051A (en) Point cloud encoding method, point cloud decoding method and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination