diff options
author | trav90 <travawine@palemoon.org> | 2018-10-19 21:52:15 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-19 21:52:20 -0500 |
commit | bbcc64772580c8a979288791afa02d30bc476d2e (patch) | |
tree | 437ce94c3fdd7497508e5b55de06c6d011678597 /third_party/aom/av1/common/resize.h | |
parent | 14805f6ddbfb173c327768fff9f81f40ce5e81b0 (diff) | |
download | UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.gz UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.lz UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.xz UXP-bbcc64772580c8a979288791afa02d30bc476d2e.zip |
Update aom to v1.0.0
Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0.
Diffstat (limited to 'third_party/aom/av1/common/resize.h')
-rw-r--r-- | third_party/aom/av1/common/resize.h | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/third_party/aom/av1/common/resize.h b/third_party/aom/av1/common/resize.h index 66b32c72d..feec3a90e 100644 --- a/third_party/aom/av1/common/resize.h +++ b/third_party/aom/av1/common/resize.h @@ -39,7 +39,6 @@ void av1_resize_frame444(const uint8_t *const y, int y_stride, int oy_stride, uint8_t *ou, uint8_t *ov, int ouv_stride, int oheight, int owidth); -#if CONFIG_HIGHBITDEPTH void av1_highbd_resize_plane(const uint8_t *const input, int height, int width, int in_stride, uint8_t *output, int height2, int width2, int out_stride, int bd); @@ -61,25 +60,16 @@ void av1_highbd_resize_frame444(const uint8_t *const y, int y_stride, uint8_t *oy, int oy_stride, uint8_t *ou, uint8_t *ov, int ouv_stride, int oheight, int owidth, int bd); -#endif // CONFIG_HIGHBITDEPTH - -#if CONFIG_HIGHBITDEPTH -void av1_resize_and_extend_frame(const YV12_BUFFER_CONFIG *src, - YV12_BUFFER_CONFIG *dst, int bd); -#else void av1_resize_and_extend_frame(const YV12_BUFFER_CONFIG *src, - YV12_BUFFER_CONFIG *dst); -#endif // CONFIG_HIGHBITDEPTH - -#if CONFIG_FRAME_SUPERRES -#if CONFIG_HIGHBITDEPTH -void av1_upscale_normative_and_extend_frame(const YV12_BUFFER_CONFIG *src, - YV12_BUFFER_CONFIG *dst, int bd); -#else -void av1_upscale_normative_and_extend_frame(const YV12_BUFFER_CONFIG *src, + YV12_BUFFER_CONFIG *dst, int bd, + const int num_planes); + +void av1_upscale_normative_rows(const AV1_COMMON *cm, const uint8_t *src, + int src_stride, uint8_t *dst, int dst_stride, + int plane, int rows); +void av1_upscale_normative_and_extend_frame(const AV1_COMMON *cm, + const YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst); -#endif // CONFIG_HIGHBITDEPTH -#endif // CONFIG_FRAME_SUPERRES YV12_BUFFER_CONFIG *av1_scale_if_required(AV1_COMMON *cm, YV12_BUFFER_CONFIG *unscaled, @@ -89,7 +79,6 @@ YV12_BUFFER_CONFIG *av1_scale_if_required(AV1_COMMON *cm, // resize scale denominator. void av1_calculate_scaled_size(int *width, int *height, int resize_denom); -#if CONFIG_FRAME_SUPERRES // Similar to above, but calculates scaled dimensions after superres from the // given original dimensions and superres scale denominator. void av1_calculate_scaled_superres_size(int *width, int *height, @@ -102,11 +91,19 @@ void av1_calculate_unscaled_superres_size(int *width, int *height, int denom); void av1_superres_upscale(AV1_COMMON *cm, BufferPool *const pool); -// Returns 1 if a superres upscaled frame is unscaled and 0 otherwise. -static INLINE int av1_superres_unscaled(const AV1_COMMON *cm) { - return (cm->superres_scale_denominator == SCALE_NUMERATOR); +// Returns 1 if a superres upscaled frame is scaled and 0 otherwise. +static INLINE int av1_superres_scaled(const AV1_COMMON *cm) { + // Note: for some corner cases (e.g. cm->width of 1), there may be no scaling + // required even though cm->superres_scale_denominator != SCALE_NUMERATOR. + // So, the following check is more accurate. + return !(cm->width == cm->superres_upscaled_width); } -#endif // CONFIG_FRAME_SUPERRES + +#define UPSCALE_NORMATIVE_TAPS 8 +extern const int16_t av1_resize_filter_normative[1 << RS_SUBPEL_BITS] + [UPSCALE_NORMATIVE_TAPS]; + +int32_t av1_get_upscale_convolve_step(int in_length, int out_length); #ifdef __cplusplus } // extern "C" |