WO2008100206A1 - Generating a data stream and identifying positions within a data stream - Google Patents

Generating a data stream and identifying positions within a data stream Download PDF

Info

Publication number
WO2008100206A1
WO2008100206A1 PCT/SE2008/000125 SE2008000125W WO2008100206A1 WO 2008100206 A1 WO2008100206 A1 WO 2008100206A1 SE 2008000125 W SE2008000125 W SE 2008000125W WO 2008100206 A1 WO2008100206 A1 WO 2008100206A1
Authority
WO
WIPO (PCT)
Prior art keywords
stream
marker
data
variable length
code word
Prior art date
Application number
PCT/SE2008/000125
Other languages
French (fr)
Inventor
Sami Niemi
Johan Sten
Original Assignee
Scalado Ab
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
Priority claimed from SE0700446A external-priority patent/SE533185C2/en
Application filed by Scalado Ab filed Critical Scalado Ab
Priority to EP08712717.1A priority Critical patent/EP2123053B1/en
Priority to CN2008800050520A priority patent/CN101647288B/en
Priority to JP2009549554A priority patent/JP5289333B2/en
Priority to KR1020097019348A priority patent/KR101463279B1/en
Publication of WO2008100206A1 publication Critical patent/WO2008100206A1/en
Priority to IL200413A priority patent/IL200413A0/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4092Image resolution transcoding, e.g. client/server architecture
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • H03M7/42Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/65Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using error resilience
    • H04N19/68Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using error resilience involving the insertion of resynchronisation markers into the bitstream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present invention relates to methods and apparatus, including computer program products, for generating a data stream encoded by means of a Variable Length Coding scheme and to a method for identifying the position of a code word within a stream of Variable Length Codes.
  • the users of electronic devices displaying images on a display are in most cases interested in being able to alter the view of the image. Some common operations requested by the user are to zoom into an image to view details of the image, pan in the zoomed image in order to trace a feature or just to get an overview of the details, rotate images in order to facilitate viewing on the display, etc.
  • the images handled by users of such electronic devices are of increasing resolution, i.e. the number of pixels defining an image becomes greater and greater.
  • Said electronic devices may, for example, be mobile telephones, personal digital assistance, palm tops, or other devices having limited processing capacity in view of the images to be handled.
  • a lot of said electronic devices having a display for viewing images do not include enough processing capacity to perform operations such as zoom, pan, etc. without presenting frequently occurring and annoying delays between consecutively presented views. This may result in that continuously zooming in or out of an image may be experienced as a presentation of a plurality of images with long delay in-between images. Thus, no experience of continuous zoom is achieved, which may be irritating for the user. This may also result in erroneous handling or inputs by the user.
  • An object of the present invention is to improve operations on Variable Length Coded streams and or images and improve the experience for the user of continuous operations on such streams and/or images, as well as improve the time to decode a captured image to screen.
  • the above object is achieved by a method for generating a data stream encoded by means of a Variable Length Coding scheme.
  • the method comprises encoding code words for a data stream including a plurality of code words in accordance with a Variable Length Coding scheme, and inserting a separation marker between encoded code words in the data stream.
  • a separation marker partial access to a data stream of variable length codes is facilitated. For example, it becomes possible to speed up access to image data representing an arbitrary area of an image coded by means of a variable length coding. Moreover, the marker makes it possible to access data forming part of the data in a data stream of variable length codes without the need of decoding every single code arranged ahead of the data to be accessed. Thereby, both time and processing capacity may be saved. The same advantageous applies to the use of the markers in order to indicate separate data streams sharing the same transport or storage medium, e.g. multiplexed data streams.
  • said inserting of a separation marker is performed by inserting at least 16 consecutive binary ones after a specific code word.
  • the insertion of a separation marker is performed by inserting 16 consecutive binary zeros instead of 16b consecutive ones.
  • the specific code word is the last code word of a data block.
  • the marker By making the marker identify the end of one and the beginning of another data block the access to individual data blocks may be facilitated and performed substantially faster.
  • said inserting of a separation marker is performed by inserting at least 16 consecutive binary ones between two or more specific code words.
  • the method for generating a data stream encoded by means of a Variable Length Coding scheme comprises encoding data blocks of a data stream including a plurality of data blocks in accordance with a Variable Length Coding scheme, and inserting a separation marker between encoded data blocks in the data stream.
  • the introducing of a separation marker facilitates partial access to a data stream of variable length codes. For example, it becomes possible to speed up access to image data representing an arbitrary area of an image coded by means of a variable length coding. Moreover, the marker makes it possible to access data forming part of the data in a data stream of variable length codes without the need of decoding every single code arranged ahead of the data to be accessed. Thereby, both time and processing capacity may be saved. The same advantageous applies to the use of the markers in order to indicate separate data streams sharing the same transport or storage medium, e.g. multiplexed data streams. Moreover, by making the marker identify a data block the access to individual data blocks may be facilitated and performed substantially faster.
  • the act of inserting separation marker further includes inserting the separation marker at a point in time after a previous block has been encoded and before a next encoded data block has been added to the previous data block.
  • said encoding and insertion of a separation marker are performed by hardware. Thereby speeding up the insertion of the marker.
  • said inserting of a marker in the data stream is performed in connection with the data stream being encoded by means of the variable length coding scheme.
  • the encoding may be performed substantially faster than if the markers were to be inserted into the data stream by decoding the entire stream.
  • the encoding of data blocks is performed in accordance with a JPEG standard, and wherein each data block corresponds to a data unit in accordance with the JPEG standard.
  • the method comprises inserting eight binary zeros before the separation marker, if the separation marker includes binary ones, or inserting eight binary ones before the separation marker, if the separation marker includes binary zeros.
  • the inserting any of these sequences or any other known sequence before the separation marker the identification of the exact starting point in the data stream of the separation marker is facilitated.
  • the sequence inserted before the separation marker may alternatively be a set of eight bits, wherein said set of eight bits including at least one bit of binary zero value and said at least one bit of binary zero value being arranged in a predetermined position in said set of eight bits.
  • the predetermined position of said at least one bit of binary zero value may be the position as the least significant bit in the set of eight bits.
  • the above object is achieved by means of a method for retrieving data relating to a code word of particular interest within a stream of variable length codes.
  • the method comprises identifying the position of a predefined marker within the stream of variable length codes, calculating a start position of the code word of particular interest within the stream of variable length codes, and retrieving the data relating to the code word of particular interest.
  • a predefined marker in a data stream of variable length codes for identifying a position of interest in the data stream the access of this position may require less time and processing capacity than if the entire data stream is to be decoded in order to find the position. For example, it becomes possible to speed up access to image data representing an arbitrary area of an image coded by means of a variable length coding.
  • the marker also makes it possible to access data positioned within a data stream of variable length codes without the need of decoding every single code arranged ahead of the to be accessed.
  • the method further comprises identifying the position of at least one additional predefined marker within the stream of variable length codes, calculating the start position of said at least one additional code word of particular interest within the stream of variable length codes, and retrieving the data relating to at least one additional code word of particular interest. Because a plurality of markers are identified and used in decoding the data stream the process may require even less time and processing power.
  • retrieving the data relating to the code word of particular interest includes retrieving the calculated start position of the code word of particular interest within the data stream and inserting this start position into a list of features of the stream of variable length codes.
  • retrieving the data relating to the code word of particular interest includes retrieving the value represented by the specific code word. This embodiment speeds up the access to particular values to be more rarely used. For instance when performing operations on images which are not supposed to be saved.
  • the stream of variable length codes is a compressed representation of an image and the code word of particular interest is a DC-coefficient of a data unit in stream of variable length codes.
  • the code word of particular interest is a DC-coefficient of a data unit in stream of variable length codes.
  • the identifying of the position of the predefined marker further includes identifying a predetermined symbol arranged in the stream of Variable Length Codes next to the marker and wherein the transition from one of the predetermined symbol or the predefined marker to the predefined marker or the predetermined symbol is identified as the position of the marker.
  • the predetermined symbol is an End Of Block symbol, EOB.
  • the calculation of the start position within the stream of Variable Length Codes of the specific code word is based on the position of the predefined marker and the known length of the marker.
  • the stream of variable length codes include data blocks including a plurality of code words, wherein the code word of particular interest is the first code word of a data block, and thereby the calculating a start position of the code word of particular interest corresponds to calculating the start position of said data block.
  • the present invention relates to methods, apparatus, and computer program products for facilitating fast indexing of a stream of data blocks that has been coded by means of Variable Length Coding (VLC) schemes or entropy coding schemes.
  • VLC Variable Length Coding
  • the fast indexing is achieved by insertion of a data block separation marker between data blocks consecutively arranged in a data stream.
  • a data stream should be understood as data related to each other by being part of the same data file, by being part of the same data message sent via a network, such message may be separated into different packages or sent in one continuous stream depending on the network, by being part of the same information stream, such as streaming audio or streaming video or a combination of these.
  • Embodiments of the invention are applicable to any type of data stream in which data blocks are encoded by means of a VLC scheme or entropy coding scheme, e.g. Huffman encoding, arithmetic encoding, etc.
  • VLC scheme or entropy coding scheme e.g. Huffman encoding, arithmetic encoding, etc.
  • a symbol should be understood as one unit from a set of units, where each unit has an individual bit code assigned to them.
  • a data block should be understood as some data representing a portion of a larger data stream, e.g. a portion of image data, a portion of an audio stream, a rectangular image block of an image stream, etc.
  • two or more variable length coded streams are mixed according to more specific rules, for instance by alternating n symbols from a first signal, and m symbols from a second signal, and k symbols from a third signal.
  • the present invention addresses the above problems in the use of variable length coded streams by introducing special markers that can be inserted in the stream generated in the variable length encoding process. These markers may be used to speed up the process of finding specific symbols in a data stream. Additionally the present invention introduces a method of removing said markers in an efficient way in order to create or recreate the original stream or streams.
  • a variable length coded stream is made of symbols that are of different bit lengths.
  • bit stream In order to decode the bit stream to the original symbols the bit stream has to be decoded from the left and the bits are read until a valid symbol is produced. By decoding the entire bit stream it is possible to understand where the boundaries between the symbols are located:
  • bit markers or symbol separating markers are introduced to allow fast finding of a specific marker.
  • the bit markers may be made of series of binary ones of a length that is a multiple of eight and at least 16 bits long.
  • the most interesting marker being made of 16 binary ones, i.e. 11111111 11111111. If we want to mark the boundary after symbol "A" in the stream, it would be done by inserting 16 binary ones after the symbol "A" in the stream:
  • the bytes up to the byte before the marker can be copied directly, as well as the bytes one byte after the marker.
  • the remaining task is to restore the byte which was split by inserting the binary ones, marked in parenthesis.
  • the symbol before or after the sixteen ones was known and it contains at least one zero, it is trivial to find out the bit position of the boundary between the marked symbols, i.e. the position of the marker.
  • the position of the marker is the position of the next symbol, when the marker has been removed. This may be achieved by finding the first zero to the left of "FF" and by knowing the appearance and/or code of the symbol containing the zero and then calculate where that symbol ends.
  • a very good code to use for this purpose is "00000000", as it can be used as a bit mask when removing the marker, i.e.:
  • the symbol K has its first binary zero from right in the first position, hence the symbol before the symbol K ends 7 positions to the left of the found binary zero.
  • the removal can then be performed by finding the first occurrence of a binary zero to the left of the FF, marked with x below:
  • the total resulting byte array thus becomes the original stream: FB 86 10 F6 F8 7E.
  • the streams are alternated in this example so that five code words of stream A is sent, and then eight code words of stream B is sent, and then five code words of stream A, and so on:
  • Embodiments of the invention introduce the special markers in order to be able to separate the two streams in a more efficient manner, note that normally the scheme of inserting the marker happens much more seldom than in the following example, thus not requiring much overhead:
  • the streams can be alternated at the FF markers by outputting the first stream until FF, then continuing with the second stream until FF, and then continuing the first stream until next FF and so on, resulting in the following transmitted stream:
  • the symbol K could be any 7 bit number with a pre defined zero in a predefined bit position.
  • the above description may be extended to find the start of the marker by knowing the position of the predefined zero.
  • the zero is the least significant bit, and the most significant seven bit could be used for other data, for instance a number increasing from zero to 127. In that way it would be easy to skip over up to 128 marked code words just by looking at the byte stream.
  • the above described general method may be implemented for use in processing JPEG streams.
  • a way of modifying an existing JPEG Encoder with minimal changes in order to create an alternative stream of non-compliant JPEG data including special markers that indicate end of DU is described below.
  • the noncompliant JPEG data can then be analyzed to map the beginning of each DU, and the non-compliant markers can be removed while storing it to a non-volatile memory.
  • a code word is intended to be understood as a series of bits that can be decoded to produce a previously encoded unit. All code words are not of the same length. Despite this fact, they are not strictly meant to be read as a variable length representation of a single symbol. An example of such more complex code words is the ones used in a jpeg stream.
  • a JPEG codeword as defined here encodes a series of zeros followed by a non-zero number into a combination of a symbol for the zero run length together with the magnitude of the non-zero number, followed by the least significant bits of the number based on the magnitude.
  • the whole series of bits produced for the series of zeros followed by the non-zero number or any of their subsets can thus be read as a codeword according to our definition.
  • a JPEG stream consists of multiple Data Units (DUs) of 64 coefficients.
  • the coefficients are represented by Huffman coded symbols of variable length, usually the last coefficients are zeros, and an End Of Block (EOB) symbol is used to terminate a Data Unit (DU) that has zeros in the end.
  • EOB End Of Block
  • the method allows modifying of an encoder component, which may reside in hardware, in order to create markers indicating end of a block, which a receiving SW component can use to find the DU positions, and afterwards easily remove the markers, thus allowing for fast creation of a DU position database, and/or a scaled down version of the encoded image.
  • the encoding may be performed in HW due to speed issues. This is a simple approach to allowing standard JPEG HW to be modified without requirement of extra memory for storing the start positions of the data units of the JPEG data stream.
  • Normal EOB 1010 New EOB: 1010111111111111111111 Moreover, the normal DCs and the new DCs may relate to each other as described in the table below:
  • the example uses the following Huffman table:
  • the underlined portion indicates EOB.
  • the decoding may be performed in software.
  • Step 1 Seek FF that has no trailing "00". In a JPEG stream only "FF 00" is allowed, but that cannot occur with these rules. Meaning that it is 100% certain that the sought FF is our marker. (Provided that the restart markers are not used in the JPEG stream)
  • the above example describes a process of quickly finding the bit addresses of all DUs in a stream, and the process of quickly removing the markers in order to recreate the original stream.
  • the algorithm may be modified for use in finding the DC coefficients of each DU. Then, by decoding the DC coefficients the data of each DC may be used increate an 8 times smaller version of the image. The same can be done if a four times smaller representation is needed, where the DC coefficient and a number of subsequent ACs are decoded in order to be able to perform a 2x2 IDCT on the coefficients.
  • By having the markers indicate the position of DC coefficients it becomes possible to skip Huffman decoding the other coefficients, thus allowing much faster scaling of images to small screens in the capturing moment.
  • This implementation may be utilised in any application in order to speed up the process of displaying a reduced size image.
  • One example of such an application is image acquisition applications using the display as a view finder.
  • One general problem in these applications is the delay of the presentation of an image representing the image view. In other words, when the user sees the desired view on the display the moment may be long gone.
  • the delay may be substantially reduced by providing an data stream including markers indicating the position of the DC coefficients and implementing a display process that seeks the markers, retrieve the information relating to the DC coefficients at the markers, and generate an reduced size image from this information to be presented on the display.
  • a way of modifying a JPEG Encoder with minimal changes in order to create an alternative stream of non-compliant JPEG data including special markers that indicate end of DU is presented.
  • the noncompliant JPEG data can then be analyzed to map the beginning of each DU, and the non-compliant markers can be removed while storing it to a non-volatile memory.
  • the marker is set to at least 16 binary ones.
  • the marker may as well be set to at least 16 binary zeros, i.e. 0000000000000000. If the marker is set to 16 binary zeros the known code inserted before the marker may be "11111111". Hence the code 000000001111111111111111 is inverted to 11111111000000000000.
  • the invention can be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. Apparatus of the invention can be implemented in a computer program product tangibly embodied in a machine-readable storage device for execution by a programmable processor; and method steps of the invention can be performed by a programmable processor executing a program of instructions to perform functions of the invention by operating on input data and generating output.
  • the invention can be implemented advantageously in one or more computer programs that are executable on a programmable system including at least one programmable processor coupled to receive data and instructions from, and to transmit data and instructions to, a data storage system, at least one input device, and at least one output device.
  • Each computer program can be implemented in a high-level procedural or object-oriented programming language, or in assembly or machine language if desired; and in any case, the language can be a compiled or interpreted language.
  • Suitable processors include, by way of example, both general and special purpose microprocessors. Generally, a processor will receive instructions and data from a read-only memory and/or a random access memory.
  • a computer will include one or more mass storage devices for storing data files; such devices include magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and optical disks.
  • Storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including by way of example semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM disks. Any of the foregoing can be supplemented by, or incorporated in, ASICs (application- specific integrated circuits).
  • the invention can be implemented on a computer system having a display device such as a monitor or LCD screen for displaying information to the user.
  • the user can provide input to the computer system through various input devices such as a keyboard and a pointing device, such as a mouse, a trackball, a microphone, a touch-sensitive display, a transducer card reader, a magnetic or paper tape reader, a tablet, a stylus, a voice or handwriting recognizer, or any other well- known input device such as, of course, other computers.
  • the computer system can be programmed to provide a graphical user interface through which computer programs interact with users.
  • the processor optionally can be coupled to a computer or telecommunications network, for example, an Internet network, or an intranet network, using a network connection, through which the processor can receive information from the network, or might output information to the network in the course of performing the above-described method steps.
  • a computer or telecommunications network for example, an Internet network, or an intranet network
  • Such information which is often represented as a sequence of instructions to be executed using the processor, may be received from and outputted to the network, for example, in the form of a computer data signal embodied in a carrier wave.
  • the present invention employs various computer-implemented operations involving data stored in computer systems. These operations include, but are not limited to, those requiring physical manipulation of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated.
  • the operations described herein that form part of the invention are useful machine operations.
  • the manipulations performed are often referred to in terms, such as, producing, identifying, running, determining, comparing, executing, downloading, or detecting. It is sometimes convenient, principally for reasons of common usage, to refer to these electrical or magnetic signals as bits, values, elements, variables, characters, data, or the like. It should remembered however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities.
  • the present invention also relates to a device, system or apparatus for performing the aforementioned operations.
  • the system may be specially constructed for the required purposes, or it may be a general-purpose computer selectively activated or configured by a computer program stored in the computer.
  • the processes presented above are not inherently related to any particular computer or other computing apparatus.
  • various general-purpose computers may be used with programs written in accordance with the teachings herein, or, alternatively, it may be more convenient to construct a more specialized computer system to perform the required operations.

Abstract

Methods and apparatus, including computer program products, for generating a data stream encoded by means of a Variable Length Coding scheme. Code words for a data stream including a plurality of code words are encoded in accordance with a Variable Length Coding scheme. A separation marker is inserted between encoded data blocks in the data stream.

Description

GENERATING A DATA STREAM AND IDENTIFYING POSITIONS WITHIN A
DATA STREAM
Technical Field
The present invention relates to methods and apparatus, including computer program products, for generating a data stream encoded by means of a Variable Length Coding scheme and to a method for identifying the position of a code word within a stream of Variable Length Codes.
Background
Today images, such as photographs, still pictures, graphics etc., are commonly viewed in any electronic device having a display. However, it is not enough to enable images being viewed on a display; it is also crucial that the images can be displayed in a reasonable time, as the size of the captured images increases. The users of electronic devices displaying images on a display are in most cases interested in being able to alter the view of the image. Some common operations requested by the user are to zoom into an image to view details of the image, pan in the zoomed image in order to trace a feature or just to get an overview of the details, rotate images in order to facilitate viewing on the display, etc. Moreover, the images handled by users of such electronic devices are of increasing resolution, i.e. the number of pixels defining an image becomes greater and greater. Said electronic devices may, for example, be mobile telephones, personal digital assistance, palm tops, or other devices having limited processing capacity in view of the images to be handled. For instance, a lot of said electronic devices having a display for viewing images do not include enough processing capacity to perform operations such as zoom, pan, etc. without presenting frequently occurring and annoying delays between consecutively presented views. This may result in that continuously zooming in or out of an image may be experienced as a presentation of a plurality of images with long delay in-between images. Thus, no experience of continuous zoom is achieved, which may be irritating for the user. This may also result in erroneous handling or inputs by the user.
One common way to address this problem is either to increase the processing capacity of the device or to avoid operations in which the user expects an experience of continuous flow. Summary
An object of the present invention is to improve operations on Variable Length Coded streams and or images and improve the experience for the user of continuous operations on such streams and/or images, as well as improve the time to decode a captured image to screen.
According to one aspect of the invention the above object is achieved by a method for generating a data stream encoded by means of a Variable Length Coding scheme. The method comprises encoding code words for a data stream including a plurality of code words in accordance with a Variable Length Coding scheme, and inserting a separation marker between encoded code words in the data stream.
By introducing a separation marker partial access to a data stream of variable length codes is facilitated. For example, it becomes possible to speed up access to image data representing an arbitrary area of an image coded by means of a variable length coding. Moreover, the marker makes it possible to access data forming part of the data in a data stream of variable length codes without the need of decoding every single code arranged ahead of the data to be accessed. Thereby, both time and processing capacity may be saved. The same advantageous applies to the use of the markers in order to indicate separate data streams sharing the same transport or storage medium, e.g. multiplexed data streams.
In one embodiment said inserting of a separation marker is performed by inserting at least 16 consecutive binary ones after a specific code word. In another embodiment, the insertion of a separation marker is performed by inserting 16 consecutive binary zeros instead of 16b consecutive ones. By using a marker including 16 consecutive binary ones or zeros a search for the marker may be performed fast and efficiently. The reason for this is that it becomes possible to detect the marker on a byte level, i.e. 8 bits. The detection on a byte level is possible because a part of the marker, 16 consecutive binary ones or zeros, in the data stream of variable length codes will always be represented by a byte including only binary ones or binary zeros.
According to another embodiment the specific code word is the last code word of a data block. By making the marker identify the end of one and the beginning of another data block the access to individual data blocks may be facilitated and performed substantially faster. According to yet another embodiment said inserting of a separation marker is performed by inserting at least 16 consecutive binary ones between two or more specific code words.
In one embodiment the method for generating a data stream encoded by means of a Variable Length Coding scheme comprises encoding data blocks of a data stream including a plurality of data blocks in accordance with a Variable Length Coding scheme, and inserting a separation marker between encoded data blocks in the data stream.
As mentioned in relation to one of the above embodiments the introducing of a separation marker facilitates partial access to a data stream of variable length codes. For example, it becomes possible to speed up access to image data representing an arbitrary area of an image coded by means of a variable length coding. Moreover, the marker makes it possible to access data forming part of the data in a data stream of variable length codes without the need of decoding every single code arranged ahead of the data to be accessed. Thereby, both time and processing capacity may be saved. The same advantageous applies to the use of the markers in order to indicate separate data streams sharing the same transport or storage medium, e.g. multiplexed data streams. Moreover, by making the marker identify a data block the access to individual data blocks may be facilitated and performed substantially faster.
According to one embodiment the act of inserting separation marker further includes inserting the separation marker at a point in time after a previous block has been encoded and before a next encoded data block has been added to the previous data block.
In another embodiment said encoding and insertion of a separation marker are performed by hardware. Thereby speeding up the insertion of the marker.
In one embodiment said inserting of a marker in the data stream is performed in connection with the data stream being encoded by means of the variable length coding scheme. By inserting the marker in connection with the data stream being encoded into a Variable length code the encoding may be performed substantially faster than if the markers were to be inserted into the data stream by decoding the entire stream. According to another embodiment the encoding of data blocks is performed in accordance with a JPEG standard, and wherein each data block corresponds to a data unit in accordance with the JPEG standard. By inserting said markers into data streams including JPEG data blocks the access of particular parts of an image represented by the encoded data stream becomes faster and requires less processing capacity. Accordingly, operations on parts of an image may be facilitated. According to another embodiment the method comprises inserting eight binary zeros before the separation marker, if the separation marker includes binary ones, or inserting eight binary ones before the separation marker, if the separation marker includes binary zeros. The inserting any of these sequences or any other known sequence before the separation marker the identification of the exact starting point in the data stream of the separation marker is facilitated. The sequence inserted before the separation marker may alternatively be a set of eight bits, wherein said set of eight bits including at least one bit of binary zero value and said at least one bit of binary zero value being arranged in a predetermined position in said set of eight bits. Moreover, the predetermined position of said at least one bit of binary zero value may be the position as the least significant bit in the set of eight bits.
According to another aspect of the invention the above object is achieved by means of a method for retrieving data relating to a code word of particular interest within a stream of variable length codes. The method comprises identifying the position of a predefined marker within the stream of variable length codes, calculating a start position of the code word of particular interest within the stream of variable length codes, and retrieving the data relating to the code word of particular interest. By using a predefined marker in a data stream of variable length codes for identifying a position of interest in the data stream the access of this position may require less time and processing capacity than if the entire data stream is to be decoded in order to find the position. For example, it becomes possible to speed up access to image data representing an arbitrary area of an image coded by means of a variable length coding.
The marker also makes it possible to access data positioned within a data stream of variable length codes without the need of decoding every single code arranged ahead of the to be accessed. The same advantageous applies to the use of the markers in order to indicate separate data streams sharing the same transport or storage medium, e.g. multiplexed data streams. According to a specific embodiment the method further comprises identifying the position of at least one additional predefined marker within the stream of variable length codes, calculating the start position of said at least one additional code word of particular interest within the stream of variable length codes, and retrieving the data relating to at least one additional code word of particular interest. Because a plurality of markers are identified and used in decoding the data stream the process may require even less time and processing power.
In another embodiment, retrieving the data relating to the code word of particular interest includes retrieving the calculated start position of the code word of particular interest within the data stream and inserting this start position into a list of features of the stream of variable length codes. By retrieving the position of the code word of particular interest and saving this position it is possible to map the data stream and thereby making it possible to perform even faster future accesses to parts of the data stream.
According to yet another embodiment, retrieving the data relating to the code word of particular interest includes retrieving the value represented by the specific code word. This embodiment speeds up the access to particular values to be more rarely used. For instance when performing operations on images which are not supposed to be saved.
In one embodiment the stream of variable length codes is a compressed representation of an image and the code word of particular interest is a DC-coefficient of a data unit in stream of variable length codes. Thereby facilitating fast generation of reduced versions of captured images. In some other embodiments markers corresponding to the markers mentioned in relation to the first aspect of the invention and the arrangement of codes preceding the marker as mentioned in relation to the first aspect of the invention presents substantially identical advantages when used in a method according to the second aspect of the invention. In yet another embodiment the identifying of the position of the predefined marker further includes identifying a predetermined symbol arranged in the stream of Variable Length Codes next to the marker and wherein the transition from one of the predetermined symbol or the predefined marker to the predefined marker or the predetermined symbol is identified as the position of the marker. By implementing this embodiment the determination of the position of the predefined marker is facilitated. According to another embodiment the predetermined symbol is an End Of Block symbol, EOB.
In yet another embodiment the calculation of the start position within the stream of Variable Length Codes of the specific code word is based on the position of the predefined marker and the known length of the marker.
According to another method the stream of variable length codes include data blocks including a plurality of code words, wherein the code word of particular interest is the first code word of a data block, and thereby the calculating a start position of the code word of particular interest corresponds to calculating the start position of said data block. By making the marker identify the end of one and the beginning of another data block the access to individual data blocks may be facilitated and performed substantially faster.
Detailed Description The present invention relates to methods, apparatus, and computer program products for facilitating fast indexing of a stream of data blocks that has been coded by means of Variable Length Coding (VLC) schemes or entropy coding schemes. According to one embodiment of the invention the fast indexing is achieved by insertion of a data block separation marker between data blocks consecutively arranged in a data stream. In the present application a data stream should be understood as data related to each other by being part of the same data file, by being part of the same data message sent via a network, such message may be separated into different packages or sent in one continuous stream depending on the network, by being part of the same information stream, such as streaming audio or streaming video or a combination of these.
Embodiments of the invention are applicable to any type of data stream in which data blocks are encoded by means of a VLC scheme or entropy coding scheme, e.g. Huffman encoding, arithmetic encoding, etc. These encoding schemes are designed to compress information and one effect of using these encoding schemes is that not all symbols, also called code words, in an encoded data stream have the same code length.
However, the scheme of the codes are such that in order to know where one symbol ends and another one begins, it is necessary to process all previous symbols in the stream.
In the context of this application a symbol should be understood as one unit from a set of units, where each unit has an individual bit code assigned to them. In this application a data block should be understood as some data representing a portion of a larger data stream, e.g. a portion of image data, a portion of an audio stream, a rectangular image block of an image stream, etc. In one embodiment it may be desirable that two or more variable length coded streams are mixed according to more specific rules, for instance by alternating n symbols from a first signal, and m symbols from a second signal, and k symbols from a third signal.
This poses a great difficulty in separating the signals at the receiving end as all the symbols have to be processed in order to find the boundaries between the different signals.
In another embodiment it may also be desirable to quickly find a specific symbol, or for instance every n:th symbol in a variable length coded stream. This also normally requires all the symbols to be processed in order to find the location of the desired symbols.
In yet another embodiment it is desirable to be able to send two or more signals through a single communication channel. This is usually achieved by alternating the two or more signals, so that n bits of the first signal is sent first, then m bits of the second signal is sent, and then b bits of the first signal is sent, and so on.
The present invention addresses the above problems in the use of variable length coded streams by introducing special markers that can be inserted in the stream generated in the variable length encoding process. These markers may be used to speed up the process of finding specific symbols in a data stream. Additionally the present invention introduces a method of removing said markers in an efficient way in order to create or recreate the original stream or streams.
Example usage of said marker: A variable length coded stream is made of symbols that are of different bit lengths. The following symbols could, for instance, be represented by the following code words: A = 10 B = 110 C = 111
D = 0000 E = 0001 The bit stream for the following symbols "CBCDBEDCABCBECB" would become:
11111011 10000110 00010000 111 10110 1111 1000 011 11110
In order to decode the bit stream to the original symbols the bit stream has to be decoded from the left and the bits are read until a valid symbol is produced. By decoding the entire bit stream it is possible to understand where the boundaries between the symbols are located:
Figure imgf000009_0001
The problem with this approach is that it is relatively time consuming to perform in software, especially when many symbols have to be processed. The same bit stream written in hexadecimal numbers corresponds to:
FB 86 10 F6 F8 7E
In accordance with various embodiments of the invention bit markers or symbol separating markers are introduced to allow fast finding of a specific marker.
The bit markers may be made of series of binary ones of a length that is a multiple of eight and at least 16 bits long. The most interesting marker being made of 16 binary ones, i.e. 11111111 11111111. If we want to mark the boundary after symbol "A" in the stream, it would be done by inserting 16 binary ones after the symbol "A" in the stream:
Figure imgf000009_0002
Figure imgf000009_0003
Thus the resulting bit stream becomes:
1111101110000110000100001111011111111111111111101111100001111110
The same bit stream written in hexadecimal numbers is:
FB 86 10 F7 FF FE F8 7E
Now, as we have written sixteen binary ones in the stream, our marker will always result in at least one "FF" byte that is never followed by a "00"; meaning that the naturally occurring FF codes can be marked with "FFOO" to indicate a non-marker; every other FF occurrence is guaranteed to be a marker in accordance with various embodiments of the invention.
This means that we can easily locate the byte FF in the bit stream seen as consecutive bytes, and we can then by using simple arithmetic logic remove the marker and restore the original stream.
The bytes up to the byte before the marker can be copied directly, as well as the bytes one byte after the marker. The remaining task is to restore the byte which was split by inserting the binary ones, marked in parenthesis.
FB 86 10 (F7 FF FE) F8 7E
The F7 FF FE written in binary numbers looks as follows:
B1 B2 B3
11110111 11111111 11111110
or more generally
B1 B2 B3 abcde111 11111111 11111fgh
The operation to remove the inserted bits becomes very simple, as the inserted binary ones can be seen as bit masks when joining them together:
Original byte = B1 & B3 = abcdei 11 & 11111fgh = abcdefgh The resulting stream will become:
FB 86 10 (F7&FE) F8 7E = FB 86 10 F6 F8 7E
If the symbol before or after the sixteen ones was known and it contains at least one zero, it is trivial to find out the bit position of the boundary between the marked symbols, i.e. the position of the marker. The position of the marker is the position of the next symbol, when the marker has been removed. This may be achieved by finding the first zero to the left of "FF" and by knowing the appearance and/or code of the symbol containing the zero and then calculate where that symbol ends.
Another way to achieve this is by using a lookup table of 256 entries for the byte before the "FF" where all possible entries with the known symbol are entered, with the bit position (p) as the value in the table.
The example below illustrates the lookup technique:
Assume that the known symbol before the sixteen ones is 10, then the only possibilities for the Byte1 are the following, where the x:s are all permutations of binary ones and binary zeros, and the p indicates the first bit of the 16 ones.
Bytei Byte2 xxxxxxi 0 p1111111 , 64 permutations, pos = 8 xxxxxi Op 11111111 , 32 permutations, pos = 7 xxxxi 0p1 11111111 , 16 permutations, pos = 6 xxx10p11 11111111 , 8 permutations, pos = 5 xx10p111 11111111 , 4 permutation, pos = 4 x10p1111 11111111 , 2 permutation, pos = 3 10p11111 11111111 , 1 permutation, pos = 2
0p111111 11111111 , 1 permutation, pos = 1
In the above example the lookup for F7 (11110111 ) would result in pos=6, (111101 pi 1 ==111101111 ). If the symbol is not known, it would be possible for instance to always insert a known code (K) that has preferably a total length that is 8 bits long, allowing us to remove it easily while knowing the symbol needed for locating the boundary between the marked symbols.
A very good code to use for this purpose is "00000000", as it can be used as a bit mask when removing the marker, i.e.:
K = 0000 0000
Such modified stream would have the appearance:
Figure imgf000012_0001
Figure imgf000012_0002
Arranged into bytes the modified stream would have the appearance:
1 111 101 1 10000110 00010000 11 110000 00000111 11111111 11 111110 11 111000 01111110
and written in hexadecimal numbers this becomes:
FB 86 10 (FO 07 FF FE) F8 7E
From the above it is possible to find the FF, and by looking at the byte before the FF representing the known symbol K, it is possible to understand where the symbol K ends and, thus, calculate backwards to find where the symbol before K ends, representing the boundary between the marked symbols.
The symbol K has its first binary zero from right in the first position, hence the symbol before the symbol K ends 7 positions to the left of the found binary zero.
FO 07 FF FE = 11110000 00000111 11111111 11111110
The removal can then be performed by finding the first occurrence of a binary zero to the left of the FF, marked with x below:
11 110000 0000x111 11111111 11 111 110 And after that occurrence is found, remove the next 24 bits starting from 7 bits left of the found binary zero, marked with r:
1111 Orrr rrrrrrrr rrrrrrrr rrrrri 10
It is now possible to join the four bytes into one, resulting in: 1111110 = F6
The total resulting byte array thus becomes the original stream: FB 86 10 F6 F8 7E.
The above removal of the marker is easily done by some simple arithmetic logic, as the K being zero can act as a mask:
Figure imgf000013_0001
B = (B1 |B2)&B4 = (F0|07)&FE = F7&FE = F6
An example of using said marking method when two or more signals are sent through the same channel is given below.
Consider the two bit streams below that are to be sent through only one channel.
Figure imgf000013_0002
Figure imgf000013_0003
Written in hexadecimal numbers this becomes: B7 0C 21 7C 18 7E A B E D C E B A B A
Stream B 10 1 10 0001 0000 111 0001 110 10 110 10 111
D A B D A
0000 10 110 0000 10
Written in hexadecimal numbers this becomes: BO 87 1 D 6B 85 82
The streams are alternated in this example so that five code words of stream A is sent, and then eight code words of stream B is sent, and then five code words of stream A, and so on:
A B D B
Stream A 10 1 10 111 0000 110
Figure imgf000014_0001
D B
Stream A 0001 0000 10 11 1 110
Figure imgf000014_0002
D B B
Stream A 0000 110 0001 111 110
Resulting in a binary stream:
101101110000110101100001000011100011101000010000 101111101101011100001011000001000001100001111110
Written in hex:
B7 OD 61 OE 3A 10 BE D7 OB 04 18 7E
The receiver now has to process all the VLC symbols in order to recreate the two original streams. Embodiments of the invention introduce the special markers in order to be able to separate the two streams in a more efficient manner, note that normally the scheme of inserting the marker happens much more seldom than in the following example, thus not requiring much overhead:
A B D B
Stream A 10 110 1 11 0000 110 0000000011111 11 111111111 0001
Figure imgf000015_0001
Figure imgf000015_0002
B7 OC 01 FF FE 217C 01 FF FE 187E
A B D B A
Stream B 10 110 0001 0000 111 0001 110 10
B D
000000001111111111111111 110 10 111 0000
A B D A
10 110 0000 10 000000001111111111111111
BO 871D 007F FF EB 858200 FF FF
Now the streams can be alternated at the FF markers by outputting the first stream until FF, then continuing with the second stream until FF, and then continuing the first stream until next FF and so on, resulting in the following transmitted stream:
B7 OC 01 FF BO 87 1 D 00 7F FF FE 21 7C 01 FF EB 85 82 00 FF FF FE 18 7E Now in order for the receiver to separate the streams, she separates the streams by FF, inverting the above process:
Stream A: B7 OC 01 FF FE 21 7C 01 FF FE 18 7E Stream B: BO 87 1 D 00 7F FF EB 85 82 00 FF FF
Each stream can now be processed to remove the markers by simple arithmetic logic:
B = (b1 |b2)&b4,
Stream A: B7 OC 01 FF FE 21 7C 01 FF FE 18 7E Stream B: BO 87 1 D 00 7F FF EB 85 82 00 FF FF
becomes
Stream A: B7 (0C|01 )&FE 21 (7C|01 )&FE 18 7E = B7 OC 21 7C 18 7E Stream B: BO 87 1 D (00|7F)&EB 85 (82|00)&FF = BO 87 1 D 6B 85 82
which is the original stream. The splitting operation on the receiving side was done entirely without any bit operations, or variable length coding. According to further embodiments , the symbol K could be any 7 bit number with a pre defined zero in a predefined bit position. The above description may be extended to find the start of the marker by knowing the position of the predefined zero. According to one of the embodiments the zero is the least significant bit, and the most significant seven bit could be used for other data, for instance a number increasing from zero to 127. In that way it would be easy to skip over up to 128 marked code words just by looking at the byte stream. According to one aspect of the invention, the above described general method may be implemented for use in processing JPEG streams. A way of modifying an existing JPEG Encoder with minimal changes in order to create an alternative stream of non-compliant JPEG data including special markers that indicate end of DU is described below. The noncompliant JPEG data can then be analyzed to map the beginning of each DU, and the non-compliant markers can be removed while storing it to a non-volatile memory. Further, it should be noted that a code word is intended to be understood as a series of bits that can be decoded to produce a previously encoded unit. All code words are not of the same length. Despite this fact, they are not strictly meant to be read as a variable length representation of a single symbol. An example of such more complex code words is the ones used in a jpeg stream. A JPEG codeword as defined here encodes a series of zeros followed by a non-zero number into a combination of a symbol for the zero run length together with the magnitude of the non-zero number, followed by the least significant bits of the number based on the magnitude. The whole series of bits produced for the series of zeros followed by the non-zero number or any of their subsets can thus be read as a codeword according to our definition.
Other subsets to be read as a codeword would be the combination of a symbol for the zero run length together with the magnitude of the non-zero number, or the bits representing the least significant bits.
A JPEG stream consists of multiple Data Units (DUs) of 64 coefficients. The coefficients are represented by Huffman coded symbols of variable length, usually the last coefficients are zeros, and an End Of Block (EOB) symbol is used to terminate a Data Unit (DU) that has zeros in the end. For some applications it is very useful to know the bit positions of the
DUs.
1 ) Instant display of a large JPEG image on a small screen. If the DU positions are known, then it is very quick to decode only the first coefficient(s) of a block and thus create a scaled down version of the original image.
2) If DU positions are known, it is possible to randomly access any DU. If the absolute DC coefficients are known as well, it is possible to decode an area of a JPEG without a need of decoding the previous blocks.
The method allows modifying of an encoder component, which may reside in hardware, in order to create markers indicating end of a block, which a receiving SW component can use to find the DU positions, and afterwards easily remove the markers, thus allowing for fast creation of a DU position database, and/or a scaled down version of the encoded image. The encoding may be performed in HW due to speed issues. This is a simple approach to allowing standard JPEG HW to be modified without requirement of extra memory for storing the start positions of the data units of the JPEG data stream. The extra memory would need to be 2*number_of_data_units (16 bit) => 2mpix= 60000 DU's => 120kb memory, which is very expensive, as it preferably is zero wait state memory, occupying a large silicon area.
The following description covers both encoding and decoding of such
JPEG data.
Encoder:
1) Modify HW so that EOB is always created. Alternatively use clever
Q tables to guarantee that the HW puts an EOB always in the end. If a zero is always inserted into the quantized coefficient nr 64, the hardware will need to insert an EOB.
2) Make sure that for each FF occurring in the original Huffman coded stream a trailing "00" is inserted. This is already done in a valid JPEG stream.
3) After each DU (or EOB) add a multiple of eight but at least 16 binary ones.
This could also be done by modifying the Huffman tables so that EOB symbol is modified to contain the usual 2-4 byte symbol, with 12 trailing binary ones, and the DC tables are modified to contain four ones before the real DC symbol. Then the encoder is forced to always encode EOBs in the bit stream.
This means that between the EOB and the DC there will always be a marker of 16 binary ones. As an example of this embodiment the normal EOB and the new EOB, in view of the above discussed adjustment to the normal EOB given, may be like below:
Normal EOB: 1010 New EOB: 1010111111111111 Moreover, the normal DCs and the new DCs may relate to each other as described in the table below:
Figure imgf000019_0001
This scheme results in that, using the example of the EOB above and the example of a new DC being the third DC in the table above, EOB combined with the third DC corresponds to "1010 1111111111111111 010". Hence, the result is the same as when adding 16 binary ones after an EOB.
An example of adding 16 binary ones by means of one embodiment of the method is given below, the below example is generalized to a general Huffman coded stream.
The example uses the following Huffman table:
A = IO (EOB) B = 110 C = 111
D = 0000 E = 0001
A Huffman coded string of symbols "CBCDBEDCABCBECB" encoded in hardware results in the bit stream below:
11111011 10000110 00010000 11110110 11111000 01111110 ... FB 86 10 F6 F8 7E
The underlined portion indicates EOB.
Then the 16 binary ones are inserted after the EOB:
11111011 10000110 00010000 11110111 11111111 11111110 11111000 01111110 ...
FB 86 10 F7 FF FE F8 7E
Now an example of decoding is given, the decoding may be performed in software.
Step 1. Seek FF that has no trailing "00". In a JPEG stream only "FF 00" is allowed, but that cannot occur with these rules. Meaning that it is 100% certain that the sought FF is our marker. (Provided that the restart markers are not used in the JPEG stream)
Now, seek down towards the EOB symbol (10 in this example), and the start of the next DU is found right after the EOB.
Remove sixteen ones, and remember the bit address for the next DU.
11111011 10000110 00010000 11110110 11111000 01111110 ...
FB 86 10 F7 FF FE F8 7E
FB 86 10 F6 F8 7E
As is seen, only one byte has to be modified, two bytes has to be removed, and the rest of the bytes are already correctly word aligned:
FB 86 10 F7 FF FE F8 7E FB 86 10 F6 F8 7E
Even better if the inserted number of ones was 32, then the rest would be long word aligned, allowing for 32bit memcpy. This may not always be desirable as adding two more bytes increases the size of the file and thus increases the bandwidth requirements when moving the data across the bus of the network.
FB 8610 F7 FF FF FF FE F87E FB 8610 F6 F87E
The process of joining the two bytes into one is also very trivial:
FB8610F7FFFEF87E FB 8610 F6 F87E
The operation that joins the F7 and the FE is very simple, it is just a logical "and" operation of them, as the inserted 16 ones act as a bit mask.
Bytei = F7 Byte2 = FE Joined Byte = Bytei & Byte2
It is easier to see the above when considering the below example:
abcde111 11111111 11111fgh
Bytei = abcdei 11 Byte2 = 11111fgh
JoinedByte = abcdei 11 & 11111fgh = abcdefgh
The above example describes a process of quickly finding the bit addresses of all DUs in a stream, and the process of quickly removing the markers in order to recreate the original stream.
The algorithm may be modified for use in finding the DC coefficients of each DU. Then, by decoding the DC coefficients the data of each DC may be used increate an 8 times smaller version of the image. The same can be done if a four times smaller representation is needed, where the DC coefficient and a number of subsequent ACs are decoded in order to be able to perform a 2x2 IDCT on the coefficients. By having the markers indicate the position of DC coefficients it becomes possible to skip Huffman decoding the other coefficients, thus allowing much faster scaling of images to small screens in the capturing moment. This implementation may be utilised in any application in order to speed up the process of displaying a reduced size image.
One example of such an application is image acquisition applications using the display as a view finder. One general problem in these applications is the delay of the presentation of an image representing the image view. In other words, when the user sees the desired view on the display the moment may be long gone. In an application like this the delay may be substantially reduced by providing an data stream including markers indicating the position of the DC coefficients and implementing a display process that seeks the markers, retrieve the information relating to the DC coefficients at the markers, and generate an reduced size image from this information to be presented on the display.
Further, according to one aspect of the invention a way of modifying a JPEG Encoder with minimal changes in order to create an alternative stream of non-compliant JPEG data including special markers that indicate end of DU is presented. The noncompliant JPEG data can then be analyzed to map the beginning of each DU, and the non-compliant markers can be removed while storing it to a non-volatile memory. In the above examples the marker is set to at least 16 binary ones.
The marker may as well be set to at least 16 binary zeros, i.e. 0000000000000000. If the marker is set to 16 binary zeros the known code inserted before the marker may be "11111111". Hence the code 000000001111111111111111 is inverted to 111111110000000000000000. The invention can be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. Apparatus of the invention can be implemented in a computer program product tangibly embodied in a machine-readable storage device for execution by a programmable processor; and method steps of the invention can be performed by a programmable processor executing a program of instructions to perform functions of the invention by operating on input data and generating output. The invention can be implemented advantageously in one or more computer programs that are executable on a programmable system including at least one programmable processor coupled to receive data and instructions from, and to transmit data and instructions to, a data storage system, at least one input device, and at least one output device. Each computer program can be implemented in a high-level procedural or object-oriented programming language, or in assembly or machine language if desired; and in any case, the language can be a compiled or interpreted language. Suitable processors include, by way of example, both general and special purpose microprocessors. Generally, a processor will receive instructions and data from a read-only memory and/or a random access memory. Generally, a computer will include one or more mass storage devices for storing data files; such devices include magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and optical disks. Storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including by way of example semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM disks. Any of the foregoing can be supplemented by, or incorporated in, ASICs (application- specific integrated circuits).
To provide for interaction with a user, the invention can be implemented on a computer system having a display device such as a monitor or LCD screen for displaying information to the user. The user can provide input to the computer system through various input devices such as a keyboard and a pointing device, such as a mouse, a trackball, a microphone, a touch-sensitive display, a transducer card reader, a magnetic or paper tape reader, a tablet, a stylus, a voice or handwriting recognizer, or any other well- known input device such as, of course, other computers. The computer system can be programmed to provide a graphical user interface through which computer programs interact with users.
Finally, the processor optionally can be coupled to a computer or telecommunications network, for example, an Internet network, or an intranet network, using a network connection, through which the processor can receive information from the network, or might output information to the network in the course of performing the above-described method steps. Such information, which is often represented as a sequence of instructions to be executed using the processor, may be received from and outputted to the network, for example, in the form of a computer data signal embodied in a carrier wave. The above-described devices and materials will be familiar to those of skill in the computer hardware and software arts.
It should be noted that the present invention employs various computer-implemented operations involving data stored in computer systems. These operations include, but are not limited to, those requiring physical manipulation of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. The operations described herein that form part of the invention are useful machine operations. The manipulations performed are often referred to in terms, such as, producing, identifying, running, determining, comparing, executing, downloading, or detecting. It is sometimes convenient, principally for reasons of common usage, to refer to these electrical or magnetic signals as bits, values, elements, variables, characters, data, or the like. It should remembered however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities.
The present invention also relates to a device, system or apparatus for performing the aforementioned operations. The system may be specially constructed for the required purposes, or it may be a general-purpose computer selectively activated or configured by a computer program stored in the computer. The processes presented above are not inherently related to any particular computer or other computing apparatus. In particular, various general-purpose computers may be used with programs written in accordance with the teachings herein, or, alternatively, it may be more convenient to construct a more specialized computer system to perform the required operations.
A number of implementations of the invention have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of the invention.

