Author | Message | ||||
---|---|---|---|---|---|
amir309
Posts: 4
|
Posted 20:38 May 12, 2011 |
I think my DCT and Quantization parts are working fine and i have this output for the Ducky image: S=1638000 bits n=0 : D = 66804 bits ,CR = 24.51948985090713 n=1: D = 63462 bits ,CR = 25.810721376571806 n=4: D = 51666 bits ,CR = 31.70363488561143 n=5: D = 46774 bits ,CR = 35.01945525291829 I am not sure if it is correct or not but i think i am close...... | ||||
cbort
Posts: 95
|
Posted 20:58 May 12, 2011 |
See below Last edited by cbort at
01:17 May 13, 2011.
| ||||
cbort
Posts: 95
|
Posted 21:04 May 12, 2011 |
or make a red 64x64 image... what is your S/D for those?
For a quantization level n = 0 | ||||
amir309
Posts: 4
|
Posted 23:06 May 12, 2011 |
Hey CBORT, I changed some parts and my output was pretty close to yours. Base on that i think the difference is because of the numbers of (code, run-length) pairs that we find in the blocks. I don't know which on is possibility correct but i feel like my first result more. | ||||
lma12
Posts: 13
|
Posted 23:39 May 12, 2011 |
Ducky:
n=0:
# of Y blocks = 1120, # of bits for Y = 132645
# of Cb blocks = 288, # of bits for Cb = 27602
# of Cr blocks = 288, # of bits for Cr = 19034
S=1638000, D=179281, CR=9.14
n=1:
# of Y blocks = 1120, # of bits for Y = 89096
# of Cb blocks = 288, # of bits for Cb = 17187
# of Cr blocks = 288, # of bits for Cr = 12910
S=1638000, D=119193, CR=13.74
n=2:
# of Y blocks = 1120, # of bits for Y = 61582
# of Cb blocks = 288, # of bits for Cb = 11268
# of Cr blocks = 288, # of bits for Cr = 8988
S=1638000, D=81838, CR=20.02
n=3:
# of Y blocks = 1120, # of bits for Y = 43020
# of Cb blocks = 288, # of bits for Cb = 8403
# of Cr blocks = 288, # of bits for Cr = 6434
S=1638000, D=57857, CR=28.31
n=4:
# of Y blocks = 1120, # of bits for Y = 30130
# of Cb blocks = 288, # of bits for Cb = 5782
# of Cr blocks = 288, # of bits for Cr = 4342
S=1638000, D=40254, CR=40.69
n=5:
# of Y blocks = 1120, # of bits for Y = 20760
# of Cb blocks = 288, # of bits for Cb = 3834
# of Cr blocks = 288, # of bits for Cr = 3492
S=1638000, D=28086, CR=58.32
Last edited by lma12 at
20:07 May 16, 2011.
| ||||
amir309
Posts: 4
|
Posted 23:54 May 12, 2011 |
Here is my output for 64*64 red image. S=98304 bits n=0 : D = 2240 bits ,CR = 43.885714285714286 n=1: D = 2048 bits ,CR = 48.0 n=4: D = 1472 bits ,CR = 66.78260869565217 n=5: D = 1280 bits ,CR = 76.8 then ether both of us are right or wrong. let's check Dune image. Here is my output for the Dune image:
S=2457600 bits n=0 : D = 154579 bits ,CR = 15.898666701168981 Y=118695 Cr=17186 Cb=18698 n=1: D = 108175 bits ,CR = 22.718742777906172 Y=82828 Cr=12199 Cb=13148 n=4: D = 43762 bits ,CR = 56.15831086330606 Y=31892 Cr=5820 Cb=6050 n=5: D = 34281 bits ,CR = 71.68985735538637 Y=24420 Cr=4917 Cb=4944 | ||||
cbort
Posts: 95
|
Posted 00:28 May 13, 2011 |
My answer was incorrect before for all cases that were not 1 solid color. My new answer however is not equal to yours and I traced my quantized block and what it encoded, so I am fairly certain it is right now... Try doing the same thing and see if your trace goes zigzag like it is supposed to
Last edited by cbort at
01:27 May 13, 2011.
| ||||
cbort
Posts: 95
|
Posted 01:29 May 13, 2011 |
DUCKY.PPM
For a quantization level n = 0
Dune.ppm
For a quantization level n = 0
Last edited by cbort at
01:31 May 13, 2011.
| ||||
ashasabeer
Posts: 55
|
Posted 17:07 May 13, 2011 |
Here is my output..But it looks funny compare to others. Ducky.ppm
N: 0 N: 1 Number of bits for Y: 24640 Number of bits for Cr: 5760 Number of bits for Cb: 5760 Compression Ratio: 45.29867256637168 N: 2 Number of bits for Y: 22400 Number of bits for Cr: 5184 Number of bits for Cb: 5184 Compression Ratio: 49.98779296875 N: 3 Number of bits for Y: 20160 Number of bits for Cr: 4608 Number of bits for Cb: 4608 Compression Ratio: 55.759803921568626 N: 4 Number of bits for Y: 17920 Number of bits for Cr: 4032 Number of bits for Cb: 4032 Compression Ratio: 63.03879310344828 N: 5 Number of bits for Y: 15680 Number of bits for Cr: 3456 Number of bits for Cb: 3456 Compression Ratio: 72.50354107648725 | ||||
kknaur
Posts: 540
|
Posted 20:02 May 13, 2011 |
Last edited by kknaur at
20:04 May 13, 2011.
| ||||
ashasabeer
Posts: 55
|
Posted 23:22 May 13, 2011 |
Thanks for the help.. i fixed some of my code .here is my new output
N: 0
N: 1
Number of bits for Y: 101894 Number of bits for Cr: 14769 Number of bits for Cb: 19395 Compression Ratio: 12.038983374737244
N: 2
Number of bits for Y: 72681 Number of bits for Cr: 10164 Number of bits for Cb: 12816 Compression Ratio: 17.122965471822372
N: 3
Number of bits for Y: 51444 Number of bits for Cr: 7193 Number of bits for Cb: 9514 Compression Ratio: 24.034863758418805 N: 4 Number of bits for Y: 36092 Number of bits for Cr: 4842 Number of bits for Cb: 6562 Compression Ratio: 34.48711470439616
N: 5
Number of bits for Y: 24600 Number of bits for Cr: 3537 Number of bits for Cb: 4311 Compression Ratio: 50.48076923076923 | ||||
eykang
Posts: 95
|
Posted 21:15 May 16, 2011 |
The zigzag order is wrong. The first AC should be -7, not -1. --Kang
Last edited by eykang at
21:16 May 16, 2011.
|