This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

HDR encoding
#71
(16.09.2017, 14:38)mparade Wrote: Just to inform you using Staxrip and DGDecNV with HDR10 input: I have completed my first HDR encode using DGDecNV, but unfortunately I saw some artifacts during decoding the output:

http://www.mammutmail.com/hu/download/bd...54b6fea0dd

I don't know yet if it is only a decoding problem now or if it is involved in the encode itself already due to some "problem" with decoding the original HDR content through DGDecNV.

Edit: It seems these artifacts are encoded into the output (the source material can be decoded without them).

The artifacts were due to a CUVID bug. This is fixed in the latest nVidia driver 387.92.

Today I plan to do some debugging to try to see why Vapoursynth is having a problem with DGSource(fulldepth=True)
Reply
#72
I've found out why Vapoursynth doesn't like CS_YUV420P16 returned by DGSource(fulldepth=True). Following is the code in avisynth_compat.cpp. It's pretty obvious that Vapoursynth simply does not accept CS_YUV420P16 from Avisynth+. It should be easy to add support. Maybe someone can ask Myrsloik about this. Based on my experience he won't want to hear anything from me, although really I have no grudge against Vapoursynth.

Interestingly, the vs_normalizeRational() call is a bit surprising, considering how not so long ago Myrsloik refused to do that and insisted all filters must do it themselves.

static void VS_CC avisynthFilterInit(VSMap *in, VSMap *out, void **instanceData, VSNode *node, VSCore *core, const VSAPI *vsapi) {
    WrappedClip *clip = (WrappedClip *) * instanceData;

    if (!clip->preFetchClips.empty())
        clip->fakeEnv->uglyNode = clip->preFetchClips.front();

    const VideoInfo &viAvs = clip->clip->GetVideoInfo();
    ::VSVideoInfo vi;
    vi.height = viAvs.height;
    vi.width = viAvs.width;
    vi.numFrames = viAvs.num_frames;
    vi.fpsNum = viAvs.fps_numerator;
    vi.fpsDen = viAvs.fps_denominator;
    vs_normalizeRational(&vi.fpsNum, &vi.fpsDen);

    if (viAvs.IsYV12())
        vi.format = vsapi->getFormatPreset(pfYUV420P8, core);
    else if (viAvs.IsYV24())
        vi.format = vsapi->getFormatPreset(pfYUV444P8, core);
    else if (viAvs.IsYV16())
        vi.format = vsapi->getFormatPreset(pfYUV422P8, core);
    else if (viAvs.IsYV411())
        vi.format = vsapi->getFormatPreset(pfYUV411P8, core);
    else if (viAvs.IsColorSpace(VideoInfo::CS_YUV9))
        vi.format = vsapi->getFormatPreset(pfYUV410P8, core);
    else if (viAvs.IsY8())
        vi.format = vsapi->getFormatPreset(pfGray8, core);
    else if (viAvs.IsYUY2())
        vi.format = vsapi->getFormatPreset(pfCompatYUY2, core);
    else if (viAvs.IsRGB32())
        vi.format = vsapi->getFormatPreset(pfCompatBGR32, core);
    else
        vsapi->setError(out, "Avisynth Compat: Only YV12, YUY2 and RGB32 supported");

    vi.flags = 0;
    vsapi->setVideoInfo(&vi, 1, node);
}

It seems we just have to add two lines to the if-else:

else if (viAvs.IsColorSpace(VideoInfo::CS_YUV420P16))
   vi.format = vsapi->getFormatPreset(pfYUV420P16, core);
Reply
#73
Yup, contacting Myrsloik is your best Bet.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)