Class DvppDecodeVideo
Defined in File vision_ascend.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class DvppDecodeVideo : public mindspore::dataset::TensorTransform
Decode H264/H265 video using the hardware algorithm of DVPP module on Ascend series chip.
Public Functions
-
inline DvppDecodeVideo(const std::vector<uint32_t> &size, VdecStreamFormat type, VdecOutputFormat out_format = VdecOutputFormat::kYuvSemiplanar420, const std::string &output = "./output")
Constructor.
- Example
namespace ds = mindspore::dataset; /* Define operations */ std::shared_ptr<ds::TensorTransform> dvpp_decode(new ds::vision::DvppDecodeVideo({1080, 1920}, ds::VdecStreamFormat::kH265MainLevel)); /* define preprocessor */ ds::Execute preprocessor({dvpp_decode}, ds::MapTargetDevice::kCpu, 0);
- 参数
size – [in] Parameter vector of two integers for each dimension of input video frames, with respect to H,W order.
type – [in] An enum for the coding protocol of video.
VdecStreamFormat::kH265MainLevel, video coding protocol is H265-main level.
VdecStreamFormat::kH264BaselineLevel, video coding protocol is H264-baseline level.
VdecStreamFormat::kH264MainLevel, video coding protocol is H264-main level.
VdecStreamFormat::kH264HighLevel, video coding protocol is H264-high level.
out_format – [in] An enum for the format of output image (default=VdecOutputFormat::kYUV_SEMIPLANAR_420).
VdecOutputFormat::kYUV_SEMIPLANAR_420, format of output image is YUV420SP NV12 8bit.
VdecOutputFormat::kYVU_SEMIPLANAR_420, format of output image is YUV420SP NV21 8bit.
output – [in] The output path of the decoded images corresponds to video frames.
-
inline DvppDecodeVideo(const std::vector<uint32_t> &size, VdecStreamFormat type, const std::string &output = "./output")
Constructor.
- Example
namespace ds = mindspore::dataset; /* Define operations */ std::shared_ptr<ds::TensorTransform> dvpp_decode(new ds::vision::DvppDecodeVideo({1080, 1920})); /* define preprocessor */ ds::Execute preprocessor({dvpp_decode}, ds::MapTargetDevice::kCpu, 0);
- 参数
size – [in] Parameter vector of two integers for each dimension of input video frames, with respect to H,W order.
type – [in] An enum for the coding protocol of video.
VdecStreamFormat::kH265MainLevel, video coding protocol is H265-main level.
VdecStreamFormat::kH264BaselineLevel, video coding protocol is H264-baseline level.
VdecStreamFormat::kH264MainLevel, video coding protocol is H264-main level.
VdecStreamFormat::kH264HighLevel, video coding protocol is H264-high level.
output – [in] The output path of the decoded images corresponds to video frames.
-
~DvppDecodeVideo() = default
Destructor.
-
inline DvppDecodeVideo(const std::vector<uint32_t> &size, VdecStreamFormat type, VdecOutputFormat out_format = VdecOutputFormat::kYuvSemiplanar420, const std::string &output = "./output")