CN101847394B - Storage mapping method and device for encoding and displaying video files - Google Patents

Storage mapping method and device for encoding and displaying video files Download PDF

Info

Publication number
CN101847394B
CN101847394B CN 200910132453 CN200910132453A CN101847394B CN 101847394 B CN101847394 B CN 101847394B CN 200910132453 CN200910132453 CN 200910132453 CN 200910132453 A CN200910132453 A CN 200910132453A CN 101847394 B CN101847394 B CN 101847394B
Authority
CN
China
Prior art keywords
memory
block
reference pictures
decoding
those
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.)
Expired - Fee Related
Application number
CN 200910132453
Other languages
Chinese (zh)
Other versions
CN101847394A (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.)
Ali Corp
Original Assignee
Ali Corp
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 Ali Corp filed Critical Ali Corp
Priority to CN 200910132453 priority Critical patent/CN101847394B/en
Publication of CN101847394A publication Critical patent/CN101847394A/en
Application granted granted Critical
Publication of CN101847394B publication Critical patent/CN101847394B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a storage mapping method and a storage mapping device for encoding and displaying video files. The method comprises the following steps of: encoding a plurality of reference pictures in video files; and writing the encoded reference pictures into a storage in a mapping mode of taking a first block and a second block as a unit, wherein the width of the first block is greater than that of the second block. In addition, in the method, a plurality of non-reference pictures in the video files are encoded, and the encoded non-reference pictures are written into the storage in a mapping mode of taking the first block as a unit. Thus, the access efficiency of the storage at the moment of encoding and peak value display can be improved.

Description

