check your bg reg point.
yours looks like it's -20,-20 and it should be 0,0
The registration mark (crosshairs) is on the top left of the movie clip. When I place it on the stage by itself it will fit/place prefectly
(the stage and "bg" are the 500 x 250). I've commented out the displacement _map when its commented out it places fine, when it active I get the white edges.
Experimented a little and found the the scale(s) (x_mult and y_mult) are causing the effect/problem at zero bg looks fine (placement) fine (but no Effect from using displace). As I change the vaules the white edges get bigger and smaller.
I thought these were to amplifiy/scale the effect of the map not the map itself?
oh, your displacement filter is bg sized and its background is shifting the destination bitmap pixels
make it transparent and assign the bmp's bg to transparent:
bmp = new flash.display.BitmapData(bg._width,bg._height,true,0xff000000);