Interlaced video processing method, system, device and medium in interlacing mode

文档序号:1172995 发布日期:2020-09-18 浏览:13次 中文

阅读说明:本技术 一种交织模式下隔行视频处理方法、系统、设备及介质 (Interlaced video processing method, system, device and medium in interlacing mode ) 是由 林宇辉 于 2020-05-25 设计创作,主要内容包括:本发明提供了视频处理及编码领域的一种交织模式下隔行视频处理方法、系统、设备及介质,方法包括:步骤S10、发送端设定图像排列规则,并利用图像排列规则对顶场和底场的图像重新排列,生成第二帧图像;步骤S20、发送端利用对各第二帧图像进行编码,在编码的辅助信息中设置标志位的取值为1,生成压缩包,并将压缩包以及图像排列规则发送给接收端;步骤S30、接收端解码接收的压缩包得到第二帧图像,基于标志位对第二帧图像进行验证;步骤S40、接收端利用图像排列规则,将第二帧图像的顶场和底场的图像排列顺序进行还原,输出各第一帧图像。本发明的优点在于:实现让不兼容隔行视频编码的编码器兼容隔行视频编码,并保证了编码的质量以及效率。(The invention provides a method, a system, equipment and a medium for processing an interlaced video under an interlacing mode, belonging to the field of video processing and coding, wherein the method comprises the following steps: step S10, the sending end sets the image arrangement rule, and rearranges the images of the top field and the bottom field by the image arrangement rule to generate a second frame image; step S20, the sending end encodes each second frame image, sets the value of the flag bit as 1 in the encoded auxiliary information, generates a compressed packet, and sends the compressed packet and the image arrangement rule to the receiving end; step S30, the receiving end decodes the received compressed packet to obtain a second frame image, and the second frame image is verified based on the flag bit; in step S40, the receiving end restores the image arrangement order of the top field and the bottom field of the second frame image by using the image arrangement rule, and outputs each first frame image. The invention has the advantages that: the method and the device realize that an encoder which is not compatible with the interlaced video coding is compatible with the interlaced video coding, and ensure the coding quality and efficiency.)

1. An interlaced video processing method in an interlaced mode, characterized in that: the method comprises the following steps:

step S10, the sending end sets the odd lines of each first frame image of the interlaced video as the top field and the even lines as the bottom field, sets an image arrangement rule, and rearranges the images of the top field and the bottom field by using the image arrangement rule to generate a second frame image;

step S20, the sending end uses the coder to code each second frame image, sets the value of the flag bit as 1 in the coded auxiliary information, generates the compressed packet, and sends the compressed packet and the image arrangement rule to the receiving end;

step S30, the receiving end decodes the received compressed packet by using a decoder to obtain the second frame image, and verifies the second frame image based on the flag bit;

step S40, the receiving end restores the image arrangement order of the top field and the bottom field of the second frame image by using the image arrangement rule, and outputs each first frame image.

2. The method of claim 1, wherein the video processing method comprises: in step S10, the setting an image arrangement rule, and rearranging the images in the top field and the bottom field by using the image arrangement rule to generate the second frame image specifically includes:

and the images of the top field are closed according to the original sequence to generate a first image, the images of the bottom field are closed according to the original sequence to generate a second image, the first image is arranged above the second image, and a second frame image with the same size as the first frame image is generated.

3. The method of claim 1, wherein the video processing method comprises: the step S30 specifically includes:

the receiving end decodes the received compressed packet by using a decoder to obtain the second frame image, judges whether the value of the flag bit in the auxiliary information is 1, and if so, enters step S40; if not, directly outputting the second frame image, and ending the process.

4. The method of claim 2, wherein the video processing method comprises: the step S40 specifically includes:

and separating a first image and a second image in the second frame image by a receiving end, sequentially arranging the first image on odd lines according to the original sequence, sequentially arranging the second image on even lines according to the original sequence, restoring the second image into the first frame image, and outputting each first frame image.

