gl_FragCoord uses window-space non-normalized coordinates, so "x" will be in range of [0, width) and "y" in range of [0, height).
The only issue would come if you want to draw 1280x1024 quad on the screen not starting from (0, 0). In this case, when rendering full-screen quad, you can pass normalized source texture coordinates - just make sure that top/left is (0, 0) and bottom/right is (1, 1):
#version 330
uniform sampler2D textureScrambled;
in vec2 texCoord;
out vec4 outputColor;
void main()
{
ivec2 screenPos = ivec2(texCoord * textureSize(textureScrambled, 0));
// Local position in each sub-image.
ivec2 posInImage = ivec2(screenPos.x % 128, screenPos.y % 128);
// Position of each sub-image on the screen.
ivec2 imagePos = ivec2(screenPos.x / 128, screenPos.y / 128);
// Linear image index on the screen.
int imageIndex = imagePos.x + imagePos.y * 10;
// Linear position of the pixel on the screen.
int linearPos = imageIndex * 16384 + posInImage.y * 128 + posInImage.x;
// Source coordinates of scrambled image.
ivec2 srcPos = ivec2(linearPos % 1280, linearPos / 1280);
// Read source pixel and draw it at correct (current) location.
return texelFetch(textureScrambled, srcPos, 0);
}
Note that you can also store your texture as Texture1D and simply use "linearPos" from above code to fetch it. Similarly, as per ChrisR's answer, store the texture as Texture3D and use (posInImage, imageIndex) as source 3D coordinates.