Claims

1. Method for generating a data stream encoded by means of a Variable Length Coding scheme, said method comprising: encoding code words for a data stream including a plurality of code words in accordance with a Variable Length Coding scheme, and inserting a separation marker between encoded code words in the data stream.
2. Method according to claim 1 , wherein said inserting of a separation marker is performed by inserting at least 16 consecutive binary ones after a specific code word.
3. Method according to claim 1 wherein said inserting of a separation marker is performed by inserting at least 16 consecutive binary zeros after a specific code word.
4. Method according to any one of claim 2-3, wherein the specific code word is the last code word of a data block.
5. Method according to any one of claims 1-2, wherein said inserting of a separation marker is performed by inserting at least 16 consecutive binary ones between two or more specific code words.
6. Method for generating a data stream encoded by means of a
Variable Length Coding scheme, said method comprising: encoding data blocks of a data stream including a plurality of data blocks in accordance with a Variable Length Coding scheme, and inserting a separation marker between encoded data blocks in the data stream.
7. Method according to claim 6, wherein the act of inserting separation marker further includes inserting the separation marker at a point in time after a previous block has been encoded and before a next encoded data block has been added to the previous data block.
8. Method according to any one of claims 1-7, wherein said encoding and insertion of a separation marker are performed by hardware.
9. Method according to any one of claims 1-8, wherein said inserting of a marker in the data stream is performed in connection with the data stream being encoded by means of the variable length coding scheme.
10. Method according to any one of claims 6-8, wherein the encoding of data blocks is performed in accordance with a JPEG standard, and wherein each data block corresponds to a data unit in accordance with the JPEG standard.
11. Method according to any one of claims 6-10, wherein the separation marker is a binary sequence of at least 16 consecutive binary ones.
12. Method according to claim 11 , further comprising inserting eight binary zeros before the separation marker.
13. Method according to claim 11 , further comprising inserting a set of eight bits before the separation marker, said set of eight bits including at least one bit of binary zero value and said at least one bit of binary zero value being arranged in a predetermined position in said set of eight bits.
14. Method according to claim 13, wherein the predetermined position of said at least one bit of binary zero value being the position as the least significant bit in the set of eight bits.
15. Method according to any one of claims 6-10, wherein the separation marker is a binary sequence of at least 16 consecutive binary zeros.
16. Method according to claim 15, further comprising inserting eight binary ones before the separation marker.
17. Method according to any one of claims 1-10, wherein the separation marker is a binary sequence of eight zeros followed by at least 16 binary ones.
18. Method for retrieving data relating to a code word of particular interest within a stream of variable length codes, said method comprising: identifying the position of a predefined marker within the stream of variable length codes, calculating a start position of the code word of particular interest within the stream of variable length codes, and retrieving the data relating to the code word of particular interest.
19. Method according to claim 18, further comprising: identifying the position of at least one additional predefined marker within the stream of variable length codes, calculating the start position of said at least one additional code word of particular interest within the stream of variable length codes, and retrieving the data relating to at least one additional code word of particular interest.
20. Method according to any one of claims 18-19, wherein retrieving the data relating to the code word of particular interest includes retrieving the calculated start position of the code word of particular interest within the data stream and inserting this start position into a list of features of the stream of variable length codes.
21. Method according to any one of claims 18-19, wherein retrieving the data relating to the code word of particular interest includes retrieving the value represented by the specific code word.
22. Method according to claim 21 , wherein the stream of variable length codes is a compressed representation of an image and the code word of particular interest is a DC-coefficient of a data unit in stream of variable length codes.
23. Method according to any one of claims 18-22, further comprising removing said predefined marker from the stream of Variable Length Codes.
24. Method according to any one of claims 18-24, wherein the marker is a binary sequence of at least 16 consecutive binary ones.
25. Method according to any one of claims 18-24, wherein the identifying of the position of the predefined marker further includes identifying a predetermined symbol arranged in the stream of Variable Length Codes next to the marker and wherein the transition from one of the predetermined symbol or the predefined marker to the predefined marker or the predetermined symbol is identified as the position of the marker.
26. Method according to claim 25, wherein the predetermined symbol is an End Of Block symbol, EOB.
27. Method according to any one of claims 25-26, wherein the calculation of the start position within the stream of Variable Length Codes of the specific code word is based on the position of the predefined marker and the known length of the marker.
28. Method according to any one of claims 18-27, wherein the stream of variable length codes include data blocks including a plurality of code words, wherein the code word of particular interest is the first code word of a data block, and thereby the calculating a start position of the code word of particular interest corresponds to calculating the start position of said data block.
PCT/SE2008/000125 2007-02-16 2008-02-15 Generating a data stream and identifying positions within a data stream WO2008100206A1 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
EP08712717.1A EP2123053B1 (en) 2007-02-16 2008-02-15 Generating a data stream and identifying positions within a data stream
CN2008800050520A CN101647288B (en) 2007-02-16 2008-02-15 Generating a data stream and identifying positions within a data stream
JP2009549554A JP5289333B2 (en) 2007-02-16 2008-02-15 Method for generating a data stream and identifying a position in the data stream
KR1020097019348A KR101463279B1 (en) 2007-02-16 2008-02-15 Generating a data stream and identifying positions within a data stream
IL200413A IL200413A0 (en) 2007-02-16 2009-08-13 Generating a data stream and identifying positions within a data stream

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
SE0700446A SE533185C2 (en) 2007-02-16 2007-02-16 Method for processing a digital image and image representation format
SE0700446-8 2007-02-16
US89143907P 2007-02-23 2007-02-23
US60/891,439 2007-02-23
SE0701690-0 2007-07-11
SE0701690A SE531398C2 (en) 2007-02-16 2007-07-11 Generating a data stream and identifying positions within a data stream

