Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion torchvision/csrc/io/decoder/memory_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ DecoderInCallback MemoryBuffer::getCallback(
MemoryBuffer object(buffer, size);
return
[object](uint8_t* out, int size, int whence, uint64_t timeoutMs) mutable
-> int {
-> int {
if (out) { // see defs.h file
// read mode
return object.read(out, size);
Expand Down
4 changes: 2 additions & 2 deletions torchvision/csrc/io/decoder/sync_decoder_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ TEST(SyncDecoder, TestMemoryBufferNoSeekableWithFullRead) {
CHECK(decoder.init(
params,
[object](uint8_t* out, int size, int whence, uint64_t timeoutMs) mutable
-> int {
-> int {
if (out) { // see defs.h file
// read mode
return object.read(out, size);
Expand Down Expand Up @@ -401,7 +401,7 @@ TEST(SyncDecoder, TestMemoryBufferNoSeekableWithPartialRead) {
CHECK(!decoder.init(
params,
[object](uint8_t* out, int size, int whence, uint64_t timeoutMs) mutable
-> int {
-> int {
if (out) { // see defs.h file
// read mode
return object.read(out, size);
Expand Down
4 changes: 2 additions & 2 deletions torchvision/csrc/io/image/cpu/encode_jpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ torch::Tensor encode_jpeg(const torch::Tensor& data, int64_t quality) {
C10_LOG_API_USAGE_ONCE(
"torchvision.csrc.io.image.cpu.encode_jpeg.encode_jpeg");
// Define compression structures and error handling
struct jpeg_compress_struct cinfo {};
struct torch_jpeg_error_mgr jerr {};
struct jpeg_compress_struct cinfo{};
struct torch_jpeg_error_mgr jerr{};

// Define buffer to write JPEG information to and its size
JpegSizeType jpegSize = 0;
Expand Down
Loading