Jump to content
  • Advertisement

Jimkm

Member
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

107 Neutral

About Jimkm

  • Rank
    Member
  1. As far as i know GPU is opengl (many problems) or directX - as for DirectX i really do not want to start distribute DirectX with the software and handle all DirectX versions. GDI is simpler.
  2. Hi Krypt0n what cpu are you using for benchmarking? CPU is x9000 (2 cores 2.8 each)     some possible solutions: 1. scale to half and then upscale to the resolution you wanted, e.g. I think this will kill quality but i will try. 2. write a custom scaler for the solution you need. Already tried that. I tries even to use other pro lib - performance were slow. 3. maybe your source is in some YCbCr format or something? you could scale the source Source is 24 or 32 rgb (as i want) i scale and then convert to YUV 420 Maybe scaling the YUV 420 will be faster instead of scaling the rgb but i could not find any function that scale YUV 420 without first convert it to rgb 4. interlace scaling (scale just every 2nd line per frame -> double fps) Sorry but not sure i understand what you mean here ...  
  3. I already tried few pro image library - all gave me worst FPS than strachblt
  4. ankhd hi. I do not think so since i think this is the most FPS my CPU can give me with StretchBlt which is done on the cpu (i use gpu monitor and i see that it does not do that on gpu). But if you have more details why it is coming from my code then i would love to hear.
  5. Whats break the while(1) is the user that press the stop button in the gui to stop. It is while(user did not press the stop button) { capture screenshot and scale it (Streachblt) }
  6. Olof Hi I grab screenshot, scall it to the destination device resolution and trasmit it to that device. The device that the screens are sent to can not do the scalling. I already use the extra CPU to encode the images so it will not help to scall using the extra cpu. I am more looking for a way to decrease cpu time than to have more fps (if i will be able to decrease cpu time then the extra fps will come by themself).
  7. Hi Samith. I am not sure this will work since the scaling also does some smoting and i think that doing this in your way will make the borders of the 32*32 squares to be seen ... I can try that but i am not sure how to do that.
  8. Hi Bacterius Yes i know scaling is expensive. that is why using the scaling history might help. I just do not know how to do that. I.E to scale only the parts from the image that changed from the last scale - that way i scale one time and on next scales i only scale the parts that were changed - but not sure if that can be done and how.   P.S Just tried CxImgLib and got only 20 FPS still lower than  StretchBlt ...   P.S2 lowering to 16 bit did not help and in anyway it should run on all systems without making changes - that is why recording device is not a solution.
  9.   got no idea what this halftone is doing to be so slow but this linear scaling works ok       Well without halftone the image quality is not good. Text does not look good and somehting is unreadable. The halftone smoth the image by avraging pixels before it scall or something like that.  
  10. First i tried this: http://www.geisswerks.com/ryan/FAQS/resize.html Gave me around 10 FPS only. I then tried FreeImage lib (FreeImage_Rescale) got around 7 FPS. None came even close to StretchBlt preformace.   I think the answer should be 1) To find fastest rescal (with good quality) scaling funtion/ OR AND 2)to somehow use the scaling histroy. I.E to try to scal only the parts that changed from the last scale - but not sure how to do that ... Maybe with SRCINVERT (XOR) - somehow.
  11. Hi Fir. I tried to use custom scalling - some even with ASM byut could not get even near strechblt - with the custom scaling fucntion i got ~10 FPS .... And as say i do not want to use opengl/dx.   Am am using win7.
  12. I do not think that there is an option to catch when wm_paint is sent to the screen itself, i.e tocatch some event that is thrown when what you see on the computer screen is changed.
  13. Here's my problem. I need to copy and scale the screen, ~30 times a second (live screen drawing). I do this by first getting a handle to the screen DC: GetDC(NULL) Then, I create a compatible DC using CreateCompatibleDC, create a DIB using CreateDIBSection, and select the DIB into the new DC. Now I StretchBlt from the screen DC to my own DC  (blit and scale the image) . So we have while(1) { StretchBlt ... (get the screen and resize from 1440*900 to 1200*700) } As you probable know the scaling takes most of the CPU and time. If i do only while(1){bitblt()} i get ~400 fps - i.e 400 call of bitblt per second. if i use the while(1){StretchBlt} i get only ~25 fps - i.e 25 call of StretchBlt per second. (I need 30). also since i am doing other things as well, CPU will not be idle so this code need to be ran at least at 34 FPS. As said, the bottleneck is not the Blitting from the screen. the bottleneck  is the scaling (i use SetStretchBltMode(hCompatible, HALFTONE)). with COLORONCOLOR i get 60FPS but quality is not good (if there only something in the middle of HALFTONE to COLORONCOLOR  ...). For now i do not want to use directx or open GL. Any idea how to make it faster (i only need ~10 more FPS :)) I have an idea how to make it faster  but i do know how to do that and if it is possible. Idea is to: Bitblt to get the screen into buffer A. StretchBlt to scale the image into buffer B. Now on the next bitblt's to use SRCINVERT (XOR) to blt only the differences between the new capture and the old and to use the differences to update the scaled buffer B so no need to do more scaling. Again just an idea but i do not think it is possible. I would love to hear your suggestions. I tries to use bitblt with some custom scaling functions (instead of StretchBlt) i found on the Internet or with image libs like FreeImage but results were dramatically worst than StretchBlt  (even using BOX filtering) Again, i know that using DirectX/opengl may be faster but currently i do not have the time to learn that or deal with that - so currently i would like to use GDI/GDI+ only. Thanks!  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!