Skip to content

Commit

Permalink
Merge pull request #25 from osamu620/fix
Browse files Browse the repository at this point in the history
Avoid unnecessary copies of the first argument of sabsample()
  • Loading branch information
osamu620 authored Oct 3, 2023
2 parents 78f4e2e + 88db5ef commit 99dbb55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,8 @@ HWY_EXPORT(subsample_core);
void rgb2ycbcr(uint8_t *HWY_RESTRICT in, std::vector<uint8_t *> &out, const int width) {
HWY_DYNAMIC_DISPATCH(rgb2ycbcr)(in, out, width);
}
void subsample(std::vector<uint8_t *> in, std::vector<int16_t *> &out, const int width, const int YCCtype) {
void subsample(std::vector<uint8_t *> &in, std::vector<int16_t *> &out, const int width,
const int YCCtype) {
HWY_DYNAMIC_DISPATCH(subsample_core)(in, out, width, YCCtype);
}
} // namespace jpegenc_hwy
Expand Down
2 changes: 1 addition & 1 deletion lib/color.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

namespace jpegenc_hwy {
void rgb2ycbcr(uint8_t *in, std::vector<uint8_t *> &out, int width);
void subsample(std::vector<uint8_t *>, std::vector<int16_t *> &out, int width, int YCCtype);
void subsample(std::vector<uint8_t *> &in, std::vector<int16_t *> &out, int width, int YCCtype);
} // namespace jpegenc_hwy

0 comments on commit 99dbb55

Please sign in to comment.