5. An interlaced video processing system in interlaced mode, comprising: the system comprises the following modules:

the top field and bottom field rearrangement module is used for setting odd lines of each first frame image of the interlaced video as a top field and even lines as a bottom field by the sending end, setting an image arrangement rule, and rearranging the images of the top field and the bottom field by utilizing the image arrangement rule to generate a second frame image;

the encoding module is used for encoding each second frame image by using an encoder at a transmitting end, setting the value of a flag bit to be 1 in encoded auxiliary information, generating a compressed packet, and transmitting the compressed packet and an image arrangement rule to a receiving end;

the decoding module is used for decoding the received compressed packet by using a decoder at a receiving end to obtain the second frame image through decoding, and verifying the second frame image based on the flag bit;

and the top field and bottom field arrangement and restoration module is used for restoring the image arrangement sequence of the top field and the bottom field of the second frame image by using the image arrangement rule at the receiving end and outputting each first frame image.

6. The interlaced video processing system in interlaced mode according to claim 5, wherein: in the top field and bottom field rearrangement module, the setting of an image arrangement rule, and the rearrangement of the images of the top field and the bottom field by using the image arrangement rule to generate a second frame of image specifically include:

and the images of the top field are closed according to the original sequence to generate a first image, the images of the bottom field are closed according to the original sequence to generate a second image, the first image is arranged above the second image, and a second frame image with the same size as the first frame image is generated.

7. The interlaced video processing system in interlaced mode according to claim 5, wherein: the decoding module specifically comprises:

the receiving end decodes the received compressed packet by using a decoder to obtain the second frame image, judges whether the value of the flag bit in the auxiliary information is 1, and enters a top field and bottom field arrangement and restoration module if the value of the flag bit in the auxiliary information is 1; if not, directly outputting the second frame image, and ending the process.

8. The interlaced video processing system in interlaced mode according to claim 6, wherein: the top field and bottom field arrangement reduction module specifically comprises:

and separating a first image and a second image in the second frame image by a receiving end, sequentially arranging the first image on odd lines according to the original sequence, sequentially arranging the second image on even lines according to the original sequence, restoring the second image into the first frame image, and outputting each first frame image.

9. An interlaced video processing device in interlaced mode comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 4 when executing the program.

10. An interlaced video processing medium in interlaced mode, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 4.

Technical Field

The present invention relates to the field of video processing and encoding, and in particular, to a method, system, device, and medium for processing interlaced video in an interlace mode.

Background

In the field of broadcast television and video, due to the limitation of frequency band resources and refresh frequency, an interlaced scanning mode is widely applied, and an interlacing (Weave) mode is a common interlaced video image presentation method and is widely applied to input and output of a video codec and a video capture card. The interlacing mode is to arrange two interlaced fields in an odd line and an even line of an image in an interlaced way; the field is to keep the content of the frame in a horizontal line-separating way, and when displaying, the staggered interval content of the first field is displayed first, and then the second field is displayed to fill the gap left by the first field; in this process, a field displayed first within one frame picture is referred to as a "top field", and another field constituting the frame picture is referred to as a "bottom field".

For the encoding of interlaced video, the following method is conventionally adopted: and converting the interlaced video into a progressive video through an up-down copying and de-interlacing algorithm, and then coding the progressive video, or directly coding the interlaced video. However, the conventional method has the following disadvantages: setting all odd lines (1, 3, 5 … …) in a frame of image as a top field, and all even lines (2, 4, 6 … …) as a bottom field, converting the frame of image into a progressive video, doubling the number of the image, and generating results of (1, 2 ', 3, 4 ', 5, 6 '. copy.) and (1 ', 2, 3 ', 4, 5 ', 6.. copy.), wherein x ' is an insertion line, namely the content of the bottom field needs to be inserted according to the top field information, the content of the top field needs to be inserted according to the bottom field information, and during encoding, because a new content line is inserted by adopting different algorithms, the content of the video is obviously changed, and double content needs to be transmitted, the transmission bandwidth needs to be increased, and the encoding quality and efficiency are affected;

