MJPG decoding: Error decoding huffman values: No DC table for component Y
Closed this issue · 5 comments
soyersoyer commented
I would like to use zune-jpeg to decode MJPG streams from webcams.
Some webcams do not send Huffman tables to spare bandwidth.
The MJPG has a 'spec' here: http://www.cajunbot.com/wiki/images/7/71/USB_Video_Payload_MJPEG_1.1.pdf
The structure of each frame is as follows.
• SOI (Start of Image, 0xFFD8) – required
• APPn (Application Marker, 0xFFEn) – optional, unless interlaced video is used, in
which case APP0 segment with "AVI1" marker and Field ID info is required.
• DRI (Define Restart Interval, 0xFFDD) – optional
• DQT (Define Quantization Table, 0xFFDB) – required
• DHT (Define Huffman Table, 0xFFC4) – optional, if not specified, standard tables as
specified in JPEG standard (ISO 10918-1) section K.3.3 are used.
• SOF0 (Start of Frame, 0xFFC0)- required. All other SOFn segments are not supported.
• SOS (Start of Scan, 0xFFDA) – required
• Encoded Image Data – required
• RSTn (Restart count, 0xFFDn) – optional
• EOI (End of Image, 0xFFD9) - required
The following is required for the image data:
• Color encoding - YCbCr
• Bits per pixel - 8 per color component (before filtering/subsampling)
• Subsampling - 422
• Baseline sequential DCT (SOF0)
• All key frames
Could zune-jpeg use standard Huffman tables if they are missing?
etemesi254 commented
Hi, it's possible.
soyersoyer commented
If you like this idea I can create a PR.
etemesi254 commented
Yes,that would be really welcome, sorry I'm really busy currently (probably until August, thats's when I may implement this myself) but I can review a PR anytime.
thanks
soyersoyer commented
Thanks! Works with my C270.
etemesi254 commented
Hi, welcome.
Will make a release somewhere in the middle of this month and ping this thread.