Publications (1)

Publication Number Publication Date
WO2008100206A1 true WO2008100206A1 (en) 2008-08-21

Family

ID=39690338

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/SE2008/000125 WO2008100206A1 (en) 2007-02-16 2008-02-15 Generating a data stream and identifying positions within a data stream

Country Status (7)

Country Link
US (2) US7652595B2 (en)
EP (1) EP2123053B1 (en)
JP (1) JP5289333B2 (en)
KR (1) KR101463279B1 (en)
IL (1) IL200413A0 (en)
SE (1) SE531398C2 (en)
WO (1) WO2008100206A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8654154B2 (en) 2007-02-16 2014-02-18 Mobile Imaging In Sweden Ab Method for processing a digital image
US9137443B2 (en) 2011-04-26 2015-09-15 Blackberry Limited Fast estimation of binary data length using memory corruption
US11404143B2 (en) 2016-10-11 2022-08-02 Genomsys Sa Method and systems for the indexing of bioinformatics data
US11763918B2 (en) 2016-10-11 2023-09-19 Genomsys Sa Method and apparatus for the access to bioinformatics data structured in access units

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7082450B2 (en) 2001-08-30 2006-07-25 Nokia Corporation Implementation of a transform and of a subsequent quantization
DE102007061724A1 (en) * 2007-12-20 2009-06-25 Robert Bosch Gmbh Method for transmitting data in a cycle-based communication system
US8639836B2 (en) * 2009-06-29 2014-01-28 International Business Machines Corporation Smart nagling in a TCP connection
US8520958B2 (en) * 2009-12-21 2013-08-27 Stmicroelectronics International N.V. Parallelization of variable length decoding
US8593309B2 (en) * 2011-11-30 2013-11-26 Intel Mobile Communications GmbH Method for efficient decoding of variable length codes
US8824569B2 (en) 2011-12-07 2014-09-02 International Business Machines Corporation High bandwidth decompression of variable length encoded data streams
US10196850B2 (en) 2013-01-07 2019-02-05 WexEnergy LLC Frameless supplemental window for fenestration
US8923650B2 (en) 2013-01-07 2014-12-30 Wexenergy Innovations Llc System and method of measuring distances related to an object
US9230339B2 (en) 2013-01-07 2016-01-05 Wexenergy Innovations Llc System and method of measuring distances related to an object
US9845636B2 (en) 2013-01-07 2017-12-19 WexEnergy LLC Frameless supplemental window for fenestration
US9691163B2 (en) 2013-01-07 2017-06-27 Wexenergy Innovations Llc System and method of measuring distances related to an object utilizing ancillary objects
US8933824B1 (en) 2013-08-28 2015-01-13 International Business Machines Corporation Hardware decompression of deflate encoded data with multiple blocks
US9374106B2 (en) 2013-08-28 2016-06-21 International Business Machines Corporation Efficient context save/restore during hardware decompression of DEFLATE encoded data
US9800640B2 (en) 2013-10-02 2017-10-24 International Business Machines Corporation Differential encoder with look-ahead synchronization
WO2018039730A1 (en) * 2016-08-31 2018-03-08 Pointerra Technologies Pty Ltd Method and system for storing and retrieving multi-dimensional data
CA3071106A1 (en) 2017-05-30 2018-12-06 WexEnergy LLC Frameless supplemental window for fenestration

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4967196A (en) * 1988-03-31 1990-10-30 Intel Corporation Apparatus for decoding variable-length encoded data
US20040086041A1 (en) * 2002-10-30 2004-05-06 Koninklijke Philips Electronics N.V. System and method for advanced data partitioning for robust video transmission
EP1584937A1 (en) * 2004-04-05 2005-10-12 AGILENT TECHNOLOGIES, INC. (n. d. Gesetzen d. Staates Delaware) Systems and methods for processing automatically generated test patterns
US20060182274A1 (en) * 2003-07-16 2006-08-17 Stmicroelectronics S.A. Method for ciphering a compressed audio or video stream with error tolerance
GB2435334A (en) * 2006-02-20 2007-08-22 Graeme Roy Smith Compression and decompression of data stream using a linear feedback shift register

