An MDL framework for sparse coding and dictionary learning