-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add namespace on image C++ codebase #3312
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
60b2894
Moving jpegcommon inside cpu implementation
datumbox 7fdc7ba
Adding namespaces on image and moving private methods to anonymous.
datumbox 7136251
Fixing headers.
datumbox 22925ff
Renaming public image methods to match the ones on python.
datumbox 8bad585
Refactoring to remove the double ifs in common_jpeg.h
datumbox 84616a5
Merge branch 'master' into refactor/image
datumbox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Renaming public image methods to match the ones on python.
- Loading branch information
commit 22925ff7a10eed4afc7f87fbbb72166c3f82e93e
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
torchvision/csrc/io/image/cpu/jpegcommon.cpp → ...hvision/csrc/io/image/cpu/common_jpeg.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "jpegcommon.h" | ||
#include "common_jpeg.h" | ||
|
||
namespace vision { | ||
namespace image { | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
...vision/csrc/io/image/cpu/readpng_impl.cpp → torchvision/csrc/io/image/cpu/decode_png.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
namespace vision { | ||
namespace image { | ||
|
||
C10_EXPORT torch::Tensor decodeJPEG( | ||
C10_EXPORT torch::Tensor decode_png( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again Github fails to figure out which file was moved to what here. |
||
const torch::Tensor& data, | ||
ImageReadMode mode = IMAGE_READ_MODE_UNCHANGED); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,9 @@ | |
namespace vision { | ||
namespace image { | ||
|
||
C10_EXPORT torch::Tensor encodeJPEG(const torch::Tensor& data, int64_t quality); | ||
C10_EXPORT torch::Tensor encode_jpeg( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Git fails to track the old file. |
||
const torch::Tensor& data, | ||
int64_t quality); | ||
|
||
} // namespace image | ||
} // namespace vision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...src/io/image/cpu/read_write_file_impl.cpp → ...ion/csrc/io/image/cpu/read_write_file.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "read_write_file_impl.h" | ||
#include "read_write_file.h" | ||
|
||
#include <sys/stat.h> | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#pragma once | ||
|
||
#include "cpu/read_image_impl.h" | ||
#include "cpu/read_write_file_impl.h" | ||
#include "cpu/readjpeg_impl.h" | ||
#include "cpu/readpng_impl.h" | ||
#include "cpu/writejpeg_impl.h" | ||
#include "cpu/writepng_impl.h" | ||
#include "cpu/decode_image.h" | ||
#include "cpu/decode_jpeg.h" | ||
#include "cpu/decode_png.h" | ||
#include "cpu/encode_jpeg.h" | ||
#include "cpu/encode_png.h" | ||
#include "cpu/read_write_file.h" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here Github fails to track the right file renames and thinks I moved png to jpeg and vice versa.