Skip to content

Added unit tests and remove inappropriate debugging code. #10

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

Merged
merged 8 commits into from
Feb 25, 2020

Conversation

ledyba-z
Copy link
Collaborator

@ledyba-z ledyba-z commented Feb 15, 2020

Hi.

I added small (but many) test images and write XCTest cases (using TravisCI and codecov).

Currently, it covers 70.36% of SDWebImageAVIFCoder/Classes/SDImageAVIFCoder.m.

And in this process, I found a bug.
This line is for debugging vImage frameworks, and it should be removed(sorry...):

c5e69f9#diff-80940c04bc7eacf6576a4e46ebecd2b2L287

Please take a look!

@ledyba-z ledyba-z requested a review from dreampiggy February 15, 2020 14:04
@codecov
Copy link

codecov bot commented Feb 15, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@240192f). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #10   +/-   ##
=========================================
  Coverage          ?   70.63%           
=========================================
  Files             ?        4           
  Lines             ?      824           
  Branches          ?        0           
=========================================
  Hits              ?      582           
  Misses            ?      242           
  Partials          ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 240192f...f1d6dbe. Read the comment docs.

@ledyba-z
Copy link
Collaborator Author

ledyba-z commented Feb 15, 2020

I think CI with more complex images (I wrote that before using Github Actions) is also still helpful.

@dreampiggy
Copy link
Collaborator

Actually this is OK.

The test images forcus on the AVIF standard check. It's only because this library already beyond just a simple libavif client (Which I wrote before) :)

For a stable AVIF decoder, it's OK to add more test cases and images to ensure the decoding correctness.

The Patch Code (only focus on SDImageAVIFCoder.m looks great for me. Do we need to merge and release a new Patch version ?

@ledyba-z
Copy link
Collaborator Author

ledyba-z commented Feb 25, 2020

Sorry to be late! (I have got in to server-side troubles, and resolved them....)

These tests images are focusing on testing YUV ⇔ RGB conversion functions.

The Patch Code (only focus on SDImageAVIFCoder.m looks great for me. Do we need to merge and release a new Patch version ?

Thanks! Yes, please release a new version (anyway this patch resolves a bug).

After this patch will be merged, I am going to send next patch, that makes decoder to output grayscale images for monochrome images (related to SDWebImage/SDWebImage#2907).

However, it takes some time to prepare additional test images and debugging (~10 days?), so I think it is nice timing to release new version.

@dreampiggy dreampiggy merged commit 5ba6914 into SDWebImage:master Feb 25, 2020
@dreampiggy
Copy link
Collaborator

dreampiggy commented Feb 25, 2020

Released v0.5.2


Seems the test case not so stable ? The newer push (only updated Readme.md) cause the test case failed.

https://github.com/SDWebImage/SDWebImageAVIFCoder/runs/467123380

++ compare -metric PSNR kimono.png decoded/kimono.avif.png NULL:
++ true
+ score=34.7934
* kimono.avif: 34.7934
+ echo ' * kimono.avif: 34.7934'
++ echo '34.7934 >= 35.0'
++ bc -l
+ test 0 -eq 0
+ exit -1
##[error]Process completed with exit code 255.

@ledyba-z
Copy link
Collaborator Author

ledyba-z commented Mar 2, 2020

@dreampiggy
Thanks to merge!

Seems the test case not so stable ?
The newer push (only updated Readme.md) cause the test case failed.

Ah, this test uses our sample images, and I recently updated them to set correct color information. I think this change causes the problem.

It looks libavif can't handle color information correctly. So, I am going to send a patch to libavif.

@ledyba-z ledyba-z deleted the feature/coverage branch March 2, 2020 07:32
@ledyba-z
Copy link
Collaborator Author

ledyba-z commented Mar 3, 2020

Seems the test case not so stable ? The newer push (only updated Readme.md) cause the test case failed.

AOMediaCodec/libavif#82 will resolve this issue.

@ledyba-z
Copy link
Collaborator Author

ledyba-z commented Mar 4, 2020

AOMediaCodec/libavif#82 was merged, and v0.5.7 was released!

@dreampiggy could you upgrade libavif?

@dreampiggy
Copy link
Collaborator

I'll bump the version of libavif-Xcode soon.

@dreampiggy
Copy link
Collaborator

One strange issue. I already watch the libavif GitHub repo notification, but when the new releases come, no any notification ?

Or does GitHub's Watch Release Only feature only useful for the manual created release, but not the raw Git tag ?

image

@ledyba-z
Copy link
Collaborator Author

ledyba-z commented Mar 4, 2020

@dreampiggy

Thank you!

Or does GitHub's Watch Release Only feature only useful for the manual created release, but not the raw Git tag ?

Unfortunately, it may be so:

It appears that "watch releases only" doesn't follow tags and many projects use only tags for announcing new versions. While https://newreleases.io sends notifications for tags too, it also has several version filtering options, based on regex expressions, pre and updated releases. It also offers email frequency options.

Watch only for release tags · Issue #111 · dear-github/dear-github
dear-github/dear-github#111

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

Successfully merging this pull request may close these issues.

2 participants