CN112135142B - Picture decoding method and related product - Google Patents

Picture decoding method and related product Download PDF

Info

Publication number
CN112135142B
CN112135142B CN201910557580.7A CN201910557580A CN112135142B CN 112135142 B CN112135142 B CN 112135142B CN 201910557580 A CN201910557580 A CN 201910557580A CN 112135142 B CN112135142 B CN 112135142B
Authority
CN
China
Prior art keywords
picture
decoding
video
target picture
processed
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
Application number
CN201910557580.7A
Other languages
Chinese (zh)
Other versions
CN112135142A (en
Inventor
韩世广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910557580.7A priority Critical patent/CN112135142B/en
Publication of CN112135142A publication Critical patent/CN112135142A/en
Application granted granted Critical
Publication of CN112135142B publication Critical patent/CN112135142B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application provides a picture decoding method and a related product. The picture decoding method comprises the following steps: acquiring a target picture, wherein the target picture is a picture in a webp format; processing the target picture into a to-be-processed video in a vp8 video format in a preset mode; and decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture. Therefore, the target picture is processed into the video to be processed in the vp8 video format, and then the video to be processed is decoded by using the vp8 decoder, so that compared with the method of decoding the target picture in the webp format by using the CPU, the decoding speed is higher, and the decoding efficiency is higher.

Description

Picture decoding method and related product
Technical Field
The present application relates to the field of picture processing technologies, and in particular, to a picture decoding method and a related product.
Background
At present, pictures in a network still occupy a part with larger flow, which is particularly true for a mobile terminal, so how to reduce the volume on the premise of ensuring that the picture vision is not distorted is very important for saving bandwidth and battery power. However, the optimization of the common picture formats such as JPEG, PNG, GIF and the like almost reaches the extreme at present, so Google has proposed a new picture compression format-WebP in 2010, and new possibilities are provided for the optimization of the pictures.
WebP provides lossless and lossy compression capabilities for web pictures while supporting transparent channels under lossy conditions. According to official experiments, it is shown that: lossless WebP is reduced in size by 26% compared to PNG; the size of the lossy WebP is reduced by 25-34% compared with JPEG under the same SSIM (Structural Similarity Index); lossy WebP also supports a transparent channel, typically about 1/3 for the corresponding PNG.
In current android apps, the use of Webp format pictures is very common. Webp has the same image quality and smaller volume, and is suitable for being used by a mobile terminal. Due to the high compression ratio, the decoding efficiency of the Webp format picture is slower than that of png jpeg, and the cpu soft decoding mode is commonly used by webps on android mobile phones, so that the efficiency is low.
Disclosure of Invention
The embodiment of the application provides a picture decoding method and a related product, which can improve the decoding speed and efficiency of an electronic device for picture processing.
A first aspect of an embodiment of the present application provides a picture decoding method, including:
acquiring a target picture, wherein the target picture is a picture in a webp format;
processing the target picture into a to-be-processed video in a vp8 video format in a preset mode;
and decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture.
A second aspect of an embodiment of the present application provides a picture decoding apparatus, including:
the image acquisition module is used for acquiring a target image, wherein the target image is an image in a webp format;
the picture processing module is used for processing the target picture into a to-be-processed video in a vp8 video format in a preset mode;
and the picture decoding module is used for decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture.
A third aspect of the embodiments of the present application provides an electronic apparatus, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the step instructions in the first aspect of the embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application.
According to the technical scheme, a target picture is obtained first, wherein the target picture is a picture in a webp format; then processing the target picture into a to-be-processed video in a vp8 video format in a preset mode; and decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture. Therefore, the target picture is processed into the to-be-processed video in the vp8 video format, and then the to-be-processed video is decoded by using the vp8 decoder, so that compared with the case that the target picture in the webp format is decoded by using a CPU (central processing unit), the decoding speed is higher, and the decoding efficiency is higher.
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, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a picture decoding method according to an embodiment of the present application;
fig. 3 is another schematic flow chart of a picture decoding method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a picture decoding method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a picture decoding apparatus 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. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device according to the embodiments of the present application may include various devices including a handheld device, an in-vehicle device, a wearable device, a computing device, or other processing devices having functions of displaying or processing images. As shown in fig. 1, the electronic device 100 includes a processor 101, a memory 102, and one or more programs stored in the memory 102 and configured to be executed by the processor 101, the programs including instructions for steps of a processing method in any of the following embodiments. The memory 102 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a disk memory), and the memory 102 may optionally be a storage device independent of the processor 101. The electronic device may also comprise an input output interface 103. The input/output interface 103 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Fig. 2 is a flowchart illustrating a picture decoding method according to an embodiment of the present application. The picture decoding method according to the embodiment of the present application may be implemented by the picture decoding apparatus or the electronic apparatus according to the embodiment of the present application. The picture decoding method includes, but is not limited to, the following steps:
21. acquiring a target picture, wherein the target picture is a picture in a webp format;
the webp format, which is a picture file format that provides both lossy compression and lossless compression, is derived from the image coding format vp 8. Is a format developed by Google after purchasing On2Technologies, published under BSD licensing terms. The target picture is a webp format picture which needs to be decoded. The decoding device or the electronic device can obtain the target picture according to the user operation. For example, when a user needs to decode a picture, the user selects the picture and issues a decoding instruction for causing a decoding device or an electronic device to decode the picture, and when the decoding device or the electronic device receives the decoding instruction issued by the user, the picture is taken as a target picture.
Since the user may not know whether the picture to be decoded is a webp format picture. And when a decoding instruction sent by a user is received, judging whether the picture corresponding to the decoding instruction is a webp format picture, and when the picture corresponding to the decoding instruction is in a webp format, taking the picture corresponding to the decoding instruction as a target picture.
22. Processing the target picture into a video to be processed in a vp8 video format in a preset mode;
the target picture can be processed into a single-frame image in the video in the vp8 video format, so as to obtain the video to be processed containing the single-frame image.
Specifically, a data portion corresponding to the vp8 video format may be extracted from the target picture as data to be processed; and combining the data to be processed with a preset file header to obtain a single-frame image, and taking the single-frame image as a video to be processed, wherein the preset file header is a file header corresponding to a vp8 video format.
It should be noted that information such as a file header of the target picture is removed from the to-be-processed data extracted from the target picture. And combining the data to be processed with the file header conforming to the vp8 video format to immediately obtain the video to be processed containing a single-frame image, wherein the content information of the single-frame image is consistent with that of the target image. That is, the target picture can be processed into the video to be processed in the vp8 video format by modifying the file header.
23. And decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture.
The electronic device or the picture decoding device is pre-installed with a vp8 decoder. The interface provided by the vp8 decoder SDK for decoding the single-frame video can be called, and the video to be processed is decoded to obtain a decoded picture corresponding to the target picture.
Step 23 may be performed by a processor of the electronic device. The processor firstly utilizes an interface provided by a vp8 decoder SDK for decoding single-frame video to send the video to be processed to a vp8 decoder, and after the vp8 decoder decodes the video to be processed, the decoded picture is copied to the processor from a vp8 decoder.
According to the picture decoding method, a target picture is obtained, and the target picture is a picture in a webp format; processing the target picture into a video to be processed in a vp8 video format by using a preset mode; and decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture. Therefore, the target picture is processed into the video to be processed in the vp8 video format, and then the video to be processed is decoded by using the vp8 decoder, so that compared with the method of decoding the target picture in the webp format by using the CPU, the decoding speed is higher, and the decoding efficiency is higher.
Referring to fig. 3, fig. 3 is another flow chart illustrating a picture decoding method according to an embodiment of the present disclosure. In another embodiment, a picture decoding method includes the steps of:
31. acquiring a target picture, wherein the target picture is a picture in a webp format;
the target picture is a webp format picture which needs to be decoded. The decoding device or the electronic device can obtain the target picture according to the user operation. For example, when a user needs to decode a picture, the user selects the picture and issues a decoding instruction for causing a decoding device or an electronic device to decode the picture, and when the decoding device or the electronic device receives the decoding instruction issued by the user, the picture is taken as a target picture.
Since the user may not know whether the picture to be decoded is a webp format picture. And when a decoding instruction sent by a user is received, judging whether the picture corresponding to the decoding instruction is a webp format picture, and when the picture corresponding to the decoding instruction is in a webp format, taking the picture corresponding to the decoding instruction as a target picture.
32. And analyzing whether the decoding promotion time is greater than the bus transmission time by using a preset algorithm.
The decoding boost time is the predicted boost time of the first process relative to the second process. The first process is to decode the processing target picture by using a vp8 decoder, and the second process is to decode the processing target picture by using a processor. The bus transmission time is the sum of a first time length and a second time length, the first time length is the time length required by the processor to transmit the data corresponding to the target picture to the vp8 decoder, and the second time length is the time length required by the processor to receive the decoded picture decoded by the vp8 decoder.
Wherein, analyzing whether the decoding promotion time is greater than the bus transmission time by using a preset algorithm comprises: acquiring the data size of a target picture and the compression ratio of the target picture; determining decoding lifting time and bus transmission time according to the data size and the compression ratio; and judging whether the decoding promotion time is larger than the bus transmission time.
The decoding lifting time and the bus transmission time are related to the data size and the compression ratio.
The time required by each webb picture in the plurality of webb pictures to be decoded by the processor and the vp8 decoder is analyzed, the time required by each picture to be decoded by the processor and the time required by each vp8 decoder are compared to obtain the decoding promotion time corresponding to each picture, and then the mapping relation between the decoding promotion time and the data size and the compression ratio is obtained according to the decoding promotion time corresponding to each picture and the data size and the compression ratio of the corresponding picture. And when whether the decoding promotion time is larger than the bus transmission time is analyzed, the decoding promotion time of the target picture can be directly obtained according to the data size and the compression ratio of the target picture and the mapping relation.
A first duration T1Data size/bus bandwidth; a second duration T2 is compression ratio data size/bus bandwidth; then, the bus transfer time is (1+ compression ratio) data size/bus bandwidth.
33. And when the decoding promotion time is greater than the bus transmission time, processing the target picture into a to-be-processed video in a vp8 video format by using a preset mode.
34. And decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture.
The electronic device or the picture decoding device is pre-installed with a vp8 decoder. The interface for decoding the single-frame video provided by the vp8 decoder SDK can be called to decode the video to be processed to obtain a decoded picture corresponding to the target picture.
Step 34 may be implemented by a processor of the electronic device according to the embodiment of the present application, that is, the processor decodes the video to be processed by using the vp8 decoder to obtain a decoded picture corresponding to the target picture, in this process, the processor needs to first send the video to be processed to the vp8 decoder, and after the vp8 decoder completes decoding, sends the decoded picture to the processor.
In the prior art, a processor is directly used for decoding pictures in a webp format, and the decoding speed is low. Although the decoding speed is higher when the vp8 decoder is used for decoding the pictures in the webp format, it takes time to transmit the video to be decoded corresponding to the pictures in the webp format from the processor to the vp8 decoder, and it also takes time to transmit the decoded pictures decoded by the vp8 decoder from the vp8 decoder to the processor.
Then, after the target picture is acquired, it may be determined whether decoding by using a vp8 decoder is faster than decoding by using a processor by determining that the decoding promotion time is greater than the bus transfer time, and when the decoding promotion time is greater than the bus transfer time, it may be determined that decoding by using a vp8 decoder is faster than decoding by using the processor, the target picture is processed into a to-be-processed video in a vp8 video format in a preset manner, so that the vp8 decoder decodes the to-be-processed video to obtain a decoded picture corresponding to the target picture.
In a possible embodiment, it can also be confirmed whether the target picture is processed into the video to be processed in the vp8 video format in a preset manner by setting a compression ratio threshold. For example, when the compression ratio of the target picture is greater than or equal to the compression ratio threshold, the target picture may be processed into the to-be-processed video in the vp8 video format in a preset manner. This can more quickly confirm whether the target picture can be decoded by the vp8 decoder to increase the decoding speed. The compression ratio threshold may be set based on empirical values.
Referring to fig. 4, fig. 4 is a schematic flow chart of a picture decoding method according to an embodiment of the present application. In yet another embodiment, a picture decoding method includes the steps of:
41. acquiring a target picture, wherein the target picture is a picture in a webp format;
the target picture is a webp format picture which needs to be decoded. The decoding device or the electronic device can obtain the target picture according to the user operation. For example, when a user needs to decode a picture, the user selects the picture and issues a decoding instruction for causing a decoding device or an electronic device to decode the picture, and when the decoding device or the electronic device receives the decoding instruction issued by the user, the picture is taken as a target picture.
Since the user may not know whether the picture to be decoded is a webp format picture. And when a decoding instruction sent by a user is received, judging whether the picture corresponding to the decoding instruction is a webp format picture, and when the picture corresponding to the decoding instruction is in a webp format, taking the picture corresponding to the decoding instruction as a target picture.
42. Judging whether the format of the target picture is a format supported by a vp8 decoder;
43. and judging that the format of the target picture is the format supported by the vp8 decoder.
The pictures in the webp format comprise two formats corresponding to a vp8 video format and a vp9 video format respectively, the vp8 decoder does not support all the pictures in the webp format, and only the pictures in the webp format corresponding to the vp8 video format can be decoded by the vp8 decoder. Before the target picture is processed into the video to be processed in the vp8 video format in the preset mode, after the format of the target picture is judged to be the format supported by the vp8 decoder, whether the decoding promotion time is larger than the bus transmission time is analyzed by using a preset algorithm. Therefore, after the format of the target picture is confirmed to be the format supported by the vp8 decoder, whether the decoding promotion time is greater than the bus transmission time is analyzed by using a preset algorithm, so that decoding failure caused by the fact that the picture formats are not corresponding can be avoided, and the decoding efficiency is improved.
44. And analyzing whether the decoding promotion time is greater than the bus transmission time by using a preset algorithm.
The decoding boost time is the predicted boost time of the first process relative to the second process. The first process is to decode the processing target picture by using a vp8 decoder, and the second process is to decode the processing target picture by using a processor. The bus transmission time is the sum of a first time length and a second time length, the first time length is the time length required by the processor to transmit the data corresponding to the target picture to the vp8 decoder, and the second time length is the time length required by the processor to receive the decoded picture decoded by the vp8 decoder.
Wherein, analyzing whether the decoding promotion time is greater than the bus transmission time by using a preset algorithm comprises: acquiring the data size of a target picture and the compression ratio of the target picture; determining decoding lifting time and bus transmission time according to the data size and the compression ratio; and judging whether the decoding promotion time is larger than the bus transmission time.
The decoding lifting time and the bus transmission time are related to the data size and the compression ratio.
The time required by each webb picture in the plurality of webb pictures to be decoded by the processor and the vp8 decoder is analyzed, the time required by each picture to be decoded by the processor and the time required by each vp8 decoder are compared to obtain the decoding promotion time corresponding to each picture, and then the mapping relation between the decoding promotion time and the data size and the compression ratio is obtained according to the decoding promotion time corresponding to each picture and the data size and the compression ratio of the corresponding picture. And when whether the decoding promotion time is larger than the bus transmission time is analyzed, the decoding promotion time of the target picture can be directly obtained according to the data size and the compression ratio of the target picture and the mapping relation.
First duration T1 ═ data size/bus bandwidth; a second duration T2 ═ compression ratio data size/bus bandwidth; then, the bus transfer time is (1+ compression ratio) data size/bus bandwidth.
45. And when the decoding promotion time is greater than the bus transmission time, processing the target picture into a to-be-processed video in a vp8 video format by using a preset mode.
46. And decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture.
The electronic device or the picture decoding device is pre-installed with a vp8 decoder. The interface provided by the vp8 decoder SDK for decoding the single-frame video can be called, and the video to be processed is decoded to obtain a decoded picture corresponding to the target picture.
Step 46 may be implemented by a processor of the electronic device according to the embodiment of the present application, that is, the processor decodes the video to be processed by using the vp8 decoder to obtain a decoded picture corresponding to the target picture, in this process, the processor needs to first send the video to be processed to the vp8 decoder, and after the vp8 decoder completes decoding, sends the decoded picture to the processor.
In the embodiment of the present application, before analyzing whether the decoding promotion time is greater than the bus transfer time by using the preset algorithm, it is determined whether the format of the target picture is the format supported by the vp8 decoder, and after determining that the format of the target picture is the format supported by the vp8 decoder, it is further determined whether the decoding promotion time is greater than the bus transfer time by using the preset algorithm. Therefore, when the picture format is not the format supported by the vp8 decoder, subsequent steps of judging whether the decoding lifting time is greater than the bus transfer time by using a preset algorithm are not needed, unnecessary calculation is reduced, and when the picture format is not the format supported by the vp8 decoder, the processor decodes the target picture, so that the problem that the decoding rate is reduced instead because the target picture is not the format supported by the vp8 decoder can be avoided.
It should be noted that, in other embodiments, step 42 and step 43 may be performed after step 44 and before step 45, or may be performed simultaneously with step 44 and step 45.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In accordance with the above, referring to fig. 5, an embodiment of the present invention further provides a picture decoding apparatus 500, including:
the image obtaining module 501 is configured to obtain a target image, where the target image is an image in a webp format;
the picture processing module 502 is configured to process the target picture into a to-be-processed video in a vp8 video format in a preset manner;
a picture decoding module 503, configured to decode the video to be processed by using a vp8 decoder to obtain a decoded picture corresponding to the target picture.
In the picture decoding apparatus 500 according to the embodiment of the present application, a target picture is obtained first, where the target picture is a picture in a webp format; then processing the target picture into a to-be-processed video in a vp8 video format in a preset mode; and decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture. Therefore, the target picture is processed into the video to be processed in the vp8 video format, and then the video to be processed is decoded by using the vp8 decoder, so that compared with the method of decoding the target picture in the webp format by using the CPU, the decoding speed is higher, and the decoding efficiency is higher.
In some embodiments, the picture processing module is specifically configured to process the target picture into a single frame image in a video in a VP8 video format, so as to obtain a to-be-processed video including the single frame image.
In some embodiments, the image processing module is specifically configured to:
extracting a data part corresponding to a vp8 video format from the target picture as data to be processed;
and combining the data to be processed with a preset file header to obtain the single-frame image, and taking the single-frame image as the video to be processed, wherein the preset file header is a file header corresponding to a vp8 video format.
In certain embodiments, the picture processing module comprises:
a first determining unit, configured to analyze whether a decoding lifting time is greater than a bus transfer time by using a preset algorithm, where the decoding lifting time is a predicted lifting time of a first process relative to a second process, the first process is to decode and process the target picture by using the vp8 decoder, the second process is to decode and process the target picture by using a processor, the bus transfer time is a sum of a first duration and a second duration, the first duration is a duration required by the processor to transmit data corresponding to the target picture to the vp8 decoder, and the second duration is a duration required by the processor to receive the decoded picture decoded by the vp8 decoder;
and the processing unit is used for processing the target picture into a to-be-processed video in a vp8 video format in a preset mode when the decoding promotion time is greater than the bus transmission time.
In some embodiments, the first determining unit is specifically configured to:
acquiring the data size of the target picture and the compression ratio of the target picture;
determining the decoding lifting time and the bus transmission time according to the data size and the compression ratio;
and judging whether the decoding promoting time is larger than the bus transmission time or not.
In some embodiments, the picture processing module further comprises:
a second determining unit, configured to determine whether the format of the target picture is a format supported by the vp8 decoder;
and the judging unit is used for judging that the format of the target picture is the format supported by the vp8 decoder.
It should be noted that the explanation of the steps of the picture decoding method in the above embodiments is also applicable to the picture decoding apparatuses in the above embodiments, and is not repeated herein to avoid redundancy.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the picture decoding methods as described in the above method embodiments.
Embodiments of the present application further provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program causes a computer to execute some or all of the steps of any one of the picture decoding methods as described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps of the methods of the above embodiments may be implemented by a program, which is stored in a computer-readable memory, the memory including: flash memory disks, read-only memory, random access memory, magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A picture decoding method, comprising:
acquiring a target picture, wherein the target picture is a picture in a webp format;
extracting a data part corresponding to a vp8 video format from the target picture as data to be processed;
combining the data to be processed with a preset file header to obtain a single-frame image, and taking the single-frame image as a video to be processed, wherein the preset file header is a file header corresponding to a vp8 video format;
and decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture.
2. The picture decoding method according to claim 1, wherein before said extracting a data portion corresponding to a vp8 video format from the target picture as data to be processed, the method further comprises:
analyzing whether the decoding lifting time is greater than bus transfer time by using a preset algorithm, wherein the decoding lifting time is predicted lifting time of a first process relative to a second process, the first process is to decode and process the target picture by using the vp8 decoder, the second process is to decode and process the target picture by using a processor, the bus transfer time is the sum of a first time length and a second time length, the first time length is the time length required by the processor to transmit data corresponding to the target picture to the vp8 decoder, and the second time length is the time length required by the processor to receive the decoded picture decoded by the vp8 decoder;
and judging that the decoding promotion time is greater than the bus transmission time.
3. The picture decoding method according to claim 2, wherein the analyzing whether the decoding promotion time is greater than the bus transfer time by using a preset algorithm comprises:
acquiring the data size of the target picture and the compression ratio of the target picture;
determining the decoding lifting time and the bus transmission time according to the data size and the compression ratio;
and judging whether the decoding promotion time is larger than the bus transmission time.
4. The picture decoding method according to claim 2, wherein before the analyzing whether the decoding promotion time is greater than the bus transfer time by using the preset algorithm, the method further comprises:
judging whether the format of the target picture is a format supported by the vp8 decoder;
and judging that the format of the target picture is the format supported by the vp8 decoder.
5. A picture decoding apparatus, comprising:
the image acquisition module is used for acquiring a target image, wherein the target image is an image in a webp format;
the data extraction module is used for extracting a data part corresponding to the vp8 video format from the target picture as data to be processed;
the image processing module is used for combining the data to be processed with a preset file header to obtain a single-frame image, and taking the single-frame image as a video to be processed, wherein the preset file header is a file header corresponding to a vp8 video format;
and the picture decoding module is used for decoding the video to be processed by utilizing a vp8 decoder to obtain a decoded picture corresponding to the target picture.
6. The picture decoding apparatus according to claim 5, wherein the picture processing module is specifically configured to process the target picture into a single frame image in a video in the VP8 video format to obtain the video to be processed including the single frame image.
7. An electronic device comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-4.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-4.
CN201910557580.7A 2019-06-25 2019-06-25 Picture decoding method and related product Active CN112135142B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910557580.7A CN112135142B (en) 2019-06-25 2019-06-25 Picture decoding method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910557580.7A CN112135142B (en) 2019-06-25 2019-06-25 Picture decoding method and related product

