CN110581995A - Video processing method and device - Google Patents

Video processing method and device Download PDF

Info

Publication number
CN110581995A
CN110581995A CN201910866614.0A CN201910866614A CN110581995A CN 110581995 A CN110581995 A CN 110581995A CN 201910866614 A CN201910866614 A CN 201910866614A CN 110581995 A CN110581995 A CN 110581995A
Authority
CN
China
Prior art keywords
video image
blocks
image block
target video
block
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.)
Pending
Application number
CN201910866614.0A
Other languages
Chinese (zh)
Inventor
陈科吉
王志航
董胜富
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910866614.0A priority Critical patent/CN110581995A/en
Publication of CN110581995A publication Critical patent/CN110581995A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • 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/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

Landscapes

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

Abstract

the embodiment of the application provides a video processing method and a video processing device, wherein the method comprises the following steps: acquiring a video image block to be processed contained in a target video; judging whether the video image block can be divided into an integral number of maximum coding blocks according to the size of a preset maximum coding block and the size of the video image block; if the video image block can not be divided into an integer of maximum coding blocks, judging whether the video image block can be divided into an integer of minimum coding blocks according to the size of a preset minimum coding block, wherein the size of the minimum coding block is smaller than that of the maximum coding block; and if the video image block cannot be divided into an integer of minimum coding blocks, performing edge filling on the video image block to obtain a target video image block. By adopting the scheme provided by the embodiment of the application to process the video, the code rate in the transmission process can be saved, the difficulty and complexity of realizing code stream splicing are reduced, and great convenience is provided for code stream splicing.

Description

