Saturday, April 24, 2010

FFRell (FFRend in parallel) coming soon

There's been lots of progress on FFRell, the parallel-processing version of FFRend. I'm currently running FFRell at 1024 x 768 on a purpose-built i7 box (8 CPUs with Hyperthreading) and seeing frame rates from 30 to 60 Hz for quite complex patches. FFRend has been completely rebuilt around a multithreaded pipelined rendering engine. Each plugin runs in its own thread, and frames are routed via thread-safe zero-copy pointer queues.

I started by building a test system called ParaPET (Parallel Plugin Engine Test) which is an interesting project by itself; see the enclosed screen shot. Basically ParaPET is a tool for modeling the problem of optimal parallelism for arbitrary signal routes. The first case I had to deal with was feedback. If plugin A takes input from plugin B, and B also takes input from A, neither plugin can get started and the engine stalls. The solution is to prime one of the plugins, i.e. feed it blank frames until the feedback loop is closed and becomes self-sustaining. But first you need a general way of identifying such cases in all their permutations. ParaPET features a spider object which recursively crawls the plugins looking for feedback.

The other interesting case is when a plugin's output can arrive at a downstream mixer via multiple routes of different lengths. A simple example would be a source plugin that connects to both inputs of a mixer, one directly and the other via an effect. In such cases you'll get staggering, i.e. the plugins won't execute in parallel despite available CPUs. The solution is to add delay to the shorter route, so that the route lengths become equal again. Delay is added to a route by increasing the size of the corresponding frame queue.

This turned out to be a pretty hard problem to solve for all possible cases. Again the solution was recursion. The same crawl that detects feedback also gathers the necessary information for route balancing: for each plugin, 1) its maximum distance from the final output, and 2) for each sink mixer it's connected to, its distance from that mixer (distances are measured in hops, just as in network topology). With this information in hand, for each plugin, we can determine its longest route to a sink mixer, and compensate any shorter routes accordingly.

I came up with dozens of tough asymmetric test cases, including three- and four-input mixers, and the spider handles them all. It works so well I'm considering releasing ParaPET as a separate project. It's not tied to video processing so it would make a good general framework for pipelined parallel execution of interdependent tasks. If you're interested in playing with it let me know...



Once I got the engine working in ParaPET, I started building a new app (ParaFFEn) that used the same thread architecture but with FreeFrame plugins and actual video frames. The goal was to eventually port the engine into FFRend, but after hours of surgery the patient died: FFRend was just too single-thread oriented and couldn't adapt, so I gave up and started rebuilding FFRend from scratch, starting with ParaFFEn's engine.

After a long hard slog, FFRell can now read FFRend projects and run them in full-screen dual-monitor Exclusive mode. All of FFRend's GUI elements are included except the file browser and monitor bars. FFRell also includes the nifty dynamic graph view from ParaPET (courtesy of GraphViz), plus the scrolling execution history and queue views. What's not working includes recording, clipboard support, MIDI, and undo. Also FFRell can't create metaplugins, though it can load them. Plenty to keep me busy this summer. I hope to have a reasonably stable version by Q3.

34 comments:

嘉容嘉容 said...

Cool blog網愛聊天室色情網站交友找啦咧免費影片成人笑話成人圖庫sexy女同志聊天室愛戀情人用品情趣爽翻天咆哮小老鼠入口85cc6k脫衣人妻sexy85c脫光光taiwansex淫女情色成人男女做愛美女做愛脫衣秀a片正妹淫蕩色情後宮040185c85c77p2p77p2p性幻想手淫18禁

BurtonClary031 said...

I love readding, and thanks for your artical.........................................

欣穎啟佐 said...

sex女,ut,貼影,av,高潮,女優,做愛,手機成人影片,色遊戲,成人動漫,百分百貼圖區,85cc影片,成人影音,av色情影片,A片線上,a片,sex,777,三級線上看,美女的照片,視訊做愛,78論壇,打飛機,免費視訊,成人影院,辣妹視訊,視訊聊天,影片網,kiss911,a片,交友,聊天,做愛,免費影片,性交,線上成人,網路色情,聊天,美女自慰,免費a分享,免費短片,裸照,一夜情,女優,85cc成人片,美女寫真,偷拍a,情人視訊聊天室

AshantiHallenb54165 said...

cool blog,期待更新........................................

韋于倫成 said...

口交18禁貼圖寫真視訊援交露點爆乳潮吹裸體裸照裸女愛愛無碼尋夢視訊聊天a漫a片a圖一夜情一葉情人妻激情情色寫真美女自拍辣妹自拍正妹自拍美女走光辣妹走光正妹走光脫衣秀脫衣走光色情

Be224nWann1 said...

