Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test suite; generalize past 8x8 #2

Open
camilleg opened this issue Jan 27, 2021 · 9 comments
Open

test suite; generalize past 8x8 #2

camilleg opened this issue Jan 27, 2021 · 9 comments
Assignees

Comments

@camilleg
Copy link
Owner

Github user zvezdochiot suggests block sizes other than 8x8.
This change would be invasive, because 8x8 is hardcoded in loops such as costella/costella_unblock.c lines 1060-1300, 1500-1750, 2020-2170, 2260-2400, 2590-2780... .
This would first need some test cases to ensure that all the 8's were caught.

@zvezdochiot
Copy link

zvezdochiot commented Jan 28, 2021

origin

cjpeg -quality 30 -outfile lena256.jpg lena256.ppm

jpeg
Decode
djpeg
Upscale x2 (cubic)
x2

@camilleg
Copy link
Owner Author

Is this right?

  • Lena is the starting point. cjpeg's deliberately blocky output, converted to bmp (and to png) is the test case's input. unblock's output as of 2021 Jan 28 is the test case's expected output. That reassures us that the 8x8 case hasn't been broken.
  • The upscale x2 is a separate test case, for 16x16. That lets us check if 16x16 outperforms 8x8, as it should.

@zvezdochiot
Copy link

Right.

@camilleg
Copy link
Owner Author

Good! I'll build that. But instead of Lena, Jelly Beans http://sipi.usc.edu/database/download.php?vol=misc&img=4.1.08 (smooth gradients) and Mandrill http://sipi.usc.edu/database/download.php?vol=misc&img=4.2.03 (high frequency fur). By now, major journals are refusing articles that use Lena, https://en.wikipedia.org/wiki/Lenna#Criticism.

@camilleg
Copy link
Owner Author

Committed test cases for 8x8.

@zvezdochiot
Copy link

Source: in2.png
origin
Upscale x2: in2.x2.png
x2
Unblock: ./unblock in2.x2.png out2.x2.png
unblock
No good.

@zvezdochiot
Copy link

Build:

Replace

CFLAGS = -O3 -Wall -W

to

CFLAGS = -O3 -Wall -W -std=c++11

@camilleg
Copy link
Owner Author

camilleg commented Feb 1, 2021

What's your question about ./unblock in2.x2.png out2.x2.png? I haven't yet implemented 16x16; that's why this issue is still open. I've only committed some 8x8 test cases.

@camilleg camilleg self-assigned this Feb 1, 2021
@camilleg
Copy link
Owner Author

camilleg commented Mar 31, 2021

https://ffmpeg.org/ffmpeg-filters.html#deblock allows block sizes from 4 to 512 with a default of 8. Although ffmpeg is related to avisynth, its deblock filter didn't come from Costella, but from "Ramkishor, K., Karandikar, P.: A simple and efficient deblocking algorithm for low bit-rate video coding. In: IEEE Inernational Symposium on Consumer Electronics (December 2000).".

That filter would provide another way to test and compare the performance of this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants