[go: up one dir, main page]

CN112449185A - Video decoding method, video encoding device, video encoding medium, and electronic apparatus - Google Patents

Video decoding method, video encoding device, video encoding medium, and electronic apparatus Download PDF

Info

Publication number
CN112449185A
CN112449185A CN201910803861.6A CN201910803861A CN112449185A CN 112449185 A CN112449185 A CN 112449185A CN 201910803861 A CN201910803861 A CN 201910803861A CN 112449185 A CN112449185 A CN 112449185A
Authority
CN
China
Prior art keywords
coefficient
coefficients
value
encoding
video
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
CN201910803861.6A
Other languages
Chinese (zh)
Other versions
CN112449185B (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.)
Peking University
Tencent Technology Shenzhen Co Ltd
Original Assignee
Peking University
Tencent Technology Shenzhen 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 Peking University, Tencent Technology Shenzhen Co Ltd filed Critical Peking University
Priority to CN201910803861.6A priority Critical patent/CN112449185B/en
Publication of CN112449185A publication Critical patent/CN112449185A/en
Application granted granted Critical
Publication of CN112449185B publication Critical patent/CN112449185B/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/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • 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/124Quantisation
    • 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • 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

Landscapes

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

Abstract

本申请的实施例提供了一种视频解码方法、编码方法、装置、介质及电子设备。该视频解码方法包括:获取待解码视频帧对应的编码数据,所述编码数据中包含有对视频帧编码块中的DC系数和AC系数分别进行编码得到的编码结果;基于所述DC系数的编码结果进行解码处理,得到所述DC系数;根据所述DC系数的值确定所述AC系数中是否包含非零系数;根据所述AC系数中是否包含非零系数对所述AC系数的编码结果进行解码处理,得到所述AC系数。本申请实施例的技术方案可以提高视频帧编码块的解码效率和编码效率。

Figure 201910803861

Embodiments of the present application provide a video decoding method, an encoding method, an apparatus, a medium, and an electronic device. The video decoding method includes: acquiring encoded data corresponding to a video frame to be decoded, the encoded data including encoding results obtained by encoding DC coefficients and AC coefficients in a video frame encoding block respectively; encoding based on the DC coefficients As a result, decoding processing is performed to obtain the DC coefficient; according to the value of the DC coefficient, determine whether the AC coefficient includes a non-zero coefficient; according to whether the AC coefficient includes a non-zero coefficient, the coding result of the AC coefficient is performed. A decoding process is performed to obtain the AC coefficients. The technical solutions of the embodiments of the present application can improve the decoding efficiency and the coding efficiency of the video frame coding block.

Figure 201910803861

Description

