CN113038131A - Video encoding method, video encoding device, computer equipment and storage medium - Google Patents

Video encoding method, video encoding device, computer equipment and storage medium Download PDF

Info

Publication number
CN113038131A
CN113038131A CN202110276294.0A CN202110276294A CN113038131A CN 113038131 A CN113038131 A CN 113038131A CN 202110276294 A CN202110276294 A CN 202110276294A CN 113038131 A CN113038131 A CN 113038131A
Authority
CN
China
Prior art keywords
coding
scc
mode
mark
current
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
CN202110276294.0A
Other languages
Chinese (zh)
Other versions
CN113038131B (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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110276294.0A priority Critical patent/CN113038131B/en
Publication of CN113038131A publication Critical patent/CN113038131A/en
Application granted granted Critical
Publication of CN113038131B publication Critical patent/CN113038131B/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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Abstract

The present application relates to a video encoding method, apparatus, computer device and storage medium. The method comprises the following steps: acquiring a current coding block, wherein the current coding block is an uncoded coding block in a video sequence; acquiring a coding mark, wherein the coding mark is a pre-judgment mark generated by the coding of a previous coding block; if the coding mark is a first mark, coding the current coding block according to a first coding mode; if the coding mark is a second mark, coding the current coding block according to a second coding mode; and if the current coding block is coded, obtaining corresponding coded data. And determining the coding strategy of the current coding block based on the pre-judgment mark generated by the last coding block, namely selecting the corresponding coding strategy according to the coding blocks of different types, thereby realizing the purposes of improving the coding compression performance, shortening the coding time and improving the coding efficiency.

Description

Video encoding method, video encoding device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a video encoding method and apparatus, a computer device, and a storage medium.
Background
The video encoding method is a method of converting a file in an original video format into a file in another video format by a compression technique. The most important codec standards in Video streaming include h.261, h.263, h.264, h.265/hevc (high Efficiency Video Coding), h.266/VVC (Versatile Video Coding).
Many Coding tools in h.266/VVC generally encode a video sequence by using an SCC Coding tool, where a video sequence is composed of a plurality of frame images, and a frame image may be divided into a plurality of non-overlapping Coding blocks, and when a video sequence simultaneously contains SCC (Screen Content Coding) segments and non-SCC segments, in the prior art, the SCC Coding tool compresses the SCC segments and the non-SCC segments in the video sequence by using the same Coding strategy, and cannot adopt different Coding strategies for different types of segments, and the SCC Coding tool can greatly improve the compression performance of the SCC segments, but improves the compression performance of the non-SCC segments by a small amount and takes a long time, prolongs the Coding time, and reduces the video Coding efficiency.
Disclosure of Invention
In order to solve the technical problem, the present application provides a video encoding method, an apparatus, a computer device and a storage medium.
In a first aspect, the present application provides a video encoding method, including:
acquiring a current coding block, wherein the current coding block is an uncoded coding block in a video sequence;
acquiring a coding mark, wherein the coding mark is a pre-judgment mark generated by the coding of a previous coding block; if the coding mark is a first mark, coding the current coding block according to a first coding mode;
if the coding mark is a second mark, coding the current coding block according to a second coding mode;
and if the current coding block is coded, obtaining corresponding coded data.
Optionally, the first coding mode includes a plurality of different SCC coding modes, and the encoding the current coding block according to the first coding mode includes:
after the current coding block is coded and calculated according to each SCC coding mode, obtaining a coding result corresponding to each SCC coding mode, wherein the coding result is a ratio result of the SCC coding mode in a selected state;
generating a pre-judgment mark corresponding to the current coding block according to a coding result corresponding to at least one SCC coding mode;
and updating the coding mark according to the pre-judgment mark corresponding to the current coding block.
Optionally, the current coding block includes multiple coding units, and the performing coding calculation on the current coding block according to each SCC coding mode to obtain a coding result corresponding to each SCC coding mode includes:
coding calculation is carried out on each coding unit according to the SCC coding mode, and the selection state of the SCC coding mode corresponding to the coding unit is determined according to the calculation result, wherein the selection state comprises selected and unselected states;
counting the times of coding calculation of each SCC coding mode to obtain corresponding coding calculation amount;
and taking the number of the selected SCC coding modes as the mode selection number, and obtaining the coding result corresponding to the SCC coding modes according to the ratio of the mode selection number to the corresponding coding calculation amount.
Optionally, after obtaining the selection state of the SCC encoding mode corresponding to the encoding unit, the method further includes:
acquiring the accumulated calculated amount and the accumulated selected amount corresponding to each SCC encoding mode;
calculating the sum of the accumulated calculated amount and the encoding calculated amount corresponding to the SCC encoding mode to obtain an updated accumulated calculated amount;
calculating the sum of the accumulated selection quantity and the mode selection quantity of the corresponding SCC coding mode to obtain the updated accumulated selection quantity;
and obtaining a coding result corresponding to the SCC coding mode according to the ratio of the updated accumulated selection quantity to the updated accumulated calculation quantity.
Optionally, after obtaining the cumulative calculated amount and the cumulative selected amount corresponding to each SCC encoding mode, the method further includes:
calculating the product of the accumulated calculated amount and a preset attenuation coefficient to obtain an attenuation calculated amount;
calculating the product of the selected number of the modes and a preset attenuation coefficient to obtain the selected number of the attenuations;
calculating the sum of the attenuation calculated amount and the coding calculated amount corresponding to the SCC coding mode to obtain updated accumulated calculated amount;
calculating the sum of the attenuation selection quantity and the mode selection quantity of the corresponding SCC coding mode to obtain an updated accumulated selection quantity;
and obtaining a coding result corresponding to the SCC coding mode according to the ratio of the updated accumulated selection quantity to the updated accumulated calculation quantity.
Optionally, the encoding of the current coding block according to the second coding mode includes:
and if the preset number is not zero, performing coding calculation on the current coding block according to the SCC coding mode in the second coding mode to obtain a coding result corresponding to the SCC coding mode.
Optionally, the generating a pre-judgment flag corresponding to the current coding block according to a coding result corresponding to at least one SCC coding mode includes:
obtaining a decision parameter corresponding to the SCC coding mode according to the product of the coding result corresponding to the SCC coding mode and the corresponding weighting coefficient;
and generating a pre-judgment mark corresponding to the current coding block according to the decision parameter corresponding to each SCC coding mode.
In a second aspect, the present application provides a video encoding apparatus comprising:
the encoding content acquisition module is used for acquiring a current encoding block, wherein the current encoding block is an encoding block which is not encoded in a video sequence;
the mark acquisition module is used for acquiring a coding mark, wherein the coding mark is a pre-judgment mark generated by the coding of the last coding block;
the first coding module is used for coding the current coding block according to a first coding mode if the coding mark is a first mark;
the second coding module is used for coding the current coding block according to a second coding mode if the coding mark is a second mark;
and the coded data generation module is used for obtaining corresponding coded data if the coding of the current coding block is finished.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a current coding block, wherein the current coding block is an uncoded coding block in a video sequence;
acquiring a coding mark, wherein the coding mark is a pre-judgment mark generated by the coding of a previous coding block;
if the coding mark is a first mark, coding the current coding block according to a first coding mode;
if the coding mark is a second mark, coding the current coding block according to a second coding mode;
and if the current coding block is coded, obtaining corresponding coded data.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a current coding block, wherein the current coding block is an uncoded coding block in a video sequence;
acquiring a coding mark, wherein the coding mark is a pre-judgment mark generated by the coding of a previous coding block;
if the coding mark is a first mark, coding the current coding block according to a first coding mode;
if the coding mark is a second mark, coding the current coding block according to a second coding mode;
and if the current coding block is coded, obtaining corresponding coded data.
The video coding method, the video coding device, the computer equipment and the storage medium comprise the following steps: acquiring a current coding block, wherein the current coding block is an uncoded coding block in a video sequence; acquiring a coding mark, wherein the coding mark is a pre-judgment mark generated by the coding of a previous coding block; if the coding mark is a first mark, coding the current coding block according to a first coding mode; if the coding mark is a second mark, coding the current coding block according to a second coding mode; and if the current coding block is coded, obtaining corresponding coded data. And determining the coding strategy of the current coding block based on the pre-judgment mark generated by the last coding block, namely selecting the corresponding coding strategy according to the coding blocks of different types, thereby realizing the purposes of improving the coding compression performance, shortening the coding time and improving the coding efficiency.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a diagram of an exemplary video encoding method;
FIG. 2 is a flow diagram illustrating a video encoding method according to one embodiment;
FIG. 3 is a schematic diagram of a video encoding method in one embodiment;
FIG. 4 is a block diagram of a video encoding apparatus in one embodiment;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a diagram of an application environment of a video encoding method according to an embodiment. Referring to fig. 1, the video encoding method is applied to a video encoding system. The video coding system includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, fig. 2 is a flow chart illustrating a video encoding method in one embodiment, and referring to fig. 2, a video encoding method is provided. The present embodiment is mainly exemplified by applying the method to the server 120 in fig. 1, and the video encoding method specifically includes the following steps:
step S210, a current coding block is obtained, where the current coding block is an uncoded coding block in a video sequence.
Specifically, the Coding block is divided from a video sequence, where the Coding block may be specifically a frame of image in the video sequence, a Coding Tree Unit (CTU), or a Coding Unit (CU), where the frame of image may be divided into a plurality of non-overlapping Coding Tree units, and each Coding Tree Unit as a root node may be divided into a plurality of smaller Coding units. In the present embodiment, a coding tree unit is selected as a coding block. Coding blocks in a video sequence are sequentially coded according to a sequence, a current coding block is a coding block to be coded in the video sequence, and a coding block above the current coding block is a coding block which is finished in coding.
Step S220, a coding flag is obtained, where the coding flag is a pre-judgment flag generated by the coding of the previous coding block.
Specifically, the encoding flag is a flag for predicting a type of a current encoding block according to an encoding result of a previous encoding block, the encoding flag is denoted as b _ SCC, the type of the encoding block includes a Screen Content Coding (SCC) video and a non-SCC video, the SCC video refers to a video generated by a computer and includes a game video or a real-time Screen shared video of a video conference, and the like, the non-SCC video is a natural Content video, and the natural Content video refers to a video acquired by a camera. And judging whether the current coding block belongs to the SCC video or not according to the coding mark corresponding to the last coding block.
Step S230, if the coding flag is the first flag, the current coding block is coded according to the first coding mode.
Specifically, the first flag is a flag that the current coding block belongs to the SCC video, and the first coding mode is a coding mode for coding the SCC video, that is, when the current coding block belongs to the SCC video, the first coding mode is adopted to code the current coding block.
Step S240, if the coding flag is the second flag, the current coding block is coded according to the second coding mode.
Specifically, the second flag is a flag that the current coding block belongs to a non-SCC video, and the second coding mode is a coding mode for coding the non-SCC video, that is, when the current coding block belongs to the non-SCC video, the current coding block is coded by using the second coding mode, which is different from the first coding mode, so that coding is performed by using corresponding coding strategies according to different types of videos, which not only can preserve the compression performance of an SCC coding tool on the coding blocks belonging to the SCC video, but also can reduce the coding time of the coding blocks belonging to the non-SCC sequence.
Step S250, if the encoding of the current encoding block is completed, obtaining corresponding encoded data.
Specifically, the encoded data is data obtained by removing redundant information from a current encoding block and compressing the data, the data amount of the encoded data is smaller than that of the current encoding block, and the encoded data is convenient to store or transmit, and the redundant information includes spatial redundancy, temporal redundancy, encoding redundancy and the like, the spatial redundancy is used for representing correlation between adjacent pixels of an image, the temporal redundancy is used for representing correlation between adjacent images in a video sequence, and the encoding redundancy is used for representing probability of occurrence of different pixel values.
In one embodiment, the first coding mode includes a plurality of different SCC coding modes, and the encoding the current coding block according to the first coding mode includes: after the current coding block is coded and calculated according to each SCC coding mode, obtaining a coding result corresponding to each SCC coding mode, wherein the coding result is a ratio result of the SCC coding mode in a selected state; generating a pre-judgment mark corresponding to the current coding block according to a coding result corresponding to at least one SCC coding mode; and updating the coding mark according to the pre-judgment mark corresponding to the current coding block.
Specifically, each SCC coding mode corresponds to an SCC coding tool, the first coding mode includes, but is not limited to, SCC coding modes such as a Transform skip mode (TS), an Intra Block Copy (IBC), a palette mode (PLT), a Block Differential Pulse Code Modulation (BDPCM), and the like, and the first coding mode further includes a base coding mode including an Intra prediction mode and an inter prediction mode, where the Intra prediction mode removes spatial redundancy by using correlation of adjacent pixels in an image frame, and the Intra prediction mode may specifically be an angle prediction mode, a Planar mode, or a DC mode, and the like. The inter-frame prediction mode achieves the purpose of image compression by using the inter-frame correlation, i.e. temporal correlation, of the video image, and the inter-frame prediction mode may specifically be merge mode, affine mode, ME mode, and the like. In this embodiment, the first coding mode includes a basic coding mode and the four SCC coding modes, and then, coding and calculating are performed on the current coding block according to SCC coding tools corresponding to the basic coding mode and the four SCC coding modes to obtain coding results corresponding to the basic coding mode and the four SCC coding modes, where the coding results corresponding to the SCC coding modes are the duty results of the selected states of the SCC coding modes.
After the current coding block is coded through a basic coding mode or different SCC coding modes, each coding mode obtains a corresponding rate distortion cost and coded compressed data, and the smaller the rate distortion cost is, the better the compression performance is, so that the compressed data corresponding to the rate distortion cost with the smallest value is selected from all the rate distortion costs as the coded data.
The pre-judging flag is generated according to the coding result corresponding to at least one SCC coding mode, and the pre-judging flag can also be generated comprehensively according to the coding results corresponding to a plurality of SCC coding modes. For example, after the current coding block is coded, a pre-judgment flag is generated only according to a coding result corresponding to the PLT coding mode, whether a next coding block belongs to the SCC video is pre-judged according to the coding result corresponding to the PLT coding mode, if the coding result corresponding to the PLT coding mode meets a preset condition, a first flag is generated as the pre-judgment flag of the current coding block, the next coding block is judged to belong to the SCC video, the coding flag is updated according to the pre-judgment flag, that is, the coding flag is set as the first flag, and the coding calculation is performed on the next coding block through the first coding mode. And if the coding result corresponding to the PLT coding mode does not meet the preset condition, generating a second mark as a pre-judgment mark of the current coding block, judging that the next coding block belongs to the non-SCC video, updating the coding mark according to the pre-judgment mark, namely, enabling the coding mark to be the second mark, and enabling the next coding block to perform coding calculation through a second coding mode.
In an embodiment, the current coding block includes a plurality of coding units, and the performing coding calculation on the current coding block according to each of the SCC coding modes to obtain a coding result corresponding to each of the SCC coding modes includes: coding calculation is carried out on the coding unit according to the SCC coding mode, and the selection state of the SCC coding mode corresponding to the coding unit is obtained, wherein the selection state comprises a selected state and an unselected state; counting the times of coding calculation of each SCC coding mode to obtain corresponding coding calculation amount; and taking the number of the selected SCC coding modes as the mode selection number, and obtaining the coding result corresponding to the SCC coding modes according to the ratio of the mode selection number to the corresponding coding calculation amount.
Specifically, referring to fig. 3, in this embodiment, the coding blocks are coding tree units, the coding tree units are square (generally, 128 × 128 pixel blocks), each coding block may be divided into a plurality of coding units CU, the sizes of the coding units obtained by the division are generally different, the coding units obtained by the division may be continuously divided, the thick lines in fig. 3 are quadtree divisions, the thin lines are binary tree divisions or ternary tree divisions, only considering the quadtree divisions, the 128 × 128 coding tree unit may be divided into 4 coding units of 64x64, the 64x64 coding unit may be continuously divided into 4 coding units of 32x32, or may not be divided, specifically whether the division is determined according to the rate-distortion cost corresponding to each SCC coding mode before and after the division, and finally, non-overlapping coding units may be obtained.
Encoding a current coding block according to an SCC coding mode in a first coding mode, that is, performing encoding calculation on each coding unit in the current coding block according to an SCC coding tool corresponding to each of four SCC coding modes in the first coding mode, where each coding unit performs encoding calculation on each coding unit in the current coding block, each coding unit performs calculation on four coding tools, each coding unit obtains calculation results corresponding to the four coding tools after calculation of the four coding tools, the calculation results include a compression result and a rate distortion cost, a selection state of the four SCC coding modes corresponding to the current coding unit is determined according to the rate distortion cost obtained by calculation of each coding tool, and if the rate distortion cost obtained by calculation of the coding tool corresponding to the TS coding mode is less than a corresponding preset cost value, and the selection state of the TS coding mode corresponding to the current coding unit is selected, and the selection states corresponding to other SCC coding modes are determined according to the rate distortion cost calculated by each SCC coding mode.
If one coding unit performs calculation of a coding tool corresponding to a certain SCC coding mode, the coding calculation amount corresponding to the SCC coding mode is accumulated by one, and after the calculation, it is found that the rate-distortion cost corresponding to the SCC coding mode is smaller than the corresponding preset cost, and the selection state corresponding to the SCC coding mode is selected, and the selection state corresponding to the SCC coding mode is the selected mode selection amount, which is accumulated by one. And after the mode selection quantity is calculated by each coding unit in the current coding block corresponding to the four coding tools, the selection state of each SCC coding mode is the selected quantity, and the coding result corresponding to each SCC coding mode is obtained by dividing the mode selection quantity corresponding to each SCC coding mode by the coding calculation quantity.
The coding calculation amount corresponding to the TS coding mode is denoted as TS _ valid, the mode selection amount of the selected TS coding mode in the selected state is denoted as TS _ used, the coding calculation amount corresponding to the IBC coding mode is denoted as IBC _ valid, the mode selection amount of the selected IBC coding mode in the selected state is denoted as IBC _ used, the coding calculation amount corresponding to the PLT coding mode is denoted as PLT _ valid, the mode selection amount of the selected PLT coding mode in the selected state is denoted as PLT _ used, the coding calculation amount corresponding to the BDPCM coding mode is denoted as bdcpcm _ valid, and the mode selection amount of the selected BDPCM coding mode in the selected state is denoted as bdcpcm _ used. The TS coding mode corresponds to a coding result of
Figure BDA0002976772350000111
The IBC coding mode corresponds to a coding result of
Figure BDA0002976772350000112
The coding result corresponding to the PLT coding mode is
Figure BDA0002976772350000113
The BDPCM coding mode corresponds to the coding result of
Figure BDA0002976772350000114
And obtaining a coding result corresponding to the SCC coding mode according to a ratio of the selected area corresponding to the SCC coding mode to the calculated area corresponding to the SCC coding mode. The area of one coding unit is the length multiplied by the width and is marked as size, if the current coding unit carries out the calculation of a coding tool corresponding to the TS coding mode, the coding calculation area TS _ valid corresponding to the TS coding mode is made to accumulate the size, if the TS coding mode is selected by the current coding unit after the calculation, the area TS _ used selected and accumulated size is selected by the mode corresponding to the TS coding mode, and if the coding calculation of all coding units in the current coding block is finished, the coding result corresponding to each SCC coding mode is obtained according to the ratio.
If the current coding block is the first coding block in the video sequence, the coding flag is defaulted to be the first flag, the calculated amount corresponding to each SCC coding mode is initialized, and the number of selected SCC coding modes in the selected state is selected, namely the initial values of ts _ used, ts _ valid, ibc _ used, ibc _ valid, plt _ used, plt _ valid, bdpcmcmjd and bdpcmcmjd are set to be 0.
In an embodiment, after obtaining the selection status of the SCC encoding mode corresponding to the encoding unit, the method further includes: acquiring the accumulated calculated amount and the accumulated selected amount corresponding to each SCC encoding mode; calculating the sum of the accumulated calculated amount and the encoding calculated amount corresponding to the SCC encoding mode to obtain an updated accumulated calculated amount; calculating the sum of the accumulated selection quantity and the mode selection quantity of the corresponding SCC coding mode to obtain the updated accumulated selection quantity; and obtaining a coding result corresponding to the SCC coding mode according to the ratio of the updated accumulated selection quantity to the updated accumulated calculation quantity.
Specifically, in the previous embodiment, the coding results corresponding to each SCC coding mode are obtained through statistics only according to the calculation results of each coding unit in the current coding block, and the calculation results of the coding block participating in the coding calculation before the current coding block are not combined, so that the statistical data amount is small, and therefore, the accuracy of the obtained coding results is low. In this embodiment, after each coding block is subjected to coding calculation in each SCC coding mode, the coding calculation amount and the mode selection amount corresponding to each SCC coding mode are accumulated to obtain the corresponding accumulated calculation amount and accumulated selection amount.
In the current video coding process, the accumulated calculated amount is used to represent the accumulated times of a certain SCC coding mode participating in coding calculation, and the accumulated selected amount is used to represent the times of the SCC coding mode after participating in calculation that the selection state is selected. After the current coding block is calculated by each SCC coding mode, obtaining the coding calculation amount and the mode selection amount corresponding to each SCC coding mode, and overlapping the coding calculation amount and the accumulated calculation amount to obtain the updated accumulated calculation amount; and superposing the mode selection quantity and the accumulative selection quantity to obtain the updated accumulative selection quantity, so that the data volume of the calculated coding result is enlarged, and the accuracy of the coding result is improved.
Illustratively, after each coding unit in the first coding block is subjected to coding calculation in four SCC coding modes, statistics is performed to obtain a first coding calculation amount and a first mode selected number corresponding to the four SCC coding modes. After encoding calculation of four SCC encoding modes is performed on each encoding unit in the second encoding block, counting to obtain corresponding second encoding calculated amount and second mode selected amount, and adding the first encoding calculated amount and the second encoding calculated amount corresponding to each SCC encoding mode to obtain corresponding accumulated calculated amount; and adding the first mode selection quantity and the second mode selection quantity corresponding to each SCC coding mode to obtain the corresponding accumulated selection quantity. After the coding calculation of the third coding block is finished, in the same way, the third coding calculation amount calculated by the third coding block is overlapped with the accumulated calculation amount, and the third mode selected amount calculated by the third coding block is overlapped with the accumulated selected amount.
When each coding block calculates the coding result, the calculation results of all the coding blocks after coding are combined, the statistical data amount is enlarged, and the accuracy of the coding blocks for calculating the coding result is improved.
In an embodiment, after obtaining the cumulative calculated amount and the cumulative selected amount corresponding to each SCC encoding mode, the method further includes: calculating the product of the accumulated calculated amount and a preset attenuation coefficient to obtain an attenuation calculated amount; calculating the product of the selected number of the modes and a preset attenuation coefficient to obtain the selected number of the attenuations; calculating the sum of the attenuation calculated amount and the coding calculated amount corresponding to the SCC coding mode to obtain updated accumulated calculated amount; calculating the sum of the attenuation selection quantity and the mode selection quantity of the corresponding SCC coding mode to obtain an updated accumulated selection quantity; and obtaining a coding result corresponding to the SCC coding mode according to the ratio of the updated accumulated selection quantity to the updated accumulated calculation quantity.
Specifically, in the above embodiment, although the statistical data amount is increased, the data amount is not increased heavily, in this embodiment, the preset attenuation coefficient is used to reduce part of the cumulative calculated amount and the cumulative selected number, the preset attenuation coefficient may be any constant between 0 and 1, the specific value may be self-defined according to the actual requirement, and if the preset attenuation coefficient is 0, it indicates that the current coding block does not need to use the cumulative calculated amount and the cumulative selected number to calculate the coding result, and the corresponding coding result is obtained only according to the ratio of the coding calculated amount corresponding to the current coding block to the mode selected number. If the preset attenuation coefficient is 1, it indicates that the coding result obtained by the current coding block through calculation needs to be counted by the coding calculation amounts and the mode selection amounts of all the coding blocks with the coding completed before the coding is completed, that is, referring to the previous embodiment, the cumulative calculation amount and the coding calculation amount corresponding to the current coding block are overlapped to obtain an updated cumulative calculation amount, the cumulative selection amount and the mode selection amount corresponding to the current coding block are overlapped to obtain an updated cumulative selection amount, and the coding result is calculated by using the updated cumulative calculation amount and the cumulative selection amount.
If the preset attenuation coefficient is 0.5, when the current coding block calculates the coding result, the accumulated calculated amount X1 and the accumulated selected amount Y1 need to be attenuated to obtain the attenuated calculated amount 0.5X1 and the attenuated selected amount 0.5Y1, and then the attenuated calculated amount is added to the coded calculated amount X2 calculated by the current coding block to obtain the updated accumulated calculated amount (0.5X1+ X2); adding the attenuated attenuation selected quantity to the mode selected quantity Y2 calculated by the current coding block to obtain an updated accumulated selected quantity (0.5Y1+ Y2), if the next coding block is subjected to coding calculation, continuously attenuating the updated accumulated selected quantity and the accumulated calculated quantity to obtain an attenuated attenuation calculated quantity 0.5(0.5X1+ X2) and an attenuated selected quantity 0.5(0.5Y1+ Y2), and adding the attenuated attenuation calculated quantity to the coding calculated quantity X3 calculated by the next coding block to obtain an updated accumulated calculated quantity [0.5(0.5X1+ X2) + X3 ]; and adding the attenuated selected amount to the mode selected amount Y3 calculated by the next coding block to obtain an updated accumulated selected amount [0.5(0.5Y1+ Y2) + Y3], namely further attenuating the data amount (namely Y1 and X1) corresponding to the coding block far away from the next coding block, and then continuously performing iterative attenuation on the data amount calculated by coding according to the mode. The accumulated calculated amount and the accumulated selected amount need to be attenuated when each coding block calculates the coding result, so that the data amount corresponding to the coding block far away from the current coding block is reduced, the data amount corresponding to the coding block close to the current coding block is larger in proportion, the data amount of the calculated coding result is larger, the data close to the current coding block is larger, and the accuracy of the coding result calculated by the current coding block is higher.
The larger the attenuation coefficient is, the larger the weight of the statistical base quantity before the current coding block is coded is, the statistical base quantity weight is the product of each calculated quantity or the coefficient before the selected quantity, that is, the attenuation coefficient iteration, for example, in the above cumulative calculated quantity [0.5(0.5X1+ X2) + X3], the statistical base quantity weight of X1 is 0.25, the statistical base quantity weight of X2 is 0.5, and the statistical base quantity weight of X3 is 1, that is, the larger the attenuation coefficient is, the larger the statistical base quantity before the current coding block is, the higher the accuracy of judging whether the video sequence as a whole is the SCC video is higher, and the method is suitable for a scene without switching between the SCC video and the non-SCC video, that is, a scene with a video type of SCC video or non-SCC video, that is.
The smaller the attenuation coefficient is, the smaller the weight of the statistical base number before the current coding block is, that is, the smaller the statistical base number before is, whether the current coding block belongs to the SCC video or not is judged according to the statistical base number closer to the current coding block, and the higher the accuracy of judging whether the local part of the video sequence is the SCC video or not is suitable for the scene of switching the SCC video and the non-SCC video.
In summary, if the video sequence is of a single video type, the attenuation coefficient is made to have a larger value, and the maximum value can be 1; if the video sequence is not of a single video type, the value of the attenuation coefficient is small, and the minimum value can be 0, so that a certain statistical basis number is ensured to participate in the judgment, and therefore, the attenuation coefficient of 0.5 is a better choice.
In an embodiment, the encoding the current coding block according to the second coding mode includes: and if the preset number is not zero, performing coding calculation on the current coding block according to the SCC coding mode in the second coding mode to obtain a coding result corresponding to the SCC coding mode.
Specifically, the second coding mode includes a basic coding mode and a preset number of SCC coding modes, where the preset number is smaller than the number of SCC coding modes corresponding to the first coding mode, and the preset number is self-defined when the number requirement is met, and referring to the above embodiment, the first coding mode includes four SCC coding modes, and the preset number in this embodiment may be specifically 0, 1, 2, and 3, that is, the second coding mode causes the coding unit to perform calculation of fewer different coding tools, and the calculated result may be used to update the coding flag, so that the subsequent coding flag is more accurate, and meanwhile, the coding time of the non-SCC video is also shortened.
If the preset number is 0, the current coding block is coded only according to the basic coding mode without the calculation of an SCC coding tool, so that all coding blocks behind the current coding block cannot be coded and calculated by using the SCC coding mode, that is, the coding flag cannot be changed, and the coding time is shortened to the greatest extent.
If the preset number is 1, randomly selecting one SCC encoding mode from four SCC encoding modes corresponding to the first encoding mode, using the selected SCC encoding mode as the SCC encoding mode corresponding to the second encoding mode, and enabling the current encoding block to perform encoding calculation according to the base encoding mode and the SCC encoding mode in the second encoding mode to obtain an encoding result corresponding to the SCC encoding mode. If the TS coding mode is selected as the SCC coding mode corresponding to the second coding mode, the current coding block is made to perform coding calculation according to the basic coding mode and the TS coding mode, the coding calculation amount TS _ valid corresponding to the TS coding mode is counted, and the mode selection amount TS _ used of the selected TS coding mode is selected, so that the coding result corresponding to the TS coding mode is obtained
Figure BDA0002976772350000161
Because the calculation complexity corresponding to the TS coding mode is low, and the accuracy of judging whether the video type of the coding block is the SCC video is high as a single characteristic, the TS coding mode can be selected as the SCC coding mode corresponding to the second coding mode, so that the next coding block only carries out corresponding coding calculation according to the TS coding mode, the coding mark can be updated according to the coding calculation result, the accuracy of the coding mark is improved, and the coding time can be shortened.
If the preset number is 2, two different SCC coding modes are randomly selected from the four SCC coding modes corresponding to the first coding scheme as the SCC coding modes corresponding to the second coding scheme according to the condition that the preset number is 1. Because the number of the SCC coding modes corresponding to the second coding mode is smaller than the number of the SCC coding modes corresponding to the first coding mode, the coding calculation amount of the current coding block coded by the second coding mode is smaller than the coding calculation amount corresponding to the first coding mode, and the current coding block is a non-SCC video, and is coded by the second coding mode, so that the coding calculation amount of the current coding block is reduced, and the effect of shortening the coding time is achieved.
In an embodiment, the generating a pre-judgment flag corresponding to the current coding block according to a coding result corresponding to at least one SCC coding mode includes: obtaining a decision parameter corresponding to the SCC coding mode according to the product of the coding result corresponding to the SCC coding mode and the corresponding weighting coefficient; and generating a pre-judgment mark corresponding to the current coding block according to the decision parameter corresponding to each SCC coding mode.
Specifically, the weighting coefficients corresponding to each SCC encoding mode are generated by a linear model or a decision tree model according to the training of the encoding results corresponding to the multiple SCC encoding modes, that is, the encoding results corresponding to the multiple SCC encoding modes are used as input parameters of the linear model or the decision tree model, and the output parameters of the linear model or the decision tree model are the weighting coefficients corresponding to each SCC encoding mode. For example, the weighting coefficient corresponding to the TS coding mode is 2.83, the weighting coefficient corresponding to the IBC coding mode is 0.09, the weighting coefficient corresponding to the PLT coding mode is 5.76, the weighting coefficient corresponding to the BDPCM coding mode is 0.64, the decision parameter corresponding to the TS coding mode is ratio _ TS × 2.83, the decision parameter corresponding to the IBC coding mode is ratio _ IBC × 0.09, the decision parameter corresponding to the PLT coding mode is ratio _ PLT × 5.76, and the decision parameter corresponding to the BDPCM coding mode is ratio _ bdcpcm × 0.64. The preset condition comprises a preset value corresponding to at least one SCC coding mode, and the preset value can be generated through training of a linear model or a decision tree model according to each sample video sequence.
Compared with the weighting coefficients corresponding to the other 3 SCC coding modes, the weighting coefficient corresponding to the PLT coding mode output by the linear model or the decision tree model is the largest, and ratio _ PLT determines whether the SCC sequence has the highest accuracy, so that the influence of the decision parameter corresponding to the PLT coding mode on determining whether the coding block belongs to the SCC video is the largest, and whether the coding block belongs to the SCC video can be determined according to the decision parameter corresponding to the PLT coding mode alone, for example, the preset value corresponding to the PLT coding mode is 0.75, and if the decision parameter corresponding to the PLT coding mode is ratio _ PLT 5.76>0.75, a first flag is generated as a pre-determination flag of the current coding block; and if the decision parameter corresponding to the PLT coding mode is ratio _ PLT 5.76 which is not more than 0.75, generating a second mark as a pre-judgment mark of the current coding block.
The preset condition may also be a preset value determined by synthesizing decision parameters of multiple SCC coding modes, for example, the preset value determined by synthesizing decision parameters of four SCC coding modes by the preset condition is 1.45, and if ratio _ ts × 2.83+ ratio _ ibc × 0.09+ ratio _ plt 5.76+ ratio _ bdpcm × 0.64>1.45, the first flag is generated as the pre-determination flag of the current coding block.
And if ratio _ ts is 2.83+ ratio _ ibc is 0.09+ ratio _ plt is 5.76+ ratio _ bdpcm is 0.64 and is not more than 1.45, generating a second mark as a pre-judging mark of the current coding block.
The preset condition may also be a preset value determined by combining decision parameters of two SCC encoding modes, for example, because the calculated amount of SCC encoding tools corresponding to the IBC encoding mode and the BDPCM encoding mode is large, only the decision parameters corresponding to the PLT encoding mode and the TS encoding mode are considered, and when the decision parameters corresponding to the PLT encoding mode and the TS encoding mode satisfy the corresponding preset condition, the pre-judgment flag corresponding to the current encoding block is generated.
In one embodiment, after the updating the coding flag according to the pre-judging flag corresponding to the current coding block, the method further includes: if the video sequence does not have an uncoded coding block, ending the coding; and if the video sequence has an uncoded coding block, taking the next coding block as the current coding block, and executing the step of acquiring the current coding block.
Specifically, if the current coding block is the last coding block in the video sequence and the other coding blocks are all already coded, the completion of the coding of the current coding block indicates that the coding of the video sequence is completed; if the current coding block is not the last coding block in the video sequence and the video sequence still has an uncoded coding block, acquiring a next coding block after the current coding block, and enabling the next coding block to be used as the current coding block to execute the content of the step S210 until all the coding blocks in the video sequence have completed the coding calculation, and ending the coding process.
FIG. 2 is a flow diagram illustrating a video encoding method according to one embodiment. It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided a video encoding apparatus including:
a coding content obtaining module 310, configured to obtain a current coding block, where the current coding block is an uncoded coding block in a video sequence;
a flag obtaining module 320, configured to obtain a coding flag, where the coding flag is a pre-judgment flag generated by coding of a previous coding block;
a first encoding module 330, configured to encode the current coding block according to a first encoding manner if the encoding flag is a first flag;
the second encoding module 340 is configured to encode the current coding block according to a second encoding method if the encoding flag is a second flag.
And an encoded data generating module 350, configured to obtain corresponding encoded data if the encoding of the current encoding block is completed.
In one embodiment, the first encoding scheme includes a plurality of different SCC encoding modes, and the first encoding module 330 includes:
a first encoding unit, configured to perform encoding calculation on the current encoding block according to each SCC encoding mode, to obtain an encoding result corresponding to each SCC encoding mode, where the encoding result is a ratio result of the SCC encoding mode in a selected state;
generating a pre-judgment mark corresponding to the current coding block according to a coding result corresponding to at least one SCC coding mode;
and updating the coding mark according to the pre-judgment mark corresponding to the current coding block.
In one embodiment, the current coding block includes a plurality of coding units, and the first coding unit is further configured to:
coding calculation is carried out on the coding unit according to the SCC coding mode, and the selection state of the SCC coding mode corresponding to the coding unit is obtained, wherein the selection state comprises a selected state and an unselected state;
counting the times of coding calculation of each SCC coding mode to obtain corresponding coding calculation amount;
and taking the number of the selected SCC coding modes as the mode selection number, and obtaining the coding result corresponding to the SCC coding modes according to the ratio of the mode selection number to the corresponding coding calculation amount.
In one embodiment, the first encoding unit is further configured to:
acquiring the accumulated calculated amount and the accumulated selected amount corresponding to each SCC encoding mode;
calculating the sum of the accumulated calculated amount and the encoding calculated amount corresponding to the SCC encoding mode to obtain an updated accumulated calculated amount;
calculating the sum of the accumulated selection quantity and the mode selection quantity of the corresponding SCC coding mode to obtain the updated accumulated selection quantity;
and obtaining a coding result corresponding to the SCC coding mode according to the ratio of the updated accumulated selection quantity to the updated accumulated calculation quantity.
In one embodiment, the first encoding unit is further configured to:
calculating the product of the accumulated calculated amount and a preset attenuation coefficient to obtain an attenuation calculated amount;
calculating the product of the selected number of the modes and a preset attenuation coefficient to obtain the selected number of the attenuations;
calculating the sum of the attenuation calculated amount and the coding calculated amount corresponding to the SCC coding mode to obtain updated accumulated calculated amount;
calculating the sum of the attenuation selection quantity and the mode selection quantity of the corresponding SCC coding mode to obtain an updated accumulated selection quantity;
and obtaining a coding result corresponding to the SCC coding mode according to the ratio of the updated accumulated selection quantity to the updated accumulated calculation quantity.
In an embodiment, the second encoding manner includes a preset number of SCC encoding modes, where the preset number is smaller than the number of SCC encoding modes corresponding to the first encoding manner, and the second encoding module 340 is further configured to:
and if the preset number is not zero, performing coding calculation on the current coding block according to the SCC coding mode in the second coding mode to obtain a coding result corresponding to the SCC coding mode.
In one embodiment, the flag generation module comprises:
a weighting unit, configured to obtain a decision parameter corresponding to the SCC coding mode according to a product of a coding result corresponding to the SCC coding mode and a corresponding weighting coefficient;
and a flag generating unit, configured to generate a pre-judgment flag corresponding to the current coding block according to the decision parameter corresponding to each SCC coding mode.
In one embodiment, the apparatus further comprises:
an end module, configured to end encoding if there is no uncoded coding block in the video sequence;
and the cyclic execution module is used for taking the next coding block as the current coding block and executing the step of acquiring the current coding block if the uncoded coding block exists in the video sequence.
FIG. 5 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the server 120 in fig. 1. As shown in fig. 5, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement the video encoding method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a video encoding method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the video encoding apparatus provided herein may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 5. The memory of the computer device may store various program modules constituting the video encoding apparatus, such as the encoded content acquisition module 310, the flag acquisition module 320, the first encoding module 330, the second encoding module 340, and the encoded data generation module 350 shown in fig. 4. The computer program constituted by the respective program modules causes the processor to execute the steps in the video encoding method of the respective embodiments of the present application described in the present specification.
The computer device shown in fig. 5 may perform the acquiring of the current coding block, which is an uncoded coding block in the video sequence, by the encoded content acquiring module 310 in the video encoding apparatus shown in fig. 4. The computer device may execute the flag obtaining module 320 to obtain the encoding flag, where the encoding flag is a pre-determined flag generated by encoding of a previous encoding block. The computer device may perform, by using the first encoding module 330, encoding the current encoding block according to the first encoding manner if the encoding flag is the first flag. The computer device may perform, by using the second encoding module 340, encoding the current encoding block according to the second encoding manner if the encoding flag is the second flag. The encoded data generating module 350 performs the encoding of the current encoding block to obtain the corresponding encoded data.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor when executing the computer program being adapted to implement the method of any of the above embodiments.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the method of any of the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by instructing the relevant hardware through a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of video encoding, the method comprising:
acquiring a current coding block, wherein the current coding block is an uncoded coding block in a video sequence;
acquiring a coding mark, wherein the coding mark is a pre-judgment mark generated by the coding of a previous coding block;
if the coding mark is a first mark, coding the current coding block according to a first coding mode;
if the coding mark is a second mark, coding the current coding block according to a second coding mode;
and if the current coding block is coded, obtaining corresponding coded data.
2. The method of claim 1, wherein the first coding scheme comprises a plurality of different SCC coding modes, the method further comprising:
after the current coding block is coded and calculated according to each SCC coding mode, obtaining a coding result corresponding to each SCC coding mode, wherein the coding result is a ratio result of the SCC coding mode in a selected state;
generating a pre-judgment mark corresponding to the current coding block according to a coding result corresponding to at least one SCC coding mode;
and updating the coding mark according to the pre-judgment mark corresponding to the current coding block.
3. The method of claim 2, wherein the current coding block includes a plurality of coding units, and the performing coding calculation on the current coding block according to each of the SCC coding modes to obtain a coding result corresponding to each of the SCC coding modes comprises:
coding calculation is carried out on each coding unit according to the SCC coding mode, and the selection state of the SCC coding mode corresponding to the coding unit is determined according to the calculation result, wherein the selection state comprises selected and unselected states;
counting the times of coding calculation of each SCC coding mode to obtain corresponding coding calculation amount;
and taking the number of the selected SCC coding modes as the mode selection number, and obtaining a coding result corresponding to the SCC coding modes according to the ratio of the mode selection number to the corresponding coding calculation amount.
4. The method of claim 3, wherein after obtaining the selection status of the SCC encoding mode corresponding to the encoding unit, the method further comprises:
acquiring the accumulated calculated amount and the accumulated selected amount corresponding to each SCC encoding mode;
calculating the sum of the accumulated calculated amount and the encoding calculated amount corresponding to the SCC encoding mode to obtain an updated accumulated calculated amount;
calculating the sum of the accumulated selection quantity and the mode selection quantity of the corresponding SCC coding mode to obtain the updated accumulated selection quantity;
and obtaining a coding result corresponding to the SCC coding mode according to the ratio of the updated accumulated selection quantity to the updated accumulated calculation quantity.
5. The method of claim 4, wherein after obtaining the cumulative calculated amount and the cumulative selected amount corresponding to each SCC encoding mode, the method further comprises:
calculating the product of the accumulated calculated amount and a preset attenuation coefficient to obtain an attenuation calculated amount;
calculating the product of the selected number of the modes and a preset attenuation coefficient to obtain the selected number of the attenuations;
calculating the sum of the attenuation calculated amount and the coding calculated amount corresponding to the SCC coding mode to obtain updated accumulated calculated amount;
calculating the sum of the attenuation selection quantity and the mode selection quantity of the corresponding SCC coding mode to obtain an updated accumulated selection quantity;
and obtaining a coding result corresponding to the SCC coding mode according to the ratio of the updated accumulated selection quantity to the updated accumulated calculation quantity.
6. The method of claim 2, wherein the second coding scheme comprises a preset number of SCC coding modes, the preset number is smaller than the number of SCC coding modes corresponding to the first coding scheme, and the encoding the current coding block according to the second coding scheme comprises:
and if the preset number is not zero, performing coding calculation on the current coding block according to the SCC coding mode in the second coding mode to obtain a coding result corresponding to the SCC coding mode.
7. The method of claim 2, wherein the generating a pre-decision flag corresponding to the current coding block according to the coding result corresponding to the at least one SCC coding mode comprises:
obtaining a decision parameter corresponding to the SCC coding mode according to the product of the coding result corresponding to the SCC coding mode and the corresponding weighting coefficient;
and generating a pre-judgment mark corresponding to the current coding block according to the decision parameter corresponding to each SCC coding mode.
8. A video encoding apparatus, characterized in that the apparatus comprises:
the encoding content acquisition module is used for acquiring a current encoding block, wherein the current encoding block is an encoding block which is not encoded in a video sequence;
the mark acquisition module is used for acquiring a coding mark, wherein the coding mark is a pre-judgment mark generated by the coding of the last coding block;
the first coding module is used for coding the current coding block according to a first coding mode if the coding mark is a first mark;
the second coding module is used for coding the current coding block according to a second coding mode if the coding mark is a second mark;
and the coded data generation module is used for obtaining corresponding coded data if the coding of the current coding block is finished.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202110276294.0A 2021-03-15 2021-03-15 Video encoding method, video encoding device, computer equipment and storage medium Active CN113038131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110276294.0A CN113038131B (en) 2021-03-15 2021-03-15 Video encoding method, video encoding device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110276294.0A CN113038131B (en) 2021-03-15 2021-03-15 Video encoding method, video encoding device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113038131A true CN113038131A (en) 2021-06-25
CN113038131B CN113038131B (en) 2023-04-07

Family

ID=76468809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110276294.0A Active CN113038131B (en) 2021-03-15 2021-03-15 Video encoding method, video encoding device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113038131B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116233420A (en) * 2023-03-24 2023-06-06 重庆邮电大学 VVC-based intra-frame rapid coding method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105392008A (en) * 2014-08-22 2016-03-09 中兴通讯股份有限公司 Coding and decoding prediction method, corresponding coding and decoding device, and electronic equipment
US20160080748A1 (en) * 2013-07-08 2016-03-17 Panasonic Intellectual Property Corporation Of America Image coding method for coding information indicating coding scheme
CN105491379A (en) * 2014-10-01 2016-04-13 财团法人工业技术研究院 Decoder, encoder, decoding method, encoding method and encoding/decoding system
CN107534711A (en) * 2015-06-16 2018-01-02 华为技术有限公司 For efficient video coding(HEVC)Screen picture encodes(SCC)The advanced coding techniques of extension
CN110572646A (en) * 2018-06-05 2019-12-13 北京字节跳动网络技术有限公司 Interaction of intra block copy with spatial-temporal motion vector prediction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160080748A1 (en) * 2013-07-08 2016-03-17 Panasonic Intellectual Property Corporation Of America Image coding method for coding information indicating coding scheme
CN105392008A (en) * 2014-08-22 2016-03-09 中兴通讯股份有限公司 Coding and decoding prediction method, corresponding coding and decoding device, and electronic equipment
CN105491379A (en) * 2014-10-01 2016-04-13 财团法人工业技术研究院 Decoder, encoder, decoding method, encoding method and encoding/decoding system
CN107534711A (en) * 2015-06-16 2018-01-02 华为技术有限公司 For efficient video coding(HEVC)Screen picture encodes(SCC)The advanced coding techniques of extension
CN110572646A (en) * 2018-06-05 2019-12-13 北京字节跳动网络技术有限公司 Interaction of intra block copy with spatial-temporal motion vector prediction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116233420A (en) * 2023-03-24 2023-06-06 重庆邮电大学 VVC-based intra-frame rapid coding method

Also Published As

Publication number Publication date
CN113038131B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
Li et al. Learning convolutional networks for content-weighted image compression
Zhou et al. End-to-end Optimized Image Compression with Attention Mechanism.
CN110677651A (en) Video compression method
US20170195692A1 (en) Video data encoding and decoding methods and apparatuses
US11070817B2 (en) Video encoding method, computer device, and storage medium for determining skip status
WO2020078228A1 (en) Method and apparatus for video encoding, method and apparatus for video decoding, computer device and storage medium
CN110753225A (en) Video compression method and device and terminal equipment
Soh et al. Reduction of video compression artifacts based on deep temporal networks
CN105144231A (en) Method and device for selecting an image dynamic range conversion operator
CN113038131B (en) Video encoding method, video encoding device, computer equipment and storage medium
CN107547773B (en) Image processing method, device and equipment
CN114022580B (en) Data processing method, device, equipment and storage medium for image compression
CN111901602B (en) Video data encoding method, video data encoding device, computer equipment and storage medium
KR20200022386A (en) Information processing device and information processing method
Hu et al. Deep inter prediction with error-corrected auto-regressive network for video coding
CN110956669A (en) Image compression coding method and system
CN108881908B (en) Coding unit texture complexity based fast partitioning in video coding
Hu et al. Memory-augmented auto-regressive network for frame recurrent inter prediction
CN107172425B (en) Thumbnail generation method and device and terminal equipment
CN112165617B (en) Video coding method and device, electronic equipment and storage medium
CN114339240A (en) Direction selection method and device for conversion mode, electronic equipment and storage medium
CN115442617A (en) Video processing method and device based on video coding
CN108419078B (en) Image processing method and device based on WebP image compression algorithm
CN114339233A (en) Method and device for determining display stream division mode, electronic equipment and storage medium
CN117939133A (en) Video encoding method, apparatus, computer device, storage medium, and program product

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