Video processing method and device
Technical Field
the present application relates to the field of communications technologies, and in particular, to a method and an apparatus for video processing.
Background
At present, in the video transmission process, there is a need for encoding a super-resolution video, and for the super-resolution video, each video frame is generally divided into a plurality of smaller video image blocks for encoding, and the video image blocks are decoded at a receiving end, cut after being decoded, and then spliced to obtain the original video frame.
In the existing standard, the length and width of a video frame are required to be multiple of 64, and for a video frame which does not meet the requirement, the video frame can be subjected to edge filling at a sending end so that the length and width of the video frame can meet the requirement. Therefore, a large number of pixels are required to be added around the video frame to complement the edges, so that the length and width of the video frame are multiple of 64. And then, dividing the video frame after edge supplement into a plurality of smaller video image blocks for coding and transmitting. After receiving by the receiving end, the added redundant pixels need to be cut off, and then the original video frame is obtained by splicing.
The inventor finds that in the process of implementing the invention, a large number of pixels need to be added for edge supplement according to the standard, and the added large number of pixels need to be cut subsequently, so that the complexity of code stream splicing is increased, and a great obstacle is caused to the specific application of the code stream splicing technology.
disclosure of Invention
The embodiment of the application aims to provide a video processing method and a video processing device, which can reduce the difficulty and complexity of code stream splicing, save the code rate and provide great convenience for code stream splicing. The specific technical scheme is as follows:
in a first aspect, a method for video processing is provided, where the method is applied to a video sending end, and the method includes:
And acquiring a video image block to be processed contained in the target video.
and judging whether the video image block can be divided into an integral number of maximum coding blocks or not according to the size of a preset maximum coding block and the size of the video image block.
if the video image block can not be divided into an integer number of maximum coding blocks, judging whether the video image block can be divided into an integer number of minimum coding blocks according to the size of a preset minimum coding block, wherein the size of the minimum coding block is smaller than that of the maximum coding block.
And if the video image block can not be divided into an integer of minimum coding blocks, performing edge filling on the video image block to obtain a target video image block, wherein the target video image block can be divided into an integer of minimum coding blocks.
optionally, the step of performing edge filling on the video image block to obtain the target video image block includes:
And adding a first preset mark in the metadata information of the video image block, wherein the first preset mark represents that the video image block is subjected to edge filling according to the size of the minimum coding block.
calculating edge supplementing data according to the size of the video image block and the size of the minimum coding block; and adding the edge supplementing data in the metadata information.
And supplementing the video image blocks according to the edge supplementing data to obtain the target video image blocks.
Optionally, the calculating the edge-filling data includes:
calculating a minimum integer number by which the video image block is complemented into an integer number of minimum coding blocks according to the size of the video image block and the size of the minimum coding block.
And acquiring a difference value according to the sizes of the video image blocks and the minimum integer minimum coding blocks, wherein the difference value represents the size of the video image block needing to be supplemented.
Optionally, after the step of performing edge-filling on the video image block to obtain the target video image block, the method further includes:
and encoding the target video image blocks, wherein the encoded target video image blocks comprise an integer number of minimum encoding blocks obtained by encoding after the target video image blocks are divided.
And sending the encoded target video image block to a video receiving end.
In a second aspect, a method for video processing is provided, where the method is applied to a video receiving end, and the method includes:
And receiving encoded target video image blocks sent by a video sending end, wherein the encoded target video image blocks comprise an integer number of minimum encoding blocks obtained by encoding after the target video image blocks are divided.
And decoding and splicing the coded target video image blocks to obtain spliced target video image blocks.
Judging whether metadata information corresponding to the spliced target video image blocks contains a first preset mark or not; and the first preset mark indicates that the spliced target video image block is subjected to edge supplement according to the size of the minimum coding block.
If the spliced target video image blocks contain the first preset marks, acquiring edge supplementing data in metadata information of the spliced target video image blocks, wherein the edge supplementing data comprises a minimum integer and a difference value, and the minimum integer is the minimum number of the spliced target video image blocks which are supplemented into the minimum coding blocks which can be divided into an integer; the difference value represents the supplemented size of the spliced target video image block.
and cutting the spliced target video image blocks according to the edge supplementing data to obtain video image blocks.
Optionally, the cutting the spliced target video image block includes:
And calculating the size of the spliced target video image block according to the minimum integer and the size of the minimum coding block.
And cutting out the video image block part correspondingly represented by the difference value in the spliced target video image blocks according to the difference value and the size of the spliced target video image blocks to obtain the video image blocks.
in a third aspect, an apparatus for video processing is provided, where the apparatus is applied to a video sending end, and the apparatus includes:
And the acquisition module is used for acquiring the video image blocks to be processed contained in the target video.
the first judging module is used for judging whether the video image block can be divided into an integral number of maximum coding blocks according to the size of a preset maximum coding block and the size of the video image block.
and the second judging module is used for judging whether the video image block can be divided into an integer number of minimum coding blocks according to the size of a preset minimum coding block under the condition that the video image block cannot be divided into the integer number of maximum coding blocks, wherein the size of the minimum coding block is smaller than that of the maximum coding block.
And the edge supplementing module is used for supplementing edges to the video image blocks to obtain target video image blocks under the condition that the video image blocks cannot be divided into an integer of minimum coding blocks, and the target video image blocks can be divided into an integer of minimum coding blocks.
Optionally, the trimming module includes:
A first adding unit, configured to add a first preset flag to metadata information of the video image block, where the first preset flag indicates that the video image block is edge-padded according to the size of the minimum coding block.
The computing unit is used for computing the edge supplementing data according to the size of the video image block and the size of the minimum coding block;
A second adding unit, configured to add the edge supplement data to the metadata information.
And the supplementing unit is used for supplementing the video image blocks according to the edge supplementing data to obtain the target video image blocks.
Optionally, the computing unit is specifically configured to:
Calculating a minimum integer number by which the video image block is complemented into an integer number of minimum coding blocks according to the size of the video image block and the size of the minimum coding block.
And acquiring a difference value according to the sizes of the video image blocks and the minimum integer minimum coding blocks, wherein the difference value represents the size of the video image block needing to be supplemented.
optionally, the apparatus further comprises:
And the coding module is used for coding the target video image block after the video image block is subjected to edge filling to obtain the target video image block, wherein the coded target video image block comprises an integer number of minimum coding blocks obtained by coding after the target video image block is divided.
And the transmission module is used for transmitting the encoded target video image block to a video receiving end.
In a fourth aspect, an apparatus for video processing is provided, where the apparatus is applied to a video receiving end, and the apparatus includes:
The receiving module is used for receiving encoded target video image blocks sent by a video sending end, wherein the encoded target video image blocks comprise an integer number of minimum encoding blocks obtained by encoding after the target video image blocks are divided.
and the decoding module is used for decoding and splicing the encoded target video image blocks to obtain spliced target video image blocks.
the third judgment module is used for judging a first preset mark contained in metadata information corresponding to the spliced target video image blocks; and the first preset mark indicates that the spliced target video image block is subjected to edge supplement according to the size of the minimum coding block.
The second obtaining module is used for obtaining edge supplementing data in metadata information of the spliced target video image blocks under the condition that the spliced target video image blocks contain the first preset marks, and the edge supplementing data comprises minimum integers and difference values; the minimum integer is the minimum number of the spliced target video image blocks which can be divided into an integer number of minimum coding blocks; the difference value represents the supplemented size of the spliced target video image block.
and the cutting module is used for cutting the spliced target video image blocks according to the edge supplementing data to obtain video image blocks.
optionally, the cutting module is specifically configured to:
And calculating the size of the spliced target video image block according to the minimum integer and the size of the minimum coding block.
And cutting out the video image block part correspondingly represented by the difference value in the spliced target video image blocks according to the difference value and the size of the spliced target video image blocks to obtain the video image blocks.
In a fifth aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
A processor for implementing the method steps of any one of the first or second aspects when executing a program stored in the memory.
A sixth aspect provides a computer readable storage medium having stored therein a computer program which, when executed by a processor, performs the method steps of any one of the first or second aspects.
in a seventh aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the first or second aspects above.
In the embodiment of the invention, a video sending end can obtain a video image block to be processed contained in a target video, and judge whether the video image block can be divided into an integral number of maximum coding blocks according to the size of a preset maximum coding block and the size of the video image block; if the video image block can not be divided into an integer of maximum coding blocks, judging whether the video image block can be divided into an integer of minimum coding blocks according to the size of a preset minimum coding block, wherein the size of the minimum coding block is smaller than that of the maximum coding block; and if the video image block can not be divided into an integer number of minimum coding blocks, performing edge filling on the video image block to obtain a target video image block, wherein the target video image block can be divided into the integer number of minimum coding blocks. That is, the embodiment of the present invention only needs to perform edge-filling on the video image blocks that cannot be divided into an integer number of largest coding blocks and cannot be divided into an integer number of smallest coding blocks. Thus, the number of video image blocks needing edge supplement is reduced, and the edge supplement calculation amount is reduced. Moreover, because the target video image block obtained by edge filling can be divided into an integer number of minimum codes, namely, the video image block is subjected to edge filling according to the size of the minimum coding block, the pixels needing to be filled in the edge filling process are reduced. Therefore, the difficulty and complexity of code stream splicing are reduced, the code rate is saved, and great convenience is provided for code stream splicing.
the method comprises the steps of judging whether a video image block can be divided into an integer number of maximum coding blocks or not, screening out the video image block which cannot be divided into the integer number of maximum coding blocks, screening out the video image block which can be divided into the integer number of maximum coding blocks, and directly transmitting the video image block. In addition, whether the video image blocks can be divided into the integer number of the minimum coding blocks is judged, so that the video image blocks which can not be divided into the integer number of the minimum coding blocks can be screened out from the video image blocks which can not be divided into the integer number of the maximum coding blocks and subjected to edge supplement, and the video image blocks which can be divided into the integer number of the minimum coding blocks can be screened out and directly transmitted. Therefore, the number of the video image blocks needing to be supplemented and cut is reduced, the number of the video image blocks needing to be subjected to edge supplement can be reduced, and the edge supplement calculation amount is reduced.
in addition, the video receiving end can receive the encoded target video image blocks sent by the video sending end, wherein the encoded target video image blocks comprise an integer number of minimum encoding blocks obtained by encoding after the target video image blocks are divided. And then decoding and splicing the encoded target video image blocks to obtain spliced target video image blocks. Whether the metadata information corresponding to the target video image block contains a first preset mark or not can be judged, wherein the first preset mark indicates that the target video image block is subjected to edge supplement according to the size of the minimum coding block. If the target video image block contains the first preset mark, edge supplementing data in metadata information of the target video image block is obtained, wherein the edge supplementing data comprises a minimum integer and a difference value, and the minimum integer is the minimum number of the target video image block which is supplemented into the minimum coding blocks which can be divided into an integer; the difference value represents the supplemented size of the target video image block. And cutting the target video image block according to the edge supplementing data to obtain a video image block. By identifying the first preset identification, whether the target video image block is subjected to edge supplement can be quickly judged, whether the target video image block needs to be cut is further judged, and judgment and calculation are avoided in the cutting process. And then, the edge supplementing data of the target video image block to be cut is directly read, so that the cutting data is prevented from being calculated again in the cutting process, the calculated amount in the cutting process is reduced, and meanwhile, the target video image block is cut according to the edge supplementing data, so that the video image block can be accurately obtained.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
fig. 1 is a schematic flowchart of a video processing performed by a video sending end according to an embodiment of the present application;
Fig. 2 is a schematic flowchart illustrating a video processing performed by a video receiving end according to an embodiment of the present disclosure;
Fig. 3 is a schematic diagram of video cropping and edge-filling provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a device for processing video at a video sending end according to an embodiment of the present application;
Fig. 5 is a schematic structural diagram of an apparatus for performing video processing at a video receiving end according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of a device for processing video at a video sending end according to an embodiment of the present application;
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The following describes in detail a video processing method provided in this embodiment with reference to a specific implementation manner, and is applied to a video sending end, as shown in fig. 1, the specific steps are as follows:
Step 101, obtaining a video image block to be processed contained in a target video.
in the embodiment of the application, the video sending end can obtain the target video and obtain the video image blocks to be processed contained in the target video. The video sending end can obtain the target video in a wireless data transmission mode, for example, the video sending end can download a certain video from a network as the target video to be processed; alternatively, the video sending end may also obtain the target video through a wired data transmission manner such as a USB (Universal Serial Bus), a data line, and the like. The video sending end can obtain each frame of image contained in the target video, and the video image block can be obtained by dividing one frame of image into a plurality of parts or can be a complete frame of image. When the resolution of a certain frame of image in the target video is high, the frame of image in the target video is divided into a plurality of parts to obtain a video image block to be processed, so that the frame of image can be prevented from being directly operated, the frame of image with high resolution is prevented from being processed, the resolution of the target video image block to be processed is ensured to be proper, and various subsequent operations on the target video are facilitated.
and 102, judging whether the video image block can be divided into an integral number of maximum coding blocks according to the size of a preset maximum coding block and the size of the video image block.
in the embodiment of the application, a video sending end can divide a video image block according to the size of a preset maximum coding block and the size of a video image block to be processed, and then judge whether the video image block can be divided into an integer number of maximum coding blocks. For example, when the size of the preset maximum coding blocks is 64 pixels in length and width, the image with 480 pixels in length and width in a frame cannot be divided into an integral number of maximum coding blocks, and the image with 256 pixels in length and width in a frame can be divided into 16 maximum coding blocks.
If the video image block can be divided into an integer number of maximum coding blocks, the video image block can be directly coded, and the coded video image block is transmitted. For example, when the size of the preset largest coding block is 64 pixels in length and width, an image with a frame length and width of 256 pixels can be divided into an integer number of largest coding blocks, and the image can be transmitted by dividing the image into 4 video image blocks with length and width of 128 pixels.
If the video image block cannot be divided into an integer number of largest encoded blocks, step 103 is performed.
And 103, judging whether the video image block can be divided into an integral number of minimum coding blocks according to the size of the preset minimum coding block.
wherein the size of the smallest coding block is smaller than the size of the largest coding block.
in this embodiment of the present application, a video sending end may divide a video image block according to a size of a preset minimum coding block when the video image block cannot be divided into an integer number of maximum coding blocks, so that it is required to determine whether the video image block can be divided into an integer number of minimum coding blocks.
for example, when the size of the maximum coding blocks is preset to be 64 pixels in length and width, and the size of the minimum coding blocks is preset to be 8 pixels in length and width, for an image with a frame length of 480 pixels in length and width, the image cannot be divided into an integer number of maximum coding blocks, but can be divided into 9 video image blocks with length and width of 160 pixels, and the video image blocks with length and width of 160 pixels can be divided into an integer number of minimum coding blocks, that is, the image with length and width of 480 pixels can be divided into an integer number of minimum coding blocks.
and if the video image block can be divided into an integer number of minimum coding blocks, encoding the video image block and sending the encoded video image block to a video receiving end. For example, when the size of the maximum coding block is preset to be 64 pixels in length and width, and the size of the minimum coding block is preset to be 8 pixels in length and width, for an image of a frame of 480 pixels in length and width, the image cannot be divided into an integer number of maximum coding blocks, but can be divided into an integer number of minimum coding blocks, in which case, the image can be divided into 9 video images of 160 pixels in length and width for transmission.
If the video image block cannot be divided into an integer number of smallest encoded blocks, step 104 is performed.
And step 104, performing edge filling on the video image blocks to obtain target video image blocks, wherein the target video image blocks can be divided into an integer number of minimum coding blocks.
by judging whether the video image blocks can be divided into an integer number of maximum coding blocks or not, the video image blocks which can be divided into the integer number of maximum coding blocks can be screened out and directly transmitted, so that the number of the video image blocks which need to be subjected to edge supplementing and cutting can be reduced, and further the calculated amount in the process of transmitting the target video can be reduced.
by judging whether the video image blocks can be divided into the integer number of the minimum coding blocks or not, the video image blocks which can be divided into the integer number of the minimum coding blocks can be screened out from the video image blocks which cannot be divided into the integer number of the maximum coding blocks, the number of the video image blocks which need to be subjected to edge supplementing and cutting is further reduced, and the calculation amount in the process of transmitting the target video is further reduced.
According to the method and the device, whether the video image block which can be divided into the integer number of the largest coding blocks can be obtained by judging whether the video image block can be divided into the integer number of the largest coding blocks or not is judged, and then the video image block is subjected to coding transmission, so that the problem that the number of the coding blocks is too large when the video image block is divided according to the smallest coding block can be solved, the number of the video image blocks which need to be divided according to the smallest coding block is reduced, and further, the calculation amount in the edge supplementing, transmission and cutting processes is reduced. In addition, the video image blocks are judged and classified in such a way, and can be accurately classified according to the sizes of the video image blocks, so that the video image blocks can be conveniently processed.
In the embodiment of the invention, a video sending end can obtain a video image block to be processed contained in a target video, and judge whether the video image block can be divided into an integral number of maximum coding blocks according to the size of a preset maximum coding block and the size of the video image block; if the video image block can not be divided into an integer of maximum coding blocks, judging whether the video image block can be divided into an integer of minimum coding blocks according to the size of a preset minimum coding block, wherein the size of the minimum coding block is smaller than that of the maximum coding block; and if the video image block can not be divided into an integer number of minimum coding blocks, performing edge filling on the video image block to obtain a target video image block, wherein the target video image block can be divided into the integer number of minimum coding blocks. That is, the embodiment of the present invention only needs to perform edge-filling on the video image blocks that cannot be divided into an integer number of largest coding blocks and cannot be divided into an integer number of smallest coding blocks. Thus, the number of video image blocks needing edge supplement is reduced, and the edge supplement calculation amount is reduced. Moreover, because the target video image block obtained by edge filling can be divided into an integer number of minimum codes, namely, the video image block is subjected to edge filling according to the size of the minimum coding block, the pixels needing to be filled in the edge filling process are reduced. Therefore, the difficulty and complexity of code stream splicing are reduced, the code rate is saved, and great convenience is provided for code stream splicing.
The method comprises the steps of judging whether a video image block can be divided into an integer number of maximum coding blocks or not, screening out the video image block which cannot be divided into the integer number of maximum coding blocks, screening out the video image block which can be divided into the integer number of maximum coding blocks, and directly transmitting the video image block. In addition, whether the video image blocks can be divided into the integer number of the minimum coding blocks is judged, so that the video image blocks which can not be divided into the integer number of the minimum coding blocks can be screened out from the video image blocks which can not be divided into the integer number of the maximum coding blocks and subjected to edge supplement, and the video image blocks which can be divided into the integer number of the minimum coding blocks can be screened out and directly transmitted. Therefore, the number of the video image blocks needing to be supplemented and cut is reduced, the number of the video image blocks needing to be subjected to edge supplement can be reduced, and the edge supplement calculation amount is reduced.
Specifically, the step of performing edge-filling on the video image block to obtain the target video image block may include the following steps:
Adding a first preset mark in metadata information of a video image block, wherein the first preset mark indicates that the video image block is subjected to edge filling according to the size of a minimum coding block.
In this embodiment of the present application, after determining that the video image block cannot be divided into an integer number of minimum coding blocks, the video sending end adds a first preset flag, for example, adds an attribute value tile _ conformance _ window _ flag to 1, which may indicate that the video image block is subjected to edge supplement according to the size of the minimum coding block. By adding the first preset identifier, the electronic device can determine whether the video image block is subjected to edge supplement according to the first preset identifier and whether the video image block can be divided into an integer number of minimum coding blocks according to the condition of the size of the video image block.
Calculating edge supplementing data according to the size of the video image block and the size of the minimum coding block; the edge supplement data is added to the metadata information.
The process of calculating the edge data may include the following steps:
Step one, according to the size of the video image block and the size of the minimum coding block, calculating the minimum integer of the video image block which can be divided into an integer number of minimum coding blocks.
in the embodiment of the application, the video sending end can calculate the minimum integer meeting the condition under the condition that the video image block is subjected to edge filling to be divided into the integer number of minimum coding blocks according to the size of the video image block and the size of the minimum coding block. By calculating the minimum integer, the step of calculating the difference can be simplified, and the difference between the video image block and the target video image block can be more directly represented.
For example, when the size of the maximum coding block is preset to be 64 pixels in length and width and the size of the minimum coding block is preset to be 8 pixels in length and width, an image with a frame length of 474 pixels in length and width cannot be divided into an integer number of maximum coding blocks and an integer number of minimum coding blocks. The video sending end can divide the image into 9 video image blocks with length and width of 158 pixels, and the length and width of the video image blocks are 8 pixels according to the size of the minimum coding block, and when the video image blocks with length and width of 158 pixels are supplemented to be the minimum coding blocks which can be divided into an integer, the video image blocks need to be supplemented to 400 minimum coding blocks when edge supplement can be calculated, wherein the width and height of the video image blocks are the size of 20 minimum coding blocks.
And step two, acquiring a difference value according to the sizes of the video image block and the minimum integral number of minimum coding blocks, wherein the difference value represents the size of the video image block needing to be supplemented.
in this embodiment of the present application, the video sending end may calculate a difference value according to the size of the video image block and the size of the smallest integer number of the smallest coding blocks, where the difference value represents the size of the video image block that needs to be supplemented. The difference between the video image block and the target video image block can be clearly shown through the difference, wherein the difference comprises the sizes of the video image blocks needing to be supplemented in different directions, and the sizes of the video image blocks needing to be supplemented can be visually and simply shown.
For example, when the size of the preset largest coding block is that the length and the width are 64 pixels, and the size of the smallest coding block is that the length and the width are 8 pixels, for an image whose frame length and the width are 474 pixels, the image may be divided into 9 video image blocks whose length and the width are 158 pixels, and for a video image block whose length and the width are 158 pixels, the smallest integer satisfying the condition is 400, where the length and the width are 20 smallest coding blocks respectively, and then the size of the video image block to be supplemented is that the video image block has 2 pixels on the upper side, 2 pixels on the lower side, or 1 pixel on the upper side and the lower side, and 2 pixels on the left side, 2 pixels on the right side, or 1 pixel on the left side and the right side.
And step three, supplementing the video image block according to the edge supplementing data to obtain the target video image block.
in the embodiment of the application, the video sending end can supplement the video image block according to the calculated edge supplementing data to obtain the target video image block.
According to the video processing method provided by the embodiment of the invention, the video image blocks to be supplemented when the video image blocks are supplemented to the integral number of the minimum coding blocks can be accurately calculated by comparing the sizes of the video image blocks with the size of the minimum coding block. By calculating the minimum integer, the size of the video image block after the video image block is supplemented, i.e., the size of the target video image block, can be determined while the edge supplement data is calculated. And supplementing the video image blocks according to the calculated edge supplementing data, determining four directions of the video image blocks, namely the upper direction, the lower direction, the left direction and the right direction, and pixel values to be supplemented, thereby realizing accurate edge supplementing of the video image blocks.
for example, when the size of the preset largest coding block is that the length and the width are 64 pixels, and the size of the smallest coding block is that the length and the width are 8 pixels, for an image whose frame length and the width are 474 pixels, the image may be divided into 9 video image blocks whose length and the width are 158 pixels, as shown in fig. 3, for a schematic diagram of video cropping and edge supplement provided by the embodiment of the present application, a difference value may be obtained through calculation, where the difference value is 2 pixels on the right side and 2 pixels on the upper side of the video image block, and then 2 pixels may be added to each of the upper side and the right side of the video image block whose length and width are 158 pixels for edge supplement.
Optionally, after the video image block is subjected to edge filling to obtain the target video image block, the method further includes:
the method comprises the steps of firstly, encoding a target video image block, wherein the encoded target video image block comprises an integer number of minimum encoding blocks obtained by encoding after the target video image block is divided.
In the embodiment of the application, a video sending end can divide a target video image block obtained after edge supplement into an integer number of minimum coding blocks to be transmitted; the metadata information corresponding to the minimum coding block to be transmitted comprises: the first preset mark and the edge supplement data. And then, coding an integer number of minimum coding blocks to be transmitted according to the coding mode of the minimum coding block to obtain a coded target video image block.
And step two, sending the encoded target video image block to a video receiving end.
According to the video processing method provided by the embodiment of the invention, the target video image blocks are divided, so that the target video image blocks are prevented from being directly coded, the coding difficulty is reduced, and the calculated amount in the coding process is reduced. The target video image blocks are divided into an integer number of minimum coding blocks to be coded, so that the target video image blocks with different sizes, namely different resolutions are coded according to the coding mode of the minimum coding blocks, and code stream splicing of the target video image blocks with any resolution is realized.
The following describes in detail a video processing method provided in this embodiment with reference to specific embodiments, which is applied to a video receiving end, and as shown in fig. 2, the specific steps are as follows:
Step 201, receiving encoded target video image blocks sent by a video sending end, wherein the encoded target video image blocks include an integer number of minimum encoding blocks obtained by encoding after the target video image blocks are divided.
in the embodiment of the application, the video receiving end can receive the encoded target video image blocks sent by the video sending end, that is, the encoded target video image blocks are the integer number of minimum encoding blocks sent by the video sending end. In the embodiment of the application, the target video image blocks are divided, so that the target video image blocks are prevented from being directly coded, the coding difficulty is reduced, and the calculated amount in the coding process is reduced.
step 202, decoding and splicing the encoded target video image blocks to obtain spliced target video image blocks.
In the embodiment of the application, the video node end can decode and splice the encoded target video image blocks, that is, decode and splice the encoded integer number of minimum encoding blocks to obtain the spliced target video image blocks. Because the target video image block is divided, the encoded minimum encoding blocks and the encoded maximum encoding blocks can be decoded during decoding, so that the target video image block is prevented from being decoded, decoding difficulty is reduced, and the calculation amount in the encoding process is reduced. And then splicing the decoded target video image blocks to obtain spliced target video image blocks.
Step 203, determining whether a first preset mark is contained in metadata information corresponding to the spliced target video image block, where the first preset mark indicates that the spliced target video image block is subjected to edge filling according to the size of the minimum coding block.
In the embodiment of the application, the video receiving end can judge whether the target video image block is subjected to edge supplement according to whether the metadata information corresponding to the spliced target video image block contains the first preset mark. For example, when the attribute value tile _ conformance _ window _ flag is added as the first preset flag, whether the video image block needs to be cropped according to the size of the minimum coding block may be determined according to the value of the attribute value tile _ conformance _ window _ flag.
step 204, if the spliced target video image block contains a first preset mark, acquiring edge supplement data in metadata information of the spliced target video image block; wherein the edge-filling data comprises a minimum integer and a difference, the minimum integer being the minimum number of the spliced target video image blocks to be supplemented into the smallest coding blocks capable of being divided into an integer, the difference representing the supplemented size of the spliced target video image blocks.
In this embodiment, the video receiving end may obtain corresponding edge supplementing data in the metadata information corresponding to the target video image block when the spliced target video image block contains the first preset mark, where the edge supplementing data includes a minimum integer and a difference value. For example, when the video receiving end receives the attribute value tile _ conformance _ window _ flag as 1, the minimum integer corresponding to the target video image block is 400, where the length and the width are 20 minimum coding blocks respectively, and the difference value corresponding to the target video image block is 2 pixels on the right side and 2 pixels on the top side.
The first preset mark contained in the target video image block can be used for indicating that the video image block is subjected to edge supplement according to the size of the minimum coding block, and a video receiving end can directly judge whether the coded target video image block needs to be cut according to the first preset mark when receiving the coded target video image block.
And step 205, according to the edge supplement data, cutting the spliced target video image block to obtain a video image block.
According to the video processing method provided by the embodiment of the invention, the edge supplementing data is directly read, the corresponding video image block is cut according to the edge supplementing data, the calculated amount in the cutting process is reduced, the video image block at the corresponding position is cut according to the video image block supplemented in the supplementing data, and the video image block before edge supplementing can be accurately restored to obtain the video image block.
Specifically, the specific process of clipping the spliced target video image blocks may include the following steps:
Step one, calculating the size of the spliced target video image block according to the minimum integer and the size of the minimum coding block.
In the embodiment of the application, the video receiving end can obtain the size of the spliced target video image block according to the minimum integer and the size of the minimum coding block. For example, the video receiving end may calculate the size of the target video image block to be 160 pixels each in length and width according to the size of the minimum coding blocks being 8 pixels each in length and width and the minimum integer of the obtained corresponding target video image block being 400, where each of the length and width is 20 minimum coding blocks.
And step two, cutting out the video image block part correspondingly represented by the difference value in the target video image block according to the difference value and the size of the spliced target video image block to obtain the video image block.
according to the video processing method provided by the embodiment of the invention, the size of the target video image block can be obtained according to the minimum integer; according to the difference, the positions and the number of the supplemented video image blocks can be obtained; and according to the size and the difference of the target video image block, cutting the video image block corresponding to the difference in the target video image block, accurately restoring the video image block before edge supplement to obtain the video image block, and simultaneously cutting according to the edge supplement data, so that the cutting data is prevented from being calculated during cutting, and the calculation amount during cutting is reduced.
In the embodiment of the application, the video receiving end can cut out the video image block part correspondingly represented by the difference value in the target video image block according to the difference value and the size of the target video image block. For example, as shown in fig. 3, for a schematic diagram of video cropping and edge-filling provided by the embodiment of the present application, a video receiving end obtains a difference value of a target video image block that is 2 pixels on the right side and 2 pixels on the upper side, and the size of the target video image block obtained by calculation is 160 pixels in length and width, so that the video receiving end can crop video image block portions of 2 pixels on the right side and the upper side of the target video image block, respectively.
Corresponding to the method applied to the video sending end, an embodiment of the present application further provides a video processing apparatus, which is applied to the video sending end, and as shown in fig. 4, the apparatus includes:
The obtaining module 401 is configured to obtain a video image block to be processed included in a target video.
a first determining module 402, configured to determine whether a video image block can be divided into an integer number of largest coding blocks according to a preset size of the largest coding block and a size of the video image block.
A second judging module 403, configured to judge whether a video image block can be divided into an integer number of minimum coding blocks according to a preset size of the minimum coding block when the video image block cannot be divided into the integer number of maximum coding blocks, where the size of the minimum coding block is smaller than the size of the maximum coding block.
and an edge filling module 404, configured to fill the video image block with an edge to obtain a target video image block if the video image block cannot be divided into an integer number of minimum coding blocks, where the target video image block can be divided into an integer number of minimum coding blocks.
By applying the device provided by the embodiment of the application, a video sending end can obtain the video image block to be processed contained in a target video, and judge whether the video image block can be divided into an integral number of maximum coding blocks according to the size of a preset maximum coding block and the size of the video image block; if the video image block can not be divided into an integer of maximum coding blocks, judging whether the video image block can be divided into an integer of minimum coding blocks according to the size of a preset minimum coding block, wherein the size of the minimum coding block is smaller than that of the maximum coding block; and if the video image block can not be divided into an integer number of minimum coding blocks, performing edge filling on the video image block to obtain a target video image block, wherein the target video image block can be divided into the integer number of minimum coding blocks. That is, the embodiment of the present invention only needs to perform edge-filling on the video image blocks that cannot be divided into an integer number of largest coding blocks and cannot be divided into an integer number of smallest coding blocks. Thus, the number of video image blocks needing edge supplement is reduced, and the edge supplement calculation amount is reduced. Moreover, because the target video image block obtained by edge filling can be divided into an integer number of minimum codes, namely, the video image block is subjected to edge filling according to the size of the minimum coding block, the pixels needing to be filled in the edge filling process are reduced. Therefore, the difficulty and complexity of code stream splicing are reduced, the code rate is saved, and great convenience is provided for code stream splicing.
The method comprises the steps of judging whether a video image block can be divided into an integer number of maximum coding blocks or not, screening out the video image block which cannot be divided into the integer number of maximum coding blocks, screening out the video image block which can be divided into the integer number of maximum coding blocks, and directly transmitting the video image block. In addition, whether the video image blocks can be divided into the integer number of the minimum coding blocks is judged, so that the video image blocks which can not be divided into the integer number of the minimum coding blocks can be screened out from the video image blocks which can not be divided into the integer number of the maximum coding blocks and subjected to edge supplement, and the video image blocks which can be divided into the integer number of the minimum coding blocks can be screened out and directly transmitted. Therefore, the number of the video image blocks needing to be supplemented and cut is reduced, the number of the video image blocks needing to be subjected to edge supplement can be reduced, and the edge supplement calculation amount is reduced.
Optionally, the trimming module includes:
The first adding unit is used for adding a first preset mark in the metadata information of the video image block, wherein the first preset mark indicates that the video image block is subjected to edge filling according to the size of the minimum coding block.
and the computing unit is used for computing the edge supplementing data according to the size of the video image block and the size of the minimum coding block.
and a second adding unit configured to add the edge supplement data to the metadata information.
And the supplement unit is used for supplementing the video image blocks according to the edge supplement data to obtain the target video image blocks.
Optionally, the computing unit is specifically configured to:
The video image block is supplemented by a minimum integer number that can be divided into an integer number of minimum coding blocks is calculated according to the size of the video image block and the size of the minimum coding block.
And acquiring a difference value according to the sizes of the video image block and the minimum integer minimum coding block, wherein the difference value represents the size of the video image block needing to be supplemented.
optionally, as shown in fig. 6, the apparatus further includes:
And an encoding module 405, configured to encode the target video image block after the target video image block is obtained by edge-filling the video image block, where the encoded target video image block includes an integer number of minimum encoding blocks obtained by encoding after the target video image block is divided.
And the transmission module 406 is configured to send the encoded target video image block to a video receiving end.
Corresponding to the method applied to the video receiving end, an embodiment of the present application further provides a video processing apparatus applied to the video receiving end, as shown in fig. 5, the apparatus includes:
The receiving module 501 is configured to receive an encoded target video image block sent by a video sending end, where the encoded target video image block includes an integer number of minimum encoding blocks obtained by encoding after the target video image block is divided.
The decoding module 502 is configured to decode and splice the encoded target video image blocks to obtain spliced target video image blocks.
A third determining module 503, configured to determine whether metadata information corresponding to the spliced target video image block contains a first preset flag; wherein the first preset mark indicates that the spliced target video image block is edge-repaired according to the size of the minimum coding block.
A second obtaining module 504, configured to obtain edge supplement data in metadata information of a spliced target video image block when the spliced target video image block contains the first preset flag, where the edge supplement data includes a minimum integer and a difference value, where the minimum integer is a minimum number of minimum coding blocks into which the spliced target video image block is supplemented and the difference value represents a size supplemented by the spliced target video image block.
and the cutting module 505 is configured to cut the spliced target video image block according to the edge supplement data to obtain a video image block.
optionally, the cutting module is specifically configured to:
and calculating the size of the spliced target video image block according to the minimum integer and the size of the minimum coding block.
And cutting out the video image block part correspondingly represented by the difference value in the spliced target video image blocks according to the difference value and the size of the spliced target video image blocks to obtain the video image blocks.
In the embodiment of the present invention, a video receiving end may receive an encoded target video image block sent by a video sending end, where the encoded target video image block includes an integer number of minimum encoding blocks obtained by encoding after the target video image block is divided. And then decoding and splicing the encoded target video image blocks to obtain spliced target video image blocks. Whether the metadata information corresponding to the target video image block contains a first preset mark or not can be judged, wherein the first preset mark indicates that the target video image block is subjected to edge supplement according to the size of the minimum coding block. If the target video image block contains the first preset mark, edge supplementing data in metadata information of the target video image block is obtained, wherein the edge supplementing data comprises a minimum integer and a difference value, and the minimum integer is the minimum number of the target video image block which is supplemented into the minimum coding blocks which can be divided into an integer; the difference value represents the supplemented size of the target video image block. And cutting the target video image block according to the edge supplementing data to obtain a video image block. By identifying the first preset identification, whether the target video image block is subjected to edge supplement can be quickly judged, whether the target video image block needs to be cut is further judged, and judgment and calculation are avoided in the cutting process. And then, the edge supplementing data of the target video image block to be cut is directly read, so that the cutting data is prevented from being calculated again in the cutting process, the calculated amount in the cutting process is reduced, and meanwhile, the target video image block is cut according to the edge supplementing data, so that the video image block can be accurately obtained.
the embodiment of the present application further provides an electronic device for video processing, as shown in fig. 7, which includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete communication with each other through the communication bus 704,
A memory 703 for storing a computer program;
The processor 701 is configured to implement the method steps in any of the above-described method embodiments of video processing when executing the program stored in the memory 703.
The communication bus mentioned in the network device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
the communication interface is used for communication between the network device and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, or discrete hardware components.
an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when being executed by a processor, the computer program implements the method steps in any of the above-mentioned method embodiments of video processing.
Embodiments of the present application further provide a computer program product comprising instructions that, when run on a computer, cause the computer to perform the method steps of any of the above-described method embodiments of video processing.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some of the description of the method embodiments.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (14)

1. a video processing method is applied to a video sending end, and the method comprises the following steps:
Acquiring a video image block to be processed contained in a target video;
judging whether the video image block can be divided into an integral number of maximum coding blocks according to the size of a preset maximum coding block and the size of the video image block;
If the video image block can not be divided into an integer of maximum coding blocks, judging whether the video image block can be divided into an integer of minimum coding blocks according to the size of a preset minimum coding block, wherein the size of the minimum coding block is smaller than that of the maximum coding block;
And if the video image block can not be divided into an integer of minimum coding blocks, performing edge filling on the video image block to obtain a target video image block, wherein the target video image block can be divided into an integer of minimum coding blocks.
2. The method according to claim 1, wherein the step of bordering the video image block to obtain the target video image block comprises:
Adding a first preset mark in metadata information of the video image block, wherein the first preset mark indicates that the video image block is subjected to edge filling according to the size of the minimum coding block;
calculating edge supplementing data according to the size of the video image block and the size of the minimum coding block; adding the edge supplementing data in the metadata information;
And supplementing the video image blocks according to the edge supplementing data to obtain the target video image blocks.
3. the method of claim 2, wherein the computing the edge data comprises:
Calculating a minimum integer number by which the video image block is complemented into an integer number of minimum coding blocks according to the size of the video image block and the size of the minimum coding block;
And acquiring a difference value according to the sizes of the video image blocks and the minimum integer minimum coding blocks, wherein the difference value represents the size of the video image block needing to be supplemented.
4. The method according to claim 1, wherein after the step of bordering the video image block to obtain the target video image block, further comprising:
Encoding the target video image blocks, wherein the encoded target video image blocks comprise an integer number of minimum encoding blocks obtained by encoding after the target video image blocks are divided;
And sending the encoded target video image block to a video receiving end.
5. A method for video processing, wherein the method is applied to a video receiving end, and the method comprises:
Receiving encoded target video image blocks sent by a video sending end, wherein the encoded target video image blocks comprise an integer number of minimum encoding blocks obtained by encoding after the target video image blocks are divided;
Decoding and splicing the encoded target video image blocks to obtain spliced target video image blocks;
judging whether metadata information corresponding to the spliced target video image blocks contains a first preset mark or not; the first preset mark indicates that the spliced target video image block is subjected to edge supplement according to the size of the minimum coding block;
If the spliced target video image blocks contain the first preset marks, acquiring edge supplementing data in metadata information of the spliced target video image blocks; the edge supplementing data comprises a minimum integer and a difference value, the minimum integer is the minimum number of the spliced target video image blocks which can be divided into an integer number of minimum coding blocks, and the difference value represents the supplemented size of the spliced target video image blocks;
and cutting the spliced target video image blocks according to the edge supplementing data to obtain video image blocks.
6. The method of claim 5, wherein the cropping the stitched target video tiles to obtain video tiles comprises:
calculating the size of the spliced target video image block according to the minimum integer and the size of the minimum coding block;
and cutting out the video image block part correspondingly represented by the difference value in the spliced target video image blocks according to the difference value and the size of the spliced target video image blocks to obtain the video image blocks.
7. An apparatus for video processing, wherein the apparatus is applied to a video transmitting end, and the apparatus comprises:
The acquisition module is used for acquiring a video image block to be processed contained in a target video;
The first judgment module is used for judging whether the video image block can be divided into an integral number of maximum coding blocks according to the size of a preset maximum coding block and the size of the video image block;
A second judging module, configured to, when the video image block cannot be divided into an integer number of largest coding blocks, judge whether the video image block can be divided into an integer number of smallest coding blocks according to a size of a preset smallest coding block, where the size of the smallest coding block is smaller than the size of the largest coding block;
And the edge supplementing module is used for supplementing edges to the video image blocks to obtain target video image blocks under the condition that the video image blocks cannot be divided into an integer of minimum coding blocks, and the target video image blocks can be divided into an integer of minimum coding blocks.
8. The apparatus of claim 7, wherein the hemming module comprises:
a first adding unit, configured to add a first preset flag to metadata information of the video image block, where the first preset flag indicates that the video image block is subjected to edge padding according to the size of the minimum coding block;
The computing unit is used for computing the edge supplementing data according to the size of the video image block and the size of the minimum coding block;
a second adding unit configured to add the edge supplement data to the metadata information;
And the supplementing unit is used for supplementing the video image blocks according to the edge supplementing data to obtain the target video image blocks.
9. the apparatus according to claim 8, wherein the computing unit is specifically configured to:
Calculating a minimum integer number by which the video image block is complemented into an integer number of minimum coding blocks according to the size of the video image block and the size of the minimum coding block;
and acquiring a difference value according to the sizes of the video image blocks and the minimum integer minimum coding blocks, wherein the difference value represents the size of the video image block needing to be supplemented.
10. The apparatus of claim 7, further comprising:
The encoding module is used for encoding the target video image blocks after the video image blocks are subjected to edge filling to obtain the target video image blocks, wherein the encoded target video image blocks comprise an integer number of minimum encoding blocks obtained by encoding after the target video image blocks are divided;
And the transmission module is used for transmitting the encoded target video image block to a video receiving end.
11. An apparatus for video processing, wherein the apparatus is applied to a video receiving end, and the apparatus comprises:
the receiving module is used for receiving encoded target video image blocks sent by a video sending end, wherein the encoded target video image blocks comprise an integer number of minimum encoding blocks obtained by encoding after the target video image blocks are divided;
the decoding module is used for decoding and splicing the encoded target video image blocks to obtain spliced target video image blocks;
the third judging module is used for judging whether the metadata information corresponding to the spliced target video image blocks contains a first preset mark or not; the first preset mark indicates that the spliced target video image block is subjected to edge supplement according to the size of the minimum coding block;
A second obtaining module, configured to obtain edge supplement data in metadata information of the spliced target video image blocks when the spliced target video image blocks contain the first preset flag, where the edge supplement data includes a minimum integer and a difference value, and the minimum integer is a minimum number of minimum coding blocks into which the spliced target video image blocks are supplemented; the difference value represents the supplemented size of the spliced target video image block;
and the cutting module is used for cutting the spliced target video image blocks according to the edge supplementing data to obtain video image blocks.
12. The apparatus of claim 11, wherein the cropping module is specifically configured to:
Calculating the size of the spliced target video image block according to the minimum integer and the size of the minimum coding block;
and cutting out the video image block part correspondingly represented by the difference value in the spliced target video image blocks according to the difference value and the size of the spliced target video image blocks to obtain the video image blocks.
13. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 4 or claims 5 to 6 when executing a program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any of the claims 1-4 or claims 5-6.
CN201910866614.0A 2019-09-12 2019-09-12 Video processing method and device Pending CN110581995A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910866614.0A CN110581995A (en) 2019-09-12 2019-09-12 Video processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910866614.0A CN110581995A (en) 2019-09-12 2019-09-12 Video processing method and device

