summaryrefslogtreecommitdiffstats
path: root/third_party/aom/aomdec.c
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-17 05:59:08 -0500
committertrav90 <travawine@palemoon.org>2018-10-17 05:59:08 -0500
commitdf9477dfa60ebb5d31bc142e58ce46535c17abce (patch)
treec4fdd5d1b09d08c0514f208246260fc87372cb56 /third_party/aom/aomdec.c
parent0cc51bc106250988cc3b89cb5d743a5af52cd35a (diff)
downloadUXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.gz
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.lz
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.xz
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.zip
Update aom to slightly newer commit ID
Diffstat (limited to 'third_party/aom/aomdec.c')
-rw-r--r--third_party/aom/aomdec.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/third_party/aom/aomdec.c b/third_party/aom/aomdec.c
index f74baddb7..289776141 100644
--- a/third_party/aom/aomdec.c
+++ b/third_party/aom/aomdec.c
@@ -312,8 +312,6 @@ static int file_is_raw(struct AvxInputContext *input) {
int is_raw = 0;
aom_codec_stream_info_t si;
- si.sz = sizeof(si);
-
if (fread(buf, 1, 32, input->file) == 32) {
int i;
@@ -892,28 +890,32 @@ static int main_loop(int argc, const char **argv_) {
output_bit_depth = img->bit_depth;
}
// Shift up or down if necessary
- if (output_bit_depth != 0 && output_bit_depth != img->bit_depth) {
+ if (output_bit_depth != 0) {
const aom_img_fmt_t shifted_fmt =
output_bit_depth == 8
? img->fmt ^ (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH)
: img->fmt | AOM_IMG_FMT_HIGHBITDEPTH;
- if (img_shifted &&
- img_shifted_realloc_required(img, img_shifted, shifted_fmt)) {
- aom_img_free(img_shifted);
- img_shifted = NULL;
- }
- if (!img_shifted) {
- img_shifted =
- aom_img_alloc(NULL, shifted_fmt, img->d_w, img->d_h, 16);
- img_shifted->bit_depth = output_bit_depth;
- }
- if (output_bit_depth > img->bit_depth) {
- aom_img_upshift(img_shifted, img, output_bit_depth - img->bit_depth);
- } else {
- aom_img_downshift(img_shifted, img,
- img->bit_depth - output_bit_depth);
+
+ if (shifted_fmt != img->fmt || output_bit_depth != img->bit_depth) {
+ if (img_shifted &&
+ img_shifted_realloc_required(img, img_shifted, shifted_fmt)) {
+ aom_img_free(img_shifted);
+ img_shifted = NULL;
+ }
+ if (!img_shifted) {
+ img_shifted =
+ aom_img_alloc(NULL, shifted_fmt, img->d_w, img->d_h, 16);
+ img_shifted->bit_depth = output_bit_depth;
+ }
+ if (output_bit_depth > img->bit_depth) {
+ aom_img_upshift(img_shifted, img,
+ output_bit_depth - img->bit_depth);
+ } else {
+ aom_img_downshift(img_shifted, img,
+ img->bit_depth - output_bit_depth);
+ }
+ img = img_shifted;
}
- img = img_shifted;
}
#endif