Video decoding method, video encoding device, video encoding medium, and electronic apparatus
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a video decoding method, an encoding method, an apparatus, a medium, and an electronic device.
Background
In the video coding standard, coefficient coding is that the whole coding block is coded one by one in a certain scanning mode, each non-zero coefficient in the coding block needs to be bound with a previous continuous zero coefficient for coding, and even if the previous zero coefficient is 0, the coding needs to be carried out to find the corresponding coefficient position at a decoding end. It can be seen that this coding scheme brings more extra coded bits, resulting in lower coding efficiency and decoding efficiency.
Disclosure of Invention
Embodiments of the present application provide a video decoding method, a video encoding method, an apparatus, a medium, and an electronic device, so that the decoding efficiency and the encoding efficiency of a video frame encoding block can be improved at least to a certain extent.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a video decoding method including: acquiring coded data corresponding to a video frame to be decoded, wherein the coded data comprise coding results obtained by respectively coding a DC coefficient and an AC coefficient in a video frame coding block; decoding processing is carried out on the basis of the encoding result of the DC coefficient to obtain the DC coefficient; determining whether a non-zero coefficient is included in the AC coefficients according to the value of the DC coefficient; and decoding the coding result of the AC coefficient according to whether the AC coefficient contains a nonzero coefficient or not to obtain the AC coefficient.
According to an aspect of an embodiment of the present application, there is provided a video encoding method, including: determining a DC coefficient and an AC coefficient contained in a video frame coding block; encoding the DC coefficient; encoding a syntax element indicating whether the AC coefficient includes a non-zero coefficient according to a value of the DC coefficient; and coding the AC coefficient according to the value of the syntax element.
According to an aspect of an embodiment of the present application, there is provided a video decoding apparatus including: the device comprises an acquisition unit, a decoding unit and a decoding unit, wherein the acquisition unit is used for acquiring coded data corresponding to a video frame to be decoded, and the coded data comprise coding results obtained by respectively coding a DC coefficient and an AC coefficient in a video frame coding block; a first decoding unit, configured to perform decoding processing based on an encoding result of the DC coefficient to obtain the DC coefficient; a determining unit, configured to determine whether a non-zero coefficient is included in the AC coefficient according to a value of the DC coefficient; and the second decoding unit is used for decoding the coding result of the AC coefficient according to whether the AC coefficient contains a nonzero coefficient or not to obtain the AC coefficient.
In some embodiments of the present application, based on the foregoing scheme, the first decoding unit is configured to: and decoding according to the context of the DC coefficient to obtain the value of the DC coefficient, wherein the value of the DC coefficient is obtained through binarization processing.
In some embodiments of the present application, based on the foregoing scheme, the first decoding unit is further configured to: determining a context of a DC coefficient in the video frame coding block according to values of DC coefficients of neighboring blocks of the video frame coding block.
In some embodiments of the present application, based on the foregoing scheme, the first decoding unit is configured to: determining a reference variable to be 0 if a value of a DC coefficient of a predetermined number of valid neighboring blocks among valid neighboring blocks of the video frame coding block is 0, the valid neighboring blocks being neighboring blocks having edge overlap with the video frame coding block; if the number of the effective adjacent blocks of which the DC coefficient value is 0 in the effective adjacent blocks of the video frame coding block is less than or equal to the preset number, selecting the maximum value and the minimum value of the non-zero DC coefficient from the effective adjacent blocks of the video frame coding block, and determining the value of the reference variable according to the maximum value and the minimum value; determining a context of a DC coefficient in the video frame coding block based on the value of the reference variable.
In some embodiments of the present application, based on the foregoing scheme, the determining unit is configured to: and if the value of the DC coefficient is 0, determining that the AC coefficient contains a non-zero coefficient, wherein if the value of the DC coefficient is 0, omitting an encoding process of a syntax element for indicating whether the AC coefficient contains the non-zero coefficient when encoding the video frame encoding block.
In some embodiments of the present application, based on the foregoing scheme, the determining unit is configured to: and if the value of the DC coefficient is 1, decoding according to the context of the syntax element to obtain the value of the syntax element, and determining whether the AC coefficient comprises a nonzero coefficient according to the value of the syntax element.
In some embodiments of the present application, based on the foregoing scheme, the determining unit is further configured to: determining a context of the syntax element as a function of a value of the DC coefficient and a size of the video frame encoding block.
In some embodiments of the present application, based on the foregoing scheme, the second decoding unit is configured to: if the AC coefficients do not contain non-zero coefficients, decoding all AC coefficients contained in the video frame coding block into 0, wherein the video frame coding block omits the coding process of the AC coefficients during coding; and if the AC coefficient contains a nonzero coefficient, decoding according to the scanning sequence during encoding to obtain the value of the AC coefficient contained in the video frame encoding block.
According to an aspect of an embodiment of the present application, there is provided a video encoding apparatus including: a determining unit for determining a DC coefficient and an AC coefficient contained in a video frame coding block; and the coding unit is used for coding the DC coefficient, coding a syntax element for indicating whether the AC coefficient contains a nonzero coefficient according to the value of the DC coefficient, and coding the AC coefficient according to the value of the syntax element.
In some embodiments of the present application, based on the foregoing scheme, the encoding unit is configured to: if the value of the DC coefficient is 0, omitting the encoding process of the syntax element; and if the value of the DC coefficient is not 0, determining the value of the syntax element according to the condition of the nonzero coefficient contained in the AC coefficient, and encoding the syntax element according to the context of the AC coefficient.
In some embodiments of the present application, based on the foregoing scheme, the encoding unit is configured to: omitting an encoding process for the AC coefficient if a value of the syntax element indicates that the AC coefficient does not include a non-zero coefficient; and if the value of the syntax element indicates that the AC coefficients contain nonzero coefficients, sequentially coding the AC coefficients contained in the video frame coding blocks according to a scanning sequence.
According to an aspect of embodiments of the present application, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a video decoding method or a video encoding method as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a video decoding method or a video encoding method as described in the above embodiments.
In the technical solutions provided in some embodiments of the present application, a DC coefficient and an AC coefficient included in a video frame coding block are determined, then the DC coefficient is subjected to coding processing, a syntax element indicating whether the AC coefficient includes a non-zero coefficient is subjected to coding processing according to a value of the DC coefficient, and the AC coefficient is subjected to coding processing according to a value of the syntax element, so that the DC coefficient and the AC coefficient in the video frame coding block can be separated and subjected to coding processing respectively, and further more reasonable coding processing can be performed on characteristics of the DC coefficient and the AC coefficient, which is beneficial to improving coding efficiency. Meanwhile, because the value of the DC coefficient can be directly obtained according to the coding of the DC coefficient, it is not necessary to perform coding processing on a syntax element for indicating whether the DC coefficient includes a non-zero coefficient, and it can also be inferred whether the AC coefficient includes a non-zero coefficient (for example, if the value of the DC coefficient is 0, the AC coefficient must include a non-zero coefficient), and further it is possible to select whether to perform coding processing on the syntax element for indicating whether the AC coefficient includes a non-zero coefficient, and it is also not necessary to perform coding on the DC coefficient by run (run represents the number of consecutive zero coefficients before the non-zero coefficient) and last _ flag (last _ flag is used for representing whether the non-zero coefficient is the last non-zero coefficient in the current coding block), so that some unnecessary information coding can be saved, and the coding efficiency is improved.
In the technical solutions provided in some embodiments of the present application, encoded data including an encoding result of a DC coefficient and an AC coefficient is obtained, then the DC coefficient is obtained by performing decoding processing based on the encoding result of the DC coefficient, whether the AC coefficient includes a non-zero coefficient is determined according to a value of the DC coefficient, and the AC coefficient is obtained by performing decoding processing on the encoding result of the AC coefficient according to whether the AC coefficient includes a non-zero coefficient, so that the DC coefficient and the AC coefficient in a video frame encoding block can be separated, and further more reasonable decoding processing can be performed on characteristics of the DC coefficient and the AC coefficient, which is beneficial to improving decoding efficiency. Meanwhile, because the value of the DC coefficient can be directly obtained according to the coding of the DC coefficient, the decoding processing of a syntax element for indicating whether the DC coefficient contains a nonzero coefficient is not needed, and run and last _ flag decoding of the DC coefficient is also not needed, so that the decoding efficiency can be improved.
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 application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows a schematic diagram of an exemplary system architecture to which aspects of embodiments of the present application may be applied;
FIG. 2 is a schematic diagram illustrating placement of video encoding and decoding devices in a streaming environment;
FIG. 3 shows a flow diagram of a video encoding method according to an embodiment of the present application;
FIG. 4 shows a flow diagram of a video decoding method according to an embodiment of the present application;
FIG. 5 shows a schematic diagram of valid neighboring blocks of a current coding block according to one embodiment of the present application;
FIG. 6 shows a block diagram of a video decoding apparatus according to an embodiment of the present application;
FIG. 7 shows a block diagram of a video encoding apparatus according to an embodiment of the present application;
FIG. 8 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The technical terms in the present application will first be briefly described below:
syntax elements: information representing the codestream that needs to be encoded and transmitted in video coding.
Entropy coding: a data compression method is a key technology for realizing information compression in a video coding process, and entropy coding is carried out on the basis of an entropy principle without losing any information in the coding process.
run-level coding: run length coding, a type of coefficient coding. Wherein run represents the number of continuous zero coefficients before the non-zero coefficient; level represents the magnitude of the non-zero coefficient.
Context (buffer): in the process of entropy coding, each syntax element reads and writes information in the corresponding buffer for calculation and updating.
last _ flag: is a coefficient-coded syntax element used to indicate whether the current non-zero coefficient is the last non-zero coefficient in the current coding block. The 0 coefficients after the last non-zero coefficient can be skipped without transmitting the code stream, and the decoding end can decode the rest 0 coefficients through the position of the last non-zero coefficient.
And (3) quantification: refers to the process of mapping a continuous value (or a large number of possible discrete values) of a signal to a finite number of discrete amplitudes, which is a many-to-one mapping. In the video encoding process, after the residual signal is subjected to Discrete Cosine Transform (DCT for short), the Transform coefficient generally has a large range, so that the quantization of the Transform coefficient can effectively reduce the signal value space, and further obtain a better compression rate.
DC coefficient: the Direct Current (Direct Current) component after transform quantization of the residual coefficient is a position of the top left corner of the video frame coding block, and if x represents width (width) and y represents height (height), the position coordinate of DC is (0, 0).
AC coefficient: and (3) Alternating Current (Alternating Current) components after the residual coefficients are subjected to transform quantization, wherein all coefficients except the DC coefficient in the video frame coding block are AC coefficients.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture 100 includes a plurality of end devices that may communicate with each other over, for example, a network 150. For example, the system architecture 100 may 100 include a first end device 110 and a second end device 120 interconnected by a network 150. In the embodiment of fig. 1, the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission. For example, the first end device 110 may encode video data (e.g., a video picture stream captured by the end device 110) for transmission over the network 150 to the second end device 120. The encoded video data is transmitted in the form of one or more encoded video streams. The second terminal device 120 may receive the encoded video data from the network 150, decode the encoded video data to restore the video data, and display a video picture according to the restored video data.
In one embodiment of the present application, system architecture 100 may include a third end device 130 and a fourth end device 140 that perform bi-directional transmission of encoded video data, which may occur, for example, during a video conference. For bi-directional data transmission, each of third end device 130 and fourth end device 140 may encode video data (e.g., a stream of video pictures captured by the end device) for transmission over network 150 to the other of third end device 130 and fourth end device 140. Each of third terminal device 130 and fourth terminal device 140 may also receive encoded video data transmitted by the other of third terminal device 130 and fourth terminal device 140, and may decode the encoded video data to recover the video data, and may display video pictures on an accessible display device according to the recovered video data.
In the embodiment of fig. 1, the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140 may be a server, a personal computer, and a smart phone, but the principles disclosed herein may not be limited thereto. Embodiments disclosed herein are applicable to laptop computers, tablet computers, media players, and/or dedicated video conferencing equipment. Network 150 represents any number of networks that communicate encoded video data between first end device 110, second end device 120, third end device 130, and fourth end device 140, including, for example, wired and/or wireless communication networks. The communication network 150 may exchange data in circuit-switched and/or packet-switched channels. The network may include a telecommunications network, a local area network, a wide area network, and/or the internet. For purposes of this application, the architecture and topology of the network 150 may be immaterial to the operation of the present disclosure, unless explained below.
In one embodiment of the present application, fig. 2 illustrates the placement of video encoding devices and video decoding devices in a streaming environment. The subject matter disclosed herein is equally applicable to other video-enabled applications including, for example, video conferencing, digital TV, storing compressed video on digital media including CDs, DVDs, memory sticks, and the like.
The streaming system may include an acquisition subsystem 213, and the acquisition subsystem 213 may include a video source 201, such as a digital camera, that creates an uncompressed video picture stream 202. In an embodiment, the video picture stream 202 includes samples taken by a digital camera. The video picture stream 202 is depicted as a thick line to emphasize a high data amount video picture stream compared to the encoded video data 204 (or the encoded video codestream 204), the video picture stream 202 can be processed by an electronic device 220, the electronic device 220 comprising a video encoding device 203 coupled to a video source 201. The video encoding device 203 may comprise hardware, software, or a combination of hardware and software to implement or embody aspects of the disclosed subject matter as described in greater detail below. The encoded video data 204 (or encoded video codestream 204) is depicted as a thin line compared to the video picture stream 202 to emphasize the lower data amount of the encoded video data 204 (or encoded video codestream 204), which may be stored on the streaming server 205 for future use. One or more streaming client subsystems, such as client subsystem 206 and client subsystem 208 in fig. 2, may access streaming server 205 to retrieve copies 207 and 209 of encoded video data 204. Client subsystem 206 may include, for example, video decoding device 210 in electronic device 230. Video decoding device 210 decodes incoming copies 207 of the encoded video data and generates an output video picture stream 211 that may be presented on a display 212 (e.g., a display screen) or another presentation device. In some streaming systems, encoded video data 204, video data 207, and video data 209 (e.g., video streams) may be encoded according to certain video encoding/compression standards. Examples of such standards include ITU-T H.265. In an embodiment, the Video Coding standard under development is informally referred to as next generation Video Coding (VVC), and the present application may be used in the context of the VVC standard.
It should be noted that electronic devices 220 and 230 may include other components not shown in the figures. For example, electronic device 220 may include a video decoding device not shown, and electronic device 230 may also include a video encoding device not shown.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 3 shows a flow chart of a video encoding method according to an embodiment of the present application, which may be performed by the video encoding apparatus described in the foregoing embodiments. Referring to fig. 3, the video encoding method at least includes steps S310 to S340, which are described in detail as follows:
in step S310, the DC coefficient and the AC coefficient contained in the video frame encoding block are determined.
In one embodiment of the present application, the DC coefficient is a position of the uppermost left corner of the video frame coding block, and the AC coefficients are all coefficients except the DC coefficient in the video frame coding block, so that the DC coefficient and the AC coefficient contained in the video frame coding block can be determined accordingly.
In step S320, the DC coefficient is subjected to encoding processing.
In one embodiment of the present application, the DC coefficient may be subjected to an encoding process according to a value of the DC coefficient and a context of the DC coefficient. Since the encoding of the DC coefficient can directly determine the value of the DC coefficient, there is no need to perform encoding processing on a syntax element indicating whether the DC coefficient contains a non-zero coefficient, saving unnecessary information encoding.
In step S330, a syntax element indicating whether the AC coefficient includes a non-zero coefficient is subjected to encoding processing according to the value of the DC coefficient.
In one embodiment of the present application, if the DC coefficient has a value of 0, the AC coefficient must be non-zero, since all video frame coding blocks must include at least one non-zero coefficient when entropy coding is performed, and therefore the coding process for the syntax element indicating whether the AC coefficient includes a non-zero coefficient can be omitted to reduce the amount of information to be coded. If the value of the DC coefficient is not 0, it is necessary to determine a condition of a non-zero coefficient included in the AC coefficient, then determine a value of a syntax element indicating whether the AC coefficient includes a non-zero coefficient according to the condition of the non-zero coefficient included in the AC coefficient, and then perform encoding processing on the syntax element indicating whether the AC coefficient includes a non-zero coefficient according to a context of the AC coefficient.
As shown with continued reference to fig. 3, in step S340, the AC coefficient is subjected to encoding processing according to a value of a syntax element indicating whether the AC coefficient includes a non-zero coefficient.
In one embodiment of the present application, the encoding process for the AC coefficients may be omitted if the value of the syntax element used to indicate whether the AC coefficients contain non-zero coefficients indicates that the AC coefficients do not contain non-zero coefficients. And if the value of the syntax element used for indicating whether the AC coefficient comprises the nonzero coefficient indicates that the AC coefficient comprises the nonzero coefficient, sequentially encoding the AC coefficients contained in the video frame encoding blocks according to the scanning order.
It should be noted that the execution sequence of each step shown in fig. 3 is only an illustration, and in other embodiments of the present application, the execution sequence of step S320, step S330, and step S340 may be adjusted according to actual needs, for example, step S320, step S330, and step S340 are executed simultaneously.
The technical solution of the embodiment shown in fig. 3 enables the DC coefficient and the AC coefficient in the video frame coding block to be separated and respectively subjected to coding processing, and further more reasonable coding processing can be performed for the characteristics of the DC coefficient and the AC coefficient, which is beneficial to improving coding efficiency. Meanwhile, because the value of the DC coefficient can be directly obtained according to the coding of the DC coefficient, it is not necessary to perform coding processing on a syntax element for indicating whether the DC coefficient includes a non-zero coefficient, and it can also be inferred whether the AC coefficient includes a non-zero coefficient (for example, if the value of the DC coefficient is 0, the AC coefficient must include a non-zero coefficient), and further it can be selected whether to perform coding processing on the syntax element for indicating whether the AC coefficient includes a non-zero coefficient, and furthermore, run and last _ flag coding on the DC coefficient is not necessary, so that some unnecessary information coding can be saved, and the coding efficiency is improved.
Fig. 4 shows a flowchart of a video decoding method according to an embodiment of the present application, which can be performed by the video decoding apparatus described in the foregoing embodiments. Referring to fig. 4, the video decoding method at least includes steps S410 to S440, which are described in detail as follows:
in step S410, encoded data corresponding to a video frame to be decoded is obtained, where the encoded data includes encoding results obtained by encoding a DC coefficient and an AC coefficient in a video frame encoding block respectively.
In step S420, a decoding process is performed based on the encoding result of the DC coefficient to obtain the DC coefficient.
In an embodiment of the present application, a decoding process may be performed according to a context of the DC coefficient to obtain a value of the DC coefficient, where the value of the DC coefficient is obtained through a binarization process, that is, the value of the DC coefficient is 0 or 1.
In one embodiment of the present application, a context for a DC coefficient in a video frame coding block may be determined from values of DC coefficients of neighboring blocks of the video frame coding block. For example, if the DC coefficient of a predetermined number of valid neighboring blocks among valid neighboring blocks of a video frame coding block has a value of 0, the reference variable is determined to be 0, and the valid neighboring blocks are neighboring blocks having edge overlap with the video frame coding block; if the number of the effective adjacent blocks of which the DC coefficient value is 0 in the effective adjacent blocks of the video frame coding block is less than or equal to the preset number, selecting the maximum value and the minimum value of the non-zero DC coefficient from the effective adjacent blocks of the video frame coding block, and determining the value of a reference variable according to the maximum value and the minimum value; the context of the DC coefficient in a coded block of a video frame may then be determined based on the value of the reference variable.
In step S430, it is determined whether a non-zero coefficient is included in the AC coefficients according to the value of the DC coefficient.
In one embodiment of the present application, if the value of the DC coefficient is 0, it is determined that the AC coefficient includes a non-zero coefficient. In this case, the encoding process for syntax elements indicating whether non-zero coefficients are included in the AC coefficients may be omitted when encoding blocks of video frames.
In an embodiment of the present application, if the value of the DC coefficient is 1, decoding processing may be performed according to a context of a syntax element indicating whether the AC coefficient includes a non-zero coefficient, to obtain a value of the syntax element, and determine whether the AC coefficient includes the non-zero coefficient according to the value of the syntax element. For example, if the value of the syntax element is 1, it is determined that the AC coefficient includes a non-zero coefficient; if the value of the syntax element is 0, it is determined that the AC coefficients do not include non-zero coefficients.
In one embodiment of the present application, a context for a syntax element indicating whether a non-zero coefficient is included in an AC coefficient may be determined based on the value of the DC coefficient and the size of the video frame encoding block.
Continuing to refer to fig. 4, in step S440, the AC coefficient is obtained by performing decoding processing on the encoding result of the AC coefficient according to whether the AC coefficient includes a nonzero coefficient.
In one embodiment of the present application, if the AC coefficients do not include non-zero coefficients, all the AC coefficients included in the video frame coding block may be decoded to 0, in which case the video frame coding block may omit the encoding process for the AC coefficients when encoding. If the AC coefficient contains non-zero coefficient, the decoding process can be carried out according to the scanning sequence during the coding to obtain the value of the AC coefficient contained in the video frame coding block.
The technical scheme of the embodiment shown in fig. 4 enables the DC coefficient and the AC coefficient in the video frame coding block to be separated, and further more reasonable decoding processing can be performed according to the characteristics of the DC coefficient and the AC coefficient, which is beneficial to improving the decoding efficiency. Meanwhile, because the value of the DC coefficient can be directly obtained according to the coding of the DC coefficient, the decoding processing of a syntax element for indicating whether the DC coefficient contains a nonzero coefficient is not needed, and run and last _ flag decoding of the DC coefficient is also not needed, so that the decoding efficiency can be improved.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
in one embodiment of the present application, the DC coefficients and AC coefficients contained in the video frame coding blocks can be separated, i.e., the DC coefficients and AC coefficients are divided into different bands, where band0 contains only DC coefficients and band1 contains all AC coefficients except DC coefficients.
In one embodiment of the present application, after separating the DC coefficient and the AC coefficient, syntax elements DC _ level and AC _ band _ flag may be defined. Wherein DC _ level represents the magnitude of the DC coefficient; the AC _ band _ flag indicates whether the band1 in which the AC coefficient is located includes a non-zero coefficient, that is, all coefficients in the band1 can be traversed, if the band1 includes a non-zero coefficient, the value of the syntax element AC _ band _ flag is 1, otherwise, the value of the syntax element AC _ band _ flag is 0.
Since band0 contains only one DC coefficient, the encoding of this coefficient can directly know its own value, and therefore no additional syntax element indicating whether band0 contains non-zero coefficients needs to be encoded at the time of encoding. Once the value of the DC coefficient is known to be 0, it can be concluded that the AC _ band _ flag must be non-zero, so some extra bit representation can be saved, i.e. when the DC coefficient is 0, there is no need to encode the AC _ band _ flag. Meanwhile, band0 with the DC coefficient is not used for coding run and last _ flag. Furthermore, since DC coefficients and AC coefficients are of essentially different significance, it is reasonable to encode them separately, and more reasonable contexts can also be designed for DC coefficients alone.
In one embodiment of the present application, for band0, i.e., DC band, run and last _ flag in the band need not be encoded when encoding, and the value of the DC coefficient may be encoded based on its context.
For the band1, that is, the AC band, if the DC _ level value is not 0 during encoding, it is necessary to determine the value of the AC _ band _ flag according to the condition of the non-zero coefficient included in the band1, and then encode the value of the AC _ band _ flag. Meanwhile, if the value of the AC _ band _ flag is 1, the coefficients in the band1 need to be encoded according to the scanning order, that is, the run value, the level value, and the last _ flag of the non-zero coefficient in the band1 need to be encoded; if the AC _ band _ flag has a value of 0, the encoding process of band1 may be omitted.
In an embodiment of the present application, in decoding, for the band0, the value of the DC coefficient may be decoded based on the video frame code stream and the context of the DC coefficient, so as to obtain the value of DC _ level.
For band1, during decoding, if the DC _ level value is not 0, performing decoding processing according to the video frame code stream and the context of the AC _ band _ flag to obtain the value of the AC _ band _ flag; if the value of DC _ level is 0, it may be determined that the value of AC _ band _ flag is 1. If the value of the AC _ band _ flag is 1, decoding the band1 according to the scanning sequence during encoding, namely decoding to obtain a run value, a level value and a last _ flag of a non-zero coefficient in the band 1; if the value of AC _ band _ flag is 0, all coefficients in band1 can be decoded to 0.
In the embodiments of the present application, since syntax elements DC _ level and AC _ band _ flag are introduced, the embodiments of the present application also propose context design for DC _ level and AC _ band _ flag.
In an embodiment of the present application, the DC _ Level may be binarized, for example, by using a binary code method typical in AVS (Audio Video coding Standard), or by using another binarization method. For the context design of DC _ level, the context design may be designed by referring to the DC _ level values of several already encoded \ decoded encoding blocks in adjacent blocks around the current encoding block.
For example, it is assumed that DC _ level has 24 contexts, and each of the contexts includes 12 in terms of luma (luminance) and chroma (chrominance). Let preLevel be the value of DC _ level estimated from the neighboring blocks of the current coding block, and an effective neighboring block is a block with an edge overlap with the current coding block, for example, the current coding block shown in fig. 5 has 5 effective neighboring blocks.
In one embodiment of the present application, if DC _ Level of more than half of the valid neighboring blocks of the current coding block is 0, then preLevel is 0; if the number of blocks with a DC _ Level of 0 in the effective adjacent blocks of the current coding block is not more than half, the maximum value and the minimum value can be selected from the non-zero DC _ levels in the effective adjacent blocks, then the average value of the maximum value and the minimum value is calculated and rounded down to obtain a preLevel. After deriving preLevel, the context for DC _ Level can be determined by the following equation:
ctx_index_start=min(preLevel,5)*2+(ch_type==luma)?0:12。
wherein ctx _ index _ start is an integer variable, and ch _ type represents a scanned channel type; ctx _ index _ start represents the context index number of DC _ Level.
In one embodiment of the application, the AC _ band _ flag is mainly referenced to DC _ level and coding block size, which in one example may have 4 contexts, each containing 2 in luma and chroma. The context of the AC _ band _ flag is designed as follows:
offset=(DC_Level!=0)&&(width*height>64)?0:1;
ctx_index=offset+(ch_type==luma)?0:2。
wherein, offset and ctx _ index are integer variables, and ch _ type represents the scanned channel type; ctx _ index represents a context index number of AC _ band _ flag; width and height represent the width and height of the coding block, respectively.
In an embodiment of the present application, the context design of DC _ Level may refer to information of a number of coded/decoded coding blocks in neighboring blocks around a current coding block, and may also be designed by using the number of nonzero coefficients in the neighboring blocks.
In the technical solution in the above embodiment of the present application, since the DC coefficient has a unique statistical characteristic, which is a direct current component of the coefficient and contains most of information of the whole block, performing syntax element design alone is beneficial to improving compression efficiency; meanwhile, the DC coefficient is independently coded, so that whether the AC coefficient contains a nonzero coefficient can be implied, run coding and last _ flag coding of the DC coefficient can be saved, and the code rate is greatly saved; in addition, the AC _ band _ flag may not be encoded at any time, and may be estimated by the value of the DC coefficient, so that unnecessary encoding information may be saved, which is advantageous to improve encoding efficiency.
Embodiments of the apparatus of the present application are described below, which may be used to perform the methods of the above-described embodiments of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method described above in the present application.
Fig. 6 shows a block diagram of a video decoding apparatus according to an embodiment of the present application.
Referring to fig. 6, a video decoding apparatus 600 according to an embodiment of the present application includes: an acquisition unit 602, a first decoding unit 604, a determination unit 606, and a second decoding unit 608.
The acquiring unit 602 is configured to acquire encoded data corresponding to a video frame to be decoded, where the encoded data includes encoding results obtained by encoding a DC coefficient and an AC coefficient in a video frame encoding block respectively; the first decoding unit 604 is configured to perform decoding processing based on an encoding result of the DC coefficient to obtain the DC coefficient; the determining unit 606 is configured to determine whether the AC coefficients include a non-zero coefficient according to the value of the DC coefficient; the second decoding unit 608 is configured to perform decoding processing on the encoding result of the AC coefficient according to whether the AC coefficient includes a nonzero coefficient, so as to obtain the AC coefficient.
In some embodiments of the present application, based on the foregoing scheme, the first decoding unit 604 is configured to: and decoding according to the context of the DC coefficient to obtain the value of the DC coefficient, wherein the value of the DC coefficient is obtained through binarization processing.
In some embodiments of the present application, based on the foregoing scheme, the first decoding unit 604 is further configured to: determining a context of a DC coefficient in the video frame coding block according to values of DC coefficients of neighboring blocks of the video frame coding block.
In some embodiments of the present application, based on the foregoing scheme, the first decoding unit 604 is configured to: determining a reference variable to be 0 if a value of a DC coefficient of a predetermined number of valid neighboring blocks among valid neighboring blocks of the video frame coding block is 0, the valid neighboring blocks being neighboring blocks having edge overlap with the video frame coding block; if the number of the effective adjacent blocks of which the DC coefficient value is 0 in the effective adjacent blocks of the video frame coding block is less than or equal to the preset number, selecting the maximum value and the minimum value of the non-zero DC coefficient from the effective adjacent blocks of the video frame coding block, and determining the value of the reference variable according to the maximum value and the minimum value; determining a context of a DC coefficient in the video frame coding block based on the value of the reference variable.
In some embodiments of the present application, based on the foregoing scheme, the determining unit 606 is configured to: and if the value of the DC coefficient is 0, determining that the AC coefficient contains a non-zero coefficient, wherein if the value of the DC coefficient is 0, omitting an encoding process of a syntax element for indicating whether the AC coefficient contains the non-zero coefficient when encoding the video frame encoding block.
In some embodiments of the present application, based on the foregoing scheme, the determining unit 606 is configured to: and if the value of the DC coefficient is 1, decoding according to the context of the syntax element to obtain the value of the syntax element, and determining whether the AC coefficient comprises a nonzero coefficient according to the value of the syntax element.
In some embodiments of the present application, based on the foregoing scheme, the determining unit 606 is further configured to: determining a context of the syntax element as a function of a value of the DC coefficient and a size of the video frame encoding block.
In some embodiments of the present application, based on the foregoing scheme, the second decoding unit 608 is configured to: if the AC coefficients do not contain non-zero coefficients, decoding all AC coefficients contained in the video frame coding block into 0, wherein the video frame coding block omits the coding process of the AC coefficients during coding; and if the AC coefficient contains a nonzero coefficient, decoding according to the scanning sequence during encoding to obtain the value of the AC coefficient contained in the video frame encoding block.
Fig. 7 shows a block diagram of a video encoding apparatus according to an embodiment of the present application.
Referring to fig. 7, a video encoding apparatus 700 according to an embodiment of the present application includes: a determination unit 702 and an encoding unit 704.
Wherein the determining unit 702 is configured to determine a DC coefficient and an AC coefficient contained in a video frame coding block; the encoding unit 704 is configured to perform encoding processing on the DC coefficient, perform encoding processing on a syntax element indicating whether the AC coefficient includes a non-zero coefficient according to a value of the DC coefficient, and perform encoding processing on the AC coefficient according to a value of the syntax element.
In some embodiments of the present application, based on the foregoing scheme, the encoding unit 704 is configured to: if the value of the DC coefficient is 0, omitting the encoding process of the syntax element; and if the value of the DC coefficient is not 0, determining the value of the syntax element according to the condition of the nonzero coefficient contained in the AC coefficient, and encoding the syntax element according to the context of the AC coefficient.
In some embodiments of the present application, based on the foregoing scheme, the encoding unit 704 is configured to: omitting an encoding process for the AC coefficient if a value of the syntax element indicates that the AC coefficient does not include a non-zero coefficient; and if the value of the syntax element indicates that the AC coefficients contain nonzero coefficients, sequentially coding the AC coefficients contained in the video frame coding blocks according to a scanning sequence.
FIG. 8 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 800 of the electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 8, a computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for system operation are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An Input/Output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. When the computer program is executed by the Central Processing Unit (CPU)801, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application 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 application is limited only by the appended claims.

