Hi There,
We’re finishing up our OpenCL Version of an FxPlug Version.
In the last phases of testing we’re experiencing a few anomalies.
Repro Case
1) Launch Motion and Create a Final Cut Effect Project
2) Choose the 4k Digital Cinema Preset and set FPS to 60
3) When Project opens - set Resolution to Full and Quality to Best in the Render Drop Down. Uncheck Dynamic Quality
4) Drag and Drop a 4096 x 2160 Still Image (JPEG for Instance) into the Effect Source
5) Hit Play
On our End, we get 58/59 FPS
6) Inserting our Shared Context GLCL Plug we get capped at 30FPS. Which is mixed off from what the algorithm is capable of. Hence our testing and this letter.
7) Insert Your Own (Apple) Filter, Brightness from the Color Correction Category and hit play.
On our end, FPS are punished by a few and settles in @ about 56 FPS which is OK.
Now
8) Create a new FxPlug Plug-IN by using the Xcode Template and remove ALL code from this following Method
- (BOOL)renderOutput:(FxImage *)output withInput:(FxImage *)inputImage withInfo:(FxRenderInfo)renderInfo;
Make sure you set canRenderSoftware to NO and hardware to YES.
Then build and move product to FxPlug
9) Reboot Motion and load up the Project you created in Step 2 and instantiate the new plug.
You will get a black screen of course. Hit play nevertheless and watch it being capped at the Magic 30FPS.
There is no code interfering with process and thus should NOT be punished by 30FPS. A few perhaps but nothing like 30.
10) During Playback - uncheck the Plug-in and watch the FPS march right back up to 58/59 FPS.
Are you deliberately capping performance on the FxPlug FrameWork ? Or is the renderFunction uploading the FxImage from Host Memory to Device Memory every time in that function. This would explain the slowness. In our native app we too are leveraging a shared GL Context and getting thus circumventing Host Memory using shared GPU memory and easily getting 60FPS on 8k+
It would be greatly appreciated if you could shed some light on this as I cannot understand why FxPlug is not capable of going beyond the 30FPS is Apple’s own filters are.
Thanks a Bunch in Advance
— Dieter Becker
PS - In general I would think that it might be in your best interest if you provided a little more information about the FxPlug architecture, especially pertaining to high performance. Its there to have but hidden away so deep that it is very expensive to dig out. Most of your 3rd Pty. Plug-Vendors are kneeing down when it comes to real-time rendering in Final Cut X and Motion. While Premiere Pro on the Mac isn’t even breaking a sweat ;-).