Skip to content

Commit

Permalink
AOM encoder: remove unnecessary call to extend_padding_to_size() (see…
Browse files Browse the repository at this point in the history
… also #365)
  • Loading branch information
farindk committed Sep 5, 2022
1 parent 4ce0e5f commit a01bacc
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions libheif/heif_encoder_aom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void encoder_struct_aom::add_custom_option(std::string name, std::string value)
}
#endif

static const char* kError_out_of_memory = "Out of memory";
//static const char* kError_out_of_memory = "Out of memory";
static const char* kError_encode_frame = "Failed to encode frame";

static const char* kParam_min_q = "min-q";
Expand Down Expand Up @@ -727,16 +727,6 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i

struct heif_error err;

bool success = image->image->extend_padding_to_size(image->image->get_width(),
image->image->get_height());
if (!success) {
err = {heif_error_Memory_allocation_error,
heif_suberror_Unspecified,
kError_out_of_memory};
return err;
}


const int source_width = heif_image_get_width(image, heif_channel_Y);
const int source_height = heif_image_get_height(image, heif_channel_Y);

Expand Down

0 comments on commit a01bacc

Please sign in to comment.