Skip to content

Commit

Permalink
Rename Crop to CropPosition.
Browse files Browse the repository at this point in the history
This prevents name collisions with FFFR.
  • Loading branch information
Sibras committed Aug 28, 2019
1 parent 73612f1 commit 15d4dcf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions include/FFMultiCrop.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using EncoderOptions = Ffr::EncoderOptions;
using Resolution = Ffr::Resolution;
using Stream = Ffr::Stream;

struct Crop
struct CropPosition
{
uint32_t m_top; /**< The offset in pixels from top of frame */
uint32_t m_left; /**< The offset in pixels from left of frame */
Expand All @@ -55,11 +55,11 @@ class CropOptions
* @param frame The frame index of the value to get.
* @returns The crop, {UINT32_MAX, UINT32_MAX} if frame is invalid.
*/
FFMULTICROP_EXPORT Crop getCrop(uint64_t frame) const noexcept;
FFMULTICROP_EXPORT CropPosition getCrop(uint64_t frame) const noexcept;

std::vector<Crop> m_cropList; /**< List of crops for each frame in video */
Resolution m_resolution = {0, 0}; /**< The resolution of the output video (affects crop size) */
std::string m_fileName; /**< Filename of the output file */
std::vector<CropPosition> m_cropList; /**< List of crops for each frame in video */
Resolution m_resolution = {0, 0}; /**< The resolution of the output video (affects crop size) */
std::string m_fileName; /**< Filename of the output file */
std::vector<std::pair<uint64_t, uint64_t>> m_skipRegions; /**< A list of frame ranges to skip during encoding. The
list elements takes the form [startFrame, endFrame) */
};
Expand Down
2 changes: 1 addition & 1 deletion source/FFMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class MultiCrop
}
};

Crop CropOptions::getCrop(const uint64_t frame) const noexcept
CropPosition CropOptions::getCrop(const uint64_t frame) const noexcept
{
// Check if frame is in skip region
bool skip = false;
Expand Down
2 changes: 1 addition & 1 deletion test/FFMCTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class EncodeTest1 : public ::testing::TestWithParam<TestParamsEncode>
y += yMod * directionY;
}
j.m_cropList.emplace_back(
Crop({static_cast<uint32_t>(std::max(y, 0)), static_cast<uint32_t>(std::max(x, 0))}));
CropPosition({static_cast<uint32_t>(std::max(y, 0)), static_cast<uint32_t>(std::max(x, 0))}));
y += yMod * directionY;
x += xMod * directionX;
}
Expand Down

0 comments on commit 15d4dcf

Please sign in to comment.