Lines Matching refs:yuv
23 virtual YUV read(const Mat& yuv, int row, int col) = 0;
74 virtual void write(Mat& yuv, int row, int col, const YUV& val) = 0;
135 void write(Mat& yuv, int row, int col, const YUV& val) in write() argument
137 int h = yuv.rows * 2 / 3; in write()
139 yuv.ptr<uchar>(row)[col] = val[0]; in write()
142 yuv.ptr<uchar>(h + row/4)[col/2 + ((row/2) % 2) * (yuv.cols/2)] = val[2]; in write()
143 … yuv.ptr<uchar>(h + (row/2 + h/2)/2)[col/2 + ((row/2 + h/2) % 2) * (yuv.cols/2)] = val[1]; in write()
150 void write(Mat& yuv, int row, int col, const YUV& val) in write() argument
152 int h = yuv.rows * 2 / 3; in write()
154 yuv.ptr<uchar>(row)[col] = val[0]; in write()
157 yuv.ptr<uchar>(h + row/4)[col/2 + ((row/2) % 2) * (yuv.cols/2)] = val[1]; in write()
158 … yuv.ptr<uchar>(h + (row/2 + h/2)/2)[col/2 + ((row/2 + h/2) % 2) * (yuv.cols/2)] = val[2]; in write()
178 YUV read(const Mat& yuv, int row, int col) in read() argument
180 uchar y = yuv.ptr<uchar>(row)[col]; in read()
181 uchar u = yuv.ptr<uchar>(yuv.rows * 2 / 3 + row/2)[(col/2)*2 + 1]; in read()
182 uchar v = yuv.ptr<uchar>(yuv.rows * 2 / 3 + row/2)[(col/2)*2]; in read()
191 YUV read(const Mat& yuv, int row, int col) in read()
193 uchar y = yuv.ptr<uchar>(row)[col]; in read()
194 uchar u = yuv.ptr<uchar>(yuv.rows * 2 / 3 + row/2)[(col/2)*2]; in read()
195 uchar v = yuv.ptr<uchar>(yuv.rows * 2 / 3 + row/2)[(col/2)*2 + 1]; in read()
203 YUV read(const Mat& yuv, int row, int col) in read() argument
205 int h = yuv.rows * 2 / 3; in read()
206 uchar y = yuv.ptr<uchar>(row)[col]; in read()
207 uchar u = yuv.ptr<uchar>(h + (row/2 + h/2)/2)[col/2 + ((row/2 + h/2) % 2) * (yuv.cols/2)]; in read()
208 uchar v = yuv.ptr<uchar>(h + row/4)[col/2 + ((row/2) % 2) * (yuv.cols/2)]; in read()
216 YUV read(const Mat& yuv, int row, int col) in read() argument
218 int h = yuv.rows * 2 / 3; in read()
219 uchar y = yuv.ptr<uchar>(row)[col]; in read()
220 uchar u = yuv.ptr<uchar>(h + row/4)[col/2 + ((row/2) % 2) * (yuv.cols/2)]; in read()
221 uchar v = yuv.ptr<uchar>(h + (row/2 + h/2)/2)[col/2 + ((row/2 + h/2) % 2) * (yuv.cols/2)]; in read()
229 YUV read(const Mat& yuv, int row, int col) in read() argument
231 uchar y = yuv.ptr<Vec2b>(row)[col][1]; in read()
232 uchar u = yuv.ptr<Vec2b>(row)[(col/2)*2][0]; in read()
233 uchar v = yuv.ptr<Vec2b>(row)[(col/2)*2 + 1][0]; in read()
241 YUV read(const Mat& yuv, int row, int col) in read() argument
243 uchar y = yuv.ptr<Vec2b>(row)[col][0]; in read()
244 uchar u = yuv.ptr<Vec2b>(row)[(col/2)*2][1]; in read()
245 uchar v = yuv.ptr<Vec2b>(row)[(col/2)*2 + 1][1]; in read()
253 YUV read(const Mat& yuv, int row, int col) in read() argument
255 uchar y = yuv.ptr<Vec2b>(row)[col][0]; in read()
256 uchar u = yuv.ptr<Vec2b>(row)[(col/2)*2 + 1][1]; in read()
257 uchar v = yuv.ptr<Vec2b>(row)[(col/2)*2][1]; in read()
265 YUV read(const Mat& yuv, int row, int col) in read() argument
267 return yuv.at<YUV>(row, col); in read()
322 RGB convert(YUV yuv) in convert() argument
324 int y = std::max(0, yuv[0] - 16); in convert()
325 int u = yuv[1] - 128; in convert()
326 int v = yuv[2] - 128; in convert()
338 uchar convert(YUV yuv) in convert() argument
340 return yuv[0]; in convert()
520 void referenceYUV2RGB(const Mat& yuv, Mat& rgb, YUVreader* yuvReader, RGBwriter* rgbWriter) in referenceYUV2RGB() argument
526 rgbWriter->write(rgb, row, col, cvt.convert(yuvReader->read(yuv, row, col))); in referenceYUV2RGB()
530 void referenceYUV2GRAY(const Mat& yuv, Mat& rgb, YUVreader* yuvReader, GRAYwriter* grayWriter) in referenceYUV2GRAY() argument
536 grayWriter->write(rgb, row, col, cvt.convert(yuvReader->read(yuv, row, col))); in referenceYUV2GRAY()
540 void referenceRGB2YUV(const Mat& rgb, Mat& yuv, RGBreader* rgbReader, YUVwriter* yuvWriter) in referenceRGB2YUV() argument
546 yuvWriter->write(yuv, row, col, cvt.convert(rgbReader->read(rgb, row, col))); in referenceRGB2YUV()