Family Cites Families (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0214620A (en) * 1988-07-01 1990-01-18 Nec Corp Variable length coding circuit
US5349348A (en) * 1991-08-15 1994-09-20 International Business Machines Corporation Multi-mode data stream generator
JP3197408B2 (en) * 1993-09-09 2001-08-13 沖電気工業株式会社 Additional bit processing device for marker identification
US5881176A (en) * 1994-09-21 1999-03-09 Ricoh Corporation Compression and decompression with wavelet style and binary style including quantization by device-dependent parser
JPH10341345A (en) * 1997-06-05 1998-12-22 Kokusai Electric Co Ltd Image data processing system
US6281874B1 (en) * 1998-08-27 2001-08-28 International Business Machines Corporation Method and system for downloading graphic images on the internet
KR100331332B1 (en) * 1998-11-02 2002-06-20 윤종용 Video data transmitter and receiver and method
US6381371B1 (en) * 1999-03-17 2002-04-30 Hewlett-Packard Company Method and apparatus for processing image files
US6308257B1 (en) * 1999-04-20 2001-10-23 Intel Corporation Method and apparatus for generating boundary markers for an instruction stream including variable-length instructions
WO2001009836A1 (en) 1999-08-02 2001-02-08 Iviewit Holdings, Inc. System and method for providing an enhanced digital image file
AU4710501A (en) * 1999-12-03 2001-06-18 Broadcom Corporation Interspersed training for turbo coded modulation
DK1181829T3 (en) * 2000-03-07 2012-01-16 Koninkl Philips Electronics Nv Resynchronization method for decoding video
US7146053B1 (en) * 2000-05-10 2006-12-05 International Business Machines Corporation Reordering of compressed data
JP3924420B2 (en) * 2000-07-11 2007-06-06 Necエレクトロニクス株式会社 Image compression apparatus and method
US6560745B1 (en) * 2000-07-21 2003-05-06 The United States Of America As Represented By The National Security Agency Method of identifying boundary of markerless codeword
US6931661B2 (en) 2000-10-19 2005-08-16 Motorola, Inc. Dynamic image provisioning
JP3661594B2 (en) * 2001-02-07 2005-06-15 ソニー株式会社 Data stream generating apparatus and method, variable length encoded data stream generating apparatus and method, and camera system
JP2003198378A (en) * 2001-12-25 2003-07-11 Canon Inc Decoding apparatus and method therefor, record medium, and program
US7277586B2 (en) * 2003-01-15 2007-10-02 Fujifilm Corporation Images combination processing system, images combination processing method, and images combination processing program
US7447369B2 (en) * 2003-03-07 2008-11-04 Ricoh Co., Ltd. Communication of compressed digital images
US7149370B2 (en) * 2003-03-07 2006-12-12 Nokia Corporation Method and device for image surfing
JP2005031482A (en) * 2003-07-08 2005-02-03 Matsushita Electric Ind Co Ltd Image expansion display method, image expansion display device, and program for image expansion display
WO2005032119A1 (en) 2003-09-26 2005-04-07 Thomson Licensing Method for storing an image along with a preview image
JP4949037B2 (en) * 2003-11-18 2012-06-06 スカラド、アクチボラグ Method and image representation format for processing digital images
US8237712B2 (en) * 2004-03-18 2012-08-07 Apple Inc. Manipulation of image content using various image representations
US7463775B1 (en) * 2004-05-18 2008-12-09 Adobe Systems Incorporated Estimating compressed storage size of digital data
US7738710B2 (en) * 2004-08-02 2010-06-15 Electronics For Imaging, Inc. Methods and apparatus for communicating and displaying compressed image data
US8121428B2 (en) * 2005-05-31 2012-02-21 Microsoft Corporation Accelerated image rendering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4967196A (en) * 1988-03-31 1990-10-30 Intel Corporation Apparatus for decoding variable-length encoded data
US20040086041A1 (en) * 2002-10-30 2004-05-06 Koninklijke Philips Electronics N.V. System and method for advanced data partitioning for robust video transmission
US20060182274A1 (en) * 2003-07-16 2006-08-17 Stmicroelectronics S.A. Method for ciphering a compressed audio or video stream with error tolerance
EP1584937A1 (en) * 2004-04-05 2005-10-12 AGILENT TECHNOLOGIES, INC. (n. d. Gesetzen d. Staates Delaware) Systems and methods for processing automatically generated test patterns
GB2435334A (en) * 2006-02-20 2007-08-22 Graeme Roy Smith Compression and decompression of data stream using a linear feedback shift register

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2123053A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8654154B2 (en) 2007-02-16 2014-02-18 Mobile Imaging In Sweden Ab Method for processing a digital image
US9137443B2 (en) 2011-04-26 2015-09-15 Blackberry Limited Fast estimation of binary data length using memory corruption
US11404143B2 (en) 2016-10-11 2022-08-02 Genomsys Sa Method and systems for the indexing of bioinformatics data
US11763918B2 (en) 2016-10-11 2023-09-19 Genomsys Sa Method and apparatus for the access to bioinformatics data structured in access units

Also Published As

Publication number Publication date
EP2123053A1 (en) 2009-11-25
JP5289333B2 (en) 2013-09-11
SE0701690L (en) 2008-08-17
EP2123053B1 (en) 2019-02-13
US7652595B2 (en) 2010-01-26
KR101463279B1 (en) 2014-11-19
US20100098107A1 (en) 2010-04-22
SE531398C2 (en) 2009-03-24
IL200413A0 (en) 2010-04-29
EP2123053A4 (en) 2013-06-26
US7847711B2 (en) 2010-12-07
KR20090115208A (en) 2009-11-04
US20100265966A2 (en) 2010-10-21
JP2010519806A (en) 2010-06-03
US20080198047A1 (en) 2008-08-21

Similar Documents

Publication Publication Date Title
US7652595B2 (en) Generating a data stream and identifying positions within a data stream
CN101647288B (en) Generating a data stream and identifying positions within a data stream
CN107534776B (en) Parallel processing to identify marker sequences in video data
US8121428B2 (en) Accelerated image rendering
EP1610557A1 (en) System and method for embedding multimedia processing information in a multimedia bitstream
WO2003034597A1 (en) Huffman coding
US20130019029A1 (en) Lossless compression of a predictive data stream having mixed data types
MX2011003914A (en) Method and apparatus for compressing and decompressing data records.
JP4888566B2 (en) Data compression method
US7880647B1 (en) Huffman decoding method
WO2019018030A1 (en) Structured record compression and retrieval
CN1684522A (en) Methods, decoder circuits and computer program products for processing mpeg audio frames
US6563442B1 (en) Multiple symbol length lookup table
CN103312338A (en) Apparatus and method for decoding
JP2005530411A (en) Lossless data embedding
TW200937942A (en) Coding system and method for a bit-plane
JP3417684B2 (en) Image processing device
CN116170599B (en) Synchronous real-time image compression method, system, medium and terminal
WO2010044098A2 (en) Content encoding
CN116366879A (en) Video export method, device, equipment and storage medium
JP2006313415A (en) Image processing apparatus
CN111259177A (en) Black-white binary signature picture storage method and system
JPH10177565A (en) Image decoding device
JPH0993574A (en) Method and device for detecting specific code
JPH04256285A (en) Picture data compression decoding system

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200880005052.0

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08712717

Country of ref document: EP

Kind code of ref document: A1

DPE1 Request for preliminary examination filed after expiration of 19th month from priority date (pct application filed from 20040101)
WWE Wipo information: entry into national phase

Ref document number: 200413

Country of ref document: IL

Ref document number: 4793/CHENP/2009

Country of ref document: IN

ENP Entry into the national phase

Ref document number: 2009549554

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2008712717

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 1020097019348

Country of ref document: KR