[go: up one dir, main page]

CN111953983A - Video coding method and device - Google Patents

Video coding method and device Download PDF

Info

Publication number
CN111953983A
CN111953983A CN202010695454.0A CN202010695454A CN111953983A CN 111953983 A CN111953983 A CN 111953983A CN 202010695454 A CN202010695454 A CN 202010695454A CN 111953983 A CN111953983 A CN 111953983A
Authority
CN
China
Prior art keywords
macro block
coding
current
macroblock
encoding
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
CN202010695454.0A
Other languages
Chinese (zh)
Other versions
CN111953983B (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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202010695454.0A priority Critical patent/CN111953983B/en
Publication of CN111953983A publication Critical patent/CN111953983A/en
Priority to PCT/CN2020/130430 priority patent/WO2022011916A1/en
Application granted granted Critical
Publication of CN111953983B publication Critical patent/CN111953983B/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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability

Landscapes

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

Abstract

The disclosure provides a video coding method and a video coding device, relates to the technical field of video processing, and can solve the problem of poor adaptability of a vGTP video coding algorithm in a scene with poor network conditions. The specific technical scheme is as follows: acquiring a current frame; when the current frame is different from the reference frame, acquiring the macro block type of each macro block in the current frame; if the macro block type is a character macro block or an image macro block, determining the character macro block to be progressive coding or character coding; determining the encoding method of the image macro block as layered encoding or progressive encoding; coding each macro block according to a coding method corresponding to each macro block type to obtain a plurality of coded data; the encoded data of the current frame is obtained from the plurality of encoded data. During coding, a layered coding mode or a progressive coding mode can be selected according to the current network condition, so that the coded code stream can be more suitable for the current network transmission.

Description

Video coding method and device
Technical Field
The present disclosure relates to the field of video processing, and in particular, to a video encoding method and apparatus.
Background
vGTP is a real-time image compression transmission protocol, is completely independent and autonomous and controllable, has core technologies such as multi-encoder, progressive encoding, visual lossless image transmission, network bandwidth self-adaptation, QoS and the like, and supports audio transmission and reverse control channels.
However, the existing vGTP video coding has poor adaptability in the scene with poor network condition.
Disclosure of Invention
The embodiment of the disclosure provides a video coding method and device, which can solve the problem of poor adaptability of a vGTP video coding algorithm in a scene with poor network condition. The technical scheme is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a video encoding method, including:
acquiring a current frame;
when the current frame is different from the reference frame, acquiring the macro block type of each macro block in the current frame;
if the macro block type is a text macro block or an image macro block, determining a coding method of the text macro block or the image macro block, wherein the coding method of the text macro block comprises the following steps: progressive coding or text coding; the encoding method of the image macro block comprises the following steps: layered coding or progressive coding;
coding each macro block according to the coding method corresponding to each macro block type to obtain a plurality of coded data;
and acquiring the coded data of the current frame according to the plurality of coded data.
The present disclosure provides a video encoding method, comprising: acquiring a current frame; when the current frame is different from the reference frame, acquiring the macro block type of each macro block in the current frame; if the type of the macro block is a character macro block or an image macro block, determining a coding method of the character macro block or the image macro block, wherein the coding method of the character macro block comprises the following steps: progressive coding or text coding; the encoding method of the image macro block comprises the following steps: layered coding or progressive coding; coding each macro block according to a coding method corresponding to each macro block type to obtain a plurality of coded data; the encoded data of the current frame is obtained from the plurality of encoded data. In the encoding process, a layered encoding mode or a progressive encoding mode is not used invariably, but different encoding modes can be selected according to the current network condition, so that the encoded code stream can be more suitable for the current network transmission.
In one embodiment, when the macroblock type is an image macroblock, the encoding method for determining the image macroblock includes:
performing cosine transform on the image macro block, and quantizing by adopting a first preset quantization parameter to obtain first data;
judging whether the current code rate control strategy is a first code rate control strategy or not;
if yes, determining that the coding method of the image macro block is layered coding;
and if not, determining that the coding method of the image macro block is progressive coding.
In one embodiment, when the type of the macroblock is a text macroblock, the method for determining the text macroblock comprises:
judging whether the current code rate control strategy is a second code rate control strategy or not;
if so, determining the encoding method of the character macro block as the progressive encoding;
if not, determining that the coding method of the character macro block is the character coding mode.
In one embodiment, before obtaining the macroblock type of each macroblock in the current frame, the method further includes:
when the current frame is different from the reference frame, judging whether the current frame is a full-frame h.264 code;
if so, encoding the current frame by adopting an h.264 encoding method;
if not, judging whether the current frame is a full frame vGTP code;
if yes, performing global motion vector prediction to obtain a prediction result;
if not, identifying the video window, and performing global motion vector prediction on the video window identification result to obtain a prediction result;
the obtaining the macroblock type of each macroblock in the current frame includes:
and determining the macro block type of each macro block in the current frame according to the prediction result.
In one embodiment, the determining the macroblock type of each macroblock in the current frame according to the prediction result includes:
judging the macro block types of all macro blocks in the current frame one by one according to the prediction result;
the encoding of each macroblock according to the encoding method corresponding to each macroblock type to obtain a plurality of encoded data includes:
and coding the current macro block according to a coding method corresponding to the macro block type of the current macro block.
In one embodiment, the step of determining the macroblock type of each macroblock in the current frame one by one according to the prediction result, and encoding the current macroblock according to the encoding method corresponding to the macroblock type of the current macroblock includes:
judging whether the current macro block is a video macro block according to the prediction result;
if the current macro block is a video macro block, performing coding on the current macro block according to a coding mode corresponding to the video macro block to obtain video coded data, and circularly performing macro block type judgment by using the next macro block as the current macro block;
if the current macro block is not the video macro block, judging whether the current macro block is an unchanged macro block according to the prediction result,
if the current macro block is an unchanged macro block, encoding the current macro block according to the encoding mode corresponding to the unchanged macro block to obtain unchanged encoded data, and repeatedly performing macro block type judgment on the next macro block;
if the current macro block is not an unchanged macro block, judging whether the current macro block is a motion vector macro block according to the prediction result,
if the current macro block is the motion vector macro block, the current macro block is coded according to the coding mode corresponding to the motion vector macro block to obtain motion vector coded data, and the macro block type judgment is repeatedly executed on the next macro block;
if the current macro block is not a motion vector macro block, judging whether the current macro block is a character macro block according to the prediction result,
if the current macro block is a character macro block, coding the current macro block according to a coding mode corresponding to the character macro block to obtain character coded data, and repeatedly executing macro block type judgment on the next macro block;
if the current macro block is not a character macro block, judging whether the current macro block is an image macro block according to the prediction result,
if the current macro block is the image macro block, the current macro block is coded according to the coding mode corresponding to the image macro block to obtain image coded data, and the step of judging the macro block type is repeatedly executed for the next macro block.
In one embodiment, the encoding the current macroblock according to the encoding mode corresponding to the text macroblock to obtain text encoded data includes:
when the encoding method of the text macro block is determined to be the progressive encoding, performing cosine transform on the text macro block, and quantizing by adopting a second preset quantization parameter to obtain second data;
performing progressive encoding on the second data to obtain the text encoding data;
when the coding method of the character macro block is determined to be the character coding, executing character coding on the current macro block to obtain the character coding data;
wherein the first preset quantization parameter is smaller than the second preset quantization parameter.
In one embodiment, the obtaining the encoded data of the current frame according to the plurality of encoded data includes:
and acquiring the coded data of the current frame according to the video coded data, the unchanged coded data, the motion vector coded data, the character code and the image coded data.
According to a second aspect of the embodiments of the present disclosure, there is provided a video encoding apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a current frame;
a second obtaining module, configured to obtain a macroblock type of each macroblock in the current frame when the current frame is different from the reference frame;
a first determining module, configured to determine, if the type of the macroblock is a text macroblock or an image macroblock, an encoding device for the text macroblock or the image macroblock, where the encoding device for the text macroblock includes: progressive coding or text coding; the image macroblock encoding device includes: layered coding or progressive coding;
the first coding module is used for coding each macro block according to the coding device corresponding to each macro block type to obtain a plurality of coded data;
and the third obtaining module is used for obtaining the coded data of the current frame according to the plurality of coded data.
In one embodiment, when the macroblock type is an image macroblock, the first determining module includes:
the first processing submodule is used for performing cosine transform on the image macro block and quantizing by adopting a first preset quantization parameter to obtain first data;
the first judgment submodule is used for judging whether the current code rate control strategy is a first code rate control strategy or not;
the first determining submodule is used for determining that a coding device of the image macro block is layered coding when the current code rate control strategy is the first code rate control strategy;
and the second determining submodule is used for determining that the coding device of the image macro block is progressive coding when the current code rate control strategy is not the first code rate control strategy.
In one embodiment, when the type of the macro block is a text macro block, the first determining module includes:
the second judgment submodule is used for judging whether the current code rate control strategy is a second code rate control strategy or not;
a third determining submodule, configured to determine that the coding device of the text macro-block is the progressive coding when the current rate control policy is the second rate control policy;
and the fourth determining submodule is used for determining that the coding device of the character macro block is the character coding mode when the current code rate control strategy is not the second code rate control strategy.
In one embodiment, the apparatus further comprises:
a first determining module, configured to determine whether the current frame is a full-frame h.264 code when the current frame is different from the reference frame before the second obtaining module obtains the macroblock type of each macroblock in the current frame;
the second coding module is used for coding the current frame by adopting an h.264 coding device when the current frame is a full-frame h.264 code;
the second judgment module is used for judging whether the current frame is a full frame vGTP code when the current frame is not the full frame h.264 code;
the third acquisition module is used for carrying out global motion vector prediction to obtain a prediction result when the current frame is a full frame vGTP code;
the fourth obtaining module is used for identifying the video window when the current frame is not the full frame vGTP code, and performing global motion vector prediction on the video window identification result to obtain a prediction result;
the second obtaining module includes:
and the fifth determining submodule is used for determining the macro block type of each macro block in the current frame according to the prediction result.
In one embodiment, the fifth determination submodule includes: a first judgment subunit; the first encoding module includes: a first encoding sub-module for encoding the data,
the first judging subunit is used for judging the macro block types of all macro blocks in the current frame one by one according to the prediction result;
and the first coding sub-module is used for coding the current macro block according to a coding device corresponding to the macro block type of the current macro block.
In one embodiment, the apparatus further comprises:
the video macro block judging module is used for judging whether the current macro block is a video macro block according to the prediction result;
the video coding module is used for coding the current macro block according to a coding mode corresponding to the video macro block to obtain video coding data if the current macro block is the video macro block, and circularly executing the step of judging the macro block type by using the next macro block as the current macro block;
an unchanged macro block judgment module, configured to judge whether the current macro block is an unchanged macro block according to the prediction result if the current macro block is not a video macro block,
the unchanged macro block coding module is used for coding the current macro block according to a coding mode corresponding to the unchanged macro block to obtain unchanged coded data and repeatedly executing the step of judging the macro block type of the next macro block if the current macro block is the unchanged macro block;
a motion vector macro block judging module, for judging whether the current macro block is a motion vector macro block according to the prediction result if the current macro block is not an unchanged macro block,
a motion vector macro block coding module, configured to, if a current macro block is a motion vector macro block, perform coding on the current macro block according to a coding mode corresponding to the motion vector macro block to obtain motion vector coded data, and repeatedly perform macro block type judgment on a next macro block;
a character macro block judging module for judging whether the current macro block is a character macro block according to the prediction result if the current macro block is not a motion vector macro block,
the character macro block coding module is used for coding the current macro block according to a coding mode corresponding to the character macro block to obtain character coded data and repeatedly executing the step of judging the macro block type of the next macro block if the current macro block is the character macro block;
an image macro block judging module, for judging whether the current macro block is an image macro block according to the prediction result if the current macro block is not a character macro block,
and the image macro block coding module is used for coding the current macro block according to a coding mode corresponding to the image macro block to obtain image coded data and repeatedly executing the step of judging the macro block type of the next macro block if the current macro block is the image macro block.
In one embodiment, the text macroblock encoding module comprises:
the second data acquisition sub-module is used for performing cosine transform on the text macro block when the coding device of the text macro block is determined to be the progressive coding, and quantizing by adopting a second preset quantization parameter to obtain second data;
the progressive coding submodule is used for carrying out progressive coding on the second data to obtain the character coded data;
the character coding sub-module is used for executing character coding on the current macro block to obtain the character coding data when the coding device of the character macro block is determined to be the character coding;
wherein the first preset quantization parameter is smaller than the second preset quantization parameter.
In one embodiment, the third obtaining module comprises:
and the obtaining sub-module is used for obtaining the coded data of the current frame according to the video coded data, the unchanged coded data, the motion vector coded data, the character code and the image coded data.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a video encoding method provided by an embodiment of the present disclosure;
fig. 2 is a flowchart of a video encoding method provided by an embodiment of the present disclosure;
fig. 3 is a flowchart of a video encoding method provided by an embodiment of the present disclosure;
fig. 4 is a flowchart of a video encoding method provided by an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a video encoding apparatus according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
First, the technical terms in the present disclosure are introduced:
progressive encoding: for a picture macro block coded by JPEG, gradually transmitting a video picture to be clear by a layering method under the condition of allowing network bandwidth;
layered coding: the principle of layered coding is the same as that of progressive coding, except that the definition of each frame transmission is the same during the coding process, and the number of layers to be coded is determined before transmission. The method is generally applicable to the scene with limited transmission bandwidth, for example, the current frame is totally divided into 5 layers, but the current bandwidth resource is less, and only 3 layers can be sent.
DCT: cosine transform;
RC: a code rate control strategy;
quantization (parameters): the larger the parameter, the better the sharpness, wherein T1 < T2, T1 is used for coding picture macroblock, T2 is used for coding Text macroblock;
macro block: the size of each pixel is 16x16, vgtp divides a frame of image into macro blocks with the same size, and codes each macro block after being classified;
the code rate control method comprises the following 3 methods, wherein the 3 methods can control the lowest and highest layers of video frame coding:
NORC: the vgtp algorithm is not responsible for code rate control, picture adopts layered coding, and text macro block adopts character coding;
PrimaryRC: the picture macro block adopts progressive coding, and the text adopts character coding;
and (3) high RC: the picture adopts progressive coding, and the text adopts progressive coding, but the quantization parameter of the text is larger than that of the picture.
An embodiment of the present disclosure provides a video encoding method, as shown in fig. 1, the video encoding method includes the following steps:
101. a current frame is acquired.
102. When the current frame is different from the reference frame, the macro block type of each macro block in the current frame is obtained.
103. If the type of the macro block is a character macro block or an image macro block, determining a coding method of the character macro block or the image macro block, wherein the coding method of the character macro block comprises the following steps: progressive coding or text coding; the encoding method of the image macro block comprises the following steps: layered coding or progressive coding.
In the existing vgtp algorithm, a text macro block is directly encoded in a text encoding mode, and an image macro block is directly encoded in an image encoding mode, so that the code stream of the text macro block and the encoded image macro block is high.
In the disclosure, two different encoding methods are set for the text macro block, namely progressive encoding or text encoding, wherein the progressive encoding can make the encoded code stream lower than the code stream after the text encoding, so that the adaptability is stronger in a scene with a poorer network condition.
Furthermore, two different coding methods are set for the image macro block, namely layered coding or progressive coding, and the layered coding or the progressive coding can enable the coded code stream to be lower than the code stream after video coding, so that the adaptability of the coded data is improved.
104. And coding each macro block according to the coding method corresponding to each macro block type to obtain a plurality of coded data.
105. The encoded data of the current frame is obtained from the plurality of encoded data.
Due to the fact that the existing vGTP video coding algorithm is poor in adaptability under the scene of poor network conditions. In addition, the existing vGTP is basically the same processing flow used in different scenes, different network conditions and different requirements, and the configurability is also poor.
In order to solve the above technical problems, the present disclosure provides a new video encoding method, in the present disclosure, the existing vgtp algorithm and the layered progressive encoding method are fused, and since the layered progressive encoding method can effectively reduce the code stream, the code stream encoded by the video encoding method of the present disclosure can significantly reduce the data amount of the code stream compared with the code stream encoded by the vgtp algorithm in the prior art, so that the adaptability is strong in the scene with poor network condition,
the macro blocks of the current frame are classified, and different coding methods are adopted for different types of macro blocks, so that the video coding method disclosed by the disclosure is stronger in adaptability, very flexible and capable of meeting individual requirements of users.
Furthermore, because a layered coding mode or a progressive coding mode is not used invariably during coding, different coding modes can be selected according to the current network situation, so that the coded code stream can be more suitable for the current network transmission, and therefore, the video coding method disclosed by the disclosure can be used under different network conditions and different processing flows used under different requirements, and has higher adaptability.
The present disclosure provides a video encoding method, comprising: acquiring a current frame; when the current frame is different from the reference frame, acquiring the macro block type of each macro block in the current frame; if the type of the macro block is a character macro block or an image macro block, determining a coding method of the character macro block or the image macro block, wherein the coding method of the character macro block comprises the following steps: progressive coding or text coding; the encoding method of the image macro block comprises the following steps: layered coding or progressive coding; coding each macro block according to a coding method corresponding to each macro block type to obtain a plurality of coded data; the encoded data of the current frame is obtained from the plurality of encoded data. In the encoding process, a layered encoding mode or a progressive encoding mode is not used invariably, but different encoding modes can be selected according to the current network condition, so that the encoded code stream can be more suitable for the current network transmission.
In one embodiment, as shown in fig. 2, when the macroblock type is an image macroblock, the encoding method for determining the image macroblock includes the following sub-steps:
1031. and performing cosine transform on the image macro block, and quantizing by adopting a first preset quantization parameter to obtain first data.
1032. And judging whether the current code rate control strategy is the first code rate control strategy or not.
1033. And if so, determining the encoding method of the image macro block as hierarchical encoding.
1034. If not, determining that the coding method of the image macro block is progressive coding.
In the related art, when an image macroblock is encoded, cosine transform is directly performed on the image macroblock, a preset quantization parameter is used for quantization, and then video encoding is performed on quantized data in a video encoding mode.
In the disclosure, after performing cosine transform on an image macro block (also referred to as a picture macro block) and quantizing by using a first preset quantization parameter to obtain first data, it is further determined whether a current code rate control strategy is a first code rate control strategy, if the current code rate control strategy is the first code rate control strategy, it is determined that a coding method of the image macro block is layered coding, and if the current code rate control strategy is not the first code rate control strategy, it is determined that the coding method of the image macro block is progressive coding.
Illustratively, the first codestream control policy includes: NORC. Specifically, DCT transform is performed on the picture macroblock, and a smaller first preset quantization parameter T1 is used for quantization to obtain first data. And judging whether the current code rate control strategy is NORC or not, wherein when the code rate control strategy is NORC, the coding mode of the picture macro block is hierarchical coding, and the coding mode of the picture macro block is progressive coding.
It should be noted that, if the rate control strategies are different, the coding modes for the picture macroblock are also different, and therefore, in this step, the rate control strategy needs to be determined first to determine the coding mode for the picture macroblock.
In one embodiment, as shown in fig. 3, when the macroblock type is a text macroblock (which may also be referred to as a text macroblock), the method for determining the coding of the text macroblock according to the rate control strategy includes the following sub-steps:
1035. judging whether the current code rate control strategy is a second code rate control strategy or not;
1036. if yes, determining the encoding method of the character macro block to be progressive encoding;
1037. if not, determining that the coding method of the character macro block is a character coding mode.
For example, the second code rate control strategy includes: and (3) high RC. Specifically, whether the current code rate control strategy is high rc or not is judged, wherein when the code rate control strategy is high rc, the coding mode of the picture macro block is progressive coding, the coding mode of the text macro block is progressive coding, but the quantization parameter of the text is larger than that of the picture.
It should be noted that if the code rate control strategies are different, the coding modes for the text macro block are also different, and therefore, in this step, the code rate control strategy needs to be determined first to determine the coding mode for the text macro block.
In one embodiment, before obtaining the macroblock type of each macroblock in the current frame, the method further comprises the following sub-steps:
a1, when the current frame is different from the reference frame, judging whether the current frame is a full-frame h.264 code;
note that, the full-frame h.264 encoding is set in advance. Because the encoding efficiency of the h.264 to the video image is high and the quality is good, for some scenes, such as scenes playing full-screen animation, the image frames in a time period can be set to be full-frame h.264 encoding, and for scenes with more still images, such as office desktops, the full-frame h.264 encoding is not required to be set.
A2, if yes, coding the current frame by adopting an h.264 coding method;
a3, if not, judging whether the current frame is a full frame vGTP code;
note that, the full-frame vGTP coding is set in advance. The image frame containing the video window may be set to full frame vGTP coding.
Specifically, in this step, it is determined whether the current frame is a full frame vGTP code; after determining that the current frame is not full frame vGTP encoding, the macroblocks of the current frame may be classified by performing identification of a video window after determining that the current frame is full frame vGTP encoding.
A4, if yes, carrying out global motion vector prediction to obtain a prediction result;
a5, if not, carrying out video window identification, and carrying out global motion vector prediction on the video window identification result to obtain a prediction result;
in this step, after determining that the current frame is not a full frame vGTP code, a video window in the current frame can be identified; and further classifying the macro blocks in the range of the video window according to the range of the video window.
It should be noted that the range of the video window includes: location and size. The video window may be a still image or a moving video.
It should be noted that, the processing object after this step is in units of macroblocks, and before this step, the processing object is in units of frames.
At this time, the above-mentioned obtaining the macroblock type of each macroblock in the current frame includes the following sub-steps:
and A6, determining the macro block type of each macro block in the current frame according to the prediction result.
In an implementation mode, the macro block types of all macro blocks in the current frame can be judged one by one according to the prediction result, namely the macro block types are judged one by one in a serial mode; all macro blocks in the current frame can be judged uniformly, namely in a parallel mode.
After a macro block is judged, the current macro block is coded as far as possible, namely, the current macro block is coded according to the coding method corresponding to the macro block type of the current macro block.
Specifically, a current frame is obtained, and whether the current frame is the same as a reference frame is judged; if the current frame is the full-frame h.264 code, inputting the current frame into an h.264 encoder for encoding, completing the encoding process of the current frame, and after the encoding is completed, starting to process the next frame; if the current frame is not the full-frame h.264 code, judging whether the current frame is the full-frame vGTP code, if the current frame is the full-frame vGTP code, performing global motion vector prediction to obtain a prediction result, and determining the macro block type of each macro block in the current frame according to the prediction result; and if the current frame is not the full frame vGTP code, carrying out video window identification, carrying out global motion vector prediction on the video window identification result to obtain a prediction result, and determining the macro block type of each macro block in the current frame according to the prediction result.
In this step, the reference frame may be a reference picture,
in one embodiment, the method for coding the current macro block according to the coding method corresponding to the macro block type of the current macro block comprises the following substeps:
b1, judging whether the current macro block is a video macro block (also called as a video macro block) according to the prediction result;
b2, if the current macro block is a video macro block, coding the current macro block according to the coding mode corresponding to the video macro block to obtain video coded data, and circularly executing the macro block type judgment step by using the next macro block as the current macro block;
in this step, after the range of the video window is determined, it is determined whether the current macroblock is a video macroblock, if so, the video macroblock may be encoded to generate video encoded data of the video macroblock, specifically, h.264 encoding may be performed, and if not, the macroblock is further classified through subsequent steps.
It should be noted that in this step, all macroblocks of the current frame need to be sequentially determined, so as to find out the video macroblock.
B3, if the current macro block is not the video macro block, judging whether the current macro block is an unchanged macro block according to the prediction result,
b4, if the current macro block is an unchanged macro block (also called as an unchanged macro block), encoding the current macro block according to the encoding mode corresponding to the unchanged macro block to obtain unchanged encoded data, and repeatedly executing the step of judging the macro block type for the next macro block;
b5, if the current macro block is not the unchanged macro block, judging whether the current macro block is the motion vector macro block according to the prediction result,
b6, if the current macro block is a motion vector macro block (also called as mv macro block), then coding the current macro block according to the coding mode corresponding to the motion vector macro block to obtain motion vector coded data, and repeating the step of judging the macro block type for the next macro block;
b7, if the current macro block is not the motion vector macro block, judging whether the current macro block is a character macro block according to the prediction result,
b8, if the current macro block is a text macro block (also called as text macro block), then coding the current macro block according to the coding mode corresponding to the text macro block to obtain text coded data, and repeating the step of judging the macro block type for the next macro block;
b9, if the current macro block is not a character macro block, judging whether the current macro block is an image macro block according to the prediction result;
b10, if the current macro block is an image macro block (also called as picture macro block), encoding the current macro block according to the encoding mode corresponding to the image macro block to obtain the image encoded data, and repeating the step of judging the macro block type for the next macro block.
In one embodiment, encoding a current macroblock according to a coding mode corresponding to the text macroblock to obtain text encoded data includes the following substeps:
c1, when the encoding method of the text macro block is determined to be progressive encoding, performing cosine transform on the text macro block, and quantizing by adopting a second preset quantization parameter to obtain second data; the first preset quantization parameter is smaller than the second preset quantization parameter;
c2, performing progressive coding on the second data to obtain character coded data;
specifically, DCT transformation is carried out on the text macro block; quantizing by using a larger second preset quantization parameter T2; and carrying out progressive coding to generate character coded data of the text macro block.
Wherein the parameter T2 is greater than the parameter T1.
In this step, if the current rate control strategy is HighRC, DCT transform is performed on the text macro block, then quantization is performed using a larger parameter T2, and finally progressive coding is performed to generate coded data of the text macro block.
And C3, when the coding method of the character macro block is determined to be character coding, executing character coding on the current macro block to obtain character coded data.
Specifically, if the current code rate control strategy is not the HighRC, the text macro block is subjected to text coding to generate text coded data of the text macro block.
In one embodiment, the above step 105 comprises the following sub-steps:
and after all the macro blocks in the current frame are coded, generating the coded data of the current frame according to the coded data corresponding to each macro block obtained in the step.
Specifically, the coded data of the current frame is obtained according to the video coded data, the unchanged coded data, the motion vector coded data, the character code and the image coded data.
Therefore, in the invention, the progressive and layered coding modes can be combined, the macro blocks of the current frame can be classified, different coding modes are adopted for different types of macro blocks, and meanwhile, the coding mode of the macro block of the specified type can be modified by referring to the current code rate control strategy. The adaptability is strong, the use is very flexible, and the individual requirements of users can be met.
The technical solution in the present disclosure is described below by way of specific embodiments, and as shown in fig. 4, the method includes the following sub-steps:
201. inputting a frame, namely acquiring the current frame.
202. Judging whether the current frame is the same as the reference frame; if the two frames are the same, no encoding is performed, and the next frame starts to be processed, and if the two frames are not the same, step 203 is executed.
In this step, the reference frame may be a reference image, if the current frame is the same as the reference image, no encoding is required, the next frame may be processed, and if not, the subsequent steps are performed.
203, judging whether the current frame is a full-frame h.264 code; if yes, go to step 204, otherwise go to step 205.
Note that, the full-frame h.264 encoding is set in advance. Because the encoding efficiency of the h.264 to the video image is high and the quality is good, for some scenes, such as scenes playing full-screen animation, the image frames in a time period can be set to be full-frame h.264 encoding, and for scenes with more still images, such as office desktops, the full-frame h.264 encoding is not required to be set.
In this step, it may be determined whether the current frame is a full-frame h.264 coding, if so, the h.264 coding is performed on the frame by performing step 204, and if not, further classification and processing are required.
Step 204, inputting the current frame into an h.264 encoder for encoding, and completing the encoding processing of the current frame.
In this step, after determining that the current frame is full-frame h.264 encoding, the current frame is encoded using an h.264 encoder. And starting to process the next frame after the coding is finished.
Step 205, determine whether the current frame is the full frame vGTP code, if yes, execute step 206, if no, execute step 207.
Note that, the full-frame vGTP coding is set in advance. The image frame containing the video window may be set to full frame vGTP coding.
In the step, whether the current frame is a full frame vGTP code is judged; the identification of the video window may be performed by performing step 8 after determining that the current frame is not full frame vGTP encoding, and the macroblocks of the current frame may be classified after determining that the current frame is full frame vGTP encoding.
And step 206, performing global MV prediction on the current frame to obtain a prediction result, and executing step 7.
In this step, after determining that the current frame is not the full-frame h.264 coding, global MV prediction is performed on the current frame to obtain a prediction result, and after obtaining the prediction result, step 208 is performed.
Step 207, identifying the video window of the current frame, determining the range of the video window, and executing step 206.
In this step, after determining that the current frame is not a full frame vGTP code, a video window in the current frame can be identified; and further classifying the macro blocks in the range of the video window according to the range of the video window.
It should be noted that the range of the video window includes: location and size. The video window may be a still image or a moving video.
Step 208, judging whether the macro block of the current frame is a video macro block; if yes, go to step 2024, otherwise go to step 209.
In this step, after the range of the video window is determined, it is determined whether the macroblock of the current frame is a video macroblock, if so, the video macroblock may be encoded to generate encoded data of the video macroblock, specifically, h.264 encoding may be performed, and if not, the macroblock is further classified through subsequent steps.
It should be noted that in this step, all macroblocks of the current frame need to be sequentially determined, so as to find out the video macroblock.
It should be noted that, from step 208, the processing target is in units of macroblocks, and before step 208, the processing target is in units of frames.
In step 209, it is determined whether other macroblocks except the macroblock of the determined type in the current frame are unchanged macroblocks, if yes, step 2024 is executed, and if not, step 2010 is executed.
It should be noted that this step may classify all macroblocks in the current frame except the video macroblock already determined in step 208.
In this step, after determining that the current frame is full frame vGTP coding, classifying other macroblocks in the current frame except the video macroblock determined in step 208; sequentially judging whether the macro blocks are exchange macro blocks; if yes, the changemacroblock can be coded to generate coded data of the changemacroblock, and if not, the classification is continued through the subsequent steps.
Step 2011, determine whether other macroblocks in the current frame except the macroblock with the determined type are mv macroblocks; if yes, go to step 2024, otherwise go to step 2012.
It should be noted that, in the present step, all macroblocks except the video macroblock determined in step 208 and the changemacroblock determined in step 209 in the current frame may be classified.
In this step, according to the prediction result obtained in step 206, other macroblocks except the video macroblock determined in step 208 and the change macroblock determined in step 209 in the current frame are classified; sequentially judging whether the macro block is an mv macro block; if so, the macroblock is encoded in step 2024 to generate encoded data of an mv macroblock, and if not, the macroblock is classified continuously in the subsequent steps.
Step 2012, determining whether other macro blocks in the current frame except the macro block of the determined type are text macro blocks; if yes, go to step 2013, otherwise go to step 2018.
It should be noted that, in the present step, all macroblocks in the current frame except the video macroblock that has been determined in step 208, the exchange macroblock that has been determined in step 209, and the mv macroblock that has been determined in step 2010 may be classified.
In this step, other macroblocks in the current frame are classified except the video macroblock determined in step 208, the change macroblock determined in step 209, and the mv macroblock determined in step 2010; sequentially judging whether the macro blocks are text macro blocks or not; if so, the code rate control strategy is further judged through the step 2013 so as to determine the coding mode of the text macro block, and if not, the classification is continued through the subsequent steps.
Step 2013, judging whether the current code rate control strategy (RC) is HIGH; if so, go to step 2014; if not, go to step 2017.
It should be noted that if the code rate control strategies are different, the coding modes for the text macro block are also different, and therefore, in this step, the code rate control strategy needs to be determined first to determine the coding mode for the text macro block.
When the rate control strategy is highRC, the picture macro block is coded in a progressive mode, the text macro block is coded in a progressive mode, and the text quantization parameter is larger than the picture quantization parameter.
In this step, it is determined whether the current rate control strategy is HighRC, and if so, the text macroblock is progressively encoded in step 2014.
In step 2014, DCT transform is performed on the text macroblock.
Step 2015, a larger parameter T2 is used for quantization.
In step 2016, progressive encoding is performed to generate encoded data of the text macroblock.
Wherein the parameter T2 is greater than the parameter T1.
In this step, if the current rate control strategy is HighRC, DCT transform is performed on the text macro block, then quantization is performed using a larger parameter T2, and finally progressive coding is performed to generate coded data of the text macro block.
Step 2017, perform text encoding on the text macroblock to generate encoded data of the text macroblock, and execute step 2024.
In this step, if the current code rate control strategy is not HighRC, text coding is performed on the text macro block to generate coded data of the text macro block.
Step 2018, judging whether other macro blocks except the macro block with the determined type in the current frame are picture macro blocks; if so, go to step 2019.
It should be noted that, in the present step, all macroblocks in the current frame except the video macroblock that has been determined in step 208, the exchange macroblock that has been determined in step 209, the mv macroblock that has been determined in step 2010, and the text macroblock that has been determined in step 2012 may be classified.
In this step, other macroblocks in the current frame are classified except the video macroblock determined in step 208, the change macroblock determined in step 209, the mv macroblock determined in step 2010, and the text macroblock determined in step 2012; sequentially judging whether the macro blocks are picture macro blocks; if so, go to step 2019.
Step 2019, DCT transformation is carried out on the picture macro block.
Step 2020, performing quantization by using a smaller parameter T1; step 2021 is performed.
Wherein the parameter T1 is smaller than the parameter T2.
Step 2021, judging whether the current code rate control strategy is NORC; if yes, go to step 2022, otherwise go to step 2023.
It should be noted that, if the rate control strategies are different, the coding modes for the picture macroblock are also different, and therefore, in this step, the rate control strategy needs to be determined first to determine the coding mode for the picture macroblock.
When the code rate control strategy is NORC, the picture macro block is coded in a layered coding mode, and the text macro block is coded in a character coding mode.
In this step, it is determined whether the current rate control strategy is NORC, and if yes, the picture macroblock is hierarchically encoded in step 2022, and if no, the picture macroblock is progressively encoded.
Step 2022, hierarchically encoding the picture macroblock to generate encoded data of the picture macroblock, and then executing step 2024.
Step 2023, progressively encodes the picture macroblock, generates encoded data of the picture macroblock, and executes step 2024.
At step 2024, the encoded data of the current frame is determined based on the encoded data of all macroblocks.
In this step, the encoded data of the current frame may be generated based on the encoded data of each type of macroblock obtained in step 208, step 209, step 2010, step 2014, step 2017, step 2022, and step 2023.
It should be noted that the above embodiment corresponding to fig. 4 may perform parallel processing on all macroblocks in the current frame, or perform serial processing on each macroblock in the current frame, and when performing serial processing, after the current step goes to step 2024, the process loops to 208 to perform the determination process again on the next macroblock.
Therefore, in the invention, the progressive and layered coding modes can be combined, the macro blocks of the current frame can be classified, different coding modes are adopted for different types of macro blocks, and meanwhile, the coding mode of the macro block of the specified type can be modified by referring to the current code rate control strategy. The adaptability is strong, the use is very flexible, and the individual requirements of users can be met.
Based on the video encoding method described in the embodiment corresponding to fig. 1, the following is an embodiment of the apparatus of the present disclosure, which can be used to execute the embodiment of the method of the present disclosure.
An embodiment of the present disclosure provides a video encoding apparatus, as shown in fig. 5, the video encoding apparatus including:
a first obtaining module 11, configured to obtain a current frame;
a second obtaining module 12, configured to obtain a macroblock type of each macroblock in the current frame when the current frame is different from the reference frame;
a first determining module 13, configured to determine, if the type of the macroblock is a text macroblock or an image macroblock, an encoding apparatus for the text macroblock or the image macroblock, where the encoding apparatus for the text macroblock includes: progressive coding or text coding; the image macroblock encoding device includes: layered coding or progressive coding;
a first encoding module 14, configured to encode each macroblock according to the encoding device corresponding to each macroblock type to obtain multiple encoded data;
a third obtaining module 15, configured to obtain the encoded data of the current frame according to the multiple encoded data.
In one embodiment, when the macroblock type is an image macroblock, the first determining module includes:
the first processing submodule is used for performing cosine transform on the image macro block and quantizing by adopting a first preset quantization parameter to obtain first data;
the first judgment submodule is used for judging whether the current code rate control strategy is a first code rate control strategy or not;
the first determining submodule is used for determining that a coding device of the image macro block is layered coding when the current code rate control strategy is the first code rate control strategy;
and the second determining submodule is used for determining that the coding device of the image macro block is progressive coding when the current code rate control strategy is not the first code rate control strategy.
In one embodiment, when the type of the macro block is a text macro block, the first determining module includes:
a second determining submodule, configured to determine whether the current code rate control policy is a second code rate control policy;
a third determining submodule, configured to determine that the coding device of the text macro-block is the progressive coding when the current rate control policy is the second rate control policy;
and the fourth determining submodule is used for determining that the coding device of the character macro block is the character coding mode when the current code rate control strategy is not the second code rate control strategy.
In one embodiment, the apparatus further comprises:
a first determining module, configured to determine whether the current frame is a full-frame h.264 code when the current frame is different from the reference frame before the second obtaining module obtains the macroblock type of each macroblock in the current frame;
the second coding module is used for coding the current frame by adopting an h.264 coding device when the current frame is a full-frame h.264 code;
the second judgment module is used for judging whether the current frame is a full frame vGTP code when the current frame is not the full frame h.264 code;
the third acquisition module is used for carrying out global motion vector prediction to obtain a prediction result when the current frame is a full frame vGTP code;
the fourth obtaining module is used for identifying the video window when the current frame is not the full frame vGTP code, and performing global motion vector prediction on the video window identification result to obtain a prediction result;
the second obtaining module includes:
and the fifth determining submodule is used for determining the macro block type of each macro block in the current frame according to the prediction result.
In one embodiment, the fifth determination submodule includes: a first judgment subunit; the first encoding module includes: a first encoding sub-module for encoding the data,
the first judging subunit is used for judging the macro block types of all macro blocks in the current frame one by one according to the prediction result;
and the first coding sub-module is used for coding the current macro block according to a coding device corresponding to the macro block type of the current macro block.
In one embodiment, the apparatus further comprises:
the video macro block judging module is used for judging whether the current macro block is a video macro block according to the prediction result;
the video coding module is used for coding the current macro block according to a coding mode corresponding to the video macro block to obtain video coding data if the current macro block is the video macro block, and circularly executing the step of judging the macro block type by using the next macro block as the current macro block;
an unchanged macro block judgment module, configured to judge whether the current macro block is an unchanged macro block according to the prediction result if the current macro block is not a video macro block,
the unchanged macro block coding module is used for coding the current macro block according to a coding mode corresponding to the unchanged macro block to obtain unchanged coded data and repeatedly executing the step of judging the macro block type of the next macro block if the current macro block is the unchanged macro block;
a motion vector macro block judging module, for judging whether the current macro block is a motion vector macro block according to the prediction result if the current macro block is not an unchanged macro block,
a motion vector macro block coding module, configured to, if a current macro block is a motion vector macro block, perform coding on the current macro block according to a coding mode corresponding to the motion vector macro block to obtain motion vector coded data, and repeatedly perform macro block type judgment on a next macro block;
a character macro block judging module for judging whether the current macro block is a character macro block according to the prediction result if the current macro block is not a motion vector macro block,
the character macro block coding module is used for coding the current macro block according to a coding mode corresponding to the character macro block to obtain character coded data and repeatedly executing the step of judging the macro block type of the next macro block if the current macro block is the character macro block;
an image macro block judging module, for judging whether the current macro block is an image macro block according to the prediction result if the current macro block is not a character macro block,
and the image macro block coding module is used for coding the current macro block according to a coding mode corresponding to the image macro block to obtain image coded data and repeatedly executing the step of judging the macro block type of the next macro block if the current macro block is the image macro block.
In one embodiment, the text macroblock encoding module comprises:
the second data acquisition sub-module is used for performing cosine transform on the text macro block when the coding device of the text macro block is determined to be the progressive coding, and quantizing by adopting a second preset quantization parameter to obtain second data;
the progressive coding submodule is used for carrying out progressive coding on the second data to obtain the character coded data;
the character coding sub-module is used for executing character coding on the current macro block to obtain the character coding data when the coding device of the character macro block is determined to be the character coding;
wherein the first preset quantization parameter is smaller than the second preset quantization parameter.
In one embodiment, the third obtaining module comprises:
and the obtaining sub-module is used for obtaining the coded data of the current frame according to the video coded data, the unchanged coded data, the motion vector coded data, the character code and the image coded data.
Based on the video encoding method described in the embodiment corresponding to fig. 1, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the video encoding method described in the embodiment corresponding to fig. 1, which is not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (9)

1. A method of video encoding, the method comprising:
acquiring a current frame;
when the current frame is different from the reference frame, acquiring the macro block type of each macro block in the current frame;
if the macro block type is a text macro block or an image macro block, determining a coding method of the text macro block or the image macro block, wherein the coding method of the text macro block comprises the following steps: progressive coding or text coding; the encoding method of the image macro block comprises the following steps: layered coding or progressive coding;
coding each macro block according to the coding method corresponding to each macro block type to obtain a plurality of coded data;
and acquiring the coded data of the current frame according to the plurality of coded data.
2. The method according to claim 1, wherein when the macroblock type is a picture macroblock, the determining the coding method of the picture macroblock comprises:
performing cosine transform on the image macro block, and quantizing by adopting a first preset quantization parameter to obtain first data;
judging whether the current code rate control strategy is a first code rate control strategy or not;
if yes, determining that the coding method of the image macro block is layered coding;
and if not, determining that the coding method of the image macro block is progressive coding.
3. The method according to claim 2, wherein when the macroblock type is a text macroblock, the determining the coding method of the text macroblock comprises:
judging whether the current code rate control strategy is a second code rate control strategy or not;
if so, determining the encoding method of the character macro block as the progressive encoding;
if not, determining that the coding method of the character macro block is the character coding mode.
4. The method of claim 3, wherein before obtaining the macroblock type of each macroblock in the current frame, the method further comprises:
when the current frame is different from the reference frame, judging whether the current frame is a full-frame h.264 code;
if so, encoding the current frame by adopting an h.264 encoding method;
if not, judging whether the current frame is a full frame vGTP code;
if yes, performing global motion vector prediction to obtain a prediction result;
if not, identifying the video window, and performing global motion vector prediction on the video window identification result to obtain a prediction result;
the obtaining the macroblock type of each macroblock in the current frame includes:
and determining the macro block type of each macro block in the current frame according to the prediction result.
5. The method of claim 4, wherein determining the macroblock type of each macroblock in the current frame according to the prediction comprises:
judging the macro block types of all macro blocks in the current frame one by one according to the prediction result;
the encoding of each macroblock according to the encoding method corresponding to each macroblock type to obtain a plurality of encoded data includes:
and coding the current macro block according to a coding method corresponding to the macro block type of the current macro block.
6. The method according to claim 5, wherein said determining the macroblock type of each macroblock in the current frame one by one according to the prediction result, and encoding the current macroblock according to the encoding method corresponding to the macroblock type of the current macroblock comprises:
judging whether the current macro block is a video macro block according to the prediction result;
if the current macro block is a video macro block, performing coding on the current macro block according to a coding mode corresponding to the video macro block to obtain video coded data, and circularly performing macro block type judgment by using the next macro block as the current macro block;
if the current macro block is not the video macro block, judging whether the current macro block is an unchanged macro block according to the prediction result,
if the current macro block is an unchanged macro block, encoding the current macro block according to the encoding mode corresponding to the unchanged macro block to obtain unchanged encoded data, and repeatedly performing macro block type judgment on the next macro block;
if the current macro block is not an unchanged macro block, judging whether the current macro block is a motion vector macro block according to the prediction result,
if the current macro block is the motion vector macro block, the current macro block is coded according to the coding mode corresponding to the motion vector macro block to obtain motion vector coded data, and the macro block type judgment is repeatedly executed on the next macro block;
if the current macro block is not a motion vector macro block, judging whether the current macro block is a character macro block according to the prediction result,
if the current macro block is a character macro block, coding the current macro block according to a coding mode corresponding to the character macro block to obtain character coded data, and repeatedly executing macro block type judgment on the next macro block;
if the current macro block is not a character macro block, judging whether the current macro block is an image macro block according to the prediction result,
if the current macro block is the image macro block, the current macro block is coded according to the coding mode corresponding to the image macro block to obtain image coded data, and the step of judging the macro block type is repeatedly executed for the next macro block.
7. The method of claim 6, wherein the encoding the current macroblock according to the encoding method corresponding to the text macroblock to obtain text encoded data comprises:
when the encoding method of the text macro block is determined to be the progressive encoding, performing cosine transform on the text macro block, and quantizing by adopting a second preset quantization parameter to obtain second data;
performing progressive encoding on the second data to obtain the text encoding data;
when the coding method of the character macro block is determined to be the character coding, executing character coding on the current macro block to obtain the character coding data;
wherein the first preset quantization parameter is smaller than the second preset quantization parameter.
8. The method according to claim 6 or 7, wherein said obtaining the encoded data of the current frame from the plurality of encoded data comprises:
and acquiring the coded data of the current frame according to the video coded data, the unchanged coded data, the motion vector coded data, the character code and the image coded data.
9. A video encoding apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring a current frame;
a second obtaining module, configured to obtain a macroblock type of each macroblock in the current frame when the current frame is different from the reference frame;
a first determining module, configured to determine, if the type of the macroblock is a text macroblock or an image macroblock, an encoding device for the text macroblock or the image macroblock, where the encoding device for the text macroblock includes: progressive coding or text coding; the image macroblock encoding device includes: layered coding or progressive coding;
the first coding module is used for coding each macro block according to the coding device corresponding to each macro block type to obtain a plurality of coded data;
and the third obtaining module is used for obtaining the coded data of the current frame according to the plurality of coded data.
CN202010695454.0A 2020-07-17 2020-07-17 Video coding method and device Active CN111953983B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010695454.0A CN111953983B (en) 2020-07-17 2020-07-17 Video coding method and device
PCT/CN2020/130430 WO2022011916A1 (en) 2020-07-17 2020-11-20 Video coding method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010695454.0A CN111953983B (en) 2020-07-17 2020-07-17 Video coding method and device

Publications (2)

Publication Number Publication Date
CN111953983A true CN111953983A (en) 2020-11-17
CN111953983B CN111953983B (en) 2024-07-23

Family

ID=73340534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010695454.0A Active CN111953983B (en) 2020-07-17 2020-07-17 Video coding method and device

Country Status (2)

Country Link
CN (1) CN111953983B (en)
WO (1) WO2022011916A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022011916A1 (en) * 2020-07-17 2022-01-20 西安万像电子科技有限公司 Video coding method and apparatus
CN115580729A (en) * 2022-09-20 2023-01-06 威创集团股份有限公司 Encoding and decoding methods, systems, devices and media based on content-aware slices
US20240007714A1 (en) * 2017-12-22 2024-01-04 Comcast Cable Communications, Llc Video Delivery

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1458791A (en) * 2002-04-25 2003-11-26 微软公司 Sectioned layered image system
CN1801944A (en) * 2000-08-21 2006-07-12 诺基亚有限公司 Video coding
US20110255594A1 (en) * 2010-04-15 2011-10-20 Soyeb Nagori Rate Control in Video Coding
US8648858B1 (en) * 2009-03-25 2014-02-11 Skyfire Labs, Inc. Hybrid text and image based encoding
US20160014421A1 (en) * 2014-07-14 2016-01-14 Apple Inc. Encoding blocks in video frames containing text using histograms of gradients
CN105472392A (en) * 2015-12-11 2016-04-06 钟炎培 Screen video encoding and decoding method based on progressive character block compression and encoding and decoding device
CN106385592A (en) * 2016-08-31 2017-02-08 苏睿 Image compression method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8180165B2 (en) * 2008-12-19 2012-05-15 Microsoft Corp. Accelerated screen codec
US9210434B2 (en) * 2013-06-12 2015-12-08 Microsoft Technology Licensing, Llc Screen map and standards-based progressive codec for screen content coding
CN107566842B (en) * 2017-08-31 2019-08-23 西安万像电子科技有限公司 The methods, devices and systems of image coding and decoding compression
CN110446041B (en) * 2018-05-02 2021-11-19 中兴通讯股份有限公司 Video encoding and decoding method, device, system and storage medium
CN111953983B (en) * 2020-07-17 2024-07-23 西安万像电子科技有限公司 Video coding method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801944A (en) * 2000-08-21 2006-07-12 诺基亚有限公司 Video coding
CN1458791A (en) * 2002-04-25 2003-11-26 微软公司 Sectioned layered image system
US8648858B1 (en) * 2009-03-25 2014-02-11 Skyfire Labs, Inc. Hybrid text and image based encoding
US20110255594A1 (en) * 2010-04-15 2011-10-20 Soyeb Nagori Rate Control in Video Coding
US20160014421A1 (en) * 2014-07-14 2016-01-14 Apple Inc. Encoding blocks in video frames containing text using histograms of gradients
CN105472392A (en) * 2015-12-11 2016-04-06 钟炎培 Screen video encoding and decoding method based on progressive character block compression and encoding and decoding device
CN106385592A (en) * 2016-08-31 2017-02-08 苏睿 Image compression method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘丹;陈规胜;宋传鸣;何兴;王相海;: "屏幕内容编码方法研究进展", 计算机研究与发展, no. 09, 15 September 2017 (2017-09-15) *
郑大芳: "面向H.264的运动估计算法研究", 中国优秀硕士学位论文全文数据库, 15 January 2013 (2013-01-15) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240007714A1 (en) * 2017-12-22 2024-01-04 Comcast Cable Communications, Llc Video Delivery
WO2022011916A1 (en) * 2020-07-17 2022-01-20 西安万像电子科技有限公司 Video coding method and apparatus
CN115580729A (en) * 2022-09-20 2023-01-06 威创集团股份有限公司 Encoding and decoding methods, systems, devices and media based on content-aware slices

Also Published As

Publication number Publication date
WO2022011916A1 (en) 2022-01-20
CN111953983B (en) 2024-07-23

Similar Documents

Publication Publication Date Title
CN111556318B (en) Data transmission method and device
US7924923B2 (en) Motion estimation and compensation method and device adaptive to change in illumination
CN105075261B (en) Method and apparatus for being encoded to multi-layer video and the method and apparatus for being decoded to multi-layer video
CN111953983B (en) Video coding method and device
JP5194119B2 (en) Image processing method and corresponding electronic device
US10931945B2 (en) Method and device for processing prediction information for encoding or decoding an image
JP2013523010A5 (en) Method and apparatus for implicit adaptive motion vector predictor selection for video encoding and video decoding
CN106937126A (en) Image processing apparatus and image processing method
WO2021136375A1 (en) Video encoding or decoding methods and apparatuses related to high-level information signaling
CN107046645A (en) Image encoding and decoding method and device
CN108353175B (en) Method and apparatus for processing video signal using coefficient-induced prediction
CN110149515B (en) Data transmission method and device
US20130235935A1 (en) Preprocessing method before image compression, adaptive motion estimation for improvement of image compression rate, and method of providing image data for each image type
US7809061B1 (en) Method and system for hierarchical data reuse to improve efficiency in the encoding of unique multiple video streams
JP7665776B2 (en) Multidistribution Entropy Modeling of Latency Features in Image and Video Coding Using Neural Networks
CN115484464A (en) Video encoding method and device
US20050141616A1 (en) Video encoding and decoding methods and apparatuses using mesh-based motion compensation
CN112637596B (en) Code rate control system
Jenab et al. Content-adaptive resolution control to improve video coding efficiency
US12108062B2 (en) Video-stream format for machine analysis using NPU
KR20070046825A (en) Coding and decoding method and apparatus
KR20030060009A (en) Adaptive coding method and apparatus considering human visual characteristics
CN111212288A (en) Video data encoding and decoding method and device, computer equipment and storage medium
CN116137658A (en) Video coding method and device
CN116074528A (en) Video coding method and device, and coding information scheduling method and device

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