if the interlaced video is directly coded line by line without processing, in the process of quickly alternating the top field and the bottom field in a motion scene, a plurality of comb lines are generated between the top field and the bottom field in an alternating way, and the comb lines are high-frequency information and need to occupy more compressed bytes, thereby influencing the coding quality.

Although there are some encoders capable of directly encoding interlaced video, the latest encoders are not compatible with encoding interlaced video, such as h.265/HEVC, with the development of digital television technology and video codec.

Therefore, how to provide an interlaced video processing method, system, device and medium in the interlaced mode to achieve compatibility of an encoder incompatible with interlaced video encoding, and ensure quality and efficiency of encoding becomes a problem to be solved urgently.

Disclosure of Invention

The technical problem to be solved by the present invention is to provide a method, a system, a device and a medium for processing an interlaced video in an interlaced mode, so as to enable an encoder that is not compatible with interlaced video encoding to be compatible with interlaced video encoding, and ensure the quality and efficiency of encoding.

In a first aspect, the present invention provides an interlaced video processing method in an interlaced mode, including the following steps:

step S10, the sending end sets the odd lines of each first frame image of the interlaced video as the top field and the even lines as the bottom field, sets an image arrangement rule, and rearranges the images of the top field and the bottom field by using the image arrangement rule to generate a second frame image;

step S20, the sending end uses the coder to code each second frame image, sets the value of the flag bit as 1 in the coded auxiliary information, generates the compressed packet, and sends the compressed packet and the image arrangement rule to the receiving end;

step S30, the receiving end decodes the received compressed packet by using a decoder to obtain the second frame image, and verifies the second frame image based on the flag bit;

step S40, the receiving end restores the image arrangement order of the top field and the bottom field of the second frame image by using the image arrangement rule, and outputs each first frame image.

Further, in step S10, the setting an image arrangement rule, and rearranging the images of the top field and the bottom field by using the image arrangement rule to generate the second frame image specifically includes:

and the images of the top field are closed according to the original sequence to generate a first image, the images of the bottom field are closed according to the original sequence to generate a second image, the first image is arranged above the second image, and a second frame image with the same size as the first frame image is generated.

Further, the step S30 is specifically:

the receiving end decodes the received compressed packet by using a decoder to obtain the second frame image, judges whether the value of the flag bit in the auxiliary information is 1, and if so, enters step S40; if not, directly outputting the second frame image, and ending the process.

Further, the step S40 is specifically:

and separating a first image and a second image in the second frame image by a receiving end, sequentially arranging the first image on odd lines according to the original sequence, sequentially arranging the second image on even lines according to the original sequence, restoring the second image into the first frame image, and outputting each first frame image.

In a second aspect, the present invention provides an interlaced video processing system in an interlaced mode, including the following modules:

the top field and bottom field rearrangement module is used for setting odd lines of each first frame image of the interlaced video as a top field and even lines as a bottom field by the sending end, setting an image arrangement rule, and rearranging the images of the top field and the bottom field by utilizing the image arrangement rule to generate a second frame image;

the encoding module is used for encoding each second frame image by using an encoder at a transmitting end, setting the value of a flag bit to be 1 in encoded auxiliary information, generating a compressed packet, and transmitting the compressed packet and an image arrangement rule to a receiving end;

the decoding module is used for decoding the received compressed packet by using a decoder at a receiving end to obtain the second frame image through decoding, and verifying the second frame image based on the flag bit;

and the top field and bottom field arrangement and restoration module is used for restoring the image arrangement sequence of the top field and the bottom field of the second frame image by using the image arrangement rule at the receiving end and outputting each first frame image.

