From 2fb2ac88360f6f2c0dde2ea54e32d2d643b53360 Mon Sep 17 00:00:00 2001 From: peng xiao Date: Tue, 13 Aug 2013 17:17:07 +0800 Subject: [PATCH] Apply bugfix #3121 for OCL. --- modules/ocl/src/color.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ocl/src/color.cpp b/modules/ocl/src/color.cpp index e14bd27569..493dbc33c4 100644 --- a/modules/ocl/src/color.cpp +++ b/modules/ocl/src/color.cpp @@ -213,7 +213,7 @@ void cvtColor_caller(const oclMat &src, oclMat &dst, int code, int dcn) case CV_RGB2YUV: { CV_Assert(scn == 3 || scn == 4); - bidx = code == CV_BGR2YUV ? 0 : 2; + bidx = code == CV_RGB2YUV ? 0 : 2; dst.create(sz, CV_MAKETYPE(depth, 3)); RGB2YUV_caller(src, dst, bidx); break; @@ -222,7 +222,7 @@ void cvtColor_caller(const oclMat &src, oclMat &dst, int code, int dcn) case CV_YUV2RGB: { CV_Assert(scn == 3 || scn == 4); - bidx = code == CV_YUV2BGR ? 0 : 2; + bidx = code == CV_YUV2RGB ? 0 : 2; dst.create(sz, CV_MAKETYPE(depth, 3)); YUV2RGB_caller(src, dst, bidx); break;