Minor doc fixes, disable copy, allow move on Video

This commit is contained in:
Stephen Seo 2021-12-02 13:22:11 +09:00
parent 290ed90f96
commit cd9c363a48
3 changed files with 16 additions and 0 deletions

View file

@ -103,6 +103,9 @@ class Image {
/*! /*!
* \brief Returns a grayscaled and dithered version of the current Image. * \brief Returns a grayscaled and dithered version of the current Image.
* *
* Using std::optional would be ideal here, but this program is aiming for
* compatibility up to C++11, and std::optional was made available in C++17.
*
* \return A std::unique_ptr holding an Image on success, empty otherwise. * \return A std::unique_ptr holding an Image on success, empty otherwise.
*/ */
std::unique_ptr<Image> ToGrayscaleDitheredWithBlueNoise(Image *blue_noise); std::unique_ptr<Image> ToGrayscaleDitheredWithBlueNoise(Image *blue_noise);
@ -114,6 +117,9 @@ class Image {
* channels. There may be mixed pixels as a result, such as yellow, cyan, * channels. There may be mixed pixels as a result, such as yellow, cyan,
* magenta, or white. * magenta, or white.
* *
* Using std::optional would be ideal here, but this program is aiming for
* compatibility up to C++11, and std::optional was made available in C++17.
*
* \return A std::unique_ptr holding an Image on success, empty otherwise. * \return A std::unique_ptr holding an Image on success, empty otherwise.
*/ */
std::unique_ptr<Image> ToColorDitheredWithBlueNoise(Image *blue_noise); std::unique_ptr<Image> ToColorDitheredWithBlueNoise(Image *blue_noise);

View file

@ -121,6 +121,8 @@ class OpenCLContext {
* \brief Assign a previously created buffer to a kernel function's * \brief Assign a previously created buffer to a kernel function's
* parameter. * parameter.
* *
* idx refers to the parameter index for the kernel function.
*
* \return true on success. * \return true on success.
*/ */
bool AssignKernelBuffer(const std::string &kernel_name, unsigned int idx, bool AssignKernelBuffer(const std::string &kernel_name, unsigned int idx,

View file

@ -25,6 +25,14 @@ class Video {
~Video(); ~Video();
// disable copy
Video(const Video &other) = delete;
Video &operator=(const Video &other) = delete;
// allow move
Video(Video &&other) = default;
Video &operator=(Video &&other) = default;
/// Same as DitherVideo(const std::string&, Image*, bool, bool) /// Same as DitherVideo(const std::string&, Image*, bool, bool)
bool DitherVideo(const char *output_filename, Image *blue_noise, bool DitherVideo(const char *output_filename, Image *blue_noise,
bool grayscale = false, bool overwrite = false); bool grayscale = false, bool overwrite = false);