-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from osamu620/mcu
Change internal method of buffering and precision of quantization
- Loading branch information
Showing
18 changed files
with
754 additions
and
603 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -7,4 +7,5 @@ target_sources(jpegenc | |
quantization.cpp | ||
block_coding.cpp | ||
jpegenc.cpp | ||
bitstream.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Generates code for every target that this compiler can support. | ||
#undef HWY_TARGET_INCLUDE | ||
#define HWY_TARGET_INCLUDE "bitstream.cpp" // this file | ||
#include <hwy/foreach_target.h> // must come before highway.h | ||
#include <hwy/highway.h> | ||
|
||
#include "bitstream.hpp" | ||
|
||
namespace jpegenc_hwy { | ||
namespace HWY_NAMESPACE { | ||
namespace hn = hwy::HWY_NAMESPACE; | ||
|
||
HWY_ATTR void trial(uint8_t *HWY_RESTRICT in, uint8_t *HWY_RESTRICT out) { | ||
#if HWY_TARGET != HWY_SCALAR | ||
HWY_CAPPED(uint8_t, 8) u8; | ||
auto vin = Load(u8, in); | ||
vin = Reverse(u8, vin); | ||
Store(vin, u8, out); | ||
#else | ||
for (int i = 7; i >= 0; --i) { | ||
*out++ = in[i]; | ||
} | ||
#endif | ||
} | ||
} // namespace HWY_NAMESPACE | ||
} // namespace jpegenc_hwy | ||
|
||
#if HWY_ONCE | ||
namespace jpegenc_hwy { | ||
HWY_EXPORT(trial); | ||
void send_8_bytes(uint8_t *in, uint8_t *out) { | ||
HWY_DYNAMIC_DISPATCH(trial) | ||
(in, out); | ||
} | ||
} // namespace jpegenc_hwy | ||
#endif |
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
Oops, something went wrong.