mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-08 16:27:31 +09:00
Update aom to v1.0.0
Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0.
This commit is contained in:
parent
bb61121b44
commit
48f6d2e034
1087 changed files with 154333 additions and 265310 deletions
13
third_party/aom/aom_dsp/ssim.c
vendored
13
third_party/aom/aom_dsp/ssim.c
vendored
|
|
@ -11,7 +11,9 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include "./aom_dsp_rtcd.h"
|
||||
|
||||
#include "config/aom_dsp_rtcd.h"
|
||||
|
||||
#include "aom_dsp/ssim.h"
|
||||
#include "aom_ports/mem.h"
|
||||
#include "aom_ports/system_state.h"
|
||||
|
|
@ -31,6 +33,7 @@ void aom_ssim_parms_16x16_c(const uint8_t *s, int sp, const uint8_t *r, int rp,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void aom_ssim_parms_8x8_c(const uint8_t *s, int sp, const uint8_t *r, int rp,
|
||||
uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s,
|
||||
uint32_t *sum_sq_r, uint32_t *sum_sxr) {
|
||||
|
|
@ -46,7 +49,6 @@ void aom_ssim_parms_8x8_c(const uint8_t *s, int sp, const uint8_t *r, int rp,
|
|||
}
|
||||
}
|
||||
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
void aom_highbd_ssim_parms_8x8_c(const uint16_t *s, int sp, const uint16_t *r,
|
||||
int rp, uint32_t *sum_s, uint32_t *sum_r,
|
||||
uint32_t *sum_sq_s, uint32_t *sum_sq_r,
|
||||
|
|
@ -62,7 +64,6 @@ void aom_highbd_ssim_parms_8x8_c(const uint16_t *s, int sp, const uint16_t *r,
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
|
||||
static const int64_t cc1 = 26634; // (64^2*(.01*255)^2
|
||||
static const int64_t cc2 = 239708; // (64^2*(.03*255)^2
|
||||
|
|
@ -108,7 +109,6 @@ static double ssim_8x8(const uint8_t *s, int sp, const uint8_t *r, int rp) {
|
|||
return similarity(sum_s, sum_r, sum_sq_s, sum_sq_r, sum_sxr, 64, 8);
|
||||
}
|
||||
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
static double highbd_ssim_8x8(const uint16_t *s, int sp, const uint16_t *r,
|
||||
int rp, uint32_t bd, uint32_t shift) {
|
||||
uint32_t sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0;
|
||||
|
|
@ -117,7 +117,6 @@ static double highbd_ssim_8x8(const uint16_t *s, int sp, const uint16_t *r,
|
|||
return similarity(sum_s >> shift, sum_r >> shift, sum_sq_s >> (2 * shift),
|
||||
sum_sq_r >> (2 * shift), sum_sxr >> (2 * shift), 64, bd);
|
||||
}
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
|
||||
// We are using a 8x8 moving window with starting location of each 8x8 window
|
||||
// on the 4x4 pixel grid. Such arrangement allows the windows to overlap
|
||||
|
|
@ -142,7 +141,6 @@ static double aom_ssim2(const uint8_t *img1, const uint8_t *img2,
|
|||
return ssim_total;
|
||||
}
|
||||
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
static double aom_highbd_ssim2(const uint8_t *img1, const uint8_t *img2,
|
||||
int stride_img1, int stride_img2, int width,
|
||||
int height, uint32_t bd, uint32_t shift) {
|
||||
|
|
@ -164,7 +162,6 @@ static double aom_highbd_ssim2(const uint8_t *img1, const uint8_t *img2,
|
|||
ssim_total /= samples;
|
||||
return ssim_total;
|
||||
}
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
|
||||
double aom_calc_ssim(const YV12_BUFFER_CONFIG *source,
|
||||
const YV12_BUFFER_CONFIG *dest, double *weight) {
|
||||
|
|
@ -422,7 +419,6 @@ double aom_get_ssim_metrics(uint8_t *img1, int img1_pitch, uint8_t *img2,
|
|||
return inconsistency_total;
|
||||
}
|
||||
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
double aom_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source,
|
||||
const YV12_BUFFER_CONFIG *dest, double *weight,
|
||||
uint32_t bd, uint32_t in_bd) {
|
||||
|
|
@ -441,4 +437,3 @@ double aom_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source,
|
|||
*weight = 1;
|
||||
return abc[0] * .8 + .1 * (abc[1] + abc[2]);
|
||||
}
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue