[FFmpeg-devel] [PATCH] RV40 Loop Filter
Diego Biurrun
diego
Tue Oct 21 08:31:25 CEST 2008
On Tue, Oct 21, 2008 at 09:23:21AM +0300, Kostya wrote:
> I've tested it and looks like filter is invoked properly now,
> filtering workflow should be also correct, but there is some
> non-bitexactness elsewhere, so result picture is still a bit
> wrong.
> --- libavcodec/rv40.c (revision 15305)
> +++ libavcodec/rv40.c (working copy)
> @@ -247,7 +247,472 @@
>
> +static inline void rv40_weak_loop_filter(uint8_t *src, const int step,
> + const int flag0, const int flag1, const int mult,
> + const int lim0, const int lim1, const int lim2, const int thr0,
> + const int S0, const int S1, const int S2, const int S3)
> +{
weird indentation
> + if(!t) return;
I think statements on the same line as if conditions are unreadable.
> + if(u > 3 - (flag0 && flag1)) return;
ditto
> +/**
> + * This macro is used for calculating 25*x0+26*x1+26*x2+26*x3+25*x4
> + * or 25*x0+26*x1+51*x2+26*x3
> + * @param sub - index of the value with coefficient = 25
> + * @param last - index of the value with coefficient 25 or 51
> + */
> +#define RV40_STRONG_FILTER(src, step, start, last, sub) \
> + 26*(src[start*step] + src[(start+1)*step] + src[(start+2)*step] + src[(start+3)*step] + src[last*step]) - src[last*step] - src[sub*step]
> +/**
> + * Deblocking filter, the alternated version from JVT-A003r1 H.26L draft.
Do you mean the "alternated" version or the "alternative" version?
> +static inline void rv40_adaptive_loop_filter(uint8_t *src, const int step, const int stride, const int dmode, const int lim0, const int lim1, const int mult, const int thr0, const int thr1, const int chroma, const int edge)
That's an awfully long line, many more below.
Diego
More information about the ffmpeg-devel
mailing list