I work on an open source project called GemRB (http://www.gemrb.org/)
we have code to display various formats of video using both SDL 1.2 and 2.0. check out SDL12Video.cpp; it has code for displaying YUV frames as well as RV16 and even RV8.
I cant be more specific about my help unless you specify more about the video format you want to work with. (AVI is a container and doesn’t tell me the much)
that project also has a VLC plugin for displaying anything VLC can play, but of course that will require libVLC2 and is slow when needing to convert formats so something supported by the SDL12Video decoder.