Publications (2)

Publication Number Publication Date
CN112135142A CN112135142A (en) 2020-12-25
CN112135142B true CN112135142B (en) 2022-06-07

Family

ID=73849491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910557580.7A Active CN112135142B (en) 2019-06-25 2019-06-25 Picture decoding method and related product

Country Status (1)

Country Link
CN (1) CN112135142B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102256162A (en) * 2011-07-22 2011-11-23 网宿科技股份有限公司 Method and system for optimizing media-on-demand based on real-time file format conversion

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013034801A2 (en) * 2011-09-09 2013-03-14 Nokia Corporation Method and apparatus for processing metadata in one or more media streams
US10129566B2 (en) * 2015-03-16 2018-11-13 Microsoft Technology Licensing, Llc Standard-guided video decoding performance enhancements
US20170163990A1 (en) * 2015-12-07 2017-06-08 Le Holdings (Beijing) Co., Ltd. Video transcoding method and system
CN107292808B (en) * 2016-03-31 2021-01-05 阿里巴巴集团控股有限公司 Image processing method and device and image coprocessor
US11197010B2 (en) * 2016-10-07 2021-12-07 Microsoft Technology Licensing, Llc Browser-based video decoder using multiple CPU threads
US10084855B2 (en) * 2017-01-23 2018-09-25 Akamai Technologies, Inc. Pixel-based load balancing
CN107613301B (en) * 2017-10-17 2020-05-26 苏州浪潮智能科技有限公司 Image processing method and device
CN108769694B (en) * 2018-05-31 2021-11-09 郑州云海信息技术有限公司 Method and device for Alpha channel coding based on FPGA
CN109710359B (en) * 2018-12-25 2022-03-01 广州市百果园信息技术有限公司 Moving picture display method, moving picture display device, computer-readable storage medium and terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102256162A (en) * 2011-07-22 2011-11-23 网宿科技股份有限公司 Method and system for optimizing media-on-demand based on real-time file format conversion

