uber-research / jpeg2dct

Other
257 stars 44 forks source link

Support for JPEGs without chroma subsampling (non H2V2 / 4:2:0) #5

Closed msmsajjadi closed 5 years ago

msmsajjadi commented 5 years ago

When feeding a TensorFlow JPEG string into the decode function of jpeg2dct, the following warning is issued if chroma subsampling is disabled or whenever the optimize_size flag is set. The image is then re-encoded, as far as I can tell.

WARNING: Non-standard JPEG image encountered, transcoding to H2_V2 which may negatively impact performance. This is the only time this warning will be shown.

How feasible is it to make the library compatible with 4:4:4 encoded JPEG images?

gueguenster commented 5 years ago

It shall be feasible with extra flags being passed around. Then the speed observed in using the dnn straight from DCT might not achieve the performances advertised in the paper that strongly rely on the downsampling of chroma channels.

msmsajjadi commented 5 years ago

I see, thanks!

gengwb commented 3 years ago

It shall be feasible with extra flags being passed around. Then the speed observed in using the dnn straight from DCT might not achieve the performances advertised in the paper that strongly rely on the downsampling of chroma channels. @gueguenster hi, how to use extra flags being passed around? i want to get the dct_cr and dct_cb coffe shape same as dct_y, but the "loads" api always return different shape of dct_y,dct_cb,dct_cr to me with same img