Frame Convert Not Working >> Contractor Reviews >> Forum
Forum

Forum



SearchSearch   Users   Registration   Entrance
Today: 14.07.2025 - 13:59:02
Pages:  1  2  

Frame Convert Not Working

Advertising

/
MessageAuthor

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;

------------------------

russiamutha

user




Statistics:
Messages: 4,873
Registration: 10.06.2003
16.07.24 - 01:41:30
Message # 1
RE: Frame Convert Not Working

As I cant see the class definition, so I cant see if you have also done a GetVideoInfo to return VideoInfo to following filter. Code:

------------------------

Ac Schnitzer

user




Statistics:
Messages: 51
Registration: 05.29.2002
16.07.24 - 01:51:26
Message # 2
RE: Frame Convert Not Working

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

------------------------

Club E31

user




Statistics:
Messages: 96
Registration: 06.06.2001
16.07.24 - 02:01:54
Message # 3
RE: Frame Convert Not Working

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.

------------------------

RUddin3

user




Statistics:
Messages: 78
Registration: 03.27.2001
16.07.24 - 02:10:32
Message # 4
RE: Frame Convert Not Working

Where is shader.h

------------------------
carBONE e46 M3

shark328

user




Statistics:
Messages: 532
Registration: 06.15.2001
16.07.24 - 02:18:33
Message # 5
RE: Frame Convert Not Working

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.

dgm3

user




Statistics:
Messages: 110
Registration: 02.26.2001
16.07.24 - 02:23:11
Message # 6
RE: Frame Convert Not Working

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:

------------------------
Right you are Ken!

B R

user




Statistics:
Messages: 55
Registration: 12.09.2002
16.07.24 - 02:29:59
Message # 7
RE: Frame Convert Not Working

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.

------------------------

method

user




Statistics:
Messages: 6
Registration: 08.18.2002
16.07.24 - 02:39:27
Message # 8
RE: Frame Convert Not Working

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.

------------------------

C ///M

user




Statistics:
Messages: 369
Registration: 07.29.2003
16.07.24 - 02:47:04
Message # 9
RE: Frame Convert Not Working

OK it's working now :) at least the basic up-side-down version of it. Thanks guys!

------------------------

GrifM3

user




Statistics:
Messages: 540
Registration: 09.23.2001
16.07.24 - 02:53:52
Message # 10
RE: Frame Convert Not Working
Reaper only takes 50 unique FX : Previous topic
Pages:  1  2  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants