Add CAFFE2_API to video processing functions (#14900)
authorOrion Reblitz-Richardson <orionr@gmail.com>
Sat, 8 Dec 2018 03:48:38 +0000 (19:48 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 8 Dec 2018 03:55:21 +0000 (19:55 -0800)
Summary:
Extracted from https://github.com/pytorch/pytorch/pull/13733

Some tests were failing because these methods didn't have an export.

cc pjh5 yf225
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14900

Reviewed By: pjh5

Differential Revision: D13381130

Pulled By: orionr

fbshipit-source-id: 030536f8fb09765c09a7b0bd45400161053f2e18

caffe2/video/video_io.h

index f1260d2..4999e6b 100644 (file)
@@ -12,7 +12,7 @@
 
 namespace caffe2 {
 
-void ClipTransformRGB(
+CAFFE2_API void ClipTransformRGB(
     const unsigned char* buffer_rgb,
     const int multi_crop_count,
     const int crop_height,
@@ -40,7 +40,7 @@ void ClipTransformRGB(
     std::mt19937* randgen,
     float* transformed_clip);
 
-void ClipTransformOpticalFlow(
+CAFFE2_API void ClipTransformOpticalFlow(
     const unsigned char* buffer_rgb,
     const int crop_height,
     const int crop_width,
@@ -60,9 +60,10 @@ void ClipTransformOpticalFlow(
     const std::vector<float>& inv_std_of,
     float* transformed_clip);
 
-void FreeDecodedData(std::vector<std::unique_ptr<DecodedFrame>>& sampledFrames);
+CAFFE2_API void FreeDecodedData(
+    std::vector<std::unique_ptr<DecodedFrame>>& sampledFrames);
 
-bool DecodeMultipleClipsFromVideo(
+CAFFE2_API bool DecodeMultipleClipsFromVideo(
     const char* video_buffer,
     const std::string& video_filename,
     const int encoded_size,