def decode_jpeg(encoded, tables=b'', photometric=None, ycbcr_subsampling=
    None, ycbcr_positioning=None):
    """Decode JPEG encoded byte string (using _czifile extension module)."""
    from czifile import _czifile
    image = _czifile.decode_jpeg(encoded, tables)
    if photometric == 'rgb' and ycbcr_subsampling and ycbcr_positioning:
        pass
    return image.tostring()