Storage mapping method and device in order to decoding and demonstration video files
Technical field
The invention relates to a kind of memory mapped (Mapping) method, and particularly relevant for a kind of storage mapping method and device in order to decoding and demonstration video files.
Background technology
Along with the evolution of video image compress technique, the complexity of video image encoding and decoding increases thereupon, and (Direct Memory Access, DMA) number of times significantly increases in the related direct memory access (DMA) that also makes the required execution of encoding and decoding.At length say; The decoding of video image needs a large amount of image data of access to carry out dynamic vector search and image reconstruction; And the action of frequent storage access will become the bottleneck of system effectiveness, and make the decoder of video image become the main dissipative cell of system.
Video image is after decoding; Can be according to different display requirements; Deinterleave (de-interlace) or PIP (Picture In Picture/Picture Out Picture for example; The different modes that reads is adopted in application such as PIP/POP), and this also can make the number of times that shows the required access memory of video image increase.If the decoding and the demonstration of above-mentioned video image combined, will be great challenge as far as the usefulness of the storage access of system.
Generally speaking, the video image decoding is different with the storage mapping method that demonstration is fit to use.Be the block of N * M if an image is divided into several sizes, wherein N is that width, M are height, and the data in this N * M block are continuous in memory according to certain rules.And in the accessing operation of memory, generally can adopt the maximum length of memory burst (Memory burst) to carry out as far as possible.
For the decoding request of video image, the width N of block need select the size that is fit to the image prediction for use, makes that the data volume of from memory, reading required memory requests number of times and institute's access to effective block data is minimum; Relatively, for the display requirement of video image, the width N of block then need select for use and just be adapted in the primary memory request all data volumes of accesses, makes to show that the required data of delegation's image can read out with minimum memory requests.
Yet; Evolution along with the video image compress technique; The video image employed resource block size of decoding is more and more little; For example H.264 decoding can be used 4 * 4 block, and this conflicts with the video image demonstration need read out delegation's image data under the situation of using minimum memory requests mode mutually.To the decoding of above-mentioned video image and the difference between showing, below be example with the block of 32 * 16 and 16 * 32 two kinds of sizes respectively, how to explain that the picture with 32 * 32 shines upon write memory.
For 32 * 16 to be the mapping mode of unit, Fig. 1 illustrate is the memory access mode of tradition 32 * 16 blocks.Please, suppose that (Quad Word, QW), and each QW comprises 8 bytes (Byte) to 4 four word groups of the each access of memory with reference to Fig. 1.For the decoding of video image, block of every decoding need read memory 8 times (each 1 QW), could read back required data, and for memory that once can 4 QW of burst, efficient is quite bad like this; Relatively; Demonstration for video image; Showing that the required data of delegation's image are 4 QW, just is exactly the data volume that primary memory requirement institute can access, so the data of whole 32 * 16 blocks only need be sent 16 times memory requirement and just can obtain; Quite meet the requirement that reduces access times, and each access all there is the length of the burst of making full use of.
For 16 * 32 to be the mapping mode of unit, Fig. 2 illustrate is the memory access mode of tradition 16 * 32 blocks.Please, suppose 4 QW of the each access of memory equally, and each QW comprises 8 bytes with reference to Fig. 2.For the decoding of video image, block of every decoding need read memory 4 times (each 2 QW), could read back required data, and such memory access mode can come well than the access mode of aforementioned 32 * 16 blocks; Yet; Demonstration for video image; Therefore in the time of will showing delegation's image (4 QW), need send 2 times memory requirement, whole 32 * 16 blocks need send 32 times memory requirement and can obtain at every turn; And the burst length of each memory requirement is 2, and the obvious like this demonstration for video image is unfavorable.
Summary of the invention
The present invention provides a kind of storage mapping method in order to decoding and demonstration video files, with the demand write memory that the picture of video files is predicted and shown according to decoding respectively, uses the access efficiency of increase memory.
The present invention provides a kind of memory mapped device in order to decoding and demonstration video files; Reference picture is shone upon write memory with the block of narrower and broad respectively; And, can promote decoding and peak value display memory access efficiency constantly with the block mapping write memory of non-reference picture with broad.
The present invention proposes a kind of storage mapping method in order to decoding and demonstration video files; In order to a plurality of reference pictures in the video files are decoded; And be the mapping mode write memory of unit with one first block and one second block respectively with decoded reference picture, wherein the width of first block is greater than the width of second block.In addition, this method is also with the decoding of a plurality of non-reference picture in the video files, and is the mapping mode write memory of unit with first block with decoded non-reference picture.Reading in this memory with first block is reference picture and the non-reference picture that the mapping mode of unit writes, to show reference picture and the non-reference picture that is read.Reading in the memory with second block is the reference picture that the mapping mode of unit writes, and with reference to the reference picture that is read, with the decoding prediction as other picture of video files.
In one embodiment of this invention; Before the step of those reference pictures of above-mentioned decoding and those non-reference pictures; More comprise and receive the video streams that comprises a plurality of pictures; And, judge that the picture that is received is reference picture or non-reference picture according to the message in this video streams, determine the mapping mode of write memory according to this.
In one embodiment of this invention; Above-mentioned is that the step of the mapping mode write memory of unit comprises that with each reference picture and non-reference picture cutting be a plurality of first blocks with decoded reference picture with first block; And be unit with the width of first block; With the data of each first block write memory line by line; Make the address of data in memory of a plurality of pixels of each row in this first block for continuously, and the address of data in memory of the preceding end pixel of tail end pixel of each row and next line also is continuous.
In one embodiment of this invention; Above-mentioned is that the step of the mapping mode write memory of unit comprises that with each reference picture cutting be a plurality of second blocks with decoded reference picture with second block; And be unit with the width of second block; With the data of each second block write memory line by line; Make the address of data in memory of a plurality of pixels of each row in this second block for continuously, and the address of data in memory of tail end pixel of each row and a preceding end pixel of next line is continuous.
The present invention proposes a kind of storage mapping method in order to decoding and demonstration video files; In order to a plurality of reference pictures in the video files are decoded; And with one the 3rd block the mapping mode write memory of unit with decoded reference picture; And with the decoding of a plurality of non-reference picture in the video files, and be the mapping mode write memory of unit with decoded non-reference picture with the 4th block, wherein the width of the 4th block is greater than the width of the 3rd block.Read in this memory with the 3rd block and be the reference picture that writes of the image mode of unit and be the non-reference picture that the image mode of unit writes, to show reference picture and the non-reference picture that is read with the 4th block.Reading in the memory with the 3rd block is the reference picture that the mapping mode of unit writes, and with reference to the reference picture that is read, with the decoding prediction as other picture of video files.
The present invention proposes a kind of memory mapped device in order to decoding and demonstration video files, and it comprises that memory, decoding unit and memory write the unit.Wherein, decoding unit system is in order to a plurality of reference pictures and non-reference picture in the decoding video files.Memory writes the unit and is coupled to decoding unit and memory; And in order to reference picture after the decoding unit decodes and non-reference picture write memory; It comprises that with decoded reference picture be respectively the mapping mode write memory of unit with first block and second block; And be the mapping mode write memory of unit with decoded non-reference picture with first block, wherein the width of first block is greater than the width of second block.Decoding unit comprises that more reading in the memory with second block is the reference picture that the image mode of unit writes, and with reference to the reference picture that is read, with other picture of decoding video files.
In one embodiment of this invention; Above-mentioned decoding unit comprises video streams that comprises a plurality of pictures of reception; And, judge that the picture that is received is reference picture or non-reference picture according to the message in this video streams, determine the mapping mode of write memory according to this.
In one embodiment of this invention, above-mentioned memory writes unit pack and draws together the first block writing module and the second block writing module.Wherein, the first block writing module is to be that the mapping mode of unit is with reference picture and non-reference picture write memory with first block.The second block writing module then is to be that the mapping mode of unit is respectively with the reference picture write memory with second block.
In one embodiment of this invention; The first above-mentioned block writing module comprises that with each reference picture and non-reference picture cutting be a plurality of first blocks; And be unit with the width of first block; With the data of each first block write memory line by line, the address of data in memory that makes a plurality of pixels of each row in the block of winning is for continuously, and the address of data in memory of the preceding end pixel of tail end pixel of each row and next line is continuous.
In one embodiment of this invention; The second above-mentioned block writing module comprises that with each reference picture cutting be a plurality of second blocks; And be unit with the width of second block; With the data of each second block write memory line by line, make the address of data in memory of a plurality of pixels of each row in second block for continuously, and the address of data in memory of the preceding end pixel of tail end pixel of each row and next line is continuous.
In one embodiment of this invention, above-mentioned memory mapped device more comprises a display unit, and it is coupled to memory, and is the reference picture that the mapping mode of unit writes in order to read in the memory with first block, and shows the reference picture that is read.
In one embodiment of this invention, above-mentioned display unit comprises that more reading in the memory with first block is the non-reference picture that the mapping mode of unit writes, and shows the non-reference picture that is read.
The present invention proposes a kind of memory mapped device in order to decoding and demonstration video files, and it comprises that memory, decoding unit and memory write the unit.Wherein, decoding unit is in order to a plurality of reference pictures and non-reference picture in the decoding video files.Memory writes the unit and is coupled to decoding unit and memory; And in order to reference picture after the decoding unit decodes and non-reference picture write memory; It comprises that with decoded reference picture be the mapping mode write memory of unit with the 3rd block; And be the mapping mode write memory of unit with decoded non-reference picture with the 4th block, wherein the width of the 4th block is greater than the width of the 3rd block.Wherein decoding unit comprises that more reading in the memory with the 3rd block is the reference picture that the image mode of unit writes, and with reference to the reference picture that is read, with other picture of decoding video files.
In one embodiment of this invention, above-mentioned reference picture comprises key picture and predictive picture, and above-mentioned non-reference picture comprises bi-directional predicted picture.
Based on above-mentioned, of the present invention in order to decoding and show that the storage mapping method of video files and device are the character according to various pictures in the video files, with the different in width block mapping mode write memory of unit with the data of these pictures.When needs use these pictures to do the decoding prediction, directly read and be applicable to the decoding data predicted; And when needs show these pictures, then directly read and be applicable to data presented.In view of the above, the present invention can increase the whole access efficiency of memory.
For letting the above-mentioned feature and advantage of the present invention can be more obviously understandable, hereinafter is special lifts embodiment, and conjunction with figs. elaborates as follows.
Description of drawings
Fig. 1 illustrate is the memory access mode of tradition 32 ' 16 blocks.
Fig. 2 illustrate is the memory access mode of tradition 16 ' 32 blocks.
Fig. 3 is the storage mapping method flow chart in order to decoding and demonstration video files according to one embodiment of the invention illustrated.
Fig. 4 is the example according to the storage mapping method that one embodiment of the invention illustrated.
Fig. 5 is the storage mapping method flow chart in order to decoding and demonstration video files according to one embodiment of the invention illustrated.
Fig. 6 is the example according to the storage mapping method that one embodiment of the invention illustrated.
Fig. 7 is the storage mapping method flow chart in order to decoding and demonstration video files according to one embodiment of the invention illustrated.
Fig. 8 is according to one embodiment of the invention illustrated in order to decoding and show the example of the storage mapping method of video files.
Fig. 9 is the storage mapping method flow chart in order to decoding and demonstration video files according to one embodiment of the invention illustrated.
Figure 10 is the example according to the storage mapping method that one embodiment of the invention illustrated.
Figure 11 is according to one embodiment of the invention illustrated in order to decoding and show the calcspar of the memory mapped device of video files.
Embodiment
According to video decoded characteristic, comprise the reference picture of the reference that need be used as other picture codec prediction in the video files, and the non-reference picture that need not be used as reference.In view of the above; The present invention is used as need in the picture of reference according to the mapping that helps decoding (mapping) mode write memory; And the picture that will not do reference is decoded and peak value display memory access efficiency constantly and can promote according to the mapping mode write memory that helps showing.Based on above-mentioned notion, explain that with next act embodiment the present invention is in order to decoding and the storage mapping method of demonstration video files and the detailed step and the function of device.
Fig. 3 is the storage mapping method flow chart in order to decoding and demonstration video files according to one embodiment of the invention illustrated.Please with reference to Fig. 3, present embodiment adopts respectively and helps the mapping mode of decoding and helping showing, with a plurality of picture write memories in the video files.Wherein, described video files comprises a plurality of reference pictures and a plurality of non-reference picture.The detailed step of the method is following:
At first; With the decoding of the reference picture in the video files (step S302); And be the mapping mode write memory (step S304) of unit with one first block and one second block respectively with decoded reference picture, the width of wherein said first block is greater than the width of second block.Say that at length because the decoding of video pictures prediction is fit to adopt narrower mapping mode, that is being fit to during with the video pictures writing data into memory with the less square of width (for example 4 * 4 squares) is that unit shines upon and writes; Relative, the demonstration of video pictures then is fit to adopt the mapping mode of broad, that is being fit to during with the video pictures writing data into memory with the bigger square of width (for example 16 * 4 squares) is that unit shines upon and writes.In view of the above, the present invention respectively with the mapping mode write memory of two kinds of width, and when using the reference picture decoding or showing reference picture, reads corresponding picture data in the memory respectively with reference picture.
Above-mentioned when being unit mapping write memory with first block; Be to be a plurality of first blocks with each the reference picture cutting in the video files; And be unit with the width of this first block; With the data of each first block that is syncopated as write memory line by line, make that the address of data in memory of each row pixel is continuous in each first block, and the address of data in memory of the preceding end pixel of tail end pixel of each row and next line also is continuous.In other words, the address of data storing in memory of adjacent lines pixel is continuous in first block.For instance, the address that second of certain first block first pixel of row is stored in the memory in the video pictures is to continue after first last pixel of row is stored in the address in the memory.
In like manner; Above-mentioned when being unit mapping write memory with second block; Also be to be a plurality of second blocks with each the reference picture cutting in the video files; And be unit with the width of this second block, with the data of each second block write memory line by line, make the address of data in memory of each row pixel in this second block for continuously; And the address of data in memory of the tail end pixel of each row and the preceding end pixel of next line is continuously, that is the address of data storing in memory of adjacent lines pixel is continuous in this second block.
Except above-mentioned reference picture; The storage mapping method of present embodiment also comprises the decoding of the non-reference picture in the video files (step S306), and with the decoded non-reference picture mapping mode write memory (step S308) that is unit with above-mentioned first block.The block (i.e. first block) that adopts broad here is that for unit carries out the reason that mapping writes non-reference picture need not the reference as the decoding prediction of other picture; Therefore can directly use the mapping mode write memory that helps showing, to reduce the number of times of required access memory when showing.
In brief, above-mentioned storage mapping method is with twice of decoded reference picture write memory: once be to adopt narrower square mapping to write, be applicable to the decoding prediction; Another time then is to adopt the mapping of the square of broad to write, and is applicable to demonstration.In addition, above-mentioned storage mapping method comprises that also the square that adopts broad is with decoded non-reference picture mapping write memory, to be used for demonstration.
For instance, Fig. 4 is the example according to the storage mapping method that one embodiment of the invention illustrated.Please with reference to Fig. 4; The storage mapping method of present embodiment can write 3 data in memory; The reference picture data 402 and the non-reference picture data 404 that write comprising the mapping mode that with first block is unit; And be the reference picture data 406 that the mapping mode of unit writes with second block, the width of this first block is greater than the width of second block.Wherein, reference picture data 402 promptly are used for showing with non-reference picture data 404; Reference picture data 406 then are used for decoding.
After the writing data into memory of storage mapping method with video files with the foregoing description; When the decoding of needs prediction or display frame are arranged; Can optionally directly take the data that suitable size mapping writes from memory; Use promoting decoding and peak value display memory access efficiency constantly, specify with the next embodiment that lifts again.
Through above-mentioned storage mapping method, when needing to use reference picture to do the decoding prediction, can directly read the data that are applicable to decoding prediction (narrower block) in the memory carrying out video decoded; And when needs show these pictures, then directly read the data that are applicable to demonstration (broad block) in the memory, and then promote decoding and peak value display memory access efficiency constantly.
It should be noted that in the standard of MPEG2 video streams (Bitstream) comprises three kinds of pictures such as key picture, predictive picture and bi-directional predicted picture.Wherein, key picture and predictive picture need be as the usefulness of the decoding of other picture, and bi-directional predicted picture then need be as the usefulness of the decoding of other picture.According to the characteristic of these pictures, the present invention also provides the storage mapping method corresponding to the decoding of MPEG2 decoding and demonstration video files, specifies with the next embodiment that lifts again.
Fig. 5 is the storage mapping method flow chart in order to decoding and demonstration video files according to one embodiment of the invention illustrated.Please with reference to Fig. 5, present embodiment adopts respectively and helps the mapping mode of decoding and helping showing, with a plurality of picture write memories in the video files.Wherein, described video files comprises a plurality of key picture, a plurality of predictive picture and a plurality of bi-directional predicted picture.The detailed step of the method is following:
At first; With key picture in the video files and predictive picture decoding (step S502); And be the mapping mode write memory (step S504) of unit with one first block and one second block respectively with decoded key picture and predictive picture, the width of wherein said first block is greater than the width of second block.At length say; Because key picture and predictive picture all may be as the references of other picture of decoding; And the decoding of video pictures prediction is fit to adopt narrower mapping mode; That is, can be that unit shines upon and writes with the less square of width (for example 4 * 4 squares) during with the video pictures writing data into memory.
Above-mentioned when being unit mapping write memory with first block; Be to be a plurality of first blocks with each key picture in the video files and predictive picture cutting; And be unit with the width of this first block; With the data of each first block that is syncopated as write memory line by line; Make that the address of data in memory of each row pixel is continuous in each first block, and the address of data in memory of the preceding end pixel of the tail end pixel of each row and next line also is continuous.In other words, the address of data storing in memory of adjacent lines pixel is continuous in first block.For instance, the address that second of certain first block first pixel of row is stored in the memory in the video pictures is to continue after first last pixel of row is stored in the address in the memory.
In like manner; Above-mentioned when being unit mapping write memory with second block; Also be to be a plurality of second blocks with each key picture in the video files and predictive picture cutting; And be unit with the width of this second block, with the data of each second block write memory line by line, make the address of data in memory of each row pixel in this second block for continuously; And the address of data in memory of the tail end pixel of each row and the preceding end pixel of next line is continuously, that is the address of data storing in memory of adjacent lines pixel is continuous in this second block.
Except above-mentioned key picture and predictive picture; The storage mapping method of present embodiment also comprises the bi-directional predicted picture in video files decoding (step S506), and with the decoded bi-directional predicted picture mapping mode write memory (step S508) that is unit with above-mentioned first block.The block (i.e. first block) that adopts broad here is that for unit carries out the reason that mapping writes bi-directional predicted picture need not the reference as the decoding prediction of other picture; Therefore can directly use the mapping mode write memory that helps showing, to reduce the number of times of required access memory when showing.
In brief, above-mentioned storage mapping method is with twice of decoded key picture and predictive picture write memory: once be to adopt narrower square mapping to write, be applicable to the decoding prediction; Another time then is to adopt the mapping of the square of broad to write, and is applicable to demonstration.In addition, above-mentioned storage mapping method comprises that also the square that adopts broad is with decoded bi-directional predicted picture mapping write memory, to be used for demonstration.
For instance, Fig. 6 is the example according to the storage mapping method that one embodiment of the invention illustrated.Please with reference to Fig. 6; The storage mapping method of present embodiment can write 5 data in memory; The key picture data 602 that writes comprising the mapping mode that with first block is unit, predictive picture data 604 and bi-directional predicted picture data 606, and be the key picture data 608 and predictive picture data 610 that the mapping mode of unit writes with second block.Wherein, key picture data 602, predictive picture data 604 are used for showing that key picture data 608 then is used for decoding with predictive picture data 610 with bi-directional predicted picture data 606.
After the writing data into memory of storage mapping method with video files with the foregoing description; When the decoding of needs prediction or display frame are arranged; Can optionally directly take the data that suitable size mapping writes from memory; Use promoting decoding and peak value display memory access efficiency constantly, specify with the next embodiment that lifts again.
Fig. 7 is the storage mapping method flow chart in order to decoding and demonstration video files according to one embodiment of the invention illustrated.Please with reference to Fig. 7; Present embodiment adopts respectively and helps the mapping mode of decoding and helping showing; With a plurality of picture write memories in the video streams, and when reality is carried out picture codec prediction and display frame, take directly that previous mapping writes and the block size meets the data of demand.The detailed step of the method is following:
At first, receive a video streams (step S702), comprise a plurality of pictures in this video streams.Then, according to the message in this video streams, judge that the picture that is received is key picture, predictive picture or bi-directional predicted picture, decision according to this writes the mapping mode (step S704) of this memory.
If the picture that received is key picture or predictive picture,, be that the mapping mode of unit is with decoded picture write memory (step S708) with first block and second block respectively more then earlier with this picture codec (step S706); On the other hand; If the picture that is received is non-reference picture; The mapping mode that then earlier with this picture codec (step S710), and with first block is unit is with decoded picture write memory (step S712), and the width of wherein said first block is greater than the width of second block.
After with decoded picture write memory, next be decode predictions or show of the data that write capable of using.Need judge whether this moment will be with reference to key picture and predictive picture with other picture of decoding, or is to show key picture, predictive picture or bi-directional predicted picture (step S714).
Wherein, If need be with reference to key picture and predictive picture with other picture of decoding; Then reading in the memory with second block is key picture and the predictive picture (step S716) that the mapping mode of unit writes, and with reference to the key picture that is read and predictive picture other picture (step S718) of decoding.
On the other hand; If need to show key picture or predictive picture; Then reading in the memory with first block is key picture and the predictive picture (step S720) that the mapping mode of unit writes, and key picture that is read and predictive picture are presented at (step S722) on the screen.
In addition, if need to show bi-directional predicted picture, then reading in the memory with first block is the bi-directional predicted picture (step S724) that the mapping mode of unit writes, and the bi-directional predicted picture that is read is presented at (step S726) on the screen.
Through above-mentioned storage mapping method, when needing to use reference picture to do the decoding prediction, can directly read the data that are applicable to decoding prediction (narrower block) in the memory carrying out video decoded; And when needs show these pictures, then directly read the data that are applicable to demonstration (broad block) in the memory, and then promote decoding and peak value display memory access efficiency constantly.
For instance, Fig. 8 is according to one embodiment of the invention illustrated in order to decoding and show the example of the storage mapping method of video files.Please with reference to Fig. 8; The peak value of storage access constantly when present embodiment illustrated in a time sequence decoding and shows video pictures; Comprising the decoding sequence of arranging according to the video pictures decoding order, and the display sequence of arranging according to the video pictures DISPLAY ORDER.
As shown in Figure 8, the decoding sequence of the video files of present embodiment is picture I, P1, B1, B2, P2, B3, B4, P3, and wherein picture I represents key picture; Picture P1, P2, P3 represent predictive picture; And picture B1, B2, B3, B4 represent bi-directional predicted picture.When decoded picture P1, possibly need forward reference picture I, and when decoded picture B1, possibly need forward reference picture I, P1 and/or backward with reference to other picture.
In period T1, the picture I in the decoding sequence is decoded, wherein because picture I is a key picture, and the decoding of itself does not need with reference to other picture, but the reference picture may be as the prediction of follow-up picture codec the time.Therefore, after decoded picture I, can be unit mapping write memory with narrower and broad block respectively promptly with its data.
In period T2, can continue the data of decoded picture P1, and the decoding of picture P1 for example needs the data of forward reference picture I, therefore can from memory, read had been the data that unit shines upon the picture I that writes with narrower block before, and in order to decoded picture P1.On the other hand, also can from memory, read had been the data that unit shines upon the picture I that writes with the broad block before, and in order to display frame P1.
In period T3; Can continue the data of decoded picture B1; And the decoding of picture B1 for example needs the data of forward reference picture I, P1, and therefore needing from memory, to read had been that unit shines upon the picture I that writes, the data of P1 with narrower block before, and in order to decoded picture B1.On the other hand, also can from memory, read had been the data that unit shines upon the picture P1 that writes with the broad block before, and in order to display frame P1.
In period T4; Can continue the data of decoded picture B2; And the decoding of picture B2 for example needs the data of forward reference picture I, P1, and therefore needing from memory, to read had been that unit shines upon the picture I that writes, the data of P1 with narrower block before, and in order to decoded picture B2.In addition, also needing from memory, to read had been the data that unit shines upon the picture B1 that writes with the broad block before, and in order to display frame B1.
By that analogy, can obtain decoding sequence as shown in Figure 8 and display sequence.Wherein, For decoding; Because need be with reference to the data of other picture during bi-directional predicted picture in decoding, therefore the data volume of required access memory be maximum, and the data volume of this data volume required access memory during much larger than decoding key picture and predictive picture; Yet, for showing, no matter be key picture, predictive picture or bi-directional predicted picture, its memory data amount that shows required access is all identical.Hence one can see that, in the time series of Fig. 8, period T4, T6 and T7 all can be storage access peak value constantly because all need do the decoding of bi-directional predicted picture in these periods.
Yet, adopt the present invention with two kinds of different memory mapped mode stored picture data, when carrying out the decoding prediction, can directly take the data that write with narrower block mapping in the memory; And when carrying out demonstration, then directly take the data that write with the mapping of broad block in the memory.In view of the above, can effectively improve storage access peak value access efficiency constantly.
What deserves to be mentioned is that for the storage space condition of limited, if will reference picture be stored with two kinds of mapping modes, particularly (High Definition, HD) picture then can take a large amount of storage space for high image quality.Therefore; The present invention also provides a kind of compromise proposal; Also be about to reference picture only with mapping mode (promptly with the narrower block) write memory that is beneficial to decoding; But not reference picture is then kept the mapping mode that is beneficial to the show block of broad (promptly with) write memory, in the hope of under limited storage space, still reaching the purpose that the present invention improves storage access peak value access efficiency constantly, specifies with the next embodiment that lifts again.
Fig. 9 is the storage mapping method flow chart in order to decoding and demonstration video files according to one embodiment of the invention illustrated.Please with reference to Fig. 9, present embodiment adopts respectively and helps the mapping mode of decoding and helping showing, with a plurality of picture write memories in the video files.Wherein, described video files comprises a plurality of reference pictures and a plurality of non-reference picture.The detailed step of the method is following:
At first, with the reference picture in video files decoding (step S902), and with one the 3rd block the mapping mode write memory (step S904) of unit with decoded reference picture.Wherein, because the decoding of video pictures prediction is fit to adopt narrower mapping mode, so present embodiment is that unit shines upon and writes with the less square of width with the reference picture writing data into memory time.
Except above-mentioned reference picture; The storage mapping method of present embodiment also comprises the decoding of the non-reference picture in the video files (step S906), and is the mapping mode write memory (step S908) of unit with the 4th block with decoded non-reference picture.Wherein, the width of the 4th block is greater than the width of the 3rd block.The block (i.e. the 4th block) that adopts broad here is that for unit carries out the reason that mapping writes non-reference picture need not the reference as the decoding prediction of other picture; Therefore can directly use the mapping mode write memory that helps showing, to reduce the number of times of required access memory when showing.
For instance, Figure 10 is the example according to the storage mapping method that one embodiment of the invention illustrated.Please with reference to Figure 10; The storage mapping method of present embodiment can write 2 data in memory; The reference picture data 1002 that write comprising the mapping mode that with the 3rd block is unit; And be the non-reference picture data 1004 that the mapping mode of unit writes with the 4th block, the width of this 4th block is greater than the width of the 3rd block.Wherein, reference picture data 1002 promptly are used for decoding; But not 1004 of reference picture data are used for showing.
Through said method, the present invention can improve storage access peak value access efficiency constantly under the storage space condition of limited.In addition, to above-mentioned memory mapped mode, the present invention also provides corresponding memory mapped device, in order to the video streams that is received is decoded and show, specifies with the next embodiment that lifts again.
Figure 11 is according to one embodiment of the invention illustrated in order to decoding and show the calcspar of the memory mapped device of video files.Please with reference to Figure 11; The memory mapped device 1100 of present embodiment comprises that memory 1110, decoding unit 1120 and memory write unit 1130; Comprise the first block writing module 1132 and the second block writing module 1134 and memory writes unit 1130, its function division is following:
Memory 1110 for example is dynamic random access memory (Dynamic Random Access Memory; DRAM) or Synchronous Dynamic Random Access Memory (Synchronization Dynamic Random Access Memory; SDRAM); It is in order to when carrying out the video pictures decoding and showing, as the usefulness of temporary video pictures data.
Decoding unit 1120 for example is that (Moving Picture Experts Group Standards, MPEG) or decoder H.264, it is in order to reference picture and non-reference picture in the decoding video files for a mpeg group standard.Wherein, said reference picture for example is key picture and predictive picture, and said non-reference picture then for example is a bi-directional predicted picture.
Memory writes unit 1130 and is coupled to decoding unit 1120 and memory 1110, and in order to decoding unit 1120 decoded reference pictures and non-reference picture write memory 1110.At length say; When being reference picture by decoding unit 1120 decoded pictures; Memory writes unit 1130, and promptly to utilize the first block writing module 1132 be the mapping mode write memory of unit with first block with this reference picture; And to utilize the second block writing module 1134 be the mapping mode write memory of unit with this reference picture with second block, and the width of wherein said first block is greater than the width of second block; On the other hand, when decoding unit 1120 decoded pictures were non-reference picture, then memory write unit 1130 only to utilize the first block writing module 1132 is the mapping mode write memory of unit with first block with this non-reference picture.
At length say; The first block writing module 1132 can be a plurality of first blocks with each the reference picture cutting in the video files; And be unit with the width of this first block; With the data of each first block that is syncopated as write memory line by line, make that the address of data in memory 1110 of each row pixel is continuous in each first block, and the address of data in memory 1110 of the preceding end pixel of tail end pixel of each row and next line also is continuous.
On the other hand; 1134 of the second block writing modules can be a plurality of second blocks with each the reference picture cutting in the video files; And be unit with the width of this second block; With the data of each second block write memory line by line; Make the address of data in memory of each row pixel in this second block for continuously, and the address of data in memory 1110 of tail end pixel of each row and the preceding end pixel of next line be continuous, that is the address of data storing in memory 1110 of adjacent lines pixel is continuous in this second block.
In addition, the first block writing module 1132 comprises that also the non-reference picture that decoding unit 1120 is decoded is the mapping mode write memory of unit with first block, with the usefulness as the demonstration of follow-up bi-directional predicted picture.
The second block writing module 1134 with second block be the mapping mode of unit with the reference picture write memory after; It is key picture and the predictive picture data that unit stores with second block that decoding unit 1132 promptly can read this, and with reference to decode other picture of video files of the data that read.
What deserves to be mentioned is; In one embodiment; An also configurable display unit (not illustrating) in the memory mapped device 1100; It is coupled to memory 1110, and is the reference picture that the mapping mode of unit writes in order to read in the memory 1110 with first block, and the reference picture that is read is shown in screen; In addition, it is the non-reference picture that the mapping mode of unit writes that this display unit also can read in the memory with first block, and the non-reference picture that is read is shown in screen.
In addition; In one embodiment; In order to save the shared storage space of stored picture data; Above-mentioned memory writes unit 1130, and also can only to utilize the first block writing module 1132 be the mapping mode write memory of unit with reference picture with first block, and to utilize the second block writing module 1132 be the mapping mode write memory of unit with second block with non-reference picture.Wherein, the width of second block is greater than the width of first block.
In sum; Of the present inventionly whether need be used as the characteristic of the decoding prediction of other picture according to video pictures in order to decoding and the storage mapping method and the device that show video files, select whether to use two kinds of different in width blocks as the mapping mode of unit with decoded video pictures writing data into memory.And when reality decoding or demonstration video pictures, then can select to read the data that are fit in the memory on demand, can promote decoding and peak value display memory access efficiency constantly in view of the above.
Though the present invention discloses as above with embodiment; Right its is not in order to limit the present invention; Has common knowledge the knowledgeable in the technical field under any; Do not breaking away from the spirit and scope of the present invention, when doing a little change and retouching, so protection scope of the present invention is when being as the criterion with what claim defined.

