1st frame + SDL_RENDERER_SOFTWARE + SDL_FLIP_HORIZONTAL + Ubuntu = wrong display. Is it a bug of SDL_RenderCopyEx?

I need to display the first frame in a sprite sheet using SDL_RenderCopyEx with renderer generated using SDL_RENDERER_SOFTWARE flag, flip horizontally (SDL_FLIP_HORIZONTAL) and on Ubuntu 16.04 having SDL2.0 installed. It seems that all these factors combine to cause a bug:


while the frame should be displayed correctly as:


Changing any one of these factors would fix the problem, say:
first frame -> other frame or sourceRect.x = 1
flip horizontally -> no flip
Ubuntu 16.04 -> Windows 10.

But unfortunately, I have to run the program on the above settings. For now, I have to add 1 to sourceRect.x in the calculation as a workaround, but this makes the ship shivering. How can I display the frame correctly under the above constraints? Is this a bug of SDL_RenderCopyEx, or did I make any mistake in calling this API? Following are the related SDL code snippet that causes the problem. The sprite sheet file is also uploaded for your testing. Thank you.

PS: the size of frame is 64x29.

g_pRenderer = SDL_CreateRenderer(g_pWindow, -1, SDL_RENDERER_SOFTWARE/*0*/);
SDL_Surface *surface = IMG_Load("Ship.png");
texture = SDL_CreateTextureFromSurface(g_pRenderer, surface);
SDL_Rect rectSource{ 0/*1*/,0,64,29 }, rectDst{ 100,100,64,29 };
SDL_RenderCopyEx(g_pRenderer, texture,
	&rectSource, &rectDst,


Did you try with latest SDL2 sources ? from https://hg.libsdl.org/SDL

Did you repeat the same problem on your side?