3cd37dfeb5
Adds an arbitrary-size resize library for use in scaling of input frames in a non-normative manner in the vp9 encoder. The method used is as follows: Downsampling - Uses a 8 tap filter for factor of 2 decimation upto a size just higher than the desired size. Then interpolates pixels at a precision of 1/32 pel using a set of 8-tap filters. Upsampling - Interpolates pixels at a precision of 1/32 pel using a set of 8-tap filters. There is no assembly optimization yet. Change-Id: Ib5b81e174fc139da322bb97c8214d52289d60d8a
68 lines
2.5 KiB
C
68 lines
2.5 KiB
C
/*
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef VP9_ENCODER_VP9_RESIZE_H_
|
|
#define VP9_ENCODER_VP9_RESIZE_H_
|
|
|
|
#include <stdio.h>
|
|
|
|
void vp9_resize_plane(const uint8_t *const input,
|
|
int height,
|
|
int width,
|
|
int in_stride,
|
|
uint8_t *output,
|
|
int height2,
|
|
int width2,
|
|
int out_stride);
|
|
void vp9_resize_frame420(const uint8_t *const y,
|
|
int y_stride,
|
|
const uint8_t *const u,
|
|
const uint8_t *const v,
|
|
int uv_stride,
|
|
int height,
|
|
int width,
|
|
uint8_t *oy,
|
|
int oy_stride,
|
|
uint8_t *ou,
|
|
uint8_t *ov,
|
|
int ouv_stride,
|
|
int oheight,
|
|
int owidth);
|
|
void vp9_resize_frame422(const uint8_t *const y,
|
|
int y_stride,
|
|
const uint8_t *const u,
|
|
const uint8_t *const v,
|
|
int uv_stride,
|
|
int height,
|
|
int width,
|
|
uint8_t *oy,
|
|
int oy_stride,
|
|
uint8_t *ou,
|
|
uint8_t *ov,
|
|
int ouv_stride,
|
|
int oheight,
|
|
int owidth);
|
|
void vp9_resize_frame444(const uint8_t *const y,
|
|
int y_stride,
|
|
const uint8_t *const u,
|
|
const uint8_t *const v,
|
|
int uv_stride,
|
|
int height,
|
|
int width,
|
|
uint8_t *oy,
|
|
int oy_stride,
|
|
uint8_t *ou,
|
|
uint8_t *ov,
|
|
int ouv_stride,
|
|
int oheight,
|
|
int owidth);
|
|
|
|
#endif // VP9_ENCODER_VP9_RESIZE_H_
|