| Index: source/libvpx/vp9/common/vp9_scale.h
|
| ===================================================================
|
| --- source/libvpx/vp9/common/vp9_scale.h (revision 281795)
|
| +++ source/libvpx/vp9/common/vp9_scale.h (working copy)
|
| @@ -46,10 +46,18 @@
|
| }
|
|
|
| static INLINE int vp9_is_scaled(const struct scale_factors *sf) {
|
| - return sf->x_scale_fp != REF_NO_SCALE ||
|
| - sf->y_scale_fp != REF_NO_SCALE;
|
| + return vp9_is_valid_scale(sf) &&
|
| + (sf->x_scale_fp != REF_NO_SCALE || sf->y_scale_fp != REF_NO_SCALE);
|
| }
|
|
|
| +static INLINE int valid_ref_frame_size(int ref_width, int ref_height,
|
| + int this_width, int this_height) {
|
| + return 2 * this_width >= ref_width &&
|
| + 2 * this_height >= ref_height &&
|
| + this_width <= 16 * ref_width &&
|
| + this_height <= 16 * ref_height;
|
| +}
|
| +
|
| #ifdef __cplusplus
|
| } // extern "C"
|
| #endif
|
|
|