comparison Plugin/DecodedImageAdapter.cpp @ 101:2932473a9b19 refactoring

fix prefetching
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 27 Nov 2015 22:05:51 +0100
parents 46ec13a1177c
children 21123729ac71
comparison
equal deleted inserted replaced
100:f5b1a9267da0 101:2932473a9b19
46 if (!regex_match(uri.c_str(), what, pattern)) 46 if (!regex_match(uri.c_str(), what, pattern))
47 { 47 {
48 return false; 48 return false;
49 } 49 }
50 50
51 printf("[%s] [%s] [%s]\n", what[1].str().c_str(), what[2].str().c_str(), what[3].str().c_str());
52
53 std::string compression(what[1]); 51 std::string compression(what[1]);
54 instanceId = what[2]; 52 instanceId = what[2];
55 frameIndex = boost::lexical_cast<unsigned int>(what[3]); 53 frameIndex = boost::lexical_cast<unsigned int>(what[3]);
56 54
57 if (compression == "deflate") 55 if (compression == "deflate")
332 { 330 {
333 *q = std::numeric_limits<TargetType>::min(); 331 *q = std::numeric_limits<TargetType>::min();
334 } 332 }
335 else 333 else
336 { 334 {
337 *q = static_cast<TargetType>(boost::math::iround(v)); 335 //*q = static_cast<TargetType>(boost::math::iround(v));
336
337 // http://stackoverflow.com/a/485546/881731
338 *q = static_cast<TargetType>(floor(v + 0.5f));
338 } 339 }
339 } 340 }
340 } 341 }
341 } 342 }
342 343