Commit 90310ddb authored by fbarchard@google.com's avatar fbarchard@google.com

add environment variable to scale to override default filtering

BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/442001

git-svn-id: http://libyuv.googlecode.com/svn/trunk@209 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent bd4a849b
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 208 Version: 209
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ #ifndef INCLUDE_LIBYUV_VERSION_H_
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 208 #define LIBYUV_VERSION 209
#endif // INCLUDE_LIBYUV_VERSION_H_ #endif // INCLUDE_LIBYUV_VERSION_H_
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <stdlib.h> // For getenv()
#include "libyuv/cpu_id.h" #include "libyuv/cpu_id.h"
#include "libyuv/planar_functions.h" // For CopyPlane #include "libyuv/planar_functions.h" // For CopyPlane
...@@ -3636,6 +3637,13 @@ static void ScalePlane(const uint8* src, int src_stride, ...@@ -3636,6 +3637,13 @@ static void ScalePlane(const uint8* src, int src_stride,
uint8* dst, int dst_stride, uint8* dst, int dst_stride,
int dst_width, int dst_height, int dst_width, int dst_height,
FilterMode filtering, bool use_ref) { FilterMode filtering, bool use_ref) {
#ifdef CPU_X86
// environment variable overrides for testing.
char *filter_override = getenv("LIBYUV_FILTER");
if (filter_override) {
filtering = (FilterMode)atoi(filter_override);
}
#endif
// Use specialized scales to improve performance for common resolutions. // Use specialized scales to improve performance for common resolutions.
// For example, all the 1/2 scalings will use ScalePlaneDown2() // For example, all the 1/2 scalings will use ScalePlaneDown2()
if (dst_width == src_width && dst_height == src_height) { if (dst_width == src_width && dst_height == src_height) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment