CN113992981B - Video image processing method and device - Google Patents
Video image processing method and device Download PDFInfo
- Publication number
- CN113992981B CN113992981B CN202111226571.3A CN202111226571A CN113992981B CN 113992981 B CN113992981 B CN 113992981B CN 202111226571 A CN202111226571 A CN 202111226571A CN 113992981 B CN113992981 B CN 113992981B
- Authority
- CN
- China
- Prior art keywords
- layer
- rendering
- video image
- tree
- layer rendering
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440218—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440227—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by decomposing into layers, e.g. base layer and one or more enhancement layers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47205—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
- Image Generation (AREA)
Abstract
The disclosure relates to a method and a device for processing video images. The method comprises the following steps: acquiring a video image frame to be processed; performing layer translation according to the video image frames to be processed and layer rendering information to obtain a recursively descending layer rendering tree; performing layer rendering according to the recursion descent layer rendering tree; and outputting the rendering result of the layer rendering. According to the processing method and the processing device for the video image, the track type layer rendering tree of the video image frame is translated into the recursion descent type layer rendering tree, and layer rendering is carried out according to the recursion descent type layer rendering tree, so that the rendering efficiency and the rendering effect of the video image frame are improved.
Description
Technical Field
The present disclosure relates generally to the field of computer technology. More particularly, the present disclosure relates to a method and apparatus for processing video images.
Background
Today, where short videos are increasingly active, more and more people are involved in the industry of content authoring. Many factories in the market provide short video editing and synthesizing capability, but the existing video rendering architecture does not solve the pain points of high learning and using cost, slow video rendering, serious heating, high synthesis process resource occupation and the like on the user side.
In addition, the layer structure is taken as a basic structure of the rendering architecture, and the rendering architecture in the prior art only treats the layer tree as an individual, but ignores the relationship between layers, for example, the complete restoration of a complex special effect on the user side, and the rendering architecture does not consider the context between each layer to optimize the rendering performance in the restoration process, so that the rendering effect is poor.
Therefore, how to obtain a video image processing method with high rendering efficiency and good rendering effect is a problem to be solved in the prior art.
Disclosure of Invention
In order to at least partially solve the technical problems mentioned in the background art, the scheme of the disclosure provides a video image processing method and a video image processing device.
According to a first aspect of the present disclosure, the present disclosure provides a method for processing a video image, wherein the method includes: acquiring a video image frame to be processed; performing layer translation according to the video image frames to be processed and layer rendering information to obtain a recursively descending layer rendering tree; performing layer rendering according to the recursion descent layer rendering tree; and outputting the rendering result of the layer rendering.
Optionally, the performing layer translation according to the video image frame to be processed and the layer rendering information, obtaining the recursively descending layer rendering tree includes: extracting all layers of the video image frame to be processed according to a track type layer rendering tree of the video image frame to be processed; performing data conversion according to all layers of the video image frame to be processed and the layer rendering information to obtain a recursion descent layer; and organizing the recursively-descending layer into the recursively-descending layer rendering tree.
Optionally, the organizing the recursively-descended layers into the recursively-descended layer rendering tree includes: and analyzing the recursion descent type layers, merging the layers which can be uniformly rendered, discarding invalid layers, and obtaining the recursion descent type layer rendering tree.
Optionally, the performing layer rendering according to the recursively descent layer rendering tree includes: performing rendering necessity check on the recursion descent type layer rendering tree; and performing layer rendering on the recursion descent layer rendering tree according to the checking result of the rendering necessity check.
Optionally, the performing the rendering necessity check on the recursively-descending layer rendering tree includes: comparing the layer information of the recursively-descending layer rendering tree of the video image frame to be processed with the layer information of the recursively-descending layer rendering tree of the video image frame of the previous frame; and/or judging whether the external dependent file required by the layer rendering is ready.
Optionally, performing layer rendering on the recursive descent layer rendering tree according to the checking result of the rendering necessity check includes: if the layer information of the recursion descent type layer rendering tree of the video image frame to be processed and the recursion descent type layer rendering tree of the video image frame of the previous frame are transformed, and the external dependent file required by layer rendering is ready, the recursion descent type layer rendering tree is unfolded, and the layer by layer rendering is performed according to the sequence from bottom to top.
Optionally, the outputting the rendering result of the layer rendering includes: scaling the rendering result in equal proportion according to a preset output size; and/or converting the data format of the rendering result according to a preset output format.
According to a second aspect of the present disclosure, there is provided a processing apparatus for video images, wherein the apparatus comprises: an acquisition module configured to acquire a video image frame to be processed; the translation module is configured to translate the image layer according to the video image frames to be processed and the image layer rendering information, so as to obtain a recursively-descending image layer rendering tree; a rendering module configured for layer rendering according to the recursively descended layer rendering tree; and the output module is configured to output a rendering result of the layer rendering.
Optionally, the translation module is configured to perform layer translation according to the video image frame to be processed and layer rendering information in the following manner to obtain a recursive descent layer rendering tree: extracting all layers of the video image frame to be processed according to a track type layer rendering tree of the video image frame to be processed; performing data conversion according to all layers of the video image frame to be processed and the layer rendering information to obtain a recursion descent layer; and organizing the recursively-descending layer into the recursively-descending layer rendering tree.
Optionally, the translation module is configured to organize the recursively descended layers into the recursively descended layer rendering tree by: and analyzing the recursion descent type layers, merging the layers which can be uniformly rendered, discarding invalid layers, and obtaining the recursion descent type layer rendering tree.
Optionally, the rendering module is configured to perform layer rendering according to the recursive descent layer rendering tree in the following manner: performing rendering necessity check on the recursion descent type layer rendering tree; and performing layer rendering on the recursion descent layer rendering tree according to the checking result of the rendering necessity check.
Optionally, the rendering module is configured to perform a rendering necessity check on the recursive descent layer rendering tree in the following manner: comparing the layer information of the recursively-descending layer rendering tree of the video image frame to be processed with the layer information of the recursively-descending layer rendering tree of the video image frame of the previous frame; and/or judging whether the external dependent file required by the layer rendering is ready.
Optionally, the rendering module is configured to perform layer rendering on the recursive descent layer rendering tree according to a check result of the rendering necessity check in the following manner: if the layer information of the recursion descent type layer rendering tree of the video image frame to be processed and the recursion descent type layer rendering tree of the video image frame of the previous frame are transformed, and the external dependent file required by layer rendering is ready, the recursion descent type layer rendering tree is unfolded, and the layer by layer rendering is performed according to the sequence from bottom to top.
Optionally, the output module is configured to output a rendering result of the layer rendering in the following manner: scaling the rendering result in equal proportion according to a preset output size; and/or converting the data format of the rendering result according to a preset output format.
According to a third aspect of the present disclosure, there is provided an electronic device, wherein the electronic device comprises a memory and a processor, the memory having stored therein a computer program, the processor, when executing the computer program, implementing the method of the first aspect of the present disclosure as described above.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium, wherein the storage medium stores a computer program which, when executed, implements the method of the first aspect of the present disclosure described above.
According to the video image processing method and device, the track type layer rendering tree of the video image frame is translated into the recursion descent type layer rendering tree, and layer rendering is carried out according to the recursion descent type layer rendering tree, so that the rendering efficiency and the rendering effect of the video image frame are improved, and the learning cost of a user side is effectively reduced.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar or corresponding parts and in which:
fig. 1 is a flowchart illustrating a method of processing a video image according to one embodiment of the present disclosure;
fig. 2 is a schematic block diagram illustrating a processing apparatus of a video image according to one embodiment of the present disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The present disclosure provides a method of processing a video image. Referring to fig. 1, fig. 1 is a flowchart illustrating a processing method of a video image according to one embodiment of the present disclosure. As shown in fig. 1, the method includes the following steps S101-S104. Step S101: and acquiring the video image frames to be processed. Step S102: and performing layer translation according to the video image frames to be processed and the layer rendering information to obtain a recursively-descending layer rendering tree. Step S103: and performing layer rendering according to the recursion descent layer rendering tree. Step S104: and outputting the rendering result of the layer rendering.
According to the video image processing method, a double-layer rendering tree structure is adopted, and the upper layer is a track type layer rendering tree structure so as to provide an audio and video track type layer interface for a user side, so that the learning cost of the user is reduced; the lower layer is a result of a recursion descent type layer rendering tree, and layer rendering is carried out through the recursion descent type layer rendering tree, so that the rendering efficiency and the rendering effect of video image frames are effectively improved; and the rendering tree translation layer is adopted between the double-layer rendering tree structures to perform the layer tree conversion work of supporting the upward and downward.
In step S101, a video image frame to be processed may be acquired.
According to an embodiment of the present disclosure, in order to process a video image, first a video image frame to be processed should be acquired. The video image frames to be processed may be acquired by any suitable means, such as by video decoding, or from a gallery, or by a designer specially designed, etc.
In step S102, layer translation may be performed according to the video image frame to be processed and layer rendering information, so as to obtain a recursively descent layer rendering tree.
Preferably, the performing layer translation according to the video image frame to be processed and the layer rendering information, obtaining the recursive descent layer rendering tree includes: extracting all layers of the video image frame to be processed according to a track type layer rendering tree of the video image frame to be processed; performing data conversion according to all layers of the video image frame to be processed and the layer rendering information to obtain a recursion descent layer; and organizing the recursively-descending layer into the recursively-descending layer rendering tree.
According to embodiments of the present disclosure, a track-type layer rendering tree refers to a rendering tree structure composed of multiple video track levels, where video tracks are typically used to place video material, presenting different visual effects through a combination of multiple/multi-level video tracks and the setting of objects at different time periods in different tracks. Layer rendering information refers to all necessary information related to each layer rendering of a video image frame to be processed, including, but not limited to, one or more of the following: external dependent files such as names, properties, storage paths and the like, layer transformation information, related information such as special effects, masks, filters and the like, layer father-son relationship information, rendering context information and the like; the external dependent file refers to a file required for rendering each layer of the video image frame to be processed, and can be one or more of video pictures, characters and audio. The recursion descent type layers refer to repeatedly nested layers based on presynthesis, wherein the most basic function of presynthesis is to edit materials again, in order to facilitate management, some layers can be combined into presynthesis, so that unified effect can be added to presynthesis, unified management and control can be performed, and complicated operation of adding the same effect to each layer is avoided; meanwhile, the layers in the pre-synthesis can be replaced, added or deleted at will, so that the original material can be modified for the second time conveniently; in addition, the pre-synthesis may be used multiple times as a material. The recursive descent layer rendering tree refers to a tree layer rendering relationship obtained by analyzing the recursive descent layer.
Specifically, the method for obtaining the recursive descent layer rendering tree of the present embodiment includes: traversing a track type image layer rendering tree of the video image frame to be processed, and extracting all image layers of the video image frame to be processed; creating a layer information array according to materials on which each layer of the video image frame to be processed depends, the associated information of the materials and layer rendering information, wherein the layer information array is used for recording information of track type layers, including but not limited to: layer dependent material/animation information, layer transformation information, layer father-son relationship, mask, special effect and other information; in this embodiment, layer information may be created for each dependent material, added to a layer information array, and a track layer is added to the layer information array, so as to construct a layer information array; a pre-composite layer may then be created; then traversing the layer information array, creating a track type descending layer according to each layer information, specifically converting each layer information into the information of the corresponding track type descending layer, including adding layer transformation information, a filter, special effects, transition, tracing and other processing information, and adding the layer into the created pre-synthesized layer to obtain the track type descending layer; preferably, if the layer information includes information such as special effects, track mask layers, transition layers, etc., a pre-synthesized layer for placing derivative layers can be created again, for example, if the layer information includes special effects information, a pre-synthesized layer for storing derivative special effects, that is, an original layer and a special effects layer, can be created again, and the degree of special effects can be controlled by superposition of transparency. After the recursion descent formula layer is obtained, the recursion descent formula layer can be organized into a recursion descent formula layer rendering tree according to the layer relationship, such as the layer parent-child relationship.
Further preferably, the organizing the recursively-dropped layers into the recursively-dropped layer rendering tree includes: and analyzing the recursion descent type layers, merging the layers which can be uniformly rendered, discarding invalid layers, and obtaining the recursion descent type layer rendering tree.
According to embodiments of the present disclosure, invalid layers refer to layers that are invisible, 0 wide, 0 transparent, and/or as track masks, such layers are not typically shown in the results, and thus, when recursively downcast layers are organized into recursively downcast layer rendering trees, such layers may be temporarily discarded to reduce the steps of subsequent layer rendering. In addition, the layers which can be rendered uniformly are combined, so that the steps of subsequent layer rendering can be effectively reduced, and the layer rendering efficiency is improved.
In step S103, layer rendering may be performed according to the recursive descent layer rendering tree.
Preferably, the performing layer rendering according to the recursively descent layer rendering tree includes: performing rendering necessity check on the recursion descent type layer rendering tree; and performing layer rendering on the recursion descent layer rendering tree according to the checking result of the rendering necessity check.
According to the embodiment of the disclosure, when the layer rendering is performed, firstly, the recursive descent layer rendering tree is subjected to the rendering necessity check, so that only the video image frames meeting certain conditions are subjected to the layer rendering, and the layer rendering efficiency is improved.
Further preferably, the performing a render necessity check on the recursive descent layer rendering tree includes: comparing the layer information of the recursion descent type layer rendering tree of the video image frame to be processed with the layer information of the recursion descent type layer rendering tree of the video image frame of the previous frame; and/or judging whether the external dependent file required by the layer rendering is ready. The performing layer rendering on the recursively-descending layer rendering tree according to the checking result of the rendering necessity check includes: if the layer information of the recursion descent type layer rendering tree of the video image frame to be processed and the recursion descent type layer rendering tree of the video image frame of the previous frame are transformed, and the external dependent file required by layer rendering is ready, the recursion descent type layer rendering tree is unfolded, and the layer by layer rendering is performed according to the sequence from bottom to top.
Specifically, if the current video image frame to be processed is not the first frame, traversing a recursion descent type image layer rendering tree of the current video image frame to be processed, comparing the recursion descent type image layer rendering tree with image layer information of a recursion descent type image layer rendering tree of the video image frame of the previous frame, and if the recursion descent type image layer rendering tree is consistent with the image layer information of the recursion descent type image layer rendering tree of the previous frame, skipping the current rendering; if the two are inconsistent, judging whether external dependent files required by all layers of the current video image frame to be processed are ready for layer rendering, and if so, performing layer rendering on the current video image frame to be processed; if not, the layer rendering is skipped. If the current video image frame to be processed is the first frame, only judging whether external dependent files required by all layers of the current video image frame to be processed are ready for layer rendering, and if so, performing layer rendering on the current video image frame to be processed. The readiness means that all external dependent files required by all layers of the video image frame to be processed are loaded when the layers are rendered; the external dependent file may be loaded according to the name and storage path of the external dependent file.
And when the current video image frame to be processed is subjected to layer rendering, the recursion descent type layer rendering tree is unfolded, and layer-by-layer rendering is performed according to the sequence from bottom to top.
Specifically, each layer may include a plurality of different material sources, such as pictures, videos, colors, and the like, when rendering each layer, firstly, acquiring picture content from the material sources, then, applying a mask in the layer to the layer according to a mask relationship between the picture content, and then, using a specified special effect for the layer content according to special effect information; and then the image layer can be subjected to operations such as zooming in, zooming out, rotating and the like according to the image layer transformation information, and the transparency of the image layer can be adjusted. The rendering of each layer is performed according to actual needs, and may include, but not limited to, the above-mentioned rendering steps/contents, and if a layer does not need special rendering and is consistent with the pre-synthesis size of the previous stage, the rendering of the layer may be omitted, so as to improve the efficiency of the layer rendering.
For the case of an inter-layer mask, inter-layer masking processing may be performed according to the inter-layer mask relationship, and the content of the layers may be further clipped. Wherein the inter-layer mask can only act on the lower layer, i.e. the topmost layer does not involve an inter-layer mask; the masking algorithm may employ related algorithms in the prior art, including Alpha (transparency), luma (brightness), invertAlpha (inverse transparency), invertLuma (inverse brightness), and the like; furthermore, the mask layer typically does not participate in the layer-stacked rendering. The inter-layer mask in the embodiment of the disclosure refers to an upper layer as a mask for a lower layer, so as to achieve the effect of excluding the contents of the lower layer outside the upper layer.
Finally, the current layer and the layer below the current layer can be mixed according to the father-son relationship of the layers, and the transparency of the current layer (upper layer) and/or the layer below the current layer (lower layer) can be considered in the process of mixing the layers, so that wrong colors can be prevented from being mixed in semitransparent or completely invisible areas. The inter-layer mixing only occurs when the upper layer is overlapped to the lower layer, and if the current layer is at the bottommost layer or the current layer is a track mask, the inter-layer mixing is skipped, so that one rendering process is saved, and the rendering efficiency of the layers is improved. And after the top layer and the lower layer are mixed, the rendering flow of the layer rendering is finished.
According to the embodiment of the disclosure, in order to improve the layer rendering efficiency, when the recursively-descending layer is organized into the recursively-descending layer rendering tree, layers which can be uniformly rendered therein are combined, and therefore, in the layer rendering process, multi-layer rendering is involved. Specifically, the multi-layer rendering of the present disclosure takes as an entry from the top-most pre-synthesis of a recursively-descended layer rendering tree, traverses layers contained in the pre-synthesis, creates a context that receives a rendering result, and then renders the layers to a context that preserves the rendering result. The camera layer is used as a provider of a coordinate system and does not participate in rendering; if the layer is not displayed or its lifecycle has passed, then skip and not render.
In step S104, a rendering result of the layer rendering may be output.
According to the embodiment of the disclosure, the rendering result of the layer rendering is output, and can be output to a screen or stored as a video file according to the need.
Preferably, the outputting the rendering result of the layer rendering includes: scaling the rendering result in equal proportion according to a preset output size; and/or converting the data format of the rendering result according to a preset output format.
Specifically, scaling the picture obtained by rendering the picture layer in an equal proportion according to the output size actually required; in addition, some of the encoders of the platforms have requirements on the data format of the picture obtained by layer rendering, and the requirements of the encoders of different platforms on the data format of the picture may be different, so that the rendering result may be subjected to data format conversion according to the required data format. Embodiments of the present disclosure preferably combine the above two operations into one step for output, thereby reducing one rendering process and eventually completing the rendering process of the entire link.
The processing method of the video image adopts a double-layer rendering tree structure, and a user can realize a high-quality layer rendering effect through a track-type layer interface, so that the learning and use cost of the user is saved; in addition, the recursive descent type layer rendering tree is adopted to conduct layer rendering, layer information of the whole rendering tree is fully collected, and layer rendering processes are optimized by combining front and back frame layer information change, layer mask relation, layer transformation information, layer context information (comprising layer father-son relation information, rendering context information and the like) and the like, so that layer rendering efficiency is effectively improved.
The disclosure also provides a processing device of the video image. The apparatus is for performing the steps in the embodiment of the method of processing a video image described above in connection with fig. 1.
Referring to fig. 2, fig. 2 is a schematic block diagram illustrating a processing apparatus 100 of a video image according to one embodiment of the present disclosure. The apparatus 100 includes an acquisition module 101, a translation module 102, a rendering module 103, and an output module 104. The acquisition module 101 is configured to acquire video image frames to be processed. The translation module 102 is configured to perform layer translation according to the video image frames to be processed and layer rendering information, so as to obtain a recursively descent layer rendering tree. The rendering module 103 is configured for layer rendering according to the recursive descent layer rendering tree. The output module 104 is configured to output a rendering result of the layer rendering.
According to an embodiment of the disclosure, the translation module 102 is configured to perform layer translation according to the video image frame to be processed and layer rendering information in the following manner to obtain a recursive descent layer rendering tree: extracting all layers of the video image frame to be processed according to a track type layer rendering tree of the video image frame to be processed; performing data conversion according to all layers of the video image frame to be processed and the layer rendering information to obtain a recursion descent layer; and organizing the recursively-descending layer into the recursively-descending layer rendering tree.
According to an embodiment of the present disclosure, the translation module 102 is configured to organize the recursively-descending layers into the recursively-descending layer rendering tree in the following manner: and analyzing the recursion descent type layers, merging the layers which can be uniformly rendered, discarding invalid layers, and obtaining the recursion descent type layer rendering tree.
According to an embodiment of the present disclosure, the rendering module 103 is configured to perform layer rendering according to the recursive descent layer rendering tree in the following manner: performing rendering necessity check on the recursion descent type layer rendering tree; and performing layer rendering on the recursion descent layer rendering tree according to the checking result of the rendering necessity check.
According to an embodiment of the present disclosure, the rendering module 103 is configured to perform a rendering necessity check on the recursive descent layer rendering tree in the following manner: comparing the layer information of the recursively-descending layer rendering tree of the video image frame to be processed with the layer information of the recursively-descending layer rendering tree of the video image frame of the previous frame; and/or judging whether the external dependent file required by the layer rendering is ready.
According to an embodiment of the present disclosure, the rendering module 103 is configured to perform layer rendering on the recursive descent layer rendering tree according to a result of the rendering necessity check in the following manner: if the layer information of the recursion descent type layer rendering tree of the video image frame to be processed and the recursion descent type layer rendering tree of the video image frame of the previous frame are transformed, and the external dependent file required by layer rendering is ready, the recursion descent type layer rendering tree is unfolded, and the layer by layer rendering is performed according to the sequence from bottom to top.
According to an embodiment of the present disclosure, the output module 104 is configured to output a rendering result of the layer rendering in the following manner: scaling the rendering result in equal proportion according to a preset output size; and/or converting the data format of the rendering result according to a preset output format.
It will be appreciated that, with respect to the video image processing apparatus in the embodiment described above with reference to fig. 2, the specific manner in which the respective modules perform the operations has been described in detail in connection with the embodiment of the video image processing method described in fig. 1, and will not be explained in detail here.
The embodiment of the disclosure also provides an electronic device, wherein the electronic device comprises a memory and a processor, the memory stores a computer program, and the processor realizes the following steps when executing the computer program: acquiring a video image frame to be processed; performing layer translation according to the video image frames to be processed and layer rendering information to obtain a recursively descending layer rendering tree; performing layer rendering according to the recursion descent layer rendering tree; and outputting the rendering result of the layer rendering.
It will be appreciated that the steps implemented when the processor executes the computer program are substantially identical to the implementation of the steps in the above-described method, and that the detailed description has been given in relation to the embodiments of the video image processing method, and will not be explained in detail here.
In another aspect, the present disclosure provides a computer readable storage medium, wherein the storage medium stores a computer program that, when executed, performs the steps of: acquiring a video image frame to be processed; performing layer translation according to the video image frames to be processed and layer rendering information to obtain a recursively descending layer rendering tree; performing layer rendering according to the recursion descent layer rendering tree; and outputting the rendering result of the layer rendering.
It will be appreciated that the steps implemented when the processor executes the computer program are substantially identical to the implementation of the steps in the above-described method, and that the detailed description has been given in relation to the embodiments of the video image processing method, and will not be explained in detail here.
The foregoing has described in detail embodiments of the present disclosure, with specific examples being employed herein to illustrate the principles and implementations of the present disclosure, the above examples being provided solely to assist in understanding the methods of the present disclosure and their core ideas; meanwhile, as one of ordinary skill in the art will have variations in the detailed description and the application scope in light of the ideas of the present disclosure, the present disclosure should not be construed as being limited to the above description.
It should be understood that the terms "first" and "second", and the like in the claims, specification and drawings of this disclosure, are used for distinguishing between different objects and not for describing a particular sequential order. The terms "comprises" and "comprising" when used in the specification and claims of this disclosure are taken to specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present disclosure is for the purpose of describing particular embodiments only, and is not intended to be limiting of the disclosure. As used in this disclosure and in the claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the term "and/or" as used in the present disclosure and claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
The foregoing has outlined rather closely the embodiments of the present disclosure, and detailed description of the principles and embodiments of the present disclosure have been presented herein with the application of specific examples, the description of the examples above being merely intended to facilitate an understanding of the method of the present disclosure and its core ideas. Meanwhile, those skilled in the art will recognize that modifications or variations made on the basis of the specific embodiments and application scope of the present disclosure are within the scope of the protection of the present disclosure in light of the ideas of the present disclosure. In view of the foregoing, this description should not be construed as limiting the disclosure.
Claims (16)
1. A method of processing a video image, wherein the method comprises:
acquiring a video image frame to be processed;
performing layer translation according to the video image frames to be processed and layer rendering information to obtain a recursively descending layer rendering tree, wherein the recursively descending layer is a layer which is used for representing repeated nesting based on pre-synthesis;
performing layer rendering according to the recursion descent layer rendering tree;
and outputting the rendering result of the layer rendering.
2. The method for processing a video image according to claim 1, wherein said performing layer translation according to the video image frame to be processed and layer rendering information, obtaining a recursive descent layer rendering tree comprises:
extracting all layers of the video image frame to be processed according to a track-type layer rendering tree of the video image frame to be processed, wherein the track-type layer rendering tree is a rendering tree structure used for representing the composition of a plurality of video track levels;
performing data conversion according to all layers of the video image frame to be processed and the layer rendering information to obtain a recursion descent layer;
and organizing the recursively-descending layer into the recursively-descending layer rendering tree.
3. The method of processing a video image according to claim 2, wherein the organizing the recursively-descending layers into the recursively-descending layer rendering tree comprises:
and analyzing the recursion descent type layers, merging the layers which can be uniformly rendered, discarding invalid layers, and obtaining the recursion descent type layer rendering tree.
4. A method of processing video images according to claim 3, wherein said performing layer rendering according to said recursively descending layer rendering tree comprises:
performing rendering necessity check on the recursion descent type layer rendering tree;
and performing layer rendering on the recursion descent layer rendering tree according to the checking result of the rendering necessity check.
5. The method of processing a video image according to claim 4, wherein said performing a render necessity check on said recursively-descending layer render tree comprises:
comparing the layer information of the recursively-descending layer rendering tree of the video image frame to be processed with the layer information of the recursively-descending layer rendering tree of the video image frame of the previous frame; and/or the number of the groups of groups,
and judging whether the external dependent file required by the layer rendering is ready or not.
6. The method of processing a video image according to claim 5, wherein said performing layer rendering on the recursively-descending layer rendering tree according to the inspection result of the rendering necessity inspection comprises:
if the layer information of the recursion descent type layer rendering tree of the video image frame to be processed and the recursion descent type layer rendering tree of the video image frame of the previous frame are transformed, and the external dependent file required by layer rendering is ready, the recursion descent type layer rendering tree is unfolded, and the layer by layer rendering is performed according to the sequence from bottom to top.
7. The method for processing a video image according to claim 6, wherein the outputting of the rendering result of the layer rendering includes:
scaling the rendering result in equal proportion according to a preset output size; and/or the number of the groups of groups,
and converting the data format of the rendering result according to a preset output format.
8. A video image processing apparatus, wherein the apparatus comprises:
an acquisition module configured to acquire a video image frame to be processed;
a translation module configured to perform layer translation according to the video image frame to be processed and layer rendering information to obtain a recursively descent layer rendering tree, wherein the recursively descent layer is a layer for representing a repeatable nesting based on pre-synthesis;
a rendering module configured for layer rendering according to the recursively descended layer rendering tree;
and the output module is configured to output a rendering result of the layer rendering.
9. The video image processing apparatus according to claim 8, wherein the translation module is configured to perform layer translation according to the video image frame to be processed and layer rendering information to obtain a recursively descent layer rendering tree in the following manner:
extracting all layers of the video image frame to be processed according to a track-type layer rendering tree of the video image frame to be processed, wherein the track-type layer rendering tree is a rendering tree structure used for representing the composition of a plurality of video track levels;
performing data conversion according to all layers of the video image frame to be processed and the layer rendering information to obtain a recursion descent layer;
and organizing the recursively-descending layer into the recursively-descending layer rendering tree.
10. The video image processing apparatus of claim 9, wherein the translation module is configured to organize the recursively-descending layers into the recursively-descending layer rendering tree by:
and analyzing the recursion descent type layers, merging the layers which can be uniformly rendered, discarding invalid layers, and obtaining the recursion descent type layer rendering tree.
11. The video image processing apparatus of claim 10, wherein the rendering module is configured to perform layer rendering according to the recursively descending layer rendering tree in the following manner:
performing rendering necessity check on the recursion descent type layer rendering tree;
and performing layer rendering on the recursion descent layer rendering tree according to the checking result of the rendering necessity check.
12. The video image processing apparatus of claim 11, wherein the rendering module is configured to perform a render necessity check on the recursively-descending layer rendering tree by:
comparing the layer information of the recursively-descending layer rendering tree of the video image frame to be processed with the layer information of the recursively-descending layer rendering tree of the video image frame of the previous frame; and/or the number of the groups of groups,
and judging whether the external dependent file required by the layer rendering is ready or not.
13. The processing apparatus of video images according to claim 12, wherein the rendering module is configured to render the recursive downward layer rendering tree in layers according to a result of the rendering necessity check in such a manner that:
and if the layer information of the recursion descent type layer rendering tree of the image frame to be processed and the recursion descent type layer rendering tree of the video image frame of the previous frame are transformed and the external dependent files required by layer rendering are ready, expanding the recursion descent type layer rendering tree and rendering the layers according to the sequence from bottom to top.
14. The video image processing apparatus according to claim 13, wherein the output module is configured to output a rendering result of the layer rendering by:
scaling the rendering result in equal proportion according to a preset output size; and/or the number of the groups of groups,
and converting the data format of the rendering result according to a preset output format.
15. An electronic device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the method of any of claims 1 to 7 when the computer program is executed.
16. A computer readable storage medium, wherein the storage medium stores a computer program which, when executed, implements the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111226571.3A CN113992981B (en) | 2021-10-21 | 2021-10-21 | Video image processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111226571.3A CN113992981B (en) | 2021-10-21 | 2021-10-21 | Video image processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113992981A CN113992981A (en) | 2022-01-28 |
CN113992981B true CN113992981B (en) | 2024-03-15 |
Family
ID=79739928
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111226571.3A Active CN113992981B (en) | 2021-10-21 | 2021-10-21 | Video image processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113992981B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114513614A (en) * | 2022-02-14 | 2022-05-17 | 河南大学 | A device and method for special effect rendering of video |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110503708A (en) * | 2019-07-03 | 2019-11-26 | 华为技术有限公司 | A kind of image processing method and electronic device based on vertical synchronization signal |
CN111462292A (en) * | 2020-03-20 | 2020-07-28 | 稿定(厦门)科技有限公司 | Layering rendering method, medium, equipment and device |
CN111696188A (en) * | 2020-04-26 | 2020-09-22 | 杭州群核信息技术有限公司 | Rendering graph rapid illumination editing method and device and rendering method |
CN111724293A (en) * | 2019-03-22 | 2020-09-29 | 华为技术有限公司 | Image rendering method and device, electronic device |
CN112184856A (en) * | 2020-09-30 | 2021-01-05 | 广州光锥元信息科技有限公司 | Multimedia processing device supporting multi-layer special effect and animation mixing |
WO2021027678A1 (en) * | 2019-08-09 | 2021-02-18 | 华为技术有限公司 | Vertical synchronization signal-based image processing method, and electronic apparatus |
CN112882637A (en) * | 2021-02-23 | 2021-06-01 | 上海哔哩哔哩科技有限公司 | Interaction method for multi-layer animation display and browser |
-
2021
- 2021-10-21 CN CN202111226571.3A patent/CN113992981B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111724293A (en) * | 2019-03-22 | 2020-09-29 | 华为技术有限公司 | Image rendering method and device, electronic device |
CN110503708A (en) * | 2019-07-03 | 2019-11-26 | 华为技术有限公司 | A kind of image processing method and electronic device based on vertical synchronization signal |
WO2021027678A1 (en) * | 2019-08-09 | 2021-02-18 | 华为技术有限公司 | Vertical synchronization signal-based image processing method, and electronic apparatus |
CN111462292A (en) * | 2020-03-20 | 2020-07-28 | 稿定(厦门)科技有限公司 | Layering rendering method, medium, equipment and device |
CN111696188A (en) * | 2020-04-26 | 2020-09-22 | 杭州群核信息技术有限公司 | Rendering graph rapid illumination editing method and device and rendering method |
CN112184856A (en) * | 2020-09-30 | 2021-01-05 | 广州光锥元信息科技有限公司 | Multimedia processing device supporting multi-layer special effect and animation mixing |
CN112882637A (en) * | 2021-02-23 | 2021-06-01 | 上海哔哩哔哩科技有限公司 | Interaction method for multi-layer animation display and browser |
Also Published As
Publication number | Publication date |
---|---|
CN113992981A (en) | 2022-01-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112184856B (en) | Multimedia processing device supporting multi-layer special effect and animation mixing | |
CN110290425B (en) | Video processing method, device and storage medium | |
AU2009251018C1 (en) | Generating object representation from bitmap image | |
CN110136066A (en) | Video-oriented super-resolution method, apparatus, device and storage medium | |
CA2054749A1 (en) | Method and apparatus for manipulating digital video data | |
CN113992981B (en) | Video image processing method and device | |
CN102542043A (en) | Image annotation method and device | |
CN118674839A (en) | Animation generation method, device, electronic equipment, storage medium and program product | |
CN106372106A (en) | Method and apparatus for providing video content assistance information | |
CN111047673A (en) | PPT file generation method and device based on hand-drawn video | |
CN107885807B (en) | File saving method and device, intelligent tablet and storage medium | |
CN113992866B (en) | Video production method and device | |
CN115454412A (en) | Page generation method and device, electronic equipment and storage medium | |
CN111340958A (en) | SrollView sliding stuck optimization method, device, equipment and readable storage medium | |
CN112163179A (en) | Screen drawing method and system | |
US6760466B2 (en) | Automatic image replacement and rebuilding system and method thereof | |
CN114286163B (en) | Sequence chart recording method, device, equipment and storage medium | |
CN117829098B (en) | Multi-mode work review method, device, medium and equipment | |
Parson | Creative Graphical Coding via Pipelined Pixel Manipulation | |
CN113326036A (en) | Big data tree form component method based on AngularJS framework | |
CN116758186A (en) | Local redrawing method and device | |
WO2024174608A1 (en) | Depth-of-field image rendering method and apparatus, electronic device, computer readable storage medium, and computer program product | |
CN101662594B (en) | Super large picture and video editing method and system thereof | |
Lafler | Video Remastering: Programmatic Methods for Frame Interpolation, Resolution Upsampling, and Image Enhancement for Generating Baseline Remastered Results | |
Heurlin et al. | Implementing a video decoder using Feldspar |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |