Lines Matching defs:ifs
26 static size_t GetFileSizeInBytes(ifstream &ifs)
28 ifs.seekg(0, ifstream::end);
29 auto len = ifs.tellg();
30 ifs.seekg(0, ifstream::beg);
65 bool BufferHelper::CopyYuvData(BufferHandle *handle, ifstream &ifs, PixelFileInfo& pixelInfo)
71 ifs.read(dst, pixelInfo.alignedWidth * BYTES_PER_PIXEL_YUV);
76 ifs.read(dst, pixelInfo.alignedWidth * BYTES_PER_PIXEL_YUV);
91 ifs.read(dst, pixelInfo.alignedWidth * BYTES_PER_PIXEL_YUV);
97 bool BufferHelper::CopyRgbaData(BufferHandle *handle, ifstream &ifs, PixelFileInfo& pixelInfo)
102 ifs.read(dst, pixelInfo.alignedWidth * BYTES_PER_PIXEL_RBGA);
122 ifstream ifs(imageFile, ios::binary);
123 IF_TRUE_RETURN_VAL_WITH_MSG(!ifs.is_open(), nullptr, "cannot open %{public}s", imageFile.c_str());
144 CopyRgbaData(handle, ifs, pixelInfo) :
145 CopyYuvData(handle, ifs, pixelInfo);
181 ifstream ifs(metaFile, ios::binary);
182 IF_TRUE_RETURN_VAL_WITH_MSG(!ifs.is_open(), buffer, "cannot open %{public}s", metaFile.c_str());
183 size_t totalSize = GetFileSizeInBytes(ifs);
192 ifs.read(reinterpret_cast<char*>(addr), totalSize);
258 ifstream ifs(filePath, ios::binary);
259 IF_TRUE_RETURN_VAL_WITH_MSG(!ifs.is_open(), false, "cannot open %{public}s", filePath.c_str());
260 size_t fileSize = GetFileSizeInBytes(ifs);
280 ifs.read(reinterpret_cast<char*>(p) + offset, fileSize);