Claims (15)

1.一种视频解码方法,其特征在于,包括:1. a video decoding method, is characterized in that, comprises: 获取待解码视频帧对应的编码数据,所述编码数据中包含有对视频帧编码块中的直流DC系数和交流AC系数分别进行编码得到的编码结果;Obtaining encoded data corresponding to the video frame to be decoded, the encoded data includes encoding results obtained by encoding the direct current DC coefficients and the alternating current AC coefficients in the video frame encoding block respectively; 基于所述DC系数的编码结果进行解码处理,得到所述DC系数;Perform decoding processing based on the coding result of the DC coefficient to obtain the DC coefficient; 根据所述DC系数的值确定所述AC系数中是否包含非零系数;determining whether the AC coefficient includes a non-zero coefficient according to the value of the DC coefficient; 根据所述AC系数中是否包含非零系数对所述AC系数的编码结果进行解码处理,得到所述AC系数。The AC coefficient is obtained by decoding the coding result of the AC coefficient according to whether the AC coefficient includes a non-zero coefficient. 2.根据权利要求1所述的视频解码方法,其特征在于,基于所述DC系数的编码结果进行解码处理,得到所述DC系数,包括:2. The video decoding method according to claim 1, wherein decoding processing is performed based on the coding result of the DC coefficient to obtain the DC coefficient, comprising: 根据所述DC系数的上下文进行解码处理,得到所述DC系数的值,所述DC系数的值为经过二值化处理得到的值。The decoding process is performed according to the context of the DC coefficient to obtain the value of the DC coefficient, where the value of the DC coefficient is a value obtained through binarization processing. 3.根据权利要求2所述的视频解码方法,其特征在于,还包括:3. The video decoding method according to claim 2, further comprising: 根据所述视频帧编码块的相邻块的DC系数的值,确定所述视频帧编码块中的DC系数的上下文。The context of the DC coefficients in the video frame coding block is determined from the values of the DC coefficients of neighboring blocks of the video frame coding block. 4.根据权利要求3所述的视频解码方法,其特征在于,根据所述视频帧编码块的相邻块的DC系数的值,确定所述视频帧编码块中的DC系数的上下文,包括:4. The video decoding method according to claim 3, wherein determining the context of the DC coefficients in the video frame coding block according to the value of the DC coefficients of the adjacent blocks of the video frame coding block, comprising: 若所述视频帧编码块的有效相邻块中有预定数量个有效相邻块的DC系数的值为0,则确定参考变量为0,所述有效相邻块为与所述视频帧编码块存在边重叠的相邻块;If the value of the DC coefficients of a predetermined number of valid adjacent blocks in the video frame coding block is 0, the reference variable is determined to be 0, and the valid adjacent blocks are the same as the video frame coding block. There are adjacent blocks with overlapping edges; 若所述视频帧编码块的有效相邻块中DC系数的值为0的有效相邻块的数量小于或等于所述预定数量,则从所述视频帧编码块的有效相邻块中选择出非零DC系数的最大值和最小值,根据所述最大值和所述最小值确定所述参考变量的值;If the number of effective adjacent blocks with a DC coefficient value of 0 in the effective adjacent blocks of the video frame coding block is less than or equal to the predetermined number, selecting from the effective adjacent blocks of the video frame coding block the maximum value and the minimum value of the non-zero DC coefficient, the value of the reference variable is determined according to the maximum value and the minimum value; 基于所述参考变量的值,确定所述视频帧编码块中的DC系数的上下文。Based on the value of the reference variable, the context of the DC coefficients in the coding block of the video frame is determined. 5.根据权利要求1所述的视频解码方法,其特征在于,根据所述DC系数的值确定所述AC系数中是否包含非零系数,包括:5. The video decoding method according to claim 1, wherein determining whether the AC coefficient includes a non-zero coefficient according to the value of the DC coefficient, comprising: 若所述DC系数的值为0,则确定所述AC系数中包含有非零系数,其中,若所述DC系数的值为0,则在所述视频帧编码块编码时省略掉对用于指示所述AC系数中是否包含有非零系数的语法元素的编码过程。If the value of the DC coefficient is 0, it is determined that the AC coefficient contains a non-zero coefficient, wherein, if the value of the DC coefficient is 0, the pair used for coding the video frame coding block is omitted when the video frame coding block is coded. An encoding process of syntax elements that indicate whether the AC coefficients contain non-zero coefficients. 6.根据权利要求5所述的视频解码方法,其特征在于,根据所述DC系数的值确定所述AC系数中是否包含非零系数,还包括:6. The video decoding method according to claim 5, wherein determining whether the AC coefficient includes a non-zero coefficient according to the value of the DC coefficient, further comprising: 若所述DC系数的值为1,则根据所述语法元素的上下文进行解码处理,得到所述语法元素的值,并根据所述语法元素的值确定所述AC系数中是否包含非零系数。If the value of the DC coefficient is 1, the decoding process is performed according to the context of the syntax element to obtain the value of the syntax element, and whether the AC coefficient includes a non-zero coefficient is determined according to the value of the syntax element. 7.根据权利要求6所述的视频解码方法,其特征在于,还包括:7. The video decoding method according to claim 6, further comprising: 根据所述DC系数的值和所述视频帧编码块的大小,确定所述语法元素的上下文。The context of the syntax element is determined from the value of the DC coefficient and the size of the video frame coding block. 8.根据权利要求1至7中任一项所述的视频解码方法,其特征在于,根据所述AC系数中是否包含非零系数对所述AC系数的编码结果进行解码处理,包括:8. The video decoding method according to any one of claims 1 to 7, wherein, performing decoding processing on the coding result of the AC coefficients according to whether the AC coefficients include non-zero coefficients, comprising: 若所述AC系数中不包含非零系数,则将所述视频帧编码块中包含的所有AC系数解码为0,其中,所述视频帧编码块在编码时省略掉对所述AC系数的编码过程;If the AC coefficients do not include non-zero coefficients, all AC coefficients included in the video frame encoding block are decoded as 0, wherein the video frame encoding block omits encoding of the AC coefficients during encoding process; 若所述AC系数中包含有非零系数,则按照编码时的扫描顺序进行解码处理得到所述视频帧编码块中包含的AC系数的值。If the AC coefficients include non-zero coefficients, decoding processing is performed according to the scanning order during encoding to obtain the values of the AC coefficients included in the video frame encoding block. 9.一种视频编码方法,其特征在于,包括:9. A video encoding method, comprising: 确定视频帧编码块中包含的DC系数和AC系数;determine the DC coefficients and AC coefficients contained in the video frame coding block; 对所述DC系数进行编码处理;encoding the DC coefficient; 根据所述DC系数的值对用于指示所述AC系数是否包含非零系数的语法元素进行编码处理;encoding a syntax element indicating whether the AC coefficient contains a non-zero coefficient according to the value of the DC coefficient; 根据所述语法元素的值对所述AC系数进行编码处理。The AC coefficients are encoded according to the value of the syntax element. 10.根据权利要求9所述的视频编码方法,其特征在于,根据所述DC系数的值对用于指示所述AC系数是否包含非零系数的语法元素进行编码处理,包括:10. The video encoding method according to claim 9, wherein encoding a syntax element used to indicate whether the AC coefficient includes a non-zero coefficient according to the value of the DC coefficient, comprising: 若所述DC系数的值为0,则省略掉对所述语法元素的编码过程;If the value of the DC coefficient is 0, the encoding process of the syntax element is omitted; 若所述DC系数的值不为0,则根据所述AC系数所包含的非零系数的情况确定所述语法元素的值,并根据所述AC系数的上下文对所述语法元素进行编码处理。If the value of the DC coefficient is not 0, the value of the syntax element is determined according to the non-zero coefficients included in the AC coefficient, and the syntax element is encoded according to the context of the AC coefficient. 11.根据权利要求9所述的视频编码方法,其特征在于,根据所述语法元素的值对所述AC系数进行编码处理,包括:11. The video encoding method according to claim 9, characterized in that, encoding the AC coefficients according to the value of the syntax element, comprising: 若所述语法元素的值指示所述AC系数不包含非零系数,则省略掉对所述AC系数的编码过程;if the value of the syntax element indicates that the AC coefficients do not contain non-zero coefficients, omitting the encoding process for the AC coefficients; 若所述语法元素的值指示所述AC系数包含有非零系数,则按照扫描顺序依次对所述视频帧编码块中包含的AC系数进行编码处理。If the value of the syntax element indicates that the AC coefficients include non-zero coefficients, the AC coefficients included in the video frame encoding block are sequentially encoded in scanning order. 12.一种视频解码装置,其特征在于,包括:12. A video decoding device, comprising: 获取单元,用于获取待解码视频帧对应的编码数据,所述编码数据中包含有对视频帧编码块中的DC系数和AC系数分别进行编码得到的编码结果;an acquisition unit, configured to acquire encoded data corresponding to the video frame to be decoded, the encoded data including encoding results obtained by encoding the DC coefficients and the AC coefficients in the video frame encoding block respectively; 第一解码单元,用于基于所述DC系数的编码结果进行解码处理,得到所述DC系数;a first decoding unit, configured to perform decoding processing based on the encoding result of the DC coefficient to obtain the DC coefficient; 确定单元,用于根据所述DC系数的值确定所述AC系数中是否包含非零系数;a determining unit, configured to determine whether the AC coefficient includes a non-zero coefficient according to the value of the DC coefficient; 第二解码单元,用于根据所述AC系数中是否包含非零系数对所述AC系数的编码结果进行解码处理,得到所述AC系数。The second decoding unit is configured to perform decoding processing on the coding result of the AC coefficients according to whether the AC coefficients include non-zero coefficients to obtain the AC coefficients. 13.一种视频编码装置,其特征在于,包括:13. A video encoding device, comprising: 确定单元,用于确定视频帧编码块中包含的DC系数和AC系数;a determining unit, used for determining the DC coefficient and the AC coefficient contained in the video frame coding block; 编码单元,用于对所述DC系数进行编码处理,根据所述DC系数的值对用于指示所述AC系数是否包含非零系数的语法元素进行编码处理,并根据所述语法元素的值对所述AC系数进行编码处理。an encoding unit configured to perform encoding processing on the DC coefficient, perform encoding processing on a syntax element indicating whether the AC coefficient includes a non-zero coefficient according to the value of the DC coefficient, and pair the syntax element according to the value of the syntax element. The AC coefficients are encoded. 14.一种计算机可读介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至8中任一项所述的视频解码方法,或实现如权利要求9至11中任一项所述的视频编码方法。14. A computer-readable medium on which a computer program is stored, wherein when the computer program is executed by a processor, the video decoding method according to any one of claims 1 to 8 is realized, or the video decoding method according to claim 1 is realized. The video coding method of any one of claims 9 to 11. 15.一种电子设备,其特征在于,包括:15. An electronic device, comprising: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1至8中任一项所述的视频解码方法,或实现如权利要求9至11中任一项所述的视频编码方法。A storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement any one of claims 1 to 8 One of the video decoding methods, or implementing the video encoding method according to any one of claims 9 to 11.
CN201910803861.6A 2019-08-28 2019-08-28 Video decoding method, video encoding device, video encoding medium, and electronic apparatus Active CN112449185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910803861.6A CN112449185B (en) 2019-08-28 2019-08-28 Video decoding method, video encoding device, video encoding medium, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910803861.6A CN112449185B (en) 2019-08-28 2019-08-28 Video decoding method, video encoding device, video encoding medium, and electronic apparatus