Claims (16)

1. one kind in order to decoding and show the storage mapping method of video files, and this video files comprises a plurality of reference pictures and a plurality of non-reference picture, and this method comprises the following steps:
Those reference pictures of decoding, and be that the mapping mode of unit writes a memory with one first block and one second block respectively with decoded those reference pictures, wherein the width of this first block is greater than the width of this second block;
Those non-reference pictures of decoding, and the mapping mode that is unit with this first block with decoded those non-reference pictures writes this memory;
Read those reference pictures and those non-reference pictures that the mapping mode that is unit with this first block in this memory writes, to show those reference pictures and those the non-reference pictures that is read; And
Read those reference pictures that the mapping mode that is unit with this second block in this memory writes, and with reference to those reference pictures of being read, with decoding prediction as other picture of this video files.
2. the storage mapping method in order to decoding and demonstration video files as claimed in claim 1 is characterized in that, before the step of those reference pictures of decoding and those non-reference pictures, more comprises:
Receive a video streams, this video streams comprises a plurality of pictures;
According to the message in this video streams, judge that those pictures that received are reference picture or non-reference picture, decision according to this writes the mapping mode of this memory.
3. as claimed in claim 1 in order to decoding and show the storage mapping method of video files, it is characterized in that the step that decoded those reference pictures mapping mode that is unit with this first block is write this memory comprises:
Each those reference picture of cutting and those non-reference pictures are a plurality of first blocks; And
Width with this first block is a unit; The data of those first blocks write this memory line by line with each; Make the address of data in this memory of a plurality of pixels of each row in this first block for continuously, and the address of data in this memory of tail end pixel of each row and a preceding end pixel of next line is continuous.
4. as claimed in claim 1 in order to decoding and show the storage mapping method of video files, it is characterized in that the step that decoded those reference pictures mapping mode that is unit with this second block is write this memory comprises:
Each those reference picture of cutting are a plurality of second blocks; And
Width with this second block is a unit; The data of those second blocks write this memory line by line with each; Make the address of data in this memory of a plurality of pixels of each row in this second block for continuously, and the address of data in this memory of tail end pixel of each row and a preceding end pixel of next line is continuous.
5. the storage mapping method in order to decoding and demonstration video files as claimed in claim 1 it is characterized in that those reference pictures comprise key picture and predictive picture, and those non-reference pictures comprises bi-directional predicted picture.
6. one kind in order to decoding and show the storage mapping method of video files, and this video files comprises a plurality of reference pictures and a plurality of non-reference picture, and this method comprises the following steps:
Those reference pictures of decoding, and be that the mapping mode of unit writes a memory with decoded those reference pictures with one the 3rd block; And
Those non-reference pictures of decoding, and be that the mapping mode of unit writes this memory with decoded those non-reference pictures with the 4th block, wherein the width of the 4th block is greater than the width of the 3rd block;
Read in this memory with the 3rd block and be those reference pictures of writing of the image mode of unit and be those non-reference pictures that the image mode of unit writes, to show those reference pictures and those the non-reference pictures that is read with the 4th block; And
Reading in this memory with the 3rd block is those reference pictures that the mapping mode of unit writes, and with reference to those reference pictures that read, with the decoding prediction as other picture of this video files.
7. the storage mapping method in order to decoding and demonstration video files as claimed in claim 6 it is characterized in that those reference pictures comprise key picture and predictive picture, and those non-reference pictures comprises bi-directional predicted picture.
8. one kind in order to decoding and show the memory mapped device of video files, comprising:
One memory;
One decoding unit, a plurality of reference pictures in the video files of decoding and a plurality of non-reference picture; And
One memory writes the unit, couples this decoding unit and this memory, and those reference pictures after this decoding unit decodes and those non-reference pictures are write this memory, and it comprises:
With decoded those reference pictures is that the mapping mode of unit writes this memory with one first block and one second block respectively, and wherein the width of this first block is greater than the width of this second block; And
The mapping mode that is unit with this first block with decoded those non-reference pictures writes this memory, wherein
This decoding unit more comprises and reads those reference pictures that the image mode that is unit with this second block in this memory writes, and with reference to those reference pictures that read, with other picture of this video files of decoding.
9. the memory mapped device in order to decoding and demonstration video files as claimed in claim 8 is characterized in that this memory writes unit pack and draws together:
One first block writing module, the mapping mode that is unit with this first block writes this memory with those reference pictures and those non-reference pictures; And
One second block writing module, the mapping mode that is unit with this second block writes this memory with those reference pictures.
10. the memory mapped device in order to decoding and demonstration video files as claimed in claim 9; It is characterized in that; This first block writing module comprises that each those reference picture of cutting and those non-reference pictures are a plurality of first blocks; And be unit with the width of this first block; The data of those first blocks write this memory line by line with each, make the address of data in this memory of a plurality of pixels of each row in this first block for continuously, and the address of data in this memory of tail end pixel of each row and a preceding end pixel of next line is continuous.
11. the memory mapped device in order to decoding and demonstration video files as claimed in claim 9; It is characterized in that; This second block writing module comprises that each those reference picture of cutting are a plurality of second blocks; And be unit with the width of this second block; The data of those second blocks write this memory line by line with each, make the address of data in this memory of a plurality of pixels of each row in this second block for continuously, and the address of data in this memory of tail end pixel of each row and a preceding end pixel of next line is continuous.
12. the memory mapped device in order to decoding and demonstration video files as claimed in claim 8 is characterized in that, more comprises:
One display unit; Couple this memory; Read those reference pictures that the mapping mode that is unit with this first block in this memory writes; And show those reference pictures that read, and read those non-reference pictures that the mapping mode that is unit with this first block in this memory writes, and show those non-reference pictures that read.
13. the memory mapped device in order to decoding and demonstration video files as claimed in claim 8 it is characterized in that those reference pictures comprise key picture and predictive picture, and those non-reference pictures comprises bi-directional predicted picture.
14. the memory mapped device in order to decoding and demonstration video files comprises:
One memory;
One decoding unit, a plurality of reference pictures in the video files of decoding and a plurality of non-reference picture; And
One memory writes the unit, couples this decoding unit and this memory, and those reference pictures after this decoding unit decodes and those non-reference pictures are write this memory, and it comprises:
Is that the mapping mode of unit writes this memory with decoded those reference pictures with one the 3rd block; And
Is that the mapping mode of unit writes this memory with decoded those non-reference pictures with the 4th block, and wherein the width of the 4th block is greater than the width of the 3rd block, wherein
This decoding unit comprises that more reading in this memory with the 3rd block is those reference pictures that the image mode of unit writes, and with reference to those reference pictures that read, with other picture of this video files of decoding.
15. the memory mapped device in order to decoding and demonstration video files as claimed in claim 14 is characterized in that, more comprises:
One display unit; Couple this memory; Reading in this memory with the 3rd block is those reference pictures that the mapping mode of unit writes; And show those reference pictures read, and to read in this memory with the 4th block be those non-reference pictures that the mapping mode of unit writes, and show those non-reference pictures that read.
16. the memory mapped device in order to decoding and demonstration video files as claimed in claim 14 it is characterized in that those reference pictures comprise key picture and predictive picture, and those non-reference pictures comprises bi-directional predicted picture.
CN 200910132453 2009-03-26 2009-03-26 Storage mapping method and device for encoding and displaying video files Expired - Fee Related CN101847394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910132453 CN101847394B (en) 2009-03-26 2009-03-26 Storage mapping method and device for encoding and displaying video files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910132453 CN101847394B (en) 2009-03-26 2009-03-26 Storage mapping method and device for encoding and displaying video files

