1 #ifndef MF_YUV_IMPORTER_H_
2 #define MF_YUV_IMPORTER_H_
7 #include "../io/seekable_frame_importer.h"
8 #include "../ndarray/ndarray_view.h"
17 using char_type = std::ifstream::char_type;
20 std::size_t file_size_;
21 std::size_t current_time_ = 0;
23 std::unique_ptr<char_type[]> frame_buffer_;
24 std::streamsize frame_size_;
29 std::size_t chroma_scale_y_;
30 std::size_t chroma_scale_x_;
time_unit total_duration() const override
Definition: yuv_importer.cc:72
time_unit current_time() const override
Definition: yuv_importer.cc:67
Seekable frame importer which reads YUV file.
Definition: yuv_importer.h:13
std::ptrdiff_t time_unit
Discrete time unit type.
Definition: common.h:52
Seekable frame importer, abstract base class.
Definition: seekable_frame_importer.h:16
void read_frame(const ndarray_view< 2, ycbcr_color > &) override
Definition: yuv_importer.cc:41
const ndsize< Dim > & frame_shape()
Definition: frame_importer.h:30
void seek(time_unit) override
Definition: yuv_importer.cc:77
Vector of n-dimensional coordinates.
Definition: ndcoord.h:18
yuv_importer(const std::string &filename, const ndsize< 2 > &frame_shape, int sampling)
Definition: yuv_importer.cc:6
bool reached_end() const override
Definition: yuv_importer.cc:62