mpegvideo_enc: fix gray flag with 444 jpeg

Fixes Ticket2155

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec: mbd has a range of 0..2

Fixes Ticket2219

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>