CN114222118A - Encoding method and device, and decoding method and device - Google Patents

Encoding method and device, and decoding method and device Download PDF

Info

Publication number
CN114222118A
CN114222118A CN202111554504.4A CN202111554504A CN114222118A CN 114222118 A CN114222118 A CN 114222118A CN 202111554504 A CN202111554504 A CN 202111554504A CN 114222118 A CN114222118 A CN 114222118A
Authority
CN
China
Prior art keywords
filter
identifier
image frame
information
current image
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.)
Granted
Application number
CN202111554504.4A
Other languages
Chinese (zh)
Other versions
CN114222118B (en
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111554504.4A priority Critical patent/CN114222118B/en
Publication of CN114222118A publication Critical patent/CN114222118A/en
Application granted granted Critical
Publication of CN114222118B publication Critical patent/CN114222118B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • 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/172Methods 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 picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Abstract

The disclosure relates to an encoding method and device, and a decoding method and device. The encoding method comprises the following steps: acquiring at least one first filter and at least one second filter, wherein the at least one first filter is obtained based on the information of the current image frame, and the at least one second filter comprises a filter for the encoded image frame and/or a general filter predefined locally; determining a filter for the current image frame from the at least one first filter and the at least one second filter; writing a first identifier and information of a filter corresponding to the first identifier into the encoded information, wherein the first identifier is used for indicating whether the filter used for the current image frame is the first filter or the second filter, and the information of the filter comprises parameters of the filter or the identifier of the filter.

Description

Encoding method and device, and decoding method and device
Technical Field
The present disclosure relates to the field of data processing, and in particular, to an encoding method and apparatus, and a decoding method and apparatus.
Background
The loop filtering is one of important modules of video coding and decoding, and the main purpose of the module is to ensure the objective and subjective quality of a reconstructed image after inverse transformation and further improve the coding efficiency. With the establishment of a new generation of video coding and decoding standard, in a loop filtering module, more and more cross-component sample value compensation filtering technologies based on a frame level are adopted into the standard, most of the tools train one or more filters based on the frame level, and write parameters of the filters into a code stream to be transmitted to a decoding end. However, in the above method, since the parameters of the filter of each frame need to be written into the code stream, the code rate overhead is relatively large.
Disclosure of Invention
The present disclosure provides an encoding method and apparatus, and a decoding method and apparatus, so as to at least solve the problem that the filter parameter of each image frame needs to be written into a code stream in the related art, which results in a large code rate overhead.
According to a first aspect of the embodiments of the present disclosure, there is provided an encoding method, including: acquiring at least one first filter and at least one second filter, wherein the at least one first filter is obtained based on the information of the current image frame, and the at least one second filter comprises a filter for the encoded image frame and/or a general filter predefined locally; determining a filter for the current image frame from the at least one first filter and the at least one second filter; writing a first identifier and information of a filter corresponding to the first identifier into the encoded information, wherein the first identifier is used for indicating whether the filter used for the current image frame is a first filter or a second filter, and the information of the filter comprises parameters of the filter or the identifier of the filter.
Optionally, obtaining at least one second filter comprises: acquiring at least one parameter of a second filter from a time domain information list, wherein the time domain information list stores information of the filter of the coded image frame and/or parameters of a universal filter which is predefined locally; at least one second filter is derived based on the parameters.
Optionally, before writing the first identifier and the information of the filter corresponding to the first identifier into the encoded information, the method further includes: in the case that the first identifier indicates that the filter for the current image frame is a second filter, obtaining an identifier of the second filter from a time domain information list, wherein each filter in the time domain information list has a corresponding identifier.
Optionally, writing the first identifier and information of the filter corresponding to the first identifier into the encoded information includes: writing a first identifier, parameters of the first filter into the coding information if the first identifier indicates that the filter for the current image frame is the first filter; and writing the first identification and the identification of the second filter into the coding information in the case that the first identification indicates that the filter for the current image frame is the second filter.
Optionally, after writing the first identifier and the parameter of the first filter into the encoded information, the method further includes: and storing the parameters of the first filter into a time domain information list, and taking the field identification of the parameters of the first filter in the time domain information list as the identification of the first filter.
Optionally, storing the parameter of the first filter in the time domain information list includes: determining whether the time domain information list has reached a maximum capacity; if the determination result is yes, deleting the parameters of the filter stored firstly in the time domain information list, sequentially advancing the parameters of the rest filters, and storing the parameters of the first filter into the rearmost position in the time domain information list; and in the case that the determination result is negative, storing the parameter of the first filter into a first empty position in the time domain information list.
According to a second aspect of the embodiments of the present disclosure, there is provided a decoding method including: receiving coding information, wherein the coding information comprises a first identifier of a current image frame and information of a filter corresponding to the first identifier, the first identifier is used for indicating whether the filter used for the current image frame is a first filter obtained based on the information of the current image frame, a second filter of an encoded image frame or a general filter predefined locally, and the information of the filter comprises parameters of the filter or the identifier of the filter; acquiring a filter for the current image frame based on the first identifier and information of the filter corresponding to the first identifier; the current image frame is filtered based on the filter for the current image frame.
Optionally, acquiring a filter for the current image frame based on the first identifier and information of the filter corresponding to the first identifier includes: acquiring parameters of a second filter from a time domain information list through the identifier of the second filter under the condition that the first identifier indicates that the filter for the current image frame is the second filter, wherein the parameters of the filter of the coded image frame and/or the parameters of a common filter which is defined locally in advance are stored in the time domain information list; a second filter is derived based on the parameters.
Optionally, acquiring a filter for the current image frame based on the first identifier and information of the filter corresponding to the first identifier includes: in the case where the first flag indicates that the filter for the current image frame is a first filter, the filter for the current image frame is acquired based on parameters of the first filter.
Optionally, after obtaining the filter for the current image frame based on the parameter of the first filter, the method further includes: and storing the parameters of the first filter into a time domain information list, and taking the field identification of the parameters of the first filter in the time domain information list as the identification of the first filter.
Optionally, storing the parameter of the first filter in the time domain information list includes: determining whether the time domain information list has reached a maximum capacity; if the determination result is yes, deleting the parameters of the filter stored firstly in the time domain information list, sequentially advancing the parameters of the rest filters, and storing the parameters of the first filter into the rearmost position in the time domain information list; and in the case that the determination result is negative, storing the parameter of the first filter into a first empty position in the time domain information list.
According to a third aspect of the embodiments of the present disclosure, there is provided an encoding apparatus including: a filter acquisition unit configured to acquire at least one first filter and at least one second filter, wherein the at least one first filter is obtained based on information of a current image frame, and the at least one second filter includes a filter for an encoded image frame and/or a general filter defined locally in advance; a determining unit configured to determine a filter for a current image frame from among at least one first filter and at least one second filter; a transmitting unit configured to write a first identifier and information of a filter corresponding to the first identifier into the encoded information, wherein the first identifier is used to indicate whether the filter for the current image frame is a first filter or a second filter, and the information of the filter includes a parameter of the filter or an identifier of the filter.
Optionally, the filter obtaining unit is further configured to obtain parameters of at least one second filter from a time domain information list, where the time domain information list stores parameters of filters used for the encoded image frame and/or parameters of a general filter; at least one second filter is derived based on the parameters.
Optionally, the sending unit is further configured to, before writing the first identifier and information of the filter corresponding to the first identifier into the encoded information, obtain an identifier of a second filter from a time domain information list in a case where the first identifier indicates that the filter for the current image frame is the second filter, where each filter in the time domain information list has a corresponding identifier.
Optionally, the sending unit is further configured to, in a case where the first identifier indicates that the filter for the current image frame is a first filter, write the first identifier, and parameters of the first filter, into the encoded information; and writing the first identification and the identification of the second filter into the coding information in the case that the first identification indicates that the filter for the current image frame is the second filter.
Optionally, the sending unit is further configured to, after writing the first identifier and the parameter of the first filter into the coding information, store the parameter of the first filter into the time domain information list, and identify a corresponding field identifier of the parameter of the first filter in the time domain information list as the identifier of the first filter.
Optionally, the sending unit is further configured to determine whether the time domain information list has reached a maximum capacity; if the determination result is yes, deleting the parameters of the filter stored firstly in the time domain information list, sequentially advancing the parameters of the rest filters, and storing the parameters of the first filter into the rearmost position in the time domain information list; and in the case that the determination result is negative, storing the parameter of the first filter into a first empty position in the time domain information list.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a decoding apparatus including: a receiving unit configured to receive encoded information, wherein the encoded information includes a first identifier of a current image frame and information of a filter corresponding to the first identifier, the first identifier is used for indicating whether the filter for the current image frame is a first filter obtained based on the information of the current image frame or a second filter of an encoded image frame or a general filter defined locally in advance, and the information of the filter includes a parameter of the filter or an identifier of the filter; an acquisition unit configured to acquire a filter for a current image frame based on a first identifier and information of the filter corresponding to the first identifier; a filtering unit configured to filter the current image frame based on a filter for the current image frame.
Optionally, the obtaining unit is further configured to, in a case that the first identifier indicates that the filter for the current image frame is a second filter, obtain, through the identifier of the second filter, a parameter of the second filter from a time domain information list, where the time domain information list stores parameters of filters of encoded image frames and/or parameters of a generic filter defined locally in advance; a second filter is derived based on the parameters.
Optionally, the receiving unit is further configured to, in a case that the first identifier indicates that the filter for the current image frame is a first filter, acquire the filter for the current image frame based on a parameter of the first filter.
Optionally, the obtaining unit is further configured to, after obtaining the filter for the current image frame based on the parameter of the first filter, store the parameter of the first filter in a time domain information list, and identify a corresponding field of the parameter of the first filter in the time domain information list as an identifier of the first filter.
Optionally, the obtaining unit is further configured to determine whether the time domain information list has reached a maximum capacity; if the determination result is yes, deleting the parameters of the filter stored firstly in the time domain information list, sequentially advancing the parameters of the rest filters, and storing the parameters of the first filter into the rearmost position in the time domain information list; and in the case that the determination result is negative, storing the parameter of the first filter into a first empty position in the time domain information list.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the encoding method and/or the decoding method according to the present disclosure.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by at least one processor, cause the at least one processor to perform an encoding method and/or a decoding method as described above according to the present disclosure.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement an encoding method and/or a decoding method according to the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
according to the encoding method and device and the decoding method and device, not only the information of the current image frame is considered to obtain the filter, but also the filter of the encoded image frame is considered, the filter of the encoded image frame is adopted based on the final selection, only the identification of the filter needs to be written into the encoded information at the moment, the parameter of the filter does not need to be written into the encoded information and sent to the decoding end, and the subsequent decoding end can obtain the corresponding filter according to the identification, namely the time domain information between the encoded image frames can be fully utilized, so that the parameter of the filter of each image frame does not need to be written into a code stream, the code rate overhead is effectively reduced, and the objective performance of the cross-component compensation filtering method is improved. Therefore, the method and the device solve the problem that the code stream needs to be written in the parameters of the filter of each image frame in the related art, and the code rate overhead is high.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a schematic diagram illustrating an implementation scenario of a coding and decoding method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a method of encoding according to an example embodiment;
FIG. 3 is a diagram illustrating a time domain information list update according to an example embodiment;
FIG. 4 is a diagram illustrating a temporal filtering in combination with CCSAO in accordance with an exemplary embodiment;
FIG. 5 is a flow chart illustrating a decoding method according to an exemplary embodiment;
FIG. 6 is a block diagram illustrating an encoding apparatus according to an example embodiment;
FIG. 7 is a block diagram illustrating a decoding apparatus according to an example embodiment;
fig. 8 is a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings 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 data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The embodiments described in the following examples do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In this case, the expression "at least one of the items" in the present disclosure means a case where three types of parallel expressions "any one of the items", "a combination of any plural ones of the items", and "the entirety of the items" are included. For example, "include at least one of a and B" includes the following three cases in parallel: (1) comprises A; (2) comprises B; (3) including a and B. For another example, "at least one of the first step and the second step is performed", which means that the following three cases are juxtaposed: (1) executing the step one; (2) executing the step two; (3) and executing the step one and the step two.
In view of the above problem, the present disclosure provides an encoding method capable of reducing the bit rate overhead, and the following description takes a scene of transmitting a video as an example.
Fig. 1 is a schematic diagram illustrating an implementation scenario of a coding and decoding method according to an exemplary embodiment of the present disclosure, as shown in fig. 1, the implementation scenario includes a server 100, a user terminal 110, and a user terminal 120, where the number of the user terminals is not limited to 2, and includes not limited to a mobile phone, a personal computer, and the like, the user terminal may install a camera for acquiring a video, and the server may be one server, or several servers form a server cluster, or may be a cloud computing platform or a virtualization center.
The user terminal 110 obtains a video to be transmitted through a camera, and for each image frame in the video, the user terminal 110 performs the following operations: acquiring at least one first filter and at least one second filter, wherein the at least one first filter is obtained based on the information of the current image frame, and the at least one second filter comprises a filter for the encoded image frame and/or a general filter predefined locally; determining a filter for the current image frame from the at least one first filter and the at least one second filter; writing a first identifier and information of a filter corresponding to the first identifier, wherein the first identifier is used for indicating whether the filter used for the current image frame is a first filter or a second filter, and the information of the filter comprises parameters of the filter or the identifier of the filter, and transmitting the information to the user terminal 120 through the server 100.
The user terminal 120 receives coding information sent by the user terminal 110 via the server 100, wherein the coding information includes a first identifier of a current image frame and information of a filter corresponding to the first identifier, the first identifier is used for indicating whether the filter for the current image frame is a first filter obtained based on the information of the current image frame, a second filter of an encoded image frame or a general filter predefined locally, and the information of the filter includes parameters of the filter or the identifier of the filter; acquiring a filter for the current image frame based on the first identifier and information of the filter corresponding to the first identifier; the current image frame is filtered based on the filter for the current image frame.
Hereinafter, an encoding method and apparatus, a decoding method and apparatus according to exemplary embodiments of the present disclosure will be described in detail with reference to fig. 2 to 7.
Fig. 2 is a flow chart illustrating an encoding method according to an exemplary embodiment, as shown in fig. 2, the encoding method including the steps of:
in step S201, at least one first filter and at least one second filter are obtained, wherein the at least one first filter is obtained based on information of the current image frame, and the at least one second filter comprises a filter for an encoded image frame and/or a generic filter predefined locally. For example, the current image frame may be optimized based on its own rate distortion to obtain a set of filters or sets of filters, which is not discussed further herein since this process is common. For another example, filters of adjacent coded image frames may be stored in the coding end and the decoding end in advance, or a plurality of general filters may be found for the cross-component sample value compensation filtering method by a priori statistical method, and are defined in the coding end and the decoding end in advance, so that these filters do not need to be written into the code stream.
According to an exemplary embodiment of the disclosure, obtaining at least one second filter comprises: acquiring at least one parameter of a second filter from a time domain information list, wherein the time domain information list stores information of the filter of the coded image frame and/or parameters of a universal filter which is predefined locally; at least one second filter is derived based on the parameters. By the embodiment, the time domain information list can be set to store the parameters of the second filter and the general filter, so that the second filter and the general filter can be conveniently and quickly acquired in the following process. For example, the time domain information List may adopt a History Mode List (abbreviated as HML), and the disclosure is not limited thereto.
Returning to fig. 2, in step S202, a filter for the current image frame is determined from among the at least one first filter and the at least one second filter. For example, the filter of the current image frame may be determined from at least one first filter and at least one second filter in a rate distortion optimized manner.
In step S203, a first flag and information of a filter corresponding to the first flag are written into the encoded information, wherein the first flag is used to indicate whether the filter for the current image frame is a first filter or a second filter, and the information of the filter includes parameters of the filter or the identifier of the filter.
According to an exemplary embodiment of the present disclosure, before writing the first identifier and information of the filter corresponding to the first identifier into the encoded information, the method further includes: in the case that the first identifier indicates that the filter for the current image frame is a second filter, obtaining an identifier of the second filter from a time domain information list, wherein each filter in the time domain information list has a corresponding identifier. According to the embodiment, the identification of the second filter can be conveniently and quickly acquired.
According to an exemplary embodiment of the present disclosure, writing a first identifier and information of a filter corresponding to the first identifier into encoded information includes: writing a first identifier, parameters of the first filter into the coding information if the first identifier indicates that the filter for the current image frame is the first filter; and writing the first identification and the identification of the second filter into the coding information in the case that the first identification indicates that the filter for the current image frame is the second filter. According to the embodiment, when the current image frame adopts the first filter, parameters of the filter are written into the coding information and are merged into the code stream as in the related technology, the first identifier is also written into the first filter, so that a subsequent decoding end determines whether the parameters of the corresponding filter are obtained from the code stream or the time domain information list based on the first identifier, and meanwhile, when the current image frame adopts the second filter, the identifier of the second filter is written into the coding information without writing the corresponding parameters into the coding information, thereby reducing the code stream overhead.
According to an exemplary embodiment of the present disclosure, after writing the first identifier, the parameter of the first filter into the encoding information, further comprising: and storing the parameters of the first filter into a time domain information list, and taking the field identification of the parameters of the first filter in the time domain information list as the identification of the first filter. With this embodiment, the parameters of the first filter are stored in the temporal information list for subsequent use as the parameters of the filter for the next frame adjacent to the next image frame.
According to an exemplary embodiment of the present disclosure, storing the parameter of the first filter in the time domain information list further includes: determining whether the time domain information list has reached a maximum capacity; if the determination result is yes, deleting the parameters of the filter stored firstly in the time domain information list, sequentially advancing the parameters of the rest filters, and storing the parameters of the first filter into the rearmost position in the time domain information list; and in the case that the determination result is negative, storing the parameter of the first filter into a first empty position in the time domain information list. According to the embodiment, the time domain information list can be updated in a first-in first-out manner, so that the latest filter parameters in the time domain information list are ensured.
For example, fig. 3 is a schematic diagram illustrating updating of a time domain information list according to an exemplary embodiment, as shown in fig. 3, the time domain information list may be updated in a first-in first-out manner, that is, when the time domain information list has reached a maximum capacity and parameters of a new filter need to be stored, parameters of a front filter may be deleted, parameters of remaining filters are sequentially moved forward, so that a last position of the time domain information list is vacated, and then the parameters of the new filter are stored in the vacated position of the time domain information list; if the time domain information list does not reach the maximum capacity, and when the parameters of a new filter need to be stored, the parameters may be stored in sequence, for example, the parameters of the filter are already stored in the HML0 and the HML1, but the latter lists are all empty, at this time, the parameters of the new filter may be stored in the HML3, and so on until the time domain information list reaches the maximum capacity.
In summary, the main principle of the present disclosure is to store filters derived from encoded image frames by a cross-component sample value compensation filtering method at the encoding end and the decoding end, where there is usually a high temporal correlation between adjacent image frames of a video, and by using the correlation between the image frames, when a current image frame is subjected to a filtering decision, a set of filters may be derived by itself for filtering, or a filter that multiplexes the encoded image frames may be selected for filtering, and which way to perform filtering may be decided by a rate-distortion optimization way. In the present disclosure, a History Mode List (HML) may be used at both the encoding end and the decoding end to store information of the filter across components of the encoded image frame.
For the convenience of understanding of the above embodiments, in the following, a cross-component adaptive offset (CCSAO) in the AVS3 is taken as an example to discuss in detail, and fig. 4 is a schematic diagram illustrating a combination of temporal filtering and CCSAO according to an exemplary embodiment, as shown in fig. 4, after the current image frame is selected to be CCSAO filtered, if CCSAO temporal filtering is further selected to be used, it is not necessary to write information of a filter into the code stream, and it is only necessary to write a flag bit of temporal filtering (i.e., the above filtering identifier) and an index of a reference temporal filter in a temporal information list (i.e., the above second filter identifier) into the code stream; if CCSAO non-time domain filtering is adopted, namely a set of filters are obtained by the current image frame through self rate distortion optimization, the filters need to be written into a code stream, and a time domain information list is updated at the same time.
Fig. 5 is a flow chart illustrating a decoding method according to an exemplary embodiment, as shown in fig. 5, the decoding method including the steps of:
in step S501, encoding information is received, where the encoding information includes a first identifier of the current image frame and information of a filter corresponding to the first identifier, the first identifier is used to indicate whether the filter for the current image frame is a first filter obtained based on the information of the current image frame or a second filter of an encoded image frame or a general filter defined locally in advance, and the information of the filter includes a parameter of the filter or an identifier of the filter.
In step S502, a filter for the current image frame is acquired based on the first identifier and information of the filter corresponding to the first identifier.
According to an exemplary embodiment of the present disclosure, acquiring a filter for a current image frame based on a first identifier and information of the filter corresponding to the first identifier includes: acquiring parameters of a second filter from a time domain information list through the identifier of the second filter under the condition that the first identifier indicates that the filter for the current image frame is the second filter, wherein the parameters of the filter of the coded image frame and/or the parameters of a common filter which is defined locally in advance are stored in the time domain information list; a second filter is derived based on the parameters.
According to an exemplary embodiment of the present disclosure, acquiring a filter for a current image frame based on a first identifier and information of the filter corresponding to the first identifier includes: in the case that the first identifier indicates that the filter for the current image frame is the first filter, the filter for the current image frame is acquired based on the parameter of the first filter
According to an exemplary embodiment of the present disclosure, after acquiring the filter for the current image frame based on the parameter of the first filter, the method further includes: and storing the parameters of the first filter into a time domain information list, and taking the field identification of the parameters of the first filter in the time domain information list as the identification of the first filter.
According to an exemplary embodiment of the present disclosure, storing the parameter of the first filter into a time domain information list includes: determining whether the time domain information list has reached a maximum capacity; if the determination result is yes, deleting the parameters of the filter stored firstly in the time domain information list, sequentially advancing the parameters of the rest filters, and storing the parameters of the first filter into the rearmost position in the time domain information list; and in the case that the determination result is negative, storing the parameter of the first filter into a first empty position in the time domain information list.
Returning to fig. 5, in step S503, the current image frame is filtered based on the filter for the current image frame.
Fig. 6 is a block diagram illustrating an encoding apparatus according to an example embodiment. Referring to fig. 6, the apparatus includes a filter acquisition unit 60, a determination unit 62, and a transmission unit 64.
A filter obtaining unit 60 configured to obtain at least one first filter obtained based on information of the current image frame and at least one second filter including a filter for the encoded image frame and/or a general filter defined locally in advance; a determining unit 62 configured to determine a filter for the current image frame from the at least one first filter and the at least one second filter; a sending unit 64 configured to write a first identifier and information of a filter corresponding to the first identifier into the encoded information, wherein the first identifier is used for indicating whether the filter for the current image frame is a first filter or a second filter, and the information of the filter includes a parameter of the filter or an identifier of the filter.
According to an embodiment of the present disclosure, the filter obtaining unit 60 is further configured to obtain parameters of at least one second filter from a temporal information list, wherein the temporal information list stores parameters of filters for the encoded image frame and/or parameters of a general filter; at least one second filter is derived based on the parameters.
According to the embodiment of the present disclosure, the sending unit 64 is further configured to, before writing the first identifier and the information of the filter corresponding to the first identifier into the encoded information, obtain the identifier of the second filter from a time domain information list in a case where the first identifier indicates that the filter for the current image frame is the second filter, where each filter in the time domain information list has a corresponding identifier.
According to the embodiment of the present disclosure, the sending unit 64 is further configured to write the first identifier, the parameter of the first filter, into the encoding information in case that the first identifier indicates that the filter for the current image frame is the first filter; and writing the first identification and the identification of the second filter into the coding information in the case that the first identification indicates that the filter for the current image frame is the second filter.
According to the embodiment of the present disclosure, the sending unit 64 is further configured to, after writing the first identifier and the parameter of the first filter into the encoded information, store the parameter of the first filter into the time domain information list, and identify a corresponding field identifier of the parameter of the first filter in the time domain information list as the identifier of the first filter.
According to an embodiment of the present disclosure, the sending unit 64 is further configured to determine whether the time domain information list has reached a maximum capacity; if the determination result is yes, deleting the parameters of the filter stored firstly in the time domain information list, sequentially advancing the parameters of the rest filters, and storing the parameters of the first filter into the rearmost position in the time domain information list; and in the case that the determination result is negative, storing the parameter of the first filter into a first empty position in the time domain information list.
Fig. 7 is a block diagram illustrating a decoding apparatus according to an example embodiment. Referring to fig. 7, the apparatus includes a receiving unit 70, an obtaining unit 72, and a filtering unit 74.
A receiving unit 70 configured to receive coding information, wherein the coding information includes a first identifier of a current image frame and information of a filter corresponding to the first identifier, the first identifier is used to indicate whether the filter for the current image frame is a first filter obtained based on the information of the current image frame or a second filter of an encoded image frame or a general filter defined locally in advance, and the information of the filter includes a parameter of the filter or an identifier of the filter; an acquisition unit 72 configured to acquire a filter for the current image frame based on the first identifier and information of the filter corresponding to the first identifier; a filtering unit 74 configured to filter the current image frame based on the filter for the current image frame.
According to the embodiment of the present disclosure, the obtaining unit 72 is further configured to, in a case that the first identifier indicates that the filter for the current image frame is a second filter, obtain, through the identifier of the second filter, a parameter of the second filter from a time domain information list, where the time domain information list stores the parameter of the filter of the encoded image frame and/or the parameter of a general-purpose filter defined locally in advance; a second filter is derived based on the parameters.
According to an embodiment of the present disclosure, the receiving unit 70 is further configured to, in a case that the first flag indicates that the filter for the current image frame is the first filter, acquire the filter for the current image frame based on a parameter of the first filter.
According to the embodiment of the present disclosure, the obtaining unit 72 is further configured to, after obtaining the filter for the current image frame based on the parameter of the first filter, store the parameter of the first filter in the time domain information list, and identify a corresponding field of the parameter of the first filter in the time domain information list as the identifier of the first filter.
According to an embodiment of the present disclosure, the obtaining unit 72 is further configured to determine whether the time domain information list has reached a maximum capacity; if the determination result is yes, deleting the parameters of the filter stored firstly in the time domain information list, sequentially advancing the parameters of the rest filters, and storing the parameters of the first filter into the rearmost position in the time domain information list; and in the case that the determination result is negative, storing the parameter of the first filter into a first empty position in the time domain information list.
According to an embodiment of the present disclosure, an electronic device may be provided. Fig. 8 is a block diagram of an electronic device 800 including at least one memory 801 and at least one processor 802 having a set of computer-executable instructions stored therein that, when executed by the at least one processor, perform an encoding method and a decoding method according to embodiments of the present disclosure, according to embodiments of the present disclosure.
By way of example, the electronic device 800 may be a PC computer, tablet device, personal digital assistant, smart phone, or other device capable of executing the set of instructions described above. The electronic device 1000 need not be a single electronic device, but can be any collection of devices or circuits that can execute the above instructions (or sets of instructions) individually or in combination. The electronic device 800 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces with local or remote (e.g., via wireless transmission).
In the electronic device 800, the processor 802 may include a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a programmable logic device, a special purpose processor system, a microcontroller, or a microprocessor. By way of example, and not limitation, the processor 802 may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
The processor 802 may execute instructions or code stored in memory, wherein the memory 801 may also store data. The instructions and data may also be transmitted or received over a network via a network interface device, which may employ any known transmission protocol.
The memory 801 may be integrated with the processor 802, for example, with RAM or flash memory disposed within an integrated circuit microprocessor or the like. Further, memory 801 may include a stand-alone device, such as an external disk drive, storage array, or any other storage device usable by a database system. The memory 801 and the processor 802 may be operatively coupled or may communicate with each other, such as through I/O ports, network connections, etc., so that the processor 802 can read files stored in the memory 801.
Further, the electronic device 800 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the electronic device may be connected to each other via a bus and/or a network.
According to an embodiment of the present disclosure, there may also be provided a computer-readable storage medium, wherein when the instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is caused to perform the encoding method and the decoding method of the embodiments of the present disclosure. Examples of the computer-readable storage medium herein include: read-only memory (ROM), random-access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random-access memory (RAM), dynamic random-access memory (DRAM), static random-access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD + R, CD-RW, CD + RW, DVD-ROM, DVD-R, DVD + R, DVD-RW, DVD + RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or compact disc memory, Hard Disk Drive (HDD), solid-state drive (SSD), card-type memory (such as a multimedia card, a Secure Digital (SD) card or a extreme digital (XD) card), magnetic tape, a floppy disk, a magneto-optical data storage device, an optical data storage device, a hard disk, a magnetic tape, a magneto-optical data storage device, a hard disk, a magnetic tape, a magnetic data storage device, a magnetic tape, a magnetic data storage device, a magnetic tape, a magnetic data storage device, a magnetic tape, a magnetic data storage device, a magnetic tape, a magnetic data storage device, A solid state disk, and any other device configured to store and provide a computer program and any associated data, data files, and data structures to a processor or computer in a non-transitory manner such that the processor or computer can execute the computer program. The computer program in the computer-readable storage medium described above can be run in an environment deployed in a computer apparatus, such as a client, a host, a proxy device, a server, and the like, and further, in one example, the computer program and any associated data, data files, and data structures are distributed across a networked computer system such that the computer program and any associated data, data files, and data structures are stored, accessed, and executed in a distributed fashion by one or more processors or computers.
According to an embodiment of the present disclosure, a computer program product is provided, which includes computer instructions, and the computer instructions, when executed by a processor, implement the encoding method and the decoding method of the embodiment of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method of encoding, comprising:
acquiring at least one first filter and at least one second filter, wherein the at least one first filter is obtained based on the information of the current image frame, and the at least one second filter comprises a filter for the encoded image frame and/or a general filter predefined locally;
determining a filter for the current image frame from the at least one first filter and the at least one second filter;
writing a first identifier and information of a filter corresponding to the first identifier into encoded information, wherein the first identifier is used for indicating whether the filter used for the current image frame is a first filter or a second filter, and the information of the filter comprises parameters of the filter or the identifier of the filter.
2. The encoding method of claim 1, wherein said obtaining at least one second filter comprises:
obtaining parameters of the at least one second filter from a temporal information list, wherein the temporal information list stores parameters of filters used for the encoded image frame and/or parameters of the general filter;
deriving the at least one second filter based on the parameter.
3. The encoding method of claim 2, wherein before writing the first identification and information of the filter corresponding to the first identification into the encoded information, further comprising:
in the case that the first identifier indicates that the filter for the current image frame is a second filter, obtaining an identifier of the second filter from the time domain information list, wherein each filter in the time domain information list has a corresponding identifier.
4. The encoding method of claim 1, wherein writing the first identifier and information of the filter corresponding to the first identifier into the encoded information comprises:
writing the first identifier, parameters of the first filter into encoding information if the first identifier indicates that the filter for the current image frame is a first filter;
writing the first identifier and the identifier of the second filter into coding information if the first identifier indicates that the filter for the current image frame is a second filter.
5. A method of decoding, comprising:
receiving coding information, wherein the coding information comprises a first identifier of a current image frame and information of a filter corresponding to the first identifier, the first identifier is used for indicating whether the filter used for the current image frame is a first filter obtained based on the information of the current image frame or a second filter of an encoded image frame or a universal filter predefined locally, and the information of the filter comprises parameters of the filter or the identifier of the filter;
acquiring a filter for a current image frame based on the first identifier and information of the filter corresponding to the first identifier;
filtering the current image frame based on the filter for the current image frame.
6. An encoding apparatus, comprising:
a filter acquisition unit configured to acquire at least one first filter obtained based on information of a current image frame and at least one second filter including a filter for an encoded image frame and/or a general-purpose filter defined locally in advance;
a determining unit configured to determine a filter for the current image frame from the at least one first filter and the at least one second filter;
a sending unit configured to write a first identifier and information of a filter corresponding to the first identifier into encoded information, wherein the first identifier is used for indicating whether the filter for the current image frame is a first filter or a second filter, and the information of the filter includes a parameter of the filter or an identifier of the filter.
7. A decoding apparatus, comprising:
a receiving unit configured to receive coding information, wherein the coding information includes a first identifier of a current image frame and information of a filter corresponding to the first identifier, the first identifier is used for indicating whether the filter for the current image frame is a first filter obtained based on the information of the current image frame or a second filter of an encoded image frame or a general filter predefined locally, and the information of the filter includes a parameter of the filter or an identifier of the filter;
an acquisition unit configured to acquire a filter for a current image frame based on the first identifier and information of a filter corresponding to the first identifier;
a filtering unit configured to filter the current image frame based on the filter for the current image frame.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the encoding method of any one of claims 1 to 4 and/or the decoding method of claim 5.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by at least one processor, cause the at least one processor to perform the encoding method of any one of claims 1 to 4 and/or the decoding method of claim 5.
10. A computer program product comprising computer instructions, characterized in that said computer instructions, when executed by a processor, implement the encoding method of any one of claims 1 to 4 and/or the decoding method of claim 5.
CN202111554504.4A 2021-12-17 2021-12-17 Encoding method and device, decoding method and device Active CN114222118B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111554504.4A CN114222118B (en) 2021-12-17 2021-12-17 Encoding method and device, decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111554504.4A CN114222118B (en) 2021-12-17 2021-12-17 Encoding method and device, decoding method and device

Publications (2)

Publication Number Publication Date
CN114222118A true CN114222118A (en) 2022-03-22
CN114222118B CN114222118B (en) 2023-12-12

Family

ID=80703794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111554504.4A Active CN114222118B (en) 2021-12-17 2021-12-17 Encoding method and device, decoding method and device

Country Status (1)

Country Link
CN (1) CN114222118B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120147959A1 (en) * 2010-03-09 2012-06-14 Hiroshi Amano Moving image decoding apparatus, moving image coding apparatus, moving image decoding circuit, and moving image decoding method
WO2013145174A1 (en) * 2012-03-28 2013-10-03 株式会社 東芝 Video encoding method, video decoding method, video encoding device, and video decoding device
KR20180087216A (en) * 2018-07-20 2018-08-01 삼성전자주식회사 Method and apparatus for video encoding considering adaptive loop filtering, and method and apparatus for video decoding considering adaptive loop filtering
EP3410723A1 (en) * 2017-05-31 2018-12-05 Thomson Licensing A method and a device for picture encoding and decoding
EP3611924A1 (en) * 2018-08-14 2020-02-19 InterDigital VC Holdings, Inc. In-loop filter with multiple regions
CN111654710A (en) * 2020-06-07 2020-09-11 咪咕文化科技有限公司 Image filtering method, device, equipment and storage medium
CN111866506A (en) * 2020-06-07 2020-10-30 咪咕文化科技有限公司 Image coding method, device, equipment and readable storage medium
CN112544081A (en) * 2019-12-31 2021-03-23 北京大学 Method and device for loop filtering

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120147959A1 (en) * 2010-03-09 2012-06-14 Hiroshi Amano Moving image decoding apparatus, moving image coding apparatus, moving image decoding circuit, and moving image decoding method
WO2013145174A1 (en) * 2012-03-28 2013-10-03 株式会社 東芝 Video encoding method, video decoding method, video encoding device, and video decoding device
EP3410723A1 (en) * 2017-05-31 2018-12-05 Thomson Licensing A method and a device for picture encoding and decoding
KR20180087216A (en) * 2018-07-20 2018-08-01 삼성전자주식회사 Method and apparatus for video encoding considering adaptive loop filtering, and method and apparatus for video decoding considering adaptive loop filtering
EP3611924A1 (en) * 2018-08-14 2020-02-19 InterDigital VC Holdings, Inc. In-loop filter with multiple regions
CN112544081A (en) * 2019-12-31 2021-03-23 北京大学 Method and device for loop filtering
CN111654710A (en) * 2020-06-07 2020-09-11 咪咕文化科技有限公司 Image filtering method, device, equipment and storage medium
CN111866506A (en) * 2020-06-07 2020-10-30 咪咕文化科技有限公司 Image coding method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN114222118B (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN109254733B (en) Method, device and system for storing data
CN107229420B (en) Data storage method, reading method, deleting method and data operating system
KR20170054299A (en) Reference block aggregating into a reference set for deduplication in memory management
CN109802684B (en) Method and device for data compression
US20180101542A1 (en) Method and apparatus for compressing metadata in a file system
CN110888837B (en) Object storage small file merging method and device
CN112714359B (en) Video recommendation method and device, computer equipment and storage medium
US9003151B2 (en) Methods and systems for data cleanup using physical image of files on storage devices
CN109918352B (en) Memory system and method of storing data
CN113064859B (en) Metadata processing method and device, electronic equipment and storage medium
CN108255989B (en) Picture storage method and device, terminal equipment and computer storage medium
CN115114232A (en) Method, device and medium for enumerating historical version objects
CN111694703B (en) Cache region management method and device and computer equipment
CN112835740A (en) Method, electronic device and computer program product for managing data backup
CN104199687B (en) A kind of method and apparatus of the processing data in dummy machine system
CN109726039B (en) Method and apparatus for managing virtual machines
CN109658985B (en) Redundancy removal optimization method and system for gene reference sequence
CN114222118B (en) Encoding method and device, decoding method and device
CN104063377A (en) Information processing method and electronic equipment using same
CN114861003A (en) Object enumeration method, device and medium under specified directory
CN115599299A (en) Storage bucket management method and device, electronic equipment and storage medium
CN107526530B (en) Data processing method and device
RU141240U1 (en) SYSTEM FOR REMOVING RESIDUAL INFORMATION FROM MEMORY OF TERMINALS AND MULTI-POINT CONFERENCE SERVERS
CN113467997A (en) Data recovery method and device, mobile device and storage medium
CN113806249B (en) Object storage sequence lifting method, device, terminal and storage medium

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
GR01 Patent grant
GR01 Patent grant