I am looking to try out some ideas to see how much they could improve on JPEG's compression efficiency. These ideas are modifications to the core algorithms of DCT and entropy coding.

What do you suggest is the best way to implement these ideas and compare them to the performance of existing standard implementations? Matlab, Octave, or C? I did look up the libjpeg implementation in C.

Basically I want to do a thorough statistical comparison between my ideas and the standard JPEG, in order to decide if it is worthwhile to pursue these ideas further. I am aware that this is indeed a crowded old research field with innumerable overlapping ideas since Shannon. And that it is a patent minefield.

Should I take any existing open source implementation of JPEG and then modify that code to add my own ideas? Or is it better to implement the code myself in Matlab or Octave? I have already been playing around in Octave code to statistically analyse test images w.r.t my ideas.