Custom BBCode Help: Operate on Variables?

I’m heading up a game mod, and I’ve set up a forum for it. I want to be able to embed DivX videos in my posts, so I made a custom BBcode tag to do the job. It works great, but I would like the user to be able to define the size of the embedded video. While the width of the video can be entered directly, the height of the video in the code is always 20 pixels more than the actual height of the video to allow room for the playback controls. What I’m wondering is this: Is there any way I could take the height value entered by the user and automatically add 20 to its value in the HTML replacement field?

Ideally I want the format of the tag to be: [divx=width,height]video_url[/divx]. Currently it is just [divx]video_url[/divx] and the size is preset in the HTML to 640x500. (640x480 for the video.)

I’m using PHBB 3.