成人免費線上看 日本情色視訊 ut聊天網 免費線上色情片 yam交友 女優影片分享 露點 成人免費影片觀看 偷拍貼圖站 美女聊天室 愛情 歐美情趣圖片 女優18禁 台灣絲襪美少女 85cc免費小短片影城 免費a片直撥網 av情色影片 卡通色情影片區 一夜情 影音383 完美女人影片試看 美少女 性美女愛 辣妹強姦 人妻av下載 成人 成人視訊 空姐絲襪 a片a圖論壇 偷拍寫真 85cc 免費影片欣 微風成人區成人寫真 成人嘟嘟網免費看 www.7777th.com 杜雷斯免費貼圖區 援交妹貼圖區 嘟嘟情人色網 dudu 台南鋼管秀 pub 日本av線上 洪爺影片交流區 大大奶的 ab 女傭 sex888 okk 免費下載 巨乳人妻 敏感帶 後宮無碼光碟網 限制級 0204成人影片 無碼性愛影片 走光照

桂竹桂竹 said...

Knowledge is a treasure, but practice is the key to it.......................................................

皇雅婷豪 said...

Time and tide wait for no man. ............................................................

rl64@yahoo.com.hk said...

恨一個人,比原諒一個人,更傷力氣。............................................................

vickiekurt said...

成人 免費視訊影音觀賞 聊天網 免費h卡通 0401交友 台灣女優 性感裸體寫真 免費影片線上觀看 本土自拍偷拍露點照 免費豆豆聊天室 愛愛 情趣丁字褲 成人遊戲18禁 少女裸體圖片 嘟嘟影城85c 免費a圖a片 美眉情色網 麗的色情遊戲 一夜情短片 av383tv影片 完美女人聊天室 玩美女人影音視訊 性感熱辣美女寫真 裸睡的辣妹圖片 人妻自拍畫廊 超熟女性愛 視訊聊天 空姐免費a片 a圖網情色貼圖 寫真 85cc卡通影城 杜蕾斯成人 微風 嘟嘟 av女優777 情色貼圖片 台灣援交自拍影片 情人視訊聊天室 鋼管辣妹 免費av 洪爺性愛貼圖 大奶裸體辣妹 www.sex520.com 電話下載片 日本巨乳貼圖 性愛自拍圖貼 後宮電影院女優 限制級 0204 性愛影片觀看 內褲走光

佳皓 said...

要持續更新下去喲!!祝你心情愉快.............................................................

劉彥皓 said...

要持續更新下去喲!!祝你心情愉快.............................................................

許紀廷 said...

河水永遠是相同的,可是每一剎那又都是新的。......................................................................

江婷 said...

Pay somebody back in his own coin.................................................................

麗珠麗珠 said...

成熟,就是有能力適應生活中的模糊。.................................................................

許紀廷 said...

如果成為一支火柴,也要點亮一個短暫的宇宙;如果是一隻烏鴉,也要叫疼閉塞的耳膜。.................................................................

育隆 said...

Practice makes perfect.............................................................

JasonBirk佳琪 said...

當你真心渴望某一樣東西,整個宇宙都會聯合起來幫助你。..................................................

郁雯郁雯 said...

希望我的支持可以帶給你快樂--加油.............................................................

懿綺懿綺 said...

逛BLOG逛上癮了,一天不來會不習慣了耶!!............................................................

dawsonfelicia張君dawsonfelicia均 said...

好文,領受了!謝謝!............................................................

馥虹 said...

喜歡看大家的文章,每篇都是一個故事,都是一種心情~~祝大家開心愉快............................................................

魏江伶魏江伶 said...

加油來給你灌水 ............................................................

蔡靜芳蔡靜芳 said...

知識可以傳授,智慧卻不行。每個人必須成為他自己。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

魏江伶魏江伶 said...

耐心是一株很苦的植物,但果實卻很甜美。..................................................

lowe施cole鈺man駿 said...

文章不求沽名釣譽,率性就是真的..................................................................

靜錢怡 said...

果然是好文章 受益良多 感謝分享 ̄ 3 ̄......................................................

家唐銘 said...

一棵樹除非在春天開了花,否則難望在秋天結果。............................................................

謝佑芝 said...

IS VERY GOOD..............................

文王廷 said...

THX FOR SHARE!!!感激呀!............................................................

宇緯陳陳宇緯陳陳 said...

認識自己,是發現妳的真性格、掌握妳的命運、創照你前程的根源。......................................................

文瓊王王慧山 said...

I have nothing to offer but blood, toil, tears and sweat...................................................................

琬群學葉安高 said...

很耐斯的部落格,留言支持你繼續加油............................................................

怡禹玄禹玄君 said...

累了嗎?來杯咖啡休息一下吧!...............................................................