Publications (2)

Publication Number Publication Date
CN101847394A CN101847394A (en) 2010-09-29
CN101847394B true CN101847394B (en) 2012-03-07

Family

ID=42771991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910132453 Expired - Fee Related CN101847394B (en) 2009-03-26 2009-03-26 Storage mapping method and device for encoding and displaying video files

Country Status (1)

Country Link
CN (1) CN101847394B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105047116A (en) * 2015-08-21 2015-11-11 昆山龙腾光电有限公司 Image information processing method and device
CN106488240A (en) * 2015-09-01 2017-03-08 晨星半导体股份有限公司 Image processing system and image treatment method
US11494869B2 (en) * 2020-09-30 2022-11-08 Realtek Semiconductor Corporation Image processor having a compressing engine performing operations on each row of M*N data block

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1207635A (en) * 1997-04-30 1999-02-10 索尼公司 Signal reproducing apparatus and signal reproducing method
CN101080014A (en) * 2006-03-28 2007-11-28 株式会社东芝 Video decoding method and apparatus
CN101163237A (en) * 2006-10-11 2008-04-16 扬智科技股份有限公司 Image processing process and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1207635A (en) * 1997-04-30 1999-02-10 索尼公司 Signal reproducing apparatus and signal reproducing method
CN101080014A (en) * 2006-03-28 2007-11-28 株式会社东芝 Video decoding method and apparatus
CN101163237A (en) * 2006-10-11 2008-04-16 扬智科技股份有限公司 Image processing process and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开平10-49435A 1998.02.20

