Hello Anders
Anders Blomdell wrote:
Jean-Francois Moine wrote:
On Fri, 27 Feb 2009 23:15:54 +0100
About the JPEG images, the Huffman table is always the same
Does this mean that it's the same for all JPEG images or only for one
camera?
If it's the same for all images, it should mean that I have a way to
determine how much I have to chop off after the 0xfffe tag (no illegal
huffman codes -> possibly chop at the correct position).
Comments anyone?
As per definition of JPEG, the Huffman table is always calculated
especially for each picture to get the best compression. Thus the
Huffman table and the DQT has to be in the JPEG stream like you see on
JPEG picture on your HD.
With webcams, it is a bit an other story. The webcam hardware is usually
not powerful enough to calculate the Huffman table for each frame.
Therefor a static Huffman table is used. This Huffman table should fit
more less to the image the camera is producing. With the drawback that
we cannot achieve the highest compression possible. On the other hand
the Huffman table is always the same the cam has not to send this in the
video stream and the stream has less overhead.
In short, the Huffman table is always the same for a given webcam.
I don't think 0xfffe is a valid JPEG marker. 0xfffe is a comment marker
and the next 2 bytes after this markers tells the length of the comment
(including the two length byte). So, your comment would be 10300 Bytes
long. I don't think that such many Bytes are used for a comment when
they try to have as less as possible overhead.
I think 0xfffe is the start of the compressed data stream and has
nothing to do with JPEG markers.
Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html