CN105989175B - Image display method and apparatus - Google Patents

Image display method and apparatus Download PDF

Info

Publication number
CN105989175B
CN105989175B CN201510098389.2A CN201510098389A CN105989175B CN 105989175 B CN105989175 B CN 105989175B CN 201510098389 A CN201510098389 A CN 201510098389A CN 105989175 B CN105989175 B CN 105989175B
Authority
CN
China
Prior art keywords
macro block
file
information
image file
image
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
CN201510098389.2A
Other languages
Chinese (zh)
Other versions
CN105989175A (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.)
Shenzhen Tencent Computer Systems Co Ltd
Original Assignee
Shenzhen Tencent Computer Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tencent Computer Systems Co Ltd filed Critical Shenzhen Tencent Computer Systems Co Ltd
Priority to CN201510098389.2A priority Critical patent/CN105989175B/en
Publication of CN105989175A publication Critical patent/CN105989175A/en
Application granted granted Critical
Publication of CN105989175B publication Critical patent/CN105989175B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of image display method and apparatuses, belong to technical field of image processing.The described method includes: obtaining the macro block information for decoding failure in image file when detecting the macro block decoding failure in image file;According to the macro block information of decoding failure, modifies to the first the file information of image file, obtain the second the file information;Determine the specified macro block in image file;According to the second the file information and specified macro block, new image file is generated;New image file is decoded, is performed image display according to decoding result.The present invention, which passes through, determines that the specified macro block in image file generates new image file according to the second the file information and specified macro block, is decoded to new image file, is performed image display according to decoding result.Since new image file can be generated according to the macro block of successfully decoded, according to new image file display portion image when there is the macro block of decoding failure.Therefore, the display effect of image is preferable.

Description