Also Published As

Publication number Publication date
CN101847394A (en) 2010-09-29

Similar Documents

Publication Publication Date Title
US8890881B2 (en) Mapping method and video system for mapping pixel data included in the same pixel group to the same bank of memory
CN101527849B (en) Storing system of integrated video decoder
US9894371B2 (en) Video decoder memory bandwidth compression
CN101212674B (en) Image address mapping method in memory
CN101252694B (en) Address mapping system and frame storage compression of video frequency decoding based on blocks
US20060023792A1 (en) Memory mapping apparatus and method for video decoder/encoder
JP5969914B2 (en) Video compression / decompression device
US20140086309A1 (en) Method and device for encoding and decoding an image
US20090058866A1 (en) Method for mapping picture addresses in memory
CN105578190A (en) Lossless compression method and system for video hard decoding
US20170365033A1 (en) Image processing device
JP2010171609A (en) Image processing apparatus
CN101212680B (en) Image data storage access method and system
CN101847394B (en) Storage mapping method and device for encoding and displaying video files
CN100444636C (en) Method for improving SDRAM bus efficiency in video decoder
JP5526641B2 (en) Memory controller
US10062142B2 (en) Stutter buffer transfer techniques for display systems
US7400683B2 (en) Device with virtual tilized image memory
US20070183510A1 (en) Method and apparatus for decoding video that alternately store lines of picture in pixel units and method of storing reference picture
CN116700943A (en) Video playing system and method and electronic equipment
CN1929606A (en) Video decoding system
Nguyen et al. 71% Reducing the memory bandwidth requirement for a multi-standard video codec by lossless compression of video using a combination of 2D-DPCM and Variable Length Coding
CN115695915A (en) Video data processing system, method, device and storage medium
JP2004120027A (en) Image processing apparatus
US20080231481A1 (en) Variable length decoding device and method for improving variable length decoding performance

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120307

Termination date: 20190326