CN110324629A - Picture code-transferring method, device and electronic equipment - Google Patents
Picture code-transferring method, device and electronic equipment Download PDFInfo
- Publication number
- CN110324629A CN110324629A CN201910569955.1A CN201910569955A CN110324629A CN 110324629 A CN110324629 A CN 110324629A CN 201910569955 A CN201910569955 A CN 201910569955A CN 110324629 A CN110324629 A CN 110324629A
- Authority
- CN
- China
- Prior art keywords
- processor
- subtask
- task
- coded format
- encoded
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/40—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods 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
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
The embodiment of the invention provides a kind of picture code-transferring methods, applied to the electronic equipment with first processor and second processor: after getting the transcoding task for picture to be transcoded, transcoding task being split into decoding scaling subtask and coding subtask;Decoding scaling subtask is executed by first processor;When encoding subtask is to need to be encoded according to the first coded format, which is executed by first processor;When encoding subtask is to need to be encoded according to second of coded format, which is executed by second processor.The encoding tasks for decoding scaling task and the first relative complex coded format are executed by first processor, the encoding tasks of second of coded format are executed by second processor, to realize during picture transcoding, it is executed for different processing tasks by different processing modules, the process resource for more reasonably utilizing equipment, reduces operation cost and management cost.
Description
Technical field
The present invention relates to image processing technologies, more particularly to a kind of picture code-transferring method, device and electronic equipment.
Background technique
With the fast development of electronic product, people's lives, amusement are more dependent on each electronic product, for example, people
Usually will use the electronic products browsing pictures such as mobile phone, tablet computer, so background server needs to be implemented a large amount of jpg
(Joint Photographic Group) original image turns jpg thumbnail or jpg original image turns the different picture such as webp thumbnail
Format code transferring task.
Currently, picture format transcoding task can be using FPGA (Field-Programmable Gate Array, it is existing
Field programmable gate array) execute, every set trans-coding system executes a kind of picture format transcoding task, if executed different types of
Picture format transcoding task then needs newly-increased trans-coding system, executes multiclass picture format transcoding respectively using multiple trans-coding systems
Task.
For example, as shown in figure 1, in order to complete two class picture format transcoding tasks, needing two sets of trans-coding systems of development deployment, scheme
Two calculate nodes respectively indicate two different trans-coding systems in 1, have a FPGA in a trans-coding system, save calculating
It is that jpg original image turns webp thumbnail in point 1, FPGA is decoded scaling to jpg original image first, then to the figure after decoding scaling
Piece carries out webp coding, finally obtains webp thumbnail.It is that jpg original image turns jpg thumbnail in calculate node 2, FPGA is first
Scaling is decoded to jpg original image, jpg coding then is carried out to the picture after decoding scaling, finally obtains jpg thumbnail.When
Although the picture transcoding task of multiple format may be implemented in preceding picture format transcoding mode, and be able to ascend the processing speed of transcoding
Degree, but since process resource is using not reasonable, cause to increase operation cost and management cost.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of picture code-transferring method, device and electronic equipment, is being schemed with realizing
Process resource is more reasonably utilized during piece transcoding.Specific technical solution is as follows:
In a first aspect, the embodiment of the invention provides a kind of picture code-transferring method, it is applied to first processor and the
The electronic equipment of two processors, which comprises
After getting the transcoding task for picture to be transcoded, the transcoding task is split into decoding scaling subtask
With coding subtask;
The decoding is executed by the first processor and scales subtask, obtains being decoded the picture to be transcoded
Image data after scaling, as image data to be encoded;
When the coding subtask is to need to be encoded according to the first coded format, pass through the first processor
The coding subtask is executed, obtains turning the image data to be encoded according to what the first described coded format was encoded
Code picture;
When the coding subtask is to need to be encoded according to second of coded format, pass through the second processor
The coding subtask is executed, obtains turning the image data to be encoded according to what second of coded format was encoded
Code picture, the first described coded format are high compared to the encoder complexity of second of coded format.
In one embodiment, the method is applied to the second processor;
It is described that decoding scaling subtask is executed by the first processor, it is described when the coding subtask is to need
When being encoded according to the first coded format, the coding subtask is executed by the first processor, comprising:
When the coding subtask is to need to be encoded according to the first coded format, Xiang Suoshu first processor hair
The first task instruction for executing the decoding scaling subtask and the coding subtask is sent, is carried in the first task instruction
Indicate the code identification encoded according to the first described coded format;
Receive the first task response that the first processor is returned for first task instruction, the first task
Response indicates to have executed the decoding scaling subtask and the coding subtask;
When the coding subtask is to need to be encoded according to second of coded format, Xiang Suoshu first processor hair
Send the second assignment instructions for executing decoding scaling subtask;
Receive the second task response that the first processor is returned for second assignment instructions, second task
Response indicates to have executed decoding scaling subtask.
In one embodiment, it carries in first task response and to be encoded according to the first described coded format
The first storage location of transcoding picture in memory;
The method, further includes:
After receiving the first task response, the transcoding figure is obtained from first storage location in memory
Piece.
In one embodiment, the picture number to be encoded after being decoded scaling is carried in the second task response
According to the second storage location in memory;
The method, further includes:
After receiving the second task response, scaling is decoded from second storage location acquisition in memory
The image data to be encoded afterwards.
In one embodiment, the first described coded format is webp coded format, and second of coded format is
Other coded formats in addition to webp coded format.
In one embodiment, the first processor is on-site programmable gate array FPGA, and the second processor is
Central processor CPU.
Second aspect is applied to first processor and the embodiment of the invention provides a kind of picture transcoding device
The electronic equipment of two processors, described device include:
Task splits module, for after getting the transcoding task for picture to be transcoded, the transcoding task to be torn open
It is divided into decoding scaling subtask and coding subtask;
First task execution module obtains pair for executing decoding scaling subtask by the first processor
The picture to be transcoded is decoded the image data after scaling, as image data to be encoded;
The first task execution module, be also used to when the coding subtask be needs according to the first coded format into
When row coding, the coding subtask is executed by the first processor, is obtained to the image data to be encoded according to institute
State the transcoding picture that the first coded format is encoded;
Second task execution module, for being to need to be encoded according to second of coded format when the coding subtask
When, the coding subtask is executed by the second processor, is obtained to the image data to be encoded according to described second
The transcoding picture that kind coded format is encoded, the first described coded format are multiple compared to the coding of second of coded format
Miscellaneous degree is high.
In one embodiment, described device is applied to the second processor;
The first task execution module is specifically used for when the coding subtask being to need according to the first coded format
When being encoded, Xiang Suoshu first processor send execute it is described decoding scaling subtask and it is described coding subtask it is first
Business instructs, and carries the code identification for indicating to be encoded according to the first described coded format in the first task instruction;It connects
The first task response that the first processor is returned for first task instruction is received, the first task response indicates
Execute the decoding scaling subtask and the coding subtask;And when the coding subtask is to need to compile according to second
When code format is encoded, Xiang Suoshu first processor sends the second assignment instructions for executing decoding scaling subtask;It connects
The second task response that the first processor is returned for second assignment instructions is received, the second task response indicates
Execute decoding scaling subtask.
In one embodiment, it carries in first task response and to be encoded according to the first described coded format
The first storage location of transcoding picture in memory;
Described device, further includes:
Module is obtained, for being obtained after receiving the first task response from first storage location in memory
Take the transcoding picture.
In one embodiment, the picture number to be encoded after being decoded scaling is carried in the second task response
According to the second storage location in memory;
The acquisition module is also used to after receiving the second task response, from second storage in memory
Position acquisition is decoded the image data to be encoded after scaling.
In one embodiment, the first described coded format is webp coded format, and second of coded format is
Other coded formats in addition to webp coded format.
In one embodiment, the first processor is on-site programmable gate array FPGA, and the second processor is
Central processor CPU.
The third aspect, the embodiment of the invention provides a kind of electronic equipment, including it is first processor, second processor, logical
Believe interface, memory and communication bus, wherein first processor, second processor, communication interface, memory are total by communication
Line completes mutual communication;
Memory, for storing computer program;
The first processor, for being decoded scaling to the picture to be transcoded, the image data after decoding scaling,
As image data to be encoded;And when the coding subtask is to need to be encoded according to the first coded format, to institute
It states image data to be encoded to be encoded according to the first described coded format, obtains transcoding picture;
The second processor when for executing the program stored on memory, realizes any of the above-described picture
Code-transferring method step.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage
Dielectric memory contains computer program, and the computer program realizes any of the above-described picture transcoding when being executed by processor
Method and step.
5th aspect, the embodiment of the invention also provides a kind of computer program products comprising instruction, when it is being calculated
When being run on machine, so that computer executes any of the above-described picture code-transferring method.
Picture code-transferring method provided in an embodiment of the present invention will decode scaling task and the first relative complex coding lattice
The encoding tasks of formula are executed by first processor, and the encoding tasks of second of coded format are executed by second processor, and first
Kind coded format is high compared to the encoder complexity of second of coded format, to realize during picture transcoding, for not
Same processing task is executed by different processing modules, i.e., more reasonably utilizes the process resource of equipment, reduce operation cost
And management cost.
Certainly, implement any of the products of the present invention or method it is not absolutely required at the same reach all the above excellent
Point.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described.
Fig. 1 is the online code-transferring method schematic diagram of existing picture;
Fig. 2 is a kind of flow chart of picture code-transferring method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another picture code-transferring method provided in an embodiment of the present invention;
Fig. 4-1 is a kind of picture transcoding device schematic diagram provided in an embodiment of the present invention;
Fig. 4-2 is another picture transcoding device schematic diagram provided in an embodiment of the present invention;
Fig. 5 is a kind of electronic equipment structural schematic diagram provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description.
The embodiment of the invention provides a kind of picture code-transferring method, applied to first processor and second processor
Electronic equipment, as shown in Fig. 2, including the following steps:
Step 201, after the transcoding task for picture to be transcoded that gets, transcoding task is split into decoding scaling
Task and coding subtask.
In this step, transcoding task can be made of decoding scaling subtask and coding subtask, be directed to getting
After the transcoding task of picture to be transcoded, transcoding task can be split into decoding scaling according to decoding mark and code identification
Task and coding subtask.
Step 202 executes decoding scaling subtask by first processor, obtains being decoded scaling to picture to be transcoded
Image data afterwards, as image data to be encoded.
In this step, first processor FPGA can dispose the execution of enough decoding scalings on FPGA in advance
Logic executes the step of decoding scales to picture to be transcoded by FPGA, obtains image data to be encoded.
Step 203, when the coding subtask be need encoded according to the first coded format when, pass through first processing
Device executes the coding subtask, obtains treating the transcoding picture that encoded picture data are encoded according to the first coded format.
In this step, the first coded format can be webp coded format, according to the volume carried in coding subtask
The format identification (FID) of code format is executed when the coding subtask encoded for needs according to webp coded format by FPGA
The coding step of webp coded format obtains treating the transcoding figure that encoded picture data are encoded according to webp coded format
Piece.
Step 204, when the coding subtask be need encoded according to second of coded format when, pass through second processing
Device executes the coding subtask, obtains treating the transcoding picture that encoded picture data are encoded according to second of coded format,
The first coded format is high compared to the encoder complexity of second of coded format.
In this step, second of coded format can be other coded formats in addition to webp coded format, such as
Jpg coded format, second processor can be CPU.Equally, coding subtask can be judged according to the format identification (FID) of coded format
It whether is to need to be encoded according to jpg coded format, if it is, the coding that can carry out jpg coded format by CPU walks
Suddenly, it obtains treating the transcoding picture that encoded picture data are encoded according to jpg coded format.In general, webp encoder complexity
It is 10 times or more of jpg encoder complexity.
Picture code-transferring method provided by the above embodiment, by decoding scaling task and the first relative complex coded format
Encoding tasks executed by first processor, the encoding tasks of second of coded format are executed by second processor, wherein first
Kind coded format is high compared to the encoder complexity of second of coded format;To realize during picture transcoding, for not
Same processing task is executed by different processing modules, and the process resource of equipment is more reasonably utilized, reduces operation cost
And management cost.
With reference to the accompanying drawing, method and device provided by the invention is described in detail with specific embodiment.
In embodiments of the present invention, specifically, the above method can be applied to second processor, below with the execution of method
Main body be second processor for, above-mentioned picture code-transferring method is described in detail, as shown in Figure 3, comprising:
Step 301, second processor split into transcoding task after getting the transcoding task for picture to be transcoded
Decoding scaling subtask and coding subtask.
In this step, transcoding task is to be sent to second processing according to the user access request received by control centre
Device, transcoding task can be made of decoding scaling subtask and coding subtask, and second processor is being got for wait turn
After the transcoding task of code picture, transcoding task can be split into decoding scaling subtask according to decoding mark and code identification
With coding subtask.
Step 302, second processor judge to encode whether subtask is to need to be encoded according to the first coded format.
In this step, can judge to encode whether subtask is to need according to first according to the format identification (FID) of coded format
Kind coded format is encoded.
If it is, 303 are entered step, if it is not, then entering step 308:
Step 303, second processor are sent to first processor to be executed decoding scaling subtask and encodes the of subtask
One assignment instructions, carrying in first task instruction indicates the code identification that is encoded according to the first coded format.
Specifically, the code identification can be the format identification (FID) of the first coded format, such as webp format identification (FID).
After step 304, first processor receive first task instruction, for picture to be transcoded, decoding scaling is executed
Task obtains being decoded picture to be transcoded image data after scaling, as image data to be encoded.
Step 305, first processor are after having executed decoding scaling subtask, based on entrained in first task instruction
It indicates the code identification encoded according to the first coded format, executes coding subtask, i.e., according to the first coded format
It treats encoded picture data to be encoded, obtains the transcoding picture encoded according to the first coded format.
In this step, the first coded format specifically can be webp coded format.
Step 306, first processor return to the first task instructed for first task to second processor and respond, and first
Task response indicates to have executed decoding scaling subtask and coding subtask.
Further, obtained turn encoded according to the first coded format can be carried in first task response
Code picture can also carry the transcoding picture encoded according to the first coded format in first task response in memory
First storage location.
Step 307, second processor receive first task response after, from first task response in directly acquire according to
The transcoding picture that the first coded format is encoded, or above-mentioned first storage location is obtained from first task response, and
Transcoding picture is obtained from first storage location of memory.
Step 308, second processor send the second assignment instructions for executing decoding scaling subtask to first processor.
Second assignment instructions indicate that first processor needs to be implemented decoding scaling subtask, appoint without executing coding
Business.
After step 309, first processor receive the second assignment instructions, for picture to be transcoded, decoding scaling is executed
Task obtains being decoded picture to be transcoded image data after scaling, as image data to be encoded.
In this step, first processor is after receiving the second assignment instructions, due to not carrying table in the second assignment instructions
Show the code identification encoded according to the first coded format, can determine and only need to be implemented decoding scaling subtask, without
Need to be implemented coding subtask.
The second task of step 310, first processor to second processor return for the second assignment instructions responds, and second
Task response indicates to have executed decoding scaling subtask.
Further, the second task response in can also carry for picture to be transcoded be decoded scaling after obtain to
Encoded picture data, the second task response in can also carry for picture to be transcoded be decoded scaling after obtain it is to be encoded
The second storage location of image data in memory.
Step 311, second processor directly acquire progress from the response of the second task after receiving the response of the second task
Image data to be encoded after decoding scaling, or obtain above-mentioned second storage location from the response of the second task, and from memory
In the second storage location obtain be decoded scaling after image data to be encoded.
Step 312, second processor are to the above-mentioned image data to be encoded being decoded after scaling got, according to the
Two kinds of coded formats are encoded, and the transcoding picture encoded according to second of coded format is obtained.
In this step, second of coded format can be other coded formats in addition to webp coded format, for example, can
To be jpg coded format, png coded format, bmp coded format etc..
In embodiments of the present invention, first processor can be FPGA, and second processor can be CPU.It can exist in advance
The execution logic that enough decoding scalings are disposed on FPGA is held with the first coded format, such as the coding of webp coded format
Row logic, so that decoding scaling process and complicated webp cataloged procedure are executed by first processor FPGA, the volume of extended formatting
Code process, such as jpg cataloged procedure are executed by second processor CPU, so that the picture transcoding of two kinds of formats has shared decoding contracting
The execution logic put can realize that the picture of multiple format turns in the case where not increasing hardware device in the same apparatus
Code.Moreover, webp coding is 10 times of jpg encoder complexity or more, gives complicated webp coding to FPGA and complete, reasonably
Deploy the computing resource of processor.
Based on the same inventive concept, the above-mentioned picture code-transferring method provided according to embodiments of the present invention, the embodiment of the present invention
A kind of picture transcoding device is also provided, applied to the electronic equipment with first processor and second processor, structural representation
As shown in Fig. 4-1, which includes: figure
Task splits module 40, for after getting the transcoding task for picture to be transcoded, transcoding task to be split
At decoding scaling subtask and coding subtask;
First task execution module 41 is obtained for executing decoding scaling subtask by first processor to be transcoded
Picture is decoded the image data after scaling, as image data to be encoded;
First task execution module 41 is also used to be encoded for needs according to the first coded format when coding subtask
When, coding subtask is executed by first processor, obtains treating encoded picture data and be compiled according to the first coded format
The transcoding picture of code;
Second task execution module 42, for being to need to be encoded according to second of coded format when coding subtask
When, coding subtask is executed by second processor, obtains treating encoded picture data and be compiled according to second of coded format
The transcoding picture of code, the first coded format are high compared to the encoder complexity of second of coded format.
In one embodiment, which is applied to second processor;
Above-mentioned first task execution module 41, be specifically used for when coding subtask be need according to the first coded format into
When row coding, the first task instruction for executing decoding scaling subtask and encoding subtask is sent to first processor, it is first
The code identification for indicating to be encoded according to the first coded format is carried in business instruction;First processor is received for first
The first task response that business instruction returns, first task response indicate to have executed decoding scaling subtask and coding subtask;With
And when encoding subtask is to need to be encoded according to second of coded format, is sent to first processor and execute decoding scaling
Second assignment instructions of subtask;It receives first processor to respond for the second task that the second assignment instructions return, second
Business response indicates to have executed decoding scaling subtask.
In one embodiment, the transcoding picture encoded according to the first coded format is carried in first task response
The first storage location in memory;
As shown in the Fig. 4-2, above-mentioned apparatus, further includes:
Module 43 is obtained, for obtaining transcoding from the first storage location in memory after receiving first task response
Picture.
In one embodiment, the image data to be encoded after being decoded scaling is carried in the response of the second task in memory
In the second storage location;
Above-mentioned acquisition module 43 is also used to after receiving the response of the second task, obtains from the second storage location in memory
Take the image data to be encoded after being decoded scaling.
In one embodiment, the first coded format is webp coded format, and second of coded format is except webp is compiled
Other coded formats other than code format.
In one embodiment, first processor is on-site programmable gate array FPGA, and second processor is central processing
Device CPU.
The embodiment of the invention also provides a kind of electronic equipment, structural schematic diagram is as shown in figure 5, include first processor
50, second processor 51, communication interface 52, memory 53 and communication bus 54, wherein first processor 50, second processor
51, communication interface 52, memory 53 completes mutual communication by communication bus 54;
Memory 53, for storing computer program;
First processor 50, for being decoded scaling to picture to be transcoded, image data after decoding scaling, as to
Encoded picture data;And when encoding subtask is to need to be encoded according to the first coded format, code pattern the piece number is treated
It is encoded according to according to the first coded format, obtains transcoding picture;
Second processor 51 when for executing the program stored on memory 53, realizes following steps:
After getting the transcoding task for picture to be transcoded, transcoding task is split into decoding scaling subtask and volume
Numeral task;
Decoding scaling subtask is executed by first processor, obtains being decoded picture to be transcoded in picture after scaling
Data, as image data to be encoded;
When encoding subtask is to need to be encoded according to the first coded format, coding is executed by first processor
Subtask obtains treating the transcoding picture that encoded picture data are encoded according to the first coded format;
When encoding subtask is to need to be encoded according to second of coded format, coding is executed by second processor
Subtask obtains treating the transcoding picture that encoded picture data are encoded according to second of coded format, the first coding lattice
Formula is high compared to the encoder complexity of second of coded format.
In one embodiment, this method is applied to second processor;
Decoding scaling subtask is executed by first processor, when coding subtask is to need according to the first coded format
When being encoded, coding subtask is executed by first processor, comprising:
When encoding subtask is to need to be encoded according to the first coded format, solution is executed to first processor transmission
Code scaling subtask and the first task for encoding subtask instruct, and carrying in first task instruction indicates to encode lattice according to the first
The code identification that formula is encoded;
The first task response that first processor is returned for first task instruction is received, first task response indicates to have held
Row decoding scaling subtask and coding subtask;
When encoding subtask is to need to be encoded according to second of coded format, solution is executed to first processor transmission
Second assignment instructions of code scaling subtask;
The second task response that first processor is returned for the second assignment instructions is received, the response of the second task indicates to have held
Row decoding scaling subtask.
In one embodiment, the transcoding picture encoded according to the first coded format is carried in first task response
The first storage location in memory;
The above method, further includes:
After receiving first task response, transcoding picture is obtained from the first storage location in memory.
In one embodiment, the image data to be encoded after being decoded scaling is carried in the response of the second task in memory
In the second storage location;
The above method, further includes:
Receive the second task response after, from memory the second storage location obtain be decoded scaling after wait compile
Code image data.
In one embodiment, the first coded format is webp coded format, and second of coded format is except webp is compiled
Other coded formats other than code format.
In one embodiment, the first processor is on-site programmable gate array FPGA, and the second processor is
Central processor CPU.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component
Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just
It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete
Door or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can
It reads to be stored with computer program in storage medium, the computer program realizes any of the above-described picture transcoding when being executed by processor
The step of method.
In another embodiment provided by the invention, a kind of computer program product comprising instruction is additionally provided, when it
When running on computers, so that computer executes any picture code-transferring method in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
For electronic equipment, computer readable storage medium, computer program product, since it is substantially similar to the method embodiment, institute
To be described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (13)
1. a kind of picture code-transferring method, which is characterized in that applied to the electronic equipment with first processor and second processor,
The described method includes:
After getting the transcoding task for picture to be transcoded, the transcoding task is split into decoding scaling subtask and volume
Numeral task;
The decoding is executed by the first processor and scales subtask, obtains being decoded scaling to the picture to be transcoded
Image data afterwards, as image data to be encoded;
When the coding subtask is to need to be encoded according to the first coded format, executed by the first processor
The coding subtask obtains the transcoding figure encoded to the image data to be encoded according to the first described coded format
Piece;
When the coding subtask is to need to be encoded according to second of coded format, executed by the second processor
The coding subtask obtains the transcoding figure encoded to the image data to be encoded according to second of coded format
Piece, the first described coded format are high compared to the encoder complexity of second of coded format.
2. the method according to claim 1, wherein the method is applied to the second processor;
It is described that decoding scaling subtask is executed by the first processor, it is described when the coding subtask is to need to press
When being encoded according to the first coded format, the coding subtask is executed by the first processor, comprising:
When the coding subtask is to need to be encoded according to the first coded format, the transmission of Xiang Suoshu first processor is held
The first task of the row decoding scaling subtask and the coding subtask instructs, and carrying in the first task instruction indicates
The code identification encoded according to the first described coded format;
Receive the first task response that the first processor is returned for first task instruction, the first task response
Expression has executed the decoding scaling subtask and the coding subtask;
When the coding subtask is to need to be encoded according to second of coded format, the transmission of Xiang Suoshu first processor is held
Second assignment instructions of row decoding scaling subtask;
Receive the second task response that the first processor is returned for second assignment instructions, the second task response
Expression has executed decoding scaling subtask.
3. according to the method described in claim 2, it is characterized in that, the first task response in carry according to it is described the first
The first storage location of the transcoding picture that coded format is encoded in memory;
The method, further includes:
After receiving the first task response, the transcoding picture is obtained from first storage location in memory.
4. according to the method described in claim 3, it is characterized in that, after carrying is decoded scaling in second task response
The image data to be encoded the second storage location in memory;
The method, further includes:
After receiving the second task response, it is decoded from second storage location acquisition in memory after scaling
The image data to be encoded.
5. method according to claim 1-4, which is characterized in that the first described coded format is webp coding
Format, second of coded format are other coded formats in addition to webp coded format.
6. method according to claim 1-4, which is characterized in that the first processor is field programmable gate
Array FPGA, the second processor are central processor CPU.
7. a kind of picture transcoding device, which is characterized in that applied to the electronic equipment with first processor and second processor,
Described device includes:
Task splits module, for after getting the transcoding task for picture to be transcoded, the transcoding task to be split into
Decoding scaling subtask and coding subtask;
First task execution module scales subtask for executing the decoding by the first processor, obtains to described
Picture to be transcoded is decoded the image data after scaling, as image data to be encoded;
The first task execution module is also used to be compiled for needs according to the first coded format when the coding subtask
When code, the coding subtask is executed by the first processor, is obtained to the image data to be encoded according to described the
A kind of transcoding picture that coded format is encoded;
Second task execution module, for when the coding subtask be need encoded according to second of coded format when,
The coding subtask is executed by the second processor, obtains compiling the image data to be encoded according to described second
The transcoding picture that code format is encoded, the first described coded format compare the encoder complexity of second of coded format
It is high.
8. device according to claim 7, which is characterized in that described device is applied to the second processor;
The first task execution module is specifically used for when the coding subtask being to need to carry out according to the first coded format
When coding, Xiang Suoshu first processor sends the execution decoding scaling subtask and the first task of the coding subtask refers to
It enables, carries the code identification for indicating to be encoded according to the first described coded format in the first task instruction;Receive institute
The first task response that first processor is returned for first task instruction is stated, the first task response indicates to have executed
The decoding scaling subtask and the coding subtask;And when the coding subtask is to need according to second of coding lattice
When formula is encoded, Xiang Suoshu first processor sends the second assignment instructions for executing decoding scaling subtask;Receive institute
The second task response that first processor is returned for second assignment instructions is stated, the second task response indicates to have executed
The decoding scales subtask.
9. device according to claim 8, which is characterized in that carried in first task response according to it is described the first
The first storage location of the transcoding picture that coded format is encoded in memory;
Described device, further includes:
Module is obtained, for obtaining institute from first storage location in memory after receiving the first task response
State transcoding picture.
10. device according to claim 9, which is characterized in that carried in the second task response and be decoded scaling
The second storage location of the image data to be encoded in memory afterwards;
The acquisition module is also used to after receiving the second task response, from second storage location in memory
Obtain the image data to be encoded after being decoded scaling.
11. according to the described in any item devices of claim 7-10, which is characterized in that the first described coded format is webp volume
Code format, second of coded format are other coded formats in addition to webp coded format.
12. according to the described in any item devices of claim 7-10, which is characterized in that the first processor is field-programmable
Gate array FPGA, the second processor are central processor CPU.
13. a kind of electronic equipment, which is characterized in that including first processor, second processor, communication interface, memory and lead to
Believe bus, wherein first processor, second processor, communication interface, memory complete mutual lead to by communication bus
Letter;
Memory, for storing computer program;
The first processor, for being decoded scaling to the picture to be transcoded, the image data after decoding scaling, as
Image data to be encoded;And when the coding subtask be need encoded according to the first coded format when, to it is described to
Encoded picture data are encoded according to the first described coded format, obtain transcoding picture;
The second processor when for executing the program stored on memory, realizes any side claim 1-6
Method step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910569955.1A CN110324629B (en) | 2019-06-27 | 2019-06-27 | Image transcoding method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910569955.1A CN110324629B (en) | 2019-06-27 | 2019-06-27 | Image transcoding method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110324629A true CN110324629A (en) | 2019-10-11 |
CN110324629B CN110324629B (en) | 2021-04-09 |
Family
ID=68121400
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910569955.1A Active CN110324629B (en) | 2019-06-27 | 2019-06-27 | Image transcoding method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110324629B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110913225A (en) * | 2019-11-19 | 2020-03-24 | 北京奇艺世纪科技有限公司 | Image encoding method, image encoding device, electronic device, and computer-readable storage medium |
WO2023216798A1 (en) * | 2022-05-13 | 2023-11-16 | 腾讯科技(深圳)有限公司 | Audio and video transcoding apparatus and method, and device, medium and product |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104168488A (en) * | 2014-08-29 | 2014-11-26 | 北京奇艺世纪科技有限公司 | Video transcoding method and device |
CN104244025A (en) * | 2013-06-09 | 2014-12-24 | 北京同步科技有限公司 | Cluster transcoding system and method thereof |
CN104348886A (en) * | 2013-08-08 | 2015-02-11 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN104717517A (en) * | 2015-03-31 | 2015-06-17 | 北京奇艺世纪科技有限公司 | Scheduling method and scheduling device for video transcoding task |
CN105338358A (en) * | 2014-07-25 | 2016-02-17 | 阿里巴巴集团控股有限公司 | Image decoding method and device |
US9547836B2 (en) * | 2013-06-28 | 2017-01-17 | Verizon Patent And Licensing Inc. | Method and apparatus for scheduling media processing jobs on multiple processors to maximize processor utilization |
CN107333136A (en) * | 2017-06-26 | 2017-11-07 | 西安万像电子科技有限公司 | Method for encoding images and device |
-
2019
- 2019-06-27 CN CN201910569955.1A patent/CN110324629B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104244025A (en) * | 2013-06-09 | 2014-12-24 | 北京同步科技有限公司 | Cluster transcoding system and method thereof |
US9547836B2 (en) * | 2013-06-28 | 2017-01-17 | Verizon Patent And Licensing Inc. | Method and apparatus for scheduling media processing jobs on multiple processors to maximize processor utilization |
CN104348886A (en) * | 2013-08-08 | 2015-02-11 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN105338358A (en) * | 2014-07-25 | 2016-02-17 | 阿里巴巴集团控股有限公司 | Image decoding method and device |
CN104168488A (en) * | 2014-08-29 | 2014-11-26 | 北京奇艺世纪科技有限公司 | Video transcoding method and device |
CN104717517A (en) * | 2015-03-31 | 2015-06-17 | 北京奇艺世纪科技有限公司 | Scheduling method and scheduling device for video transcoding task |
CN107333136A (en) * | 2017-06-26 | 2017-11-07 | 西安万像电子科技有限公司 | Method for encoding images and device |
Non-Patent Citations (2)
Title |
---|
HUI ZHAO等: "Prediction-Based and Locality-Aware Task Scheduling for Parallelizing Video Transcoding Over Heterogeneous MapReduce Cluster", 《IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY》 * |
毕莎莎等: "基于Hadoop视频转码的任务调度算法", 《无线电通信技术》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110913225A (en) * | 2019-11-19 | 2020-03-24 | 北京奇艺世纪科技有限公司 | Image encoding method, image encoding device, electronic device, and computer-readable storage medium |
CN110913225B (en) * | 2019-11-19 | 2022-03-08 | 北京奇艺世纪科技有限公司 | Image encoding method, image encoding device, electronic device, and computer-readable storage medium |
WO2023216798A1 (en) * | 2022-05-13 | 2023-11-16 | 腾讯科技(深圳)有限公司 | Audio and video transcoding apparatus and method, and device, medium and product |
Also Published As
Publication number | Publication date |
---|---|
CN110324629B (en) | 2021-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104246759B (en) | Application programming interfaces testing service | |
Hu et al. | Vita: A crowdsensing-oriented mobile cyber-physical system | |
US9027837B2 (en) | Method of recognizing QR code in image data and apparatus and method for converting QR code in content data into touchable object | |
WO2021079262A1 (en) | Automatic delineation and extraction of tabular data using machine learning | |
Wang et al. | Interoperability in cloud manufacturing: a case study on private cloud structure for SMEs | |
CN110324629A (en) | Picture code-transferring method, device and electronic equipment | |
CN106462561A (en) | Optimized browser render process | |
El Beqqal et al. | Taxonomy on IoT Technologies for Designing Smart Systems. | |
US20140337296A1 (en) | Techniques to recover files in a storage network | |
Hu et al. | Pipeline parallelism for inference on heterogeneous edge computing | |
CN104205071A (en) | Information processing system, information processing method, communications terminal, server, control method therefor, and control program | |
US9984319B2 (en) | Encoding and decoding data in two-dimensional symbology | |
Taneja et al. | AirBits: a web application development using microsoft azure | |
CN107908552A (en) | A kind of test method based on link, device and equipment | |
CN107506341A (en) | Document conversion method and device | |
CN110489563B (en) | Method, device, equipment and computer readable storage medium for representing graph structure | |
CN115567526B (en) | Data monitoring method, device, equipment and medium | |
CN113656044B (en) | Android installation package compression method and device, computer equipment and storage medium | |
CN107273102A (en) | The generation method and device of mobile applications | |
CN116168403A (en) | Medical data classification model training method, classification method, device and related medium | |
CN117396865A (en) | Enhancing authentication in a mobile device | |
Hao et al. | Medical device integration model based on the internet of things | |
KR102107125B1 (en) | Definition and method of the basic identity information and the identification process of iot which is based on semantic web | |
Bordel et al. | Cyber-physical systems for environment and people monitoring in large facilities: a study case in public health | |
CN104156368A (en) | Method and device for providing application access result |
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 |