Publications (2)

Publication Number Publication Date
CN112449185A true CN112449185A (en) 2021-03-05
CN112449185B CN112449185B (en) 2022-01-25

Family

ID=74741131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910803861.6A Active CN112449185B (en) 2019-08-28 2019-08-28 Video decoding method, video encoding device, video encoding medium, and electronic apparatus

Country Status (1)

Country Link
CN (1) CN112449185B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024149182A1 (en) * 2023-01-11 2024-07-18 维沃移动通信有限公司 Transform coefficient encoding method, transform coefficient decoding method and terminal

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1809165A (en) * 2005-01-19 2006-07-26 三星电子株式会社 Method and apparatus for predicting frequency transform coefficients in video codec, video encoder and decoder having the apparatus, and encoding and decoding method using the method
CN1822677A (en) * 2005-02-18 2006-08-23 三星电子株式会社 Apparatus and method for predicting coefficients of video block
CN101547358A (en) * 2008-03-27 2009-09-30 株式会社瑞萨科技 image encoding device
CN101729899A (en) * 2009-11-02 2010-06-09 北京中星微电子有限公司 Method and device for encoding discrete cosine transform coefficient
CN101919252A (en) * 2008-01-18 2010-12-15 英特尔公司 Separate huffman coding of runlength and size data of DCT coefficients
CN101924937A (en) * 2010-07-02 2010-12-22 上海广播电视台 Optimization loading method of DCT (Discrete Cosine Transform) alternating current non-zero coefficient information of Mpeg II elementary stream
CN103210399A (en) * 2011-10-19 2013-07-17 索尼公司 Context reduction of significance map coding of 4 x 4 and 8 x 8 transform coefficient in hm4.0
CN103489170A (en) * 2013-09-05 2014-01-01 浙江宇视科技有限公司 Method and device for JPEG picture synthesis and OSD information superimposition
CN104065974A (en) * 2014-06-30 2014-09-24 清华大学 Image compression method and system
JP2019022040A (en) * 2017-07-14 2019-02-07 株式会社シキノハイテック Image decoding device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1809165A (en) * 2005-01-19 2006-07-26 三星电子株式会社 Method and apparatus for predicting frequency transform coefficients in video codec, video encoder and decoder having the apparatus, and encoding and decoding method using the method
CN1822677A (en) * 2005-02-18 2006-08-23 三星电子株式会社 Apparatus and method for predicting coefficients of video block
CN101919252A (en) * 2008-01-18 2010-12-15 英特尔公司 Separate huffman coding of runlength and size data of DCT coefficients
CN101547358A (en) * 2008-03-27 2009-09-30 株式会社瑞萨科技 image encoding device
CN101729899A (en) * 2009-11-02 2010-06-09 北京中星微电子有限公司 Method and device for encoding discrete cosine transform coefficient
CN101924937A (en) * 2010-07-02 2010-12-22 上海广播电视台 Optimization loading method of DCT (Discrete Cosine Transform) alternating current non-zero coefficient information of Mpeg II elementary stream
CN103210399A (en) * 2011-10-19 2013-07-17 索尼公司 Context reduction of significance map coding of 4 x 4 and 8 x 8 transform coefficient in hm4.0
CN103489170A (en) * 2013-09-05 2014-01-01 浙江宇视科技有限公司 Method and device for JPEG picture synthesis and OSD information superimposition
CN104065974A (en) * 2014-06-30 2014-09-24 清华大学 Image compression method and system
JP2019022040A (en) * 2017-07-14 2019-02-07 株式会社シキノハイテック Image decoding device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024149182A1 (en) * 2023-01-11 2024-07-18 维沃移动通信有限公司 Transform coefficient encoding method, transform coefficient decoding method and terminal

Also Published As

Publication number Publication date
CN112449185B (en) 2022-01-25

Similar Documents

Publication Publication Date Title
WO2022174660A1 (en) Video coding and decoding method, video coding and decoding apparatus, computer-readable medium, and electronic device
WO2022062880A1 (en) Video decoding method and apparatus, computer readable medium, and electronic device
US20230421763A1 (en) Video coding method and apparatus, medium, and electronic device
US20250039455A1 (en) Joint component secondary transform
CN112543337B (en) Video decoding method, device, computer readable medium and electronic equipment
CN111182310A (en) Video processing method and device, computer readable medium and electronic equipment
CN112449185B (en) Video decoding method, video encoding device, video encoding medium, and electronic apparatus
US20240144439A1 (en) Filtering method and apparatus, computer-readable medium
WO2022174637A1 (en) Video encoding and decoding method, video encoding and decoding apparatus, computer-readable medium and electronic device
TWI794076B (en) Method for processing track data in multimedia resources, device, medium and apparatus
CN114979655B (en) Video encoding and decoding method, device, computer readable medium and electronic device
JP2024532697A (en) History-Based Rice Parameter Derivation for Wavefront Parallel Processing in Video Coding
CN114513663B (en) Video decoding method, device and electronic equipment
WO2021263251A1 (en) State transition for dependent quantization in video coding
CN112449188B (en) Video decoding method, encoding method, apparatus, medium and electronic device
CN115209157A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
CN112449187B (en) Video decoding method, video encoding device, video encoding medium, and electronic apparatus
CN112449184B (en) Transform coefficient optimization method, encoding and decoding method, device, medium, and electronic device
CN115086654B (en) Video encoding and decoding method, device, computer readable medium and electronic device
CN114979656B (en) Video encoding and decoding method, device, computer readable medium and electronic device
WO2022174638A1 (en) Video coding method and apparatus, video decoding method and apparatus, computer readable medium, and electronic device
CN115209146A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
WO2023168257A2 (en) State transition of dependent quantization for aom enhanced compression model
CN118984390A (en) History-based Rice coding parameter derivation for video encoding and decoding
CN115209138A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment

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