[Ffmpeg-devel] [PATCH] CYUV encoder resurrected
Michael Niedermayer
michaelni
Sat Mar 3 01:13:37 CET 2007
Hi
On Thu, Mar 01, 2007 at 01:45:26AM +0100, Baptiste Coudurier wrote:
> Hi
>
> Here is old cyuv encoder resurrected from
>
> [Ffmpeg-devel] Trellis Quantization Applied To (A)DPCM
> http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-June/011688.html
>
> by Loren.
>
> I added some #ifdef DEBUG around printf code, renamed some macros. Can
> it be applied ?
[...]
> + u = nodes;
> + nodes = nodes_next;
> + nodes_next = u;
FFSWAP
[...]
> + for(i=0; i<16; i++){
> + int score = abs(d - table[i]);
FFABS
[...]
> +static int tables_tried = 0;
non constant static
[...]
> + {
> + static int fn = 0;
> + dprintf("fn %d tables_tried %d \n", fn, tables_tried);
> + fn++;
> + }
ugly
[...]
> + uint8_t y_buf[s->avctx->width];
> + uint8_t u_buf[s->avctx->width>>2];
> + uint8_t v_buf[s->avctx->width>>2];
> + pict->error[0] += quantize_row_trellis(avctx, y_ptr, y_buf, y_table, y_itable, s->avctx->width);
> + pict->error[1] += quantize_row_trellis(avctx, u_ptr, u_buf, u_table, u_itable, s->avctx->width>>2);
> + pict->error[2] += quantize_row_trellis(avctx, v_ptr, v_buf, v_table, v_itable, s->avctx->width>>2);
could be put into a loop maybe, the same applies to other similar YUV cases
of course only if the resulting code is simpler
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070303/9bae234e/attachment.pgp>
More information about the ffmpeg-devel
mailing list