Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th July 2003, 10:48   #1  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
For a better crop

If frames are not properly aligned, i.e. the address of the first pixel of a row is not a multiple of 16, than various filters, especially those which use sse are up to 20% slower. Most filters don't change alignment, but crop does it and usually crop is applied quite early leading even to more slowdown. I suggest do add an option like "align=16", to crop. Then crop has to do a bitblt if one wants to crop by an amount, which is not a multiple of 16.
kassandro is offline   Reply With Quote
Old 14th July 2003, 19:58   #2  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Couldn't hurt. I'll try it out.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 15th July 2003, 21:24   #3  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
It will be in the next version. It's implemented as a bool for simplicity. It aligns if not 16 byte aligned on SSE2 capable machines and 8 byte aligned on other machines.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 16th July 2003, 21:47   #4  |  Link
ARDA
Registered User
 
Join Date: Nov 2001
Posts: 291
a little off topic
@sh0dan

I've been playing a little with chromas in YV12; doing a plugin that
uses SSE2.
I was testing with an interlaced source and I applied my
filter after SeparateFields and before weave;it was then I
discovered that the inicial address was not 16 byte aligned
after SeparateFields.
I had been doing a lot of tests and in almost all situations,I had no problems
to be able to use movdqa to read or write (except crop ).There must be others
cases in which this problem appears;it would be usefull if you could point them.
By now I opened a branch verifying...if ( int (srcpu) & 15 || int (srcpv) & 15){}
and in such case went back to ISSE routine.
(it is less expensive than making a lot of controls).

asking?...or asking

Is it possible to make something similar you've done with crop yesterday?

Thanks in advance
Arda
ARDA is offline   Reply With Quote
Old 16th July 2003, 21:58   #5  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
I can sum up the safe things:

* pitch will be at least up to the next mod 16 (luma), mod 8 (chroma)
* env->NewVideoFrame(vi) will return a 16 byte aligned frame (pointer).
* env->NewVideoFrame(vi,32) will return a 32 (luma), 16 (chroma) byte aligned frame (pointer).

You can always create a new frame and BitBlt your material into that one (as I do in crop). You do however loose speed on that account too.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 17th July 2003, 08:16   #6  |  Link
ARDA
Registered User
 
Join Date: Nov 2001
Posts: 291
@sh0dan

quote:
--------------------------------------------------------------------------------
Originally posted by ARDA
By now I opened a branch verifying...if ( int (srcpu) & 15 || int (srcpv) & 15){}
and in such case went back to ISSE routine.
(it is less expensive than making a lot of controls).
--------------------------------------------------------------------------------

quote:
--------------------------------------------------------------------------------
Originally posted by ARDA
Is it possible to make something similar you've done with crop yesterday?
--------------------------------------------------------------------------------

quote:
--------------------------------------------------------------------------------
Originally posted by sh0dan
You can always create a new frame and BitBlt your material into that one (as I do in crop).
You do however loose speed on that account too.
--------------------------------------------------------------------------------

Sorry, in my own post was the answer.I was waiting a miracle.

Thanks
Arda
ARDA is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.