add-ons/media/ffmpeg: Use SWS for color-space conversion universally.
It seems to be as if not faster than the built-in method now as far as I can tell, and this means one less arch-specific difference. I haven't ripped all of it out yet, though.
This commit is contained in:
@@ -35,7 +35,7 @@ extern "C" {
|
|||||||
#include "gfx_util.h"
|
#include "gfx_util.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef __x86_64
|
#if 1
|
||||||
#define USE_SWS_FOR_COLOR_SPACE_CONVERSION 1
|
#define USE_SWS_FOR_COLOR_SPACE_CONVERSION 1
|
||||||
#else
|
#else
|
||||||
#define USE_SWS_FOR_COLOR_SPACE_CONVERSION 0
|
#define USE_SWS_FOR_COLOR_SPACE_CONVERSION 0
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ local sources =
|
|||||||
gfx_util.cpp
|
gfx_util.cpp
|
||||||
;
|
;
|
||||||
|
|
||||||
if $(TARGET_ARCH) != x86_64 {
|
#if $(TARGET_ARCH) != x86_64 {
|
||||||
sources +=
|
# sources +=
|
||||||
gfx_conv_mmx.cpp
|
# gfx_conv_mmx.cpp
|
||||||
yuvrgb_sse.nasm
|
# yuvrgb_sse.nasm
|
||||||
yuvrgb_sse2.nasm
|
# yuvrgb_sse2.nasm
|
||||||
yuvrgb_ssse3.nasm
|
# yuvrgb_ssse3.nasm
|
||||||
;
|
# ;
|
||||||
}
|
#}
|
||||||
|
|
||||||
local architectureObject ;
|
local architectureObject ;
|
||||||
for architectureObject in [ MultiArchSubDirSetup ] {
|
for architectureObject in [ MultiArchSubDirSetup ] {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ resolve_colorspace(color_space colorSpace, AVPixelFormat pixelFormat, int width,
|
|||||||
|
|
||||||
if (pixelFormat == AV_PIX_FMT_YUV420P
|
if (pixelFormat == AV_PIX_FMT_YUV420P
|
||||||
|| pixelFormat == AV_PIX_FMT_YUVJ420P) {
|
|| pixelFormat == AV_PIX_FMT_YUVJ420P) {
|
||||||
#ifndef __x86_64__
|
#if 0
|
||||||
if (cpu.HasSSSE3() && width % 8 == 0 && height % 2 == 0) {
|
if (cpu.HasSSSE3() && width % 8 == 0 && height % 2 == 0) {
|
||||||
TRACE("resolve_colorspace: gfx_conv_yuv420p_rgba32_ssse3\n");
|
TRACE("resolve_colorspace: gfx_conv_yuv420p_rgba32_ssse3\n");
|
||||||
return gfx_conv_yuv420p_rgba32_ssse3;
|
return gfx_conv_yuv420p_rgba32_ssse3;
|
||||||
@@ -65,7 +65,7 @@ resolve_colorspace(color_space colorSpace, AVPixelFormat pixelFormat, int width,
|
|||||||
|
|
||||||
if (pixelFormat == AV_PIX_FMT_YUV422P
|
if (pixelFormat == AV_PIX_FMT_YUV422P
|
||||||
|| pixelFormat == AV_PIX_FMT_YUVJ422P) {
|
|| pixelFormat == AV_PIX_FMT_YUVJ422P) {
|
||||||
#ifndef __x86_64__
|
#if 0
|
||||||
if (cpu.HasSSSE3() && width % 8 == 0) {
|
if (cpu.HasSSSE3() && width % 8 == 0) {
|
||||||
TRACE("resolve_colorspace: gfx_conv_yuv422p_RGB32_ssse3\n");
|
TRACE("resolve_colorspace: gfx_conv_yuv422p_RGB32_ssse3\n");
|
||||||
return gfx_conv_yuv422p_rgba32_ssse3;
|
return gfx_conv_yuv422p_rgba32_ssse3;
|
||||||
@@ -87,7 +87,7 @@ resolve_colorspace(color_space colorSpace, AVPixelFormat pixelFormat, int width,
|
|||||||
|
|
||||||
// Packed Formats
|
// Packed Formats
|
||||||
if (pixelFormat == AV_PIX_FMT_YUYV422) {
|
if (pixelFormat == AV_PIX_FMT_YUYV422) {
|
||||||
#ifndef __x86_64__
|
#if 0
|
||||||
if (cpu.HasSSSE3() && width % 8 == 0) {
|
if (cpu.HasSSSE3() && width % 8 == 0) {
|
||||||
return gfx_conv_yuv422_rgba32_ssse3;
|
return gfx_conv_yuv422_rgba32_ssse3;
|
||||||
} else if (cpu.HasSSE2() && width % 8 == 0) {
|
} else if (cpu.HasSSE2() && width % 8 == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user