I used several successive calls to generalconvolution to create an edge mask on the right side of bright areas next to dark areas and then shifted the mask over to match the right-edge halo of my laserdisc player. Then I used overlay with the mask and mode="multiply" to get rid of the halo. This isn't on every disc though so I guess it's combination of the laserdisc and the player which creates this sometimes. On ESB and TPM it's not very prominent like on SW for example.
source=avisource()
conv1=conv.converttorgb32().GeneralConvolution(0, "
1 0 -1
2 0 -2
1 0 -1 ", 8)
conv2=conv1.GeneralConvolution(0, "
0 0 0 0 0
0 0 0 0 0
1 0 0 0 0
0 0 0 0 0
0 0 0 0 0 ")
conv3=conv2.GeneralConvolution(0, "
0 0 0 0 0
0 0 0 0 0
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0 ")
overlaymask=overlay(source,conv3,mode="multiply",mask=conv3.converttorgb32().mask(conv3.converttorgb32()))
return(overlaymask)