Publications (1)

Publication Number Publication Date
CN110581995A true CN110581995A (en) 2019-12-17

Family

ID=68812886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910866614.0A Pending CN110581995A (en) 2019-09-12 2019-09-12 Video processing method and device

Country Status (1)

Country Link
CN (1) CN110581995A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111862033A (en) * 2020-07-15 2020-10-30 上海联影医疗科技有限公司 Medical image processing method, device, image processing equipment and storage medium
CN112367521A (en) * 2020-10-27 2021-02-12 广州华多网络科技有限公司 Display screen content sharing method and device, computer equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383972A (en) * 2008-09-28 2009-03-11 北京航空航天大学 Remote sensed image compression method based on space prediction and transformation
CN104410857A (en) * 2014-12-26 2015-03-11 广东威创视讯科技股份有限公司 Image display control method and related device
CN104935935A (en) * 2009-10-21 2015-09-23 Sk电信有限公司 Video encoding method, video decoding method and video decoding device
CN105027565A (en) * 2013-04-02 2015-11-04 明达半导体股份有限公司 Method and apparatus for processing video
CN106797467A (en) * 2014-06-27 2017-05-31 三星电子株式会社 Video coding and decoding method and apparatus for image completion region
CN107241302A (en) * 2016-03-29 2017-10-10 展讯通信(上海)有限公司 Image data transfer method, device and terminal
CN108200436A (en) * 2017-12-29 2018-06-22 华中科技大学 A kind of lossless compression method towards alignment scanned infrared imaging heterogeneity residual error
US20190007702A1 (en) * 2016-01-19 2019-01-03 Peking University Shenzhen Graduate School Methods and devices for panoramic video coding and decoding based on multi-mode boundary fill
US20190141319A1 (en) * 2016-04-29 2019-05-09 Intellectual Discovery Co., Ltd. Method and apparatus for encoding/decoding video signal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383972A (en) * 2008-09-28 2009-03-11 北京航空航天大学 Remote sensed image compression method based on space prediction and transformation
CN104935935A (en) * 2009-10-21 2015-09-23 Sk电信有限公司 Video encoding method, video decoding method and video decoding device
CN105027565A (en) * 2013-04-02 2015-11-04 明达半导体股份有限公司 Method and apparatus for processing video
CN106797467A (en) * 2014-06-27 2017-05-31 三星电子株式会社 Video coding and decoding method and apparatus for image completion region
CN104410857A (en) * 2014-12-26 2015-03-11 广东威创视讯科技股份有限公司 Image display control method and related device
US20190007702A1 (en) * 2016-01-19 2019-01-03 Peking University Shenzhen Graduate School Methods and devices for panoramic video coding and decoding based on multi-mode boundary fill
CN107241302A (en) * 2016-03-29 2017-10-10 展讯通信(上海)有限公司 Image data transfer method, device and terminal
US20190141319A1 (en) * 2016-04-29 2019-05-09 Intellectual Discovery Co., Ltd. Method and apparatus for encoding/decoding video signal
CN108200436A (en) * 2017-12-29 2018-06-22 华中科技大学 A kind of lossless compression method towards alignment scanned infrared imaging heterogeneity residual error

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111862033A (en) * 2020-07-15 2020-10-30 上海联影医疗科技有限公司 Medical image processing method, device, image processing equipment and storage medium
CN111862033B (en) * 2020-07-15 2024-02-20 上海联影医疗科技股份有限公司 Medical image processing method, medical image processing device, medical image processing apparatus, and storage medium
CN112367521A (en) * 2020-10-27 2021-02-12 广州华多网络科技有限公司 Display screen content sharing method and device, computer equipment and storage medium
CN112367521B (en) * 2020-10-27 2022-08-19 广州华多网络科技有限公司 Display screen content sharing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112085739B (en) Training method, device and equipment of semantic segmentation model based on weak supervision
CN110958024B (en) Method and device for encoding serial data, embedded equipment and communication system
CN110896477B (en) Video coding method, device, coding equipment and storage medium
CN110971898B (en) Point cloud coding and decoding method and coder-decoder
CN110581995A (en) Video processing method and device
EP3509305A1 (en) Intra-prediction video coding method and device
CN110166765B (en) Screen-patterned detection method, electronic device and readable storage medium
CN109963167B (en) Audio and video processing method, server, device and storage medium
CN114339248A (en) Video transcoding and video display method and device and electronic equipment
CN113055455A (en) File uploading method and equipment
CN112862842B (en) Image data processing method and device, storage medium and electronic device
CN110324629B (en) Image transcoding method and device and electronic equipment
CN112270356A (en) Image identification method and device and electronic equipment
CN106790466B (en) Method, server and terminal equipment for pushing
CN108683915B (en) Method and device for writing dQP value and electronic equipment
US20190166373A1 (en) Image encoding/decoding method and apparatus and image processing equipment
CN107682020B (en) Encoding and decoding method and device based on Turbo code
US11558625B2 (en) Method for generating residual image of multi-view video and apparatus using the same
CN111127478B (en) View block segmentation method and device
CN111476853B (en) Method, equipment and system for encoding and decoding text image
CN109544664B (en) Animation data processing method and device, electronic equipment and readable storage medium
CN107277650B (en) Video file cutting method and device
CN117452121B (en) Method, device and computer storage medium for testing electronic product through code scanner
CN113989511B (en) Image semantic segmentation method and device, electronic equipment and storage medium
CN113068043B (en) PNG image compression method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191217

RJ01 Rejection of invention patent application after publication