Skip to content

Commit f04bbc1

Browse files
committed
Better comments, docs
1 parent e889c59 commit f04bbc1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/source/api_ref_transforms.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ For a tutorial, see: TODO_DECODER_TRANSFORMS_TUTORIAL.
1414
:template: dataclass.rst
1515

1616
DecoderTransform
17+
CenterCrop
1718
RandomCrop
1819
Resize

src/torchcodec/_core/Transform.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ CropTransform::CropTransform(const FrameDims& dims, int x, int y)
4646
}
4747

4848
std::string CropTransform::getFilterGraphCpu() const {
49+
// For the FFmpeg filter crop, if the x and y coordinates are left
50+
// unspecified, it defaults to a center crop.
4951
std::string coordinates = x_.has_value()
5052
? (":" + std::to_string(x_.value()) + ":" + std::to_string(y_.value()))
5153
: "";

test/test_transform_ops.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ def test_resize_fails(self):
154154
transforms=[torchcodec.transforms.Resize(size=(100, 100, 100))],
155155
)
156156

157-
<<<<<<< HEAD
158157
@pytest.mark.parametrize(
159158
"height_scaling_factor, width_scaling_factor",
160159
((0.5, 0.5), (0.25, 0.1), (1.0, 1.0), (0.15, 0.75)),
@@ -210,8 +209,6 @@ def test_center_crop_fails(self):
210209
transforms=[torchcodec.transforms.CenterCrop(size=(100,))],
211210
)
212211

213-
=======
214-
>>>>>>> 1b13e58cf75033a8e7bd3a8974cf126af603f226
215212
@pytest.mark.parametrize(
216213
"height_scaling_factor, width_scaling_factor",
217214
((0.5, 0.5), (0.25, 0.1), (1.0, 1.0), (0.15, 0.75)),

0 commit comments

Comments
 (0)