Re: JPEG decoding question
- From: "Matt Mahoney" <matmahoney@xxxxxxxxx>
- Date: 25 Nov 2005 08:30:28 -0800
Dennis wrote:
> Here's a quick question about decoding JPEGS. When you have sampling
> factors of:
> HY =2, VY=2
> HCb=1, VCb=1
> HCr=1, VCr=1
> and you're decoding the y component as 16*16 blocks... do you calculate
> the dc coeffiecients
> in order of
>
> 1 2 5 6 9 10 by the 2(8)*2(8) blocks or do you need to wait
> and calculate them by:
> 3 4 7 8 11 12
>
>
> 1 2 3 4 5 6 7 8 9 10 as a line of 8*8 blocks and then go to
> the next line and continue?
> 11 12 13 14 15 16 17 18
You decode the four 8x8 blocks of Y, then Cb and Cr. Then you expand
the Cb and Cr out to 16x16 by expanding each pixel to a 2x2 block. The
decode order is:
Y (upper left)
Y (upper right)
Y (lower left)
Y (lower right)
Cb
Cr
then repeat on the next 16x16 block, scanning left to right from the
upper left corner of the image.
See the JPEG spec for decode order, and the JFIF spec for mapping
components to colors and the alignment of pixels when rendering.
-- Matt Mahoney
.
- Follow-Ups:
- Re: JPEG decoding question
- From: Dennis
- Re: JPEG decoding question
- References:
- JPEG decoding question
- From: Dennis
- JPEG decoding question
- Prev by Date: Re: is transfer encoding possible with content encoding
- Next by Date: Re: What is the state-of-the-art analysing hardware impact on achievable compression ratio
- Previous by thread: Re: JPEG decoding question
- Next by thread: Re: JPEG decoding question
- Index(es):