Image display method and apparatus
Technical field
The present invention relates to technical field of image processing, in particular to a kind of image display method and apparatus.
Background technique
With the fast development of internet, the data transmitted in internet are also more and more.Wherein, image is as a kind of normal With media data, it is often necessary to be shown in webpage.Since the display methods to image influences image in interface Display effect, therefore, how to carry out display to image is the key that improve image display effect.
The relevant technologies when displaying an image, used method are as follows: image is decoded, according to decoding result to image It is shown.Wherein, during being decoded to image, if there is the macro block of decoding failure in image, not to entire Image is shown.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
Since when there is the macro block of decoding failure in image, whole image will not all be shown, and there is also solutions in image The successful a part of macro block of code.Therefore, the poor display effect of image.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of image display method and apparatuses.It is described Technical solution is as follows:
On the one hand, a kind of image display method is provided, which comprises
When detecting the macro block decoding failure in image file, the macro block letter that failure is decoded in described image file is obtained Breath;
According to the macro block information of decoding failure, modifies to the first the file information of described image file, obtain second The file information, first the file information is for describing image property;
Determine the specified macro block in described image file, the position of the specified macro block is located at before the macro block of decoding failure And successfully decoded;
According to the second the file information and the specified macro block, new image file is generated;
New image file is decoded, is performed image display according to decoding result.
On the other hand, a kind of image display device is provided, described device includes:
Module is obtained, for obtaining and solving in described image file when detecting the macro block decoding failure in image file The macro block information of code failure;
Modified module carries out the first the file information of described image file for the macro block information according to decoding failure Modification obtains the second the file information, and first the file information is for describing image property;
Determining module, for determining the specified macro block in described image file, the position of the specified macro block is located at decoding Before the macro block of failure and successfully decoded;
Generation module, for generating new image file according to the second the file information and the specified macro block;
Display module is performed image display for being decoded to new image file according to decoding result.
Technical solution provided in an embodiment of the present invention has the benefit that
The macro block information for decoding failure in image file by obtaining, according to the macro block information of decoding failure, to image text First the file information of part is modified, and the second the file information is obtained, determine in image file be located at decoding failure macro block it Preceding and successfully decoded specified macro block generates new image file according to the second the file information and specified macro block, to new figure As file is decoded, performed image display according to decoding result.Due to when exist decoding failure macro block when, can be according to solution Successfully macro block generates new image file to code, according to new image file display portion image.Therefore, the display effect of image Preferably.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of image display method flow chart that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides a kind of image display method flow chart;
Fig. 3 be another embodiment of the present invention provides a kind of Webp file format schematic diagram;
Fig. 4 be another embodiment of the present invention provides a kind of Webp file format schematic diagram;
Fig. 5 be another embodiment of the present invention provides a kind of image display device structural schematic diagram;
Fig. 6 be another embodiment of the present invention provides a kind of terminal structural schematic diagram.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Due to when displaying an image, being first decoded in the related technology to image, image is carried out further according to decoding result Display.During being decoded to image, if there is the macro block of decoding failure in image, whole image is not shown Show, and there is also a part of macro blocks of successfully decoded in image at this time.Therefore, the poor display effect of image.
In order to prevent above situation, the display effect of image is improved, the embodiment of the invention provides a kind of image display sides Method, referring to Fig. 1, method flow provided in this embodiment includes:
101, when detecting the macro block decoding failure in image file, the macro block letter that failure is decoded in image file is obtained Breath.
102, it according to the macro block information of decoding failure, modifies to the first the file information of image file, obtains second The file information, the first the file information is for describing image property.
103, determine the specified macro block in image file, specify macro block position be located at decoding failure macro block before and Successfully decoded.
104, according to the second the file information and specified macro block, new image file is generated.
105, new image file is decoded, is performed image display according to decoding result.
Method provided in an embodiment of the present invention decodes the macro block information of failure by obtaining, according to decoding in image file The macro block information of failure, modifies to the first the file information of image file, obtains the second the file information, determine image file In be located at before the macro block of decoding failure and the specified macro block of successfully decoded, it is raw according to the second the file information and specified macro block The image file of Cheng Xin is decoded new image file, is performed image display according to decoding result.Due to when in the presence of decoding When the macro block of failure, new image file can be generated according to the macro block of successfully decoded, according to new image file display portion Image.Therefore, the display effect of image is preferable.
As a kind of alternative embodiment, the macro block information that failure is decoded in image file is obtained, comprising:
Determine location information of the macro block of decoding failure in image file;
According to location information, the macro block information that failure is decoded in image file is obtained.
As a kind of alternative embodiment, the first the file information includes at least the length of image file, image file offset in advance If length, the length of macro block Part0 and the total quantity of macro block after quantity.
New image file is generated according to the second the file information and specified macro block as a kind of alternative embodiment, comprising:
The macro block of second the file information and successfully decoded is combined according to format, obtains new image file.
As a kind of alternative embodiment, according to the macro block information of decoding failure, to the first the file information of image file into Row modification obtains the second the file information, and the first the file information is for describing image property, comprising:
First the file information is decoded;
According to the macro block information of decoding failure, the specified parameter in decoded first the file information is redefined, is specified Parameter includes at least file size parameter and number of macroblocks parameter;
The first the file information for redefining specified parameter is encoded, the second the file information is obtained.
All the above alternatives can form alternative embodiment of the invention using any combination, herein no longer It repeats one by one.
The embodiment of the invention provides a kind of image display methods, referring to fig. 2, method flow packet provided in this embodiment It includes:
201, when detecting the macro block decoding failure in image file, determine the macro block of decoding failure in image file Location information.
The method provided in the present embodiment is applicable to the image file of Webp format, is readily applicable to other formats Image file, the present embodiment do not make specific limit to the format of image file.When the format of image file is Webp format, figure As the content in file can be arranged according to the format of Fig. 3.In Fig. 3, image file can be stored in Webp identification fields Length, the length after image file offset preset quantity can be stored in VP8 identification fields, frame head identification field can store macro The length of block Part0, Part0 field can store the total quantity of macro block.
Macro block in image can be made of a luminance pixel block and additional two chroma pixel blocks.Wherein, luminance block It can be the block of pixels of 16x16 size, and depending on the size of two coloration block of image pixels can be according to the sample format of its image. Macro block in image can be arranged with a matrix type in image file, as may include 8 macro blocks in an image file Row, each macro-block line include 6 column macro blocks.
Since macro block has been arranged by way of matrix in image file, when detecting in image file Macro block decode failure when, it may be determined that decode location information of the macro block of failure in image file.For example, if what decoding failed Macro block is the macro block of the 4th row in image file, the 3rd column, then decoding location information of the macro block of failure in image file is the 4th Row, the 3rd column.
It should be noted that when being decoded to Webp image, usually by standard Webp decoder come to Webp It is decoded.And standard Webp decoder is when being decoded Webp image, if detecting the macro block decoding in image file Failure, then can directly abandon showing the image file, and will not carrying recorded decoding failure macro block in image file Location information.Therefore, in order to execute this step 201, can lead in advance according to the customized decoder of Webp format decoding standard Location information of the macro block of the recordable decoding failure of the decoder in image file is crossed, to execute the subsequent step of this method Suddenly, the present embodiment is not especially limited this.
202, according to location information, the macro block information that failure is decoded in image file is obtained.
The present embodiment not to according to location information, make specifically by the mode for obtaining the macro block information for decoding failure in image file It limits, including but not limited to: according to location information, determining the macro-block line where the macro block for decoding failure in image file, will scheme The total size of macro block before being expert at as the macro block of macro-block line and decoding failure where decoding the macro block of failure in file, as Decode the macro block information of failure.
203, it according to the macro block information of decoding failure, modifies to the first the file information of image file, obtains second The file information, the first the file information is for describing image property.
Including at least the length, macro after the length of image file, image file offset preset quantity in first the file information The length of block Part0 and the total quantity of macro block, the present embodiment do not make specific limit to the content in the first the file information.Wherein, Every terms of information in first the file information can be stored in each field in above-mentioned Fig. 3, and concrete mode can refer to above-mentioned steps 201 In content.
It should be noted that when image file format is Webp format, due to the frame head mark in the first the file information The content stored in field and Part0 field is usually according to CABAC (Context-based Adaptive Binary Arithmetic Coding, adaptivity binary arithmetic coding) coding made of, i.e. Frame header and Part0 field are Made of being encoded according to CABAC.Therefore, it when modifying to the partial information in the first the file information, needs first to the first text Part information is decoded.Correspondingly, the present embodiment is not to the macro block information according to decoding failure, to the first file of image file Information is modified, and the mode for obtaining the second the file information specifically limits, including but not limited to: being carried out to the first the file information Decoding;According to the macro block information of decoding failure, the specified parameter in decoded first the file information is redefined, specifies parameter Including at least file size parameter and number of macroblocks parameter;The first the file information for redefining specified parameter is encoded, Obtain the second the file information.
Macro block information due in above-mentioned steps 202, decoding failure can be the macro block where the macro block of decoding failure The total size of macro block before row and the macro block of decoding failure are expert at, and specified parameter may include file size parameter and macroblock number Measure parameter.Correspondingly, the present embodiment redefines decoded first the file information not to the macro block information according to decoding failure In the mode of specified parameter specifically limit, including but not limited to: before the macro-block line where the macro block of statistical decoder failure The quantity of all macro blocks, using statistical result as number of macroblocks parameter;Macro block is total before the macro block of decoding failure is expert at Size is as file size parameter.
For example, for store number of macroblocks parameter in Part0 field.It is decoded to obtain to the first the file information After the corresponding plaintext of Part0 field, the number of macroblocks in Part0 field can be redefined according to the macro block information of decoding failure Parameter.Macro-block line as where the macro block information to decode failure is the macro block of decoding failure, decodes the macro block behavior the 5th of failure Row, and for each macro-block line includes 6 column macro blocks in image.Since image is usually according to each complete in subsequent display Macro-block line shown that therefore, can redefine number of macroblocks parameter in Part0 field is (5-1) × 6=30.In weight After new determining number of macroblocks parameter, CABAC coding can be carried out to the first the file information comprising number of macroblocks parameter, to obtain Second the file information.
It, can be according to the macro block information of decoding failure, weight for store file size parameter in Webp identification fields Newly determine the file size parameter in Webp identification fields.As using the macro block information for decoding failure as the macro block institute of decoding failure The total size of macro block before being expert at, and the total size of macro block before the macro block to fail is expert at is decoded as that for million B of 2M, then can weigh Newly determine that the file size parameter in Webp identification fields is 2M.
It should be noted that since standard decoder does not provide the process recompiled, the coding in above content Process can realize that the present embodiment is not especially limited this by customized encoder.
In addition, due to other than comprising CABAC encoded information, also including the letter shown with plaintext in the first the file information Breath, such as Webp identification fields and the information in VP8 identification fields.Therefore, it modifies to the information shown with plaintext When, it can directly modify, and do not have to the process by above-mentioned decoding, modification, re-encoding.
204, determine the specified macro block in image file, specify macro block position be located at decoding failure macro block before and Successfully decoded.
Due to being the macro block of successfully decoded before the macro block of decoding failure, and according to the macro block of successfully decoded, can show Parts of images is shown.Accordingly, it can be determined that the specified macro block before the macro block of decoding failure.For example, to decode the macro block institute of failure For the 5th macro-block line of behavior, then it can determine the specified macro block in image file for the 1st macro-block line to the 4th macro-block line In macro block.
205, according to the second the file information and specified macro block, new image file is generated.
For the present embodiment not to according to the second the file information and specified macro block, the method for generating new image file makees specific limit It is fixed, including but not limited to: the macro block of the second the file information and successfully decoded being combined according to format, obtains new image text Part.It wherein, can be according to Webp lattice in above-mentioned steps 201 when the macro block of the second the file information and successfully decoded to be combined Formula is combined, and to generate new image file, the present embodiment is not especially limited this.
For example, each macro-block line includes 6 column macro blocks, and 8 row macro blocks are altogether to share 48 macro blocks in image file Example.If decoding failure the 5th row of macro block behavior, can determine specified macro block be the first row to the macro block of fourth line, i.e. Part1 extremely Part24.In the macro block information according to decoding failure, modifies to the first the file information of image file, obtain the second file After information, the second the file information and Part1 to Part24 can be combined, to obtain new image file.Wherein, newly The corresponding format of image file can be as shown in Figure 4.
206, new image file is decoded, is performed image display according to decoding result.
201 to step 205 through the above steps, after generating new image file, new image file can be carried out by It is decoded according to the format of image file, to be performed image display according to decoding result.For example, if new image file is Webp image file can then be decoded new graphic file according to Webp format, show corresponding Webp image.
Method provided in an embodiment of the present invention decodes the macro block information of failure by obtaining, according to decoding in image file The macro block information of failure, modifies to the first the file information of image file, obtains the second the file information, determine image file In be located at before the macro block of decoding failure and the specified macro block of successfully decoded, it is raw according to the second the file information and specified macro block The image file of Cheng Xin is decoded new image file, is performed image display according to decoding result.Due to when in the presence of decoding When the macro block of failure, new image file can be generated according to the macro block of successfully decoded, according to new image file display portion Image.Therefore, the display effect of image is preferable.
The embodiment of the invention provides a kind of image display device, the device is for executing image provided by the above embodiment Display methods.Referring to Fig. 5, which includes:
Module 501 is obtained, for obtaining and decoding in image file when detecting the macro block decoding failure in image file The macro block information of failure;
Modified module 502 repairs the first the file information of image file for the macro block information according to decoding failure Change, obtains the second the file information, the first the file information is for describing image property;
Determining module 503 specifies the position of macro block to be located at decoding failure for determining the specified macro block in image file Before macro block and successfully decoded;
Generation module 504, for generating new image file according to the second the file information and specified macro block;
Display module 505 is performed image display for being decoded to new image file according to decoding result.
As a kind of alternative embodiment, module 501 is obtained, for determining position of the macro block of decoding failure in image file Confidence breath;According to location information, the macro block information that failure is decoded in image file is obtained.
As a kind of alternative embodiment, the first the file information includes at least the length of image file, image file offset in advance If length, the length of macro block Part0 and the total quantity of macro block after quantity.
As a kind of alternative embodiment, generation module 504, for by the macro block of the second the file information and successfully decoded according to Format is combined, and obtains new image file.
As a kind of alternative embodiment, modified module 502, for being decoded to the first the file information;It is lost according to decoding The macro block information lost redefines the specified parameter in decoded first the file information, specifies parameter to include at least file big Small parameter and number of macroblocks parameter;The first the file information for redefining specified parameter is encoded, the second file letter is obtained Breath.
Device provided in an embodiment of the present invention decodes the macro block information of failure by obtaining, according to decoding in image file The macro block information of failure, modifies to the first the file information of image file, obtains the second the file information, determine image file In be located at before the macro block of decoding failure and the specified macro block of successfully decoded, it is raw according to the second the file information and specified macro block The image file of Cheng Xin is decoded new image file, is performed image display according to decoding result.Due to when in the presence of decoding When the macro block of failure, new image file can be generated according to the macro block of successfully decoded, according to new image file display portion Image.Therefore, the display effect of image is preferable.
A kind of terminal is present embodiments provided, it is aobvious which can be used for executing the image provided in above-mentioned each embodiment Show method.Referring to Fig. 6, which includes:
Terminal 600 may include RF (Radio Frequency, radio frequency) circuit 110, include one or more meter The memory 120 of calculation machine readable storage medium storing program for executing, input unit 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (Wireless Fidelity, Wireless Fidelity) module 170, the processing for including one or more than one processing core The components such as device 180 and power supply 190.It will be understood by those skilled in the art that terminal structure shown in Fig. 6 is not constituted pair The restriction of terminal may include perhaps combining certain components or different component cloth than illustrating more or fewer components It sets.Wherein:
RF circuit 110 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station After downlink information receives, one or the processing of more than one processor 180 are transferred to;In addition, the data for being related to uplink are sent to Base station.In general, RF circuit 110 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, uses Family identity module (SIM) card, transceiver, coupler, LNA (Low Noise Amplifier, low-noise amplifier), duplex Device etc..In addition, RF circuit 110 can also be communicated with network and other equipment by wireless communication.The wireless communication can make With any communication standard or agreement, and including but not limited to GSM (Global System of Mobile communication, entirely Ball mobile communcations system), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), LTE (Long Term Evolution, long term evolution), Email, SMS (Short Messaging Service, short message service) etc..
Memory 120 can be used for storing software program and module, and processor 180 is stored in memory 120 by operation Software program and module, thereby executing various function application and data processing.Memory 120 can mainly include storage journey Sequence area and storage data area, wherein storing program area can the (ratio of application program needed for storage program area, at least one function Such as sound-playing function, image player function) etc.;Storage data area, which can be stored, uses created number according to terminal 600 According to (such as audio data, phone directory etc.) etc..In addition, memory 120 may include high-speed random access memory, can also wrap Include nonvolatile memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts. Correspondingly, memory 120 can also include Memory Controller, to provide processor 180 and input unit 130 to memory 120 access.
Input unit 130 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, input unit 130 may include touching Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad are collected and are used Family on it or nearby touch operation (such as user using any suitable object or attachment such as finger, stylus in touch-sensitive table Operation on face 131 or near touch sensitive surface 131), and corresponding attachment device is driven according to preset formula.It is optional , touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used The touch orientation at family, and touch operation bring signal is detected, transmit a signal to touch controller;Touch controller is from touch Touch information is received in detection device, and is converted into contact coordinate, then gives processor 180, and can receive processor 180 The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch sensitive surface 131.In addition to touch sensitive surface 131, input unit 130 can also include other input equipments 132.Specifically, Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), One of trace ball, mouse, operating stick etc. are a variety of.
Display unit 140 can be used for showing information input by user or the information and terminal 600 that are supplied to user Various graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof. Display unit 140 may include display panel 141, optionally, can use LCD (Liquid Crystal Display, liquid crystal Show device), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display panel 141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 detects touching on it or nearby After touching operation, processor 180 is sent to determine the type of touch event, is followed by subsequent processing device 180 according to the type of touch event Corresponding visual output is provided on display panel 141.Although touch sensitive surface 131 and display panel 141 are conducts in Fig. 6 Two independent components realize input and input function, but in some embodiments it is possible to by touch sensitive surface 131 and display Panel 141 is integrated and realizes and outputs and inputs function.
Terminal 600 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensings Device.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 141, and proximity sensor can close display when terminal 600 is moved in one's ear Panel 141 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect in all directions (generally Three axis) acceleration size, can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);Extremely In other sensors such as gyroscope, barometer, hygrometer, thermometer, the infrared sensors that terminal 600 can also configure, herein It repeats no more.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and terminal 600.Audio Electric signal after the audio data received conversion can be transferred to loudspeaker 161, be converted to sound by loudspeaker 161 by circuit 160 Sound signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, after being received by voicefrequency circuit 160 Audio data is converted to, then by after the processing of audio data output processor 180, such as another end is sent to through RF circuit 110 End, or audio data is exported to memory 120 to be further processed.Voicefrequency circuit 160 is also possible that earphone jack, To provide the communication of peripheral hardware earphone Yu terminal 600.
WiFi belongs to short range wireless transmission technology, and terminal 600 can help user's transceiver electronics by WiFi module 170 Mail, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 6 is shown WiFi module 170, but it is understood that, and it is not belonging to must be configured into for terminal 600, it can according to need completely Do not change in the range of the essence of invention and omits.
Processor 180 is the control centre of terminal 600, utilizes each portion of various interfaces and connection whole mobile phone Point, by running or execute the software program and/or module that are stored in memory 120, and calls and be stored in memory 120 Interior data execute the various functions and processing data of terminal 600, to carry out integral monitoring to mobile phone.Optionally, processor 180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modem processor, Wherein, the main processing operation system of application processor, user interface and application program etc., modem processor mainly handles nothing Line communication.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Terminal 600 further includes the power supply 190 (such as battery) powered to all parts, it is preferred that power supply can pass through electricity Management system and processor 180 are logically contiguous, to realize management charging, electric discharge and power consumption by power-supply management system The functions such as management.Power supply 190 can also include one or more direct current or AC power source, recharging system, power supply event Hinder the random components such as detection circuit, power adapter or inverter, power supply status indicator.
Although being not shown, terminal 600 can also include camera, bluetooth module etc., and details are not described herein.Specifically in this reality It applies in example, the display unit of terminal is touch-screen display, and terminal further includes having memory and one or more than one Program, perhaps more than one program is stored in memory and is configured to by one or more than one processing for one of them Device executes.The one or more programs include instructions for performing the following operations:
When detecting the macro block decoding failure in image file, the macro block letter that failure is decoded in described image file is obtained Breath;
According to the macro block information of decoding failure, modifies to the first the file information of described image file, obtain second The file information, first the file information is for describing image property;
Determine the specified macro block in described image file, the position of the specified macro block is located at before the macro block of decoding failure And successfully decoded;
According to the second the file information and the specified macro block, new image file is generated;
New image file is decoded, is performed image display according to decoding result.
Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, in the memory of terminal, also include instructions for performing the following operations:
Determine location information of the macro block of decoding failure in described image file;
According to the positional information, the macro block information that failure is decoded in described image file is obtained.
In the third the possible embodiment provided based on the first possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
First the file information include at least image file length, image file offset preset quantity after length, macro block The length of Part0 and the total quantity of macro block.
In the 4th kind of possible embodiment provided based on the first possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
The macro block of second the file information and successfully decoded is combined according to format, obtains new image file.
In the 5th kind of possible embodiment provided based on the third possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
First the file information is decoded;
According to the macro block information of decoding failure, the specified parameter in decoded first the file information is redefined, it is described Specified parameter includes at least file size parameter and number of macroblocks parameter;
The first the file information for redefining specified parameter is encoded, the second the file information is obtained.
Terminal provided in an embodiment of the present invention decodes the macro block information of failure by obtaining, according to decoding in image file The macro block information of failure, modifies to the first the file information of image file, obtains the second the file information, determine image file In be located at before the macro block of decoding failure and the specified macro block of successfully decoded, it is raw according to the second the file information and specified macro block The image file of Cheng Xin is decoded new image file, is performed image display according to decoding result.Due to when in the presence of decoding When the macro block of failure, new image file can be generated according to the macro block of successfully decoded, according to new image file display portion Image.Therefore, the display effect of image is preferable.
The embodiment of the invention also provides a kind of computer readable storage medium, which be can be Computer readable storage medium included in memory in above-described embodiment;It is also possible to individualism, eventually without supplying Computer readable storage medium in end.The computer-readable recording medium storage has one or more than one program, this one A or more than one program is used to execute realization image display method, this method packet by one or more than one processor It includes:
When detecting the macro block decoding failure in image file, the macro block letter that failure is decoded in described image file is obtained Breath;
According to the macro block information of decoding failure, modifies to the first the file information of described image file, obtain second The file information, first the file information is for describing image property;
Determine the specified macro block in described image file, the position of the specified macro block is located at before the macro block of decoding failure And successfully decoded;
According to the second the file information and the specified macro block, new image file is generated;
New image file is decoded, is performed image display according to decoding result.
Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, described obtain decodes the macro block information of failure in described image file, comprising:
Determine location information of the macro block of decoding failure in described image file;
According to the positional information, the macro block information that failure is decoded in described image file is obtained.
In the third the possible embodiment provided based on the first possible embodiment, described first The file information include at least image file length, image file offset preset quantity after length, the length of macro block Part0 and The total quantity of macro block.
In the 4th kind of possible embodiment provided based on the first possible embodiment, the basis Second the file information and the specified macro block, generate new image file, comprising:
The macro block of second the file information and successfully decoded is combined according to format, obtains new image file.
In the 5th kind of possible embodiment provided based on the third possible embodiment, the basis The macro block information for decoding failure, modifies to the first the file information of described image file, obtains the second the file information, wraps It includes:
First the file information is decoded;
According to the macro block information of decoding failure, the specified parameter in decoded first the file information is redefined, it is described Specified parameter includes at least file size parameter and number of macroblocks parameter;
The first the file information for redefining specified parameter is encoded, the second the file information is obtained.
Computer readable storage medium provided in an embodiment of the present invention decodes the macro block of failure by obtaining in image file Information modifies to the first the file information of image file according to the macro block information of decoding failure, obtains the second file letter Breath, determines before the macro block for being located at decoding failure in image file and the specified macro block of successfully decoded, is believed according to the second file Breath and specified macro block, generate new image file, are decoded to new image file, and it is aobvious to carry out image according to decoding result Show.Since new image file can be generated according to the macro block of successfully decoded, according to new when there is the macro block of decoding failure Image file display portion image.Therefore, the display effect of image is preferable.
The embodiment of the invention provides a kind of graphical user interface, the graphical user interface is used at the terminal, the end End includes touch-screen display, memory and one for executing one or more than one program or more than one Processor;The graphical user interface includes:
When detecting the macro block decoding failure in image file, the macro block letter that failure is decoded in described image file is obtained Breath;
According to the macro block information of decoding failure, modifies to the first the file information of described image file, obtain second The file information, first the file information is for describing image property;
Determine the specified macro block in described image file, the position of the specified macro block is located at before the macro block of decoding failure And successfully decoded;
According to the second the file information and the specified macro block, new image file is generated;
New image file is decoded, is performed image display according to decoding result.
Graphical user interface provided in an embodiment of the present invention decodes the macro block information of failure by obtaining in image file, It according to the macro block information of decoding failure, modifies to the first the file information of image file, obtains the second the file information, determine It is located at before the macro block of decoding failure in image file and the specified macro block of successfully decoded, according to the second the file information and specified Macro block generates new image file, is decoded to new image file, is performed image display according to decoding result.Due to working as When in the presence of the macro block for decoding failure, new image file can be generated according to the macro block of successfully decoded, according to new image file Display portion image.Therefore, the display effect of image is preferable.
It should be understood that image display device provided by the above embodiment is when displaying an image, only with above-mentioned each function The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds Block is completed, i.e., the internal structure of device is divided into different functional modules, to complete all or part of function described above Energy.In addition, image display device provided by the above embodiment and image display method embodiment belong to same design, it is specific real Existing process is detailed in embodiment of the method, and which is not described herein again.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of image display method, which is characterized in that the described method includes:
When detecting the macro block decoding failure in image file, the macro block information that failure is decoded in described image file is obtained;
According to the macro block information of decoding failure, modifies to the first the file information of described image file, obtain the second file Information, first the file information is for describing image property;
Determine the specified macro block in described image file, the position of the specified macro block is located at before the macro block of decoding failure and Successfully decoded;
According to the second the file information and the specified macro block, new image file is generated;
New image file is decoded, is performed image display according to decoding result,
Wherein, the new image file includes the specified macro block.
2. the method according to claim 1, wherein described obtain the macro block for decoding failure in described image file Information, comprising:
Determine location information of the macro block of decoding failure in described image file;
According to the positional information, the macro block information that failure is decoded in described image file is obtained.
3. the method according to claim 1, wherein first the file information includes at least the length of image file Length, the length of macro block Part0 and the total quantity of macro block after degree, image file offset preset quantity.
4. the method according to claim 1, wherein described according to the second the file information and the specified macro block, Generate new image file, comprising:
The macro block of second the file information and successfully decoded is combined according to format, obtains new image file.
5. according to the method described in claim 3, it is characterized in that, it is described according to decoding failure macro block information, to the figure As the first the file information of file is modified, the second the file information is obtained, comprising:
First the file information is decoded;
According to the macro block information of decoding failure, the specified parameter in decoded first the file information is redefined, it is described specified Parameter includes at least file size parameter and number of macroblocks parameter;
The first the file information for redefining specified parameter is encoded, the second the file information is obtained.
6. a kind of image display device, which is characterized in that described device includes:
Module is obtained, for obtaining to decode in described image file and lose when detecting the macro block decoding failure in image file The macro block information lost;
Modified module modifies to the first the file information of described image file for the macro block information according to decoding failure, The second the file information is obtained, first the file information is for describing image property;
Determining module, for determining the specified macro block in described image file, the position of the specified macro block is located at decoding failure Macro block before and successfully decoded;
Generation module, for generating new image file according to the second the file information and the specified macro block;
Display module is performed image display according to decoding result for being decoded to new image file,
Wherein, the new image file includes the specified macro block.
7. device according to claim 6, which is characterized in that the acquisition module, for determining the macro block of decoding failure Location information in described image file;According to the positional information, the macro block that failure is decoded in described image file is obtained Information.
8. device according to claim 6, which is characterized in that first the file information includes at least the length of image file Length, the length of macro block Part0 and the total quantity of macro block after degree, image file offset preset quantity.
9. device according to claim 6, which is characterized in that the generation module is used for the second the file information and solution Successfully macro block is combined code according to format, obtains new image file.
10. device according to claim 8, which is characterized in that the modified module, for first the file information It is decoded;According to the macro block information of decoding failure, the specified parameter in decoded first the file information is redefined, it is described Specified parameter includes at least file size parameter and number of macroblocks parameter;To redefine the first the file information of specified parameter into Row coding, obtains the second the file information.
CN201510098389.2A 2015-03-05 2015-03-05 Image display method and apparatus Active CN105989175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510098389.2A CN105989175B (en) 2015-03-05 2015-03-05 Image display method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510098389.2A CN105989175B (en) 2015-03-05 2015-03-05 Image display method and apparatus

