diff options
author | trav90 <travawine@palemoon.org> | 2018-10-19 23:05:00 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-19 23:05:03 -0500 |
commit | d2499ead93dc4298c0882fe98902acb1b5209f99 (patch) | |
tree | cb0b942aed59e5108f9a3e9d64e7b77854383421 /third_party/aom/examples | |
parent | 41fbdea457bf50c0a43e1c27c5cbf7f0a3a9eb33 (diff) | |
download | UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.gz UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.lz UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.xz UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.zip |
Update libaom to commit ID 1e227d41f0616de9548a673a83a21ef990b62591
Diffstat (limited to 'third_party/aom/examples')
-rw-r--r-- | third_party/aom/examples/aom_cx_set_ref.c | 3 | ||||
-rw-r--r-- | third_party/aom/examples/encoder_util.h | 6 | ||||
-rw-r--r-- | third_party/aom/examples/lightfield_bitstream_parsing.c | 3 | ||||
-rw-r--r-- | third_party/aom/examples/lightfield_decoder.c | 5 | ||||
-rw-r--r-- | third_party/aom/examples/lightfield_encoder.c | 5 | ||||
-rw-r--r-- | third_party/aom/examples/lightfield_tile_list_decoder.c | 5 | ||||
-rw-r--r-- | third_party/aom/examples/noise_model.c | 11 |
7 files changed, 20 insertions, 18 deletions
diff --git a/third_party/aom/examples/aom_cx_set_ref.c b/third_party/aom/examples/aom_cx_set_ref.c index fc037d484..8e3d216fe 100644 --- a/third_party/aom/examples/aom_cx_set_ref.c +++ b/third_party/aom/examples/aom_cx_set_ref.c @@ -54,12 +54,11 @@ #include "aom/aom_decoder.h" #include "aom/aom_encoder.h" #include "aom/aomcx.h" +#include "aom_scale/yv12config.h" #include "common/tools_common.h" #include "common/video_writer.h" #include "examples/encoder_util.h" -#define AOM_BORDER_IN_PIXELS 288 - static const char *exec_name; void usage_exit() { diff --git a/third_party/aom/examples/encoder_util.h b/third_party/aom/examples/encoder_util.h index 966f5e004..a6bb3fb48 100644 --- a/third_party/aom/examples/encoder_util.h +++ b/third_party/aom/examples/encoder_util.h @@ -11,8 +11,8 @@ // Utility functions used by encoder binaries. -#ifndef EXAMPLES_ENCODER_UTIL_H_ -#define EXAMPLES_ENCODER_UTIL_H_ +#ifndef AOM_EXAMPLES_ENCODER_UTIL_H_ +#define AOM_EXAMPLES_ENCODER_UTIL_H_ #include "aom/aom_image.h" @@ -30,4 +30,4 @@ void aom_find_mismatch(const aom_image_t *const img1, int aom_compare_img(const aom_image_t *const img1, const aom_image_t *const img2); -#endif // EXAMPLES_ENCODER_UTIL_H_ +#endif // AOM_EXAMPLES_ENCODER_UTIL_H_ diff --git a/third_party/aom/examples/lightfield_bitstream_parsing.c b/third_party/aom/examples/lightfield_bitstream_parsing.c index 71d4dec77..159f1617a 100644 --- a/third_party/aom/examples/lightfield_bitstream_parsing.c +++ b/third_party/aom/examples/lightfield_bitstream_parsing.c @@ -104,6 +104,7 @@ static int get_image_bps(aom_img_fmt_t fmt) { case AOM_IMG_FMT_I44416: return 48; default: die("Invalid image format"); } + return 0; } int main(int argc, char **argv) { @@ -212,6 +213,7 @@ int main(int argc, char **argv) { if (!aom_video_writer_write_frame(writer, frame_hdr_buf, bytes_to_copy, pts)) die_codec(&codec, "Failed to copy compressed camera frame header."); + free(frame_hdr_buf); } // Read out the image format. @@ -219,6 +221,7 @@ int main(int argc, char **argv) { if (aom_codec_control(&codec, AV1D_GET_IMG_FORMAT, &ref_fmt)) die_codec(&codec, "Failed to get the image format"); const int bps = get_image_bps(ref_fmt); + if (!bps) die_codec(&codec, "Invalid image format."); // read out the tile size. unsigned int tile_size = 0; if (aom_codec_control(&codec, AV1D_GET_TILE_SIZE, &tile_size)) diff --git a/third_party/aom/examples/lightfield_decoder.c b/third_party/aom/examples/lightfield_decoder.c index 5da468413..f5e54db7f 100644 --- a/third_party/aom/examples/lightfield_decoder.c +++ b/third_party/aom/examples/lightfield_decoder.c @@ -25,12 +25,11 @@ #include "aom/aom_decoder.h" #include "aom/aomdx.h" +#include "aom_scale/yv12config.h" +#include "av1/common/enums.h" #include "common/tools_common.h" #include "common/video_reader.h" -#define MAX_EXTERNAL_REFERENCES 128 -#define AOM_BORDER_IN_PIXELS 288 - static const char *exec_name; void usage_exit(void) { diff --git a/third_party/aom/examples/lightfield_encoder.c b/third_party/aom/examples/lightfield_encoder.c index f8c37fbb0..e55cd5ce3 100644 --- a/third_party/aom/examples/lightfield_encoder.c +++ b/third_party/aom/examples/lightfield_encoder.c @@ -37,14 +37,11 @@ #include "aom/aom_encoder.h" #include "aom/aomcx.h" +#include "aom_scale/yv12config.h" #include "av1/common/enums.h" - #include "common/tools_common.h" #include "common/video_writer.h" -#define MAX_EXTERNAL_REFERENCES 128 -#define AOM_BORDER_IN_PIXELS 288 - static const char *exec_name; void usage_exit(void) { diff --git a/third_party/aom/examples/lightfield_tile_list_decoder.c b/third_party/aom/examples/lightfield_tile_list_decoder.c index 2e4f3898d..5556bf0e7 100644 --- a/third_party/aom/examples/lightfield_tile_list_decoder.c +++ b/third_party/aom/examples/lightfield_tile_list_decoder.c @@ -30,12 +30,11 @@ #include "aom/aom_decoder.h" #include "aom/aomdx.h" +#include "aom_scale/yv12config.h" +#include "av1/common/enums.h" #include "common/tools_common.h" #include "common/video_reader.h" -#define MAX_EXTERNAL_REFERENCES 128 -#define AOM_BORDER_IN_PIXELS 288 - static const char *exec_name; void usage_exit(void) { diff --git a/third_party/aom/examples/noise_model.c b/third_party/aom/examples/noise_model.c index 5a5b4d40d..5cc6003b6 100644 --- a/third_party/aom/examples/noise_model.c +++ b/third_party/aom/examples/noise_model.c @@ -179,9 +179,14 @@ static void print_variance_y(FILE *debug_file, aom_image_t *raw, int block_size, aom_film_grain_t *grain) { aom_image_t renoised; grain->apply_grain = 1; - grain->random_seed = 1071; + grain->random_seed = 7391; aom_img_alloc(&renoised, raw->fmt, raw->w, raw->h, 1); - av1_add_film_grain(grain, denoised, &renoised); + + if (av1_add_film_grain(grain, denoised, &renoised)) { + fprintf(stderr, "Internal failure in av1_add_film_grain().\n"); + aom_img_free(&renoised); + return; + } const int num_blocks_w = (raw->w + block_size - 1) / block_size; const int num_blocks_h = (raw->h + block_size - 1) / block_size; @@ -324,7 +329,7 @@ int main(int argc, char *argv[]) { const int num_blocks_h = (info.frame_height + block_size - 1) / block_size; uint8_t *flat_blocks = (uint8_t *)aom_malloc(num_blocks_w * num_blocks_h); // Sets the random seed on the first entry in the output table - int16_t random_seed = 1071; + int16_t random_seed = 7391; aom_noise_model_t noise_model; aom_noise_model_params_t params = { AOM_NOISE_SHAPE_SQUARE, 3, args.bit_depth, high_bd }; |