mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-08 01:36:47 +08:00
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
This commit is contained in:
parent
bd4a849bcb
commit
90310ddbb9
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 208
|
||||
Version: 209
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 208
|
||||
#define LIBYUV_VERSION 209
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h> // For getenv()
|
||||
|
||||
#include "libyuv/cpu_id.h"
|
||||
#include "libyuv/planar_functions.h" // For CopyPlane
|
||||
@ -3636,6 +3637,13 @@ static void ScalePlane(const uint8* src, int src_stride,
|
||||
uint8* dst, int dst_stride,
|
||||
int dst_width, int dst_height,
|
||||
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.
|
||||
// For example, all the 1/2 scalings will use ScalePlaneDown2()
|
||||
if (dst_width == src_width && dst_height == src_height) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user