PDA

View Full Version : Patch: Postprocessing UVpitch != Ypitch/2


IanB
28th October 2009, 12:04
Don,

Here is a patch to fix the PostProcessing code ready for 2.6 Avisynth.

See post 1337438 for a bug report.

Also do you have a 155 source available?

diff dgdecode154src/PostProcess.h dgdecode154Asrc/PostProcess.h
57,58c57,58
< void postprocess(unsigned char * src[], int src_stride,
< unsigned char * dst[], int dst_stride,
---
> void postprocess(unsigned char * src[], int src_stride, int UVsrc_stride,
> unsigned char * dst[], int dst_stride, int UVdst_stride,

diff dgdecode154src/PostProcess.cpp dgdecode154Asrc/PostProcess.cpp
34,35c34,35
< void postprocess(unsigned char * src[], int src_stride,
< unsigned char * dst[], int dst_stride,
---
> void postprocess(unsigned char * src[], int src_stride, int UVsrc_stride,
> unsigned char * dst[], int dst_stride, int UVdst_stride,
131,132c131,132
< src_stride >>= 1;
< dst_stride >>= 1;
---
> src_stride = UVsrc_stride;
> dst_stride = UVdst_stride;

diff dgdecode154src/AVISynthAPI.cpp dgdecode154Asrc/AVISynthAPI.cpp
1371c1371,1373
< postprocess(src, cf->GetPitch(), dst, dstf->GetPitch(), vi.width, vi.height, QP, vi.width/16,
---
> postprocess(src, cf->GetPitch(PLANAR_Y), cf->GetPitch(PLANAR_U),
> dst, dstf->GetPitch(PLANAR_Y), dstf->GetPitch(PLANAR_U),
> vi.width, vi.height, QP, vi.width/16,
1382,1383c1384,1387
< postprocess(dst, out->ypitch, dst, out->ypitch, vi.width, vi.height, QP, vi.width/16, PP_MODE,
< moderate_h, moderate_v, true, iPP);
---
> postprocess(dst, out->ypitch, out->uvpitch,
> dst, out->ypitch, out->uvpitch,
> vi.width, vi.height, QP, vi.width/16, PP_MODE,
> moderate_h, moderate_v, true, iPP);

diff dgdecode154src/store.cpp dgdecode154Asrc/store.cpp
152c152,153
< postprocess(src, this->Coded_Picture_Width, ppptr, dst->ypitch, this->Coded_Picture_Width,
---
> postprocess(src, this->Coded_Picture_Width, this->Chroma_Width,
> ppptr, dst->ypitch, dst->uvpitch, this->Coded_Picture_Width,

Wilbert
6th November 2009, 21:28
Neuron2, is this fixed in 1.5.6?

neuron2
26th November 2009, 23:25
Gosh, I just noticed this thread after IanB PM'ed me about it. I'll make a 1.5.7 ASAP.