nokiatech / heif

High Efficiency Image File Format
Other
1.75k stars 248 forks source link

call cv::VideoCapture vcap(filename); #24

Closed jgehry82 closed 6 years ago

jgehry82 commented 7 years ago

OpenCV: Couldn't read video stream from file "/Desktop/temp_bitstream.hevc" cv::VideoCapture::isOpened returned false

prepas commented 7 years ago

I have the same problem and I can't convert hevc to jpg format. The function Srcs\reader\hevcimagefilereader.cpp\HevcImageFileReader::getDecoderParameterSets has wrong code, it works correct if remove these code:

auto iter = mParameterSetMap.find(Id(contextId, itemId)); if (iter != mParameterSetMap.end()) { parameterSets = iter->second; return; }

Finally variant of function is:

void HevcImageFileReader::getDecoderParameterSets(const uint32_t contextId, const uint32_t itemId, ParameterSetMap& parameterSets) const { isInitialized(); // Was it an image/sample? const Id parameterSetId = mImageToParameterSetMap.at(Id(contextId, itemId)); auto iter = mParameterSetMap.find(parameterSetId); if (iter != mParameterSetMap.end()) { parameterSets = iter->second; return; } throw FileReaderException(FileReaderException::StatusCode::INVALID_ITEM_ID); // or invalid context...? }

Please, remove these wrong code as soon as possibly

prepas commented 7 years ago

@nokiatech can fix it? Please, see my comment above.

prepas commented 6 years ago

@nokiatech any news?

nokiatech commented 6 years ago

Duplicate of issue #9. Resolved in v3.0