After closing everything and re-opening it back later, now it calls ConvertToShader and then ConvertFromShader properly. However, in the 2nd method, vi.Width is still 352 instead of 352*4 Why isn't the output of the first filter being passed to the second filter? In the 2nd filter's GetFrame method, if I simply return src, it crashes (because float-precision RGB isn't a valid format to display). If I write this, however, it doesn't crash. But the frame dimension isn't what it should be. PVideoFrame src = child->GetFrame(n, env); PVideoFrame dst = env->NewVideoFrame(viYV); return dst;
You can see all the files in the project on GitHub. This is defined in avisynth.h GenericVideoFilter(PClip _child) : child(_child) { vi = child->GetVideoInfo(); } Shouldn't vi already contain the incoming clip without me having to request it? Edit: Oh! I see what you're saying, it's querying a different method to get the information about the frame being returned Adding that line to the declaration works :) Now "something" displays wide
This script will allow testing the image quality for conversion distortion. Right now it's not working at all because the source and destination frames aren't in sync. StainlessS, could you take a look at my code and see what's wrong with it? TestQuality() function TestQuality(clip input) { original = input input = ConvertToShader(input) input = input.ConvertFromShader() return mt_makediff(input, original, chroma="process") } As a side note, once the conversion back and forth is working, the rest should be simple. Creating and running the DX9 texture shader. Copying the data back and forth will be very simple. Perhaps configuring the shaders will be the only thing that would require work.
You don't need Shader.h. I just added the Shader file with most of the code required to use DirectX HLSL shaders. It copies the data back and forth, creates the DX instance and texture. All that's left is creating the shader object, which will require first pre-compiling the HLSL code. Then, passing the data it needs. Not much left to do.
------------------------ 1998 M3 Sedan - Eurosport Pulleys, TC Kline Sport Suspension. Prior M3 - 1996 M3 - OBDI 3.2L, 30 lb Injectors, ECIS Intake, CSS Custom Chip, TMS Group N Suspension, MASR Sway Bars, TC Kline Roll Bar, Recaro SPG's, and more.
Doom9 went down in middle of EDIT Use Avisynth v2.6 VERSION 6 header not OLD version 5 (will have problems in older versions of v2.5, Pre Alpha 4) Dont think you will need internal.h, not sure. VS 2008 dont like below Changed in class definition Code:
The project is easier to compile by excluding Shader.h and Shader.cpp as those require the DirectX SDK Framework. I'll look at what you wrote here tomorrow.
One way to test one conversion at a time is to change it to convert to regular RGB for now so that the output can be viewed right away. It does look like there is still quite a bit of work to get the conversion to work properly and implementing the proper chroma upscaling/downscaling methods. Even if we ignore interlaced videos for now. StainlessS, would you have time to look into this conversion while I'll work on the DirectX/Shader part? The conversion could be done in a couple of ways - Standard RGB to preview output - Float RGB - Half-float RGB - Passing YUL values instead of RGB values to let a shader to the conversion. Btw, GitHub is really cool for working on projects like this. You can download the updates, make your changes, and submit your changes. It takes a bit of time to learn but once it's running it works well. It's hard to use without a proper interface, but TurtoiseGit() makes it easy. How to support the various convert formats will be easy: the confFloat function can have a param (precision), when 1 it stores as byte, when 2 as half-float, when 4 as float.