Further, in the top field and bottom field rearrangement module, the setting of an image arrangement rule, and rearranging the images of the top field and the bottom field by using the image arrangement rule to generate the second frame image specifically include:

and the images of the top field are closed according to the original sequence to generate a first image, the images of the bottom field are closed according to the original sequence to generate a second image, the first image is arranged above the second image, and a second frame image with the same size as the first frame image is generated.

Further, the decoding module specifically includes:

the receiving end decodes the received compressed packet by using a decoder to obtain the second frame image, judges whether the value of the flag bit in the auxiliary information is 1, and if so, enters step S40; if not, directly outputting the second frame image, and ending the process.

Further, the top field and bottom field arrangement reduction module specifically comprises:

and separating a first image and a second image in the second frame image by a receiving end, sequentially arranging the first image on odd lines according to the original sequence, sequentially arranging the second image on even lines according to the original sequence, restoring the second image into the first frame image, and outputting each first frame image.

In a third aspect, the present invention provides an interlaced video processing device in interlaced mode, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of the first aspect when executing the program.

In a fourth aspect, the invention provides an interlaced video processing medium in interlaced mode, on which a computer program is stored which, when executed by a processor, implements the method of the first aspect.

One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:

1. the method comprises the steps of rearranging images of a top field and a bottom field of each first frame image of an interlaced video to generate a second frame image by setting an image arrangement rule, encoding the second frame image by using an encoder, sending the encoded second frame image to a decoding party, decoding by using the decoding party to obtain the second frame image, and reducing the second frame image into the first frame image by using the image arrangement rule to output, so that the encoder incompatible with the interlaced video encoding is compatible with the interlaced video encoding.

2. The method is characterized in that interlaced video is directly coded, and in the process of quickly alternating a top field and a bottom field in a motion scene, a plurality of comb lines are generated between the top field and the bottom field alternately and are high-frequency information, and more compressed bytes are required to be occupied, so that the coding quality is influenced; by rearranging the images of the top field and the bottom field of each first frame image of the interlaced video, the high-frequency information is effectively reduced, and the coding quality is improved.

3. The method adopts a mode that a top field and a bottom field are distributed up and down in the same picture to encode the continuous interlaced video, can effectively utilize the time correlation of the top field and the bottom field in the interlaced video, and improves the inter-frame prediction quality and efficiency of an encoder; and the compatibility to the encoder is good, and the inter-frame prediction encoding can be simultaneously carried out on the top field and the bottom field only by reference frame information of one frame.

The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.

Drawings

The invention will be further described with reference to the following examples with reference to the accompanying drawings.

Fig. 1 is a flow chart of an interlaced video processing method in an interlace mode according to the present invention.

Fig. 2 is a schematic structural diagram of an interlaced video processing system in an interlace mode according to the present invention.

Fig. 3 is a schematic structural diagram of an interlaced video processing device in an interlacing mode according to the present invention.

Fig. 4 is a schematic structural diagram of an interlaced video processing medium in an interlacing mode according to the present invention.

Fig. 5 is a schematic diagram illustrating the effect of the interlaced video processing method in the interlace mode according to the present invention.

Detailed Description

The embodiment of the application realizes that an encoder which is incompatible with interlaced video coding is compatible with interlaced video coding and improves the quality and the efficiency of coding by providing an interlaced video processing method, a system, equipment and a medium under an interlaced mode.

The technical scheme in the embodiment of the application has the following general idea: an image arrangement rule is set to rearrange the images of the top field and the bottom field of each frame of image of the interlaced video, namely, a mode that the top field and the bottom field are distributed up and down in the same picture is adopted, the high-frequency information of the images is reduced, interpolation between the top field and the bottom field is omitted, half of data transmission quantity is reduced, and therefore an encoder which is not compatible with the interlaced video encoding is compatible with the interlaced video encoding, and the quality and the efficiency of the encoding are improved.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频通话方法、系统、设备、网络模组及可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类