Also Published As

Publication number Publication date
CN112135142A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
US20200260117A1 (en) Methods and Apparatuses for Coding and Decoding Depth Map
US9743080B2 (en) Encoding or decoding method and apparatus
CN110446062B (en) Receiving processing method for big data file transmission, electronic device and storage medium
KR102534443B1 (en) Video augmentation control method, device, electronic device and storage medium
WO2020107972A1 (en) Video decoding control method and apparatus, electronic device, and storage medium
CN105430393B (en) Picture processing method, picture processing device, picture processing platform and storage medium
CN113343895B (en) Target detection method, target detection device, storage medium and electronic equipment
CN109493304B (en) Image data processing method and device
CN112135142B (en) Picture decoding method and related product
CN107431809A (en) The method and apparatus of image procossing
CN109388726A (en) A kind of image display method, device, equipment and computer-readable medium
CN109784226B (en) Face snapshot method and related device
CN108933945B (en) GIF picture compression method, device and storage medium
TWI669947B (en) Image transcoding method, computational apparatus, and storage medium
CN105469433B (en) Picture compression method and equipment thereof
CN114390307A (en) Image quality enhancement method, device, terminal and readable storage medium
EP4274239A1 (en) Server and control method therefor
CN112887758B (en) Video processing method and device
CN113556552B (en) Control method for cloud video compression
CN109361956B (en) Time-based video cropping methods and related products
CN112399196B (en) Image processing method and device
CN111639634B (en) OCR (optical character recognition) method and electronic equipment
CN115965616A (en) Iris image processing method and device and electronic equipment
CN115334352A (en) Automatic matching video decoding method, device, decoder and storage medium
CN115361569A (en) Dynamic frame screen projection method in cloud conference and related product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant