digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   SansGrip Filters: More Info on Legal Clip (http://www.digitalfaq.com/archives/avisynth/1665-sansgrip-filters-more.html)

LadyMiles 11-22-2002 03:33 AM

More Info on Legal Clip
 
What "problems" do the pixels cause to the television that are out of the color range ?

SansGrip 11-22-2002 09:23 AM

Re: More Info on Legal Clip
 
Quote:

Originally Posted by LadyMiles
What "problems" do the pixels cause to the television that are out of the color range ?

That's just the way I've read about it: "problems", never anything more explicit. I don't imagine it does anything destructive, perhaps just messes up colour representation or something.

The more important benefit of using LegalClip, though, is that by clipping out-of-range colours in your Avisynth script you're not forcing the encoder to spend bits describing pixels that may not even appear on the TV set.

LadyMiles 11-22-2002 01:52 PM

Thanks SansGrip.
I was just wondering if it helped with blocky dark colors or bad gradients. So the tv scale in dvd2avi doesn't do well in making sure colors are legal

SansGrip 11-22-2002 04:47 PM

Quote:

Originally Posted by LadyMiles
I was just wondering if it helped with blocky dark colors or bad gradients.

Probably not.

Quote:

Originally Posted by LadyMiles
So the tv scale in dvd2avi doesn't do well in making sure colors are legal

Actually if you use mpeg2dec, that DVD2AVI setting is ignored. It's only relevant if you use DVD2AVI's built-in YV12->RGB conversion.

SansGrip 11-23-2002 02:39 PM

New version 0.2
 
Here's a new version of LegalClip (and the source code).

The only difference is I rewrote the main loop in assembler and added SSE-optimized code for CPUs that support it (Intel Pentium III and better, AMD Athlon and better).

In other words, it's much much faster :).

Note that the SSE code will only be used if the width of the clip is a multiple of four.

kwag 11-23-2002 03:20 PM

Ahh!, I guess the automatic mirroring is working :D
I just checked www.kvcd.net/sansgrip/avisynth and your new "Legal" filter showed up. BTW: You bought a book on "Assembly Language Programming" a couple of days ago, because you mentioned that you had to learn assembly language. Two days later you crank out a new filter with 8O assembly code 8O
Let me know what they fed you, so I can change my diet, and see if my brain can asimilate at least 10% of your speed learning :lol: I need that bad 8)
Great work SansGrip :wink:

-kwag

SansGrip 11-23-2002 05:53 PM

Quote:

Originally Posted by kwag
Ahh!, I guess the automatic mirroring is working :D

Cool -- I need to start including both addresses in the docs.

Quote:

Originally Posted by kwag
BTW: You bought a book on "Assembly Language Programming" a couple of days ago, because you mentioned that you had to learn assembly language. Two days later you crank out a new filter with 8O assembly code 8O

Well it's not quite as impressive as it sounds. I did sort of learn assembler for the Motorola 680x0 chips about ten years ago, and while the Intel architecture is quite different it's conceptually the same.

Also, LegalClip is very, very, very simple. The C code inner loop is basically

Code:

if(luma_pixel < 16)
  luma_pixel = 16;
else if(luma_pixel > 235)
  luma_pixel = 235;
if(chroma_pixel < 16)
  chroma_pixel = 16;
else if(chroma_pixel > 240)
  chroma_pixel = 240;

That's about the easiest thing to convert into assembler I can think of, which is why I started with this filter :D.

Quote:

Originally Posted by kwag
Let me know what they fed you, so I can change my diet

:lol: Maybe all that genetically modified food isn't such a bad thing... ;)

vico1 11-24-2002 07:21 AM

@SansGrip or Kwag,
where would be a good place to put Legal Clip in the script...in relation
to the placement of the other plugins? (Fluxsmooth,Blockbuster)

I found those two plugins do a great job on the movie "The Matrix"
that I`m working with now.
I`ve decided to drop NoMoSmooth when working with these plugins, as it
seemed to darken the scenes a little too much, in an already dark movie.

SansGrip, these plugins are great!.. :)





***************************************
They can put a man on the moon,
but they still can`t put a tin pan in a microwave.......UNKNOWN

urban tec 11-24-2002 08:40 AM

Hi vico1
check this link, there is a copy of the script Kwag is using, you willsee that Legal clip is used in two places.
http://www.kvcd.net/forum/viewtopic....1604&start=105

vico1 11-24-2002 01:07 PM

Thanks tec,
I kinda` thought I`d seen it answered before....forgot where.
(mental note).....use the search.. :idea:





***************************************
They can put a man on the moon,
but they still can`t put a tin pan in a microwave.......UNKNOWN


All times are GMT -5. The time now is 03:15 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.