Skip to content
Open
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
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
eclint_block_comment_start = /*
eclint_block_comment = *
eclint_block_comment_end = */

[Makefile]
indent_style = tab
indent_size = 4
2 changes: 1 addition & 1 deletion libheif-decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Libheif_Decoder : public Decoder {
cv::Mat _frame;
bool _ok;
std::vector<uint8_t> _icc_profile;

public:
Libheif_Decoder(const std::string *data);
bool loaded();
Expand Down
20 changes: 10 additions & 10 deletions libheif-encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
#include "libheif-encoder.h"

void Libheif_Encoder::_initialize() {
std::unique_ptr<heif_context, decltype(&heif_context_free)> context(
heif_context_alloc(), &heif_context_free);

if (!heif_context_get_encoder_descriptors(context.get(),
heif_compression_AV1,
"aom",
&_aom_descriptor,
1)) {
throw std::runtime_error("AOM encoder for AVIF images not available");
}
std::unique_ptr<heif_context, decltype(&heif_context_free)> context(
heif_context_alloc(), &heif_context_free);

if (!heif_context_get_encoder_descriptors(context.get(),
heif_compression_AV1,
"aom",
&_aom_descriptor,
1)) {
throw std::runtime_error("AOM encoder for AVIF images not available");
}
}


Expand Down
2 changes: 1 addition & 1 deletion libheif-encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Libheif_Encoder : public Encoder {
static const heif_encoder_descriptor *_aom_descriptor;

static void _initialize();

public:
Libheif_Encoder(const std::string &format,
int quality,
Expand Down
2 changes: 1 addition & 1 deletion libwebp-decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class LibWebP_Decoder : public Decoder {
std::unique_ptr<WebPAnimDecoder, decltype(&WebPAnimDecoderDelete)> _decoder;
WebPAnimInfo _anim_info;
int _last_ts;

public:
LibWebP_Decoder(const std::string *data);
bool loaded();
Expand Down
2 changes: 1 addition & 1 deletion opencv-decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class OpenCV_Decoder : public Decoder {
const std::string *_data;
cv::Mat _frame;
bool _ok;

public:
OpenCV_Decoder(const std::string *data);
bool loaded();
Expand Down