Summary of the invention
In view of above content, be necessary to provide a kind of image data coding method, its SVC encoder capable of using according to the display screen size of different terminal equipment, is encoded to image data, obtains the coding image of different sizes.
In one embodiment, this method comprises the steps:
The image request that receiving terminal apparatus is one type;
Judge whether the image request of the type was handled;
If the image Request Processing mistake of the type according to the image request of this terminal equipment, from the memory of server, directly obtain the image behind the coding, and the image behind the output encoder is to this terminal equipment; And
If the image request of the type was not handled; In the encoder of server, add and handle the type image tasks requested; Said encoder is according to the image request of the type; Current image data is encoded, image and this image corresponding image request type behind the coding are stored in the memory, and the image behind the output encoder is to this terminal equipment.
Preceding method can be carried out by electronic equipment (like server), and wherein this electronic equipment has display screen, one or more processor, the memory that has attached graphic user interface (GUI) and is kept at one or more modules, program or the instruction set that is used to carry out these methods in the memory.In certain embodiments, this electronic equipment provides the multiple function that comprises radio communication.
The instruction that is used for carrying out preceding method can be included in and be configured to the computer program carried out by one or more processors.
Compared to prior art, described image data coding method and server thereof, its SVC capable of using (Scalable Video Coding; Scalable video) encoder; According to the display screen size of different terminal equipment, image data is encoded, obtain the coding image of different sizes; And the coding image that transmits different sizes reaches the purpose of saving transmission space and cost to terminal equipment.
Embodiment
As shown in Figure 1, be the applied environment sketch map of image data coding of the present invention.In the present embodiment, monitor 10 sends the image data 20 of picked-up to SVC (Scalable Video Coding, scalable video) encoder 24.Event sniffer (Event Listener) 25 is used to detect the image request of terminal equipment (like T1, T2 and T3), and the image request that detects is sent to SVC encoder 24.
In the present embodiment, SVC encoder 24 is arranged in server 2 (consulting shown in Figure 2) with event sniffer 25.SVC encoder 24 is encoded to this image data 20 according to different coding block size (like P1, P2 and P3) and resolution according to the size of terminal equipment display screen, obtains the coding image of different sizes.Then, server 2 sends the coding image of different sizes to corresponding terminal equipment.
In the present embodiment, this server 2 also comprises memory 21, display screen 22 and processor 23.Wherein, Said memory 21, display screen 22, processor 23, SVC encoder 24 and event sniffer 25 are connected through data/address bus; Store the image data 210 (being called for short the coding image) after SVC encoder 24 is encoded in the said memory 21 like transmitting data stream and various parameters etc.This SVC encoder 24 is used for the display screen size according to different terminal equipment, and image data 20 is encoded, and obtains the coding image 210 of different sizes.Then, server 2 transmits the coding image 210 of different sizes to terminal equipment, and detailed process is referring to the description of Fig. 3.
In the present embodiment, said server 2 can provide one or more modules, and said one or more modules are stored in the said memory 21 and are configured to and carried out by one or more processors (present embodiment is a processor 23), to accomplish the present invention.The alleged module of the present invention is to accomplish the computer program code segments of a specific function, is more suitable in describing the implementation of software in computer than program.
Said display screen 22 is used for code displaying image 210, like video streaming and audio frequency crossfire etc.Said monitor 10 comprises, but is not limited to, can by software or hardware circuit mode drive patrol turntable video camera, fire ball video camera (SpeedDome) but and translation (Pan), tilt (Tilt), PTZ (Pan/Tilt/Zoom) video camera of convergent-divergent (Zoom) etc.
As shown in Figure 3, be the flow chart of the preferred embodiment of image data coding method of the present invention.
Step S1, server 2 is through the image request of a certain type of event sniffer 25 receiving terminal apparatus.Said image request comprises: position in this image data of the encoded block of the image data that this terminal equipment need receive size, this encoded block, and the resolution (being encoding rate) of this encoded block etc.In the present embodiment, encoded block is big more, and the image behind the coding will be big more, and resolution is high more, and the image behind the coding is clear more.For example; Consult shown in Figure 1ly, suppose that terminal equipment T3 is a mobile phone, terminal equipment T2 is PDA (Personal Digital Assistant; Palmtop PC); Terminal equipment T1 is a desktop computer, and P1, P2, P3 represent different coding block size (i.e. the part of three of a picture different sizes), and P1<P2<P3.Then can set: the encoded block size of terminal equipment T3 is P1; P1 adopts low encoding rate (like 800*600); The encoded block size of terminal equipment T2 is (P1+P2); Encoding rate (like 1024*768) during P2 adopts, the encoded block size of terminal equipment T3 is (P1+P2+P3), P3 adopts high code-rate (like 1280*1024).
Step S2, server 2 judge whether the image request of the type was handled.If the image Request Processing mistake of the type, execution in step S3 was not if execution in step S4 was then handled in the image request of the type.
Step S3, server 2 be according to the image request of this terminal equipment, from memory 21, directly obtains the image 210 behind the coding, then execution in step S6.In the present embodiment; If server 2 was handled certain type image request; Then SVC encoder 24 is when encoding to image data 20; Can increase the function of image data 20 being encoded according to the image request of the type, generating the type image request corresponding codes image, and the image after will encoding 210 and this image corresponding image request type are kept in the memory 21.Be appreciated that when follow-up server 2 can directly read the image 210 behind the coding from memory 21 when the same image request is arranged.
Step S4, server 2 add processing the type image tasks requested in SVC encoder 24.
Step S5, SVC encoder 24 encode to the image data 20 of monitor 10 current picked-ups according to the image request of the type, and the image after will encoding and this image corresponding image request type are stored in the memory 21.
Step S6, the image behind the output encoder is to this terminal equipment.
For the ease of explanation, above embodiment is that only to send one type image request with terminal equipment be that example describes at every turn.Be appreciated that in other embodiments each terminal equipment also can send two or more image request type at every turn, specifically consults illustrating of Fig. 4.
Consult shown in Figure 4, P2 be in the image data except P1 rest parts.The image request of supposing to have sent the big or small P1 (a type) of being of encoded block before the terminal equipment T3 is to server 2.Then when terminal equipment T2 transmission encoded block size is the image request of (P1+P2) (two types), 24 need of SVC encoder are encoded to block P2, send the block P2 behind the coding to this terminal equipment T2.Because the encoded block size had been handled for the image request of P1; SVC encoder 24 can be according to P1 corresponding image request type; In real time the image data 20 of monitor 10 picked-ups is encoded; And the image after will encoding is kept in the memory 21, so the image behind the block P1 coding can directly read from memory 21.
In the present embodiment, adopt the different blocks of 24 pairs of image datas of SVC encoder to encode, in other embodiments, those skilled in the art also can adopt other encoder to come embodiment of the present invention.
What should explain at last is; Above embodiment is only unrestricted in order to technical scheme of the present invention to be described; Although the present invention is specified with reference to preferred embodiment; Those of ordinary skill in the art should be appreciated that and can make amendment or be equal to replacement technical scheme of the present invention, and do not break away from the spirit and the scope of technical scheme of the present invention.