Publications (2)

Publication Number Publication Date
CN105989175A CN105989175A (en) 2016-10-05
CN105989175B true CN105989175B (en) 2019-11-22

Family

ID=57038729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510098389.2A Active CN105989175B (en) 2015-03-05 2015-03-05 Image display method and apparatus

Country Status (1)

Country Link
CN (1) CN105989175B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109492451B (en) * 2018-10-30 2022-08-16 维沃移动通信有限公司 Coded image identification method and mobile terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101004837A (en) * 2006-12-30 2007-07-25 北京中星微电子有限公司 Method for adding restarting marker in JPEG compressed data, and multi-chip decoding method
CN101568028A (en) * 2009-05-15 2009-10-28 中兴通讯股份有限公司 Mobile terminal and method for cooperatively broadcasting mobile broadcasting television between mobile terminals
CN101621685A (en) * 2008-07-04 2010-01-06 株式会社日立制作所 Coder and coding method
CN102750180A (en) * 2012-05-28 2012-10-24 中国科学院遥感应用研究所 Multithreading display mechanism of two-dimensional map tiles

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101004837A (en) * 2006-12-30 2007-07-25 北京中星微电子有限公司 Method for adding restarting marker in JPEG compressed data, and multi-chip decoding method
CN101621685A (en) * 2008-07-04 2010-01-06 株式会社日立制作所 Coder and coding method
CN101568028A (en) * 2009-05-15 2009-10-28 中兴通讯股份有限公司 Mobile terminal and method for cooperatively broadcasting mobile broadcasting television between mobile terminals
CN102750180A (en) * 2012-05-28 2012-10-24 中国科学院遥感应用研究所 Multithreading display mechanism of two-dimensional map tiles

Also Published As

Publication number Publication date
CN105989175A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
CN105243638B (en) A kind of method and apparatus uploading image
CN106933525B (en) A kind of method and apparatus showing image
CN104978176B (en) Application programming interfaces call method, device and computer readable storage medium
CN104915091B (en) A kind of method and apparatus for the prompt information that Shows Status Bar
CN103325332B (en) Page furbishing method, device and equipment
CN103473051A (en) Method and device for saving terminal power consumption
CN106488296B (en) A kind of method and apparatus showing video barrage
CN104036536B (en) The generation method and device of a kind of stop-motion animation
CN106911848B (en) Method for outputting prompt message and terminal equipment
CN104618794A (en) Method and device for playing video
CN107203960A (en) image rendering method and device
CN104238893A (en) Video preview image displaying method and device
CN106254869A (en) The decoding method of a kind of video data, device and system
CN106504303B (en) A kind of method and apparatus playing frame animation
CN105992001B (en) A kind of pair of picture carries out the method and device of quantification treatment
CN105739856B (en) A kind of method and apparatus executing Object Operations processing
CN107396193B (en) The method and apparatus of video playing
CN103677944B (en) A kind of method for making locking screen interface, device and terminal device
CN106210838B (en) Caption presentation method and device
CN107977261A (en) Method, equipment, mobile terminal and the computer-readable storage medium of limiting process
CN104616333A (en) Game video processing method and device
CN103399745A (en) Method, device and terminal device for sending instant messages
CN109062643A (en) A kind of display interface method of adjustment, device and terminal
CN105142019B (en) Video encoding/decoding method and device
CN105989175B (en) Image display method and apparatus

Legal Events

Date Code Title Description
C06 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