For playing back on TV via USB stick, H.264 as MP4 or MKV should work.
I would suggest you try out a test render of a
test chart image with all the luma values to see
how the codec renders and how it will playback on the TV.
I've tested 8bit source material with luma values 0-255 rendered on
different mp4 codecs and Xvid in Sony Vegas.
The Mainconcept AVC codec clipped the values: 0-16 became 16, 235-255 was 235.
Sony AVC was full - keeping 0-255.
Say your codec renders full values, playing that test file back on the TV can
show you how the TV deals with the values - maybe it's player makes
everything below 16 black, and from 235 white.
A safe bet would be to apply a final master levels effect to make your black be 16 and whitest white 235.
Render in any H.264 codec (AVC, MP4).
The worst thing could happen is your footage can look
more contrasty with some crushed blacks and whites.
Test chart files HERE