# HG changeset patch # User michaelni # Date 1057414687 0 # Node ID daf951f326973dc6c122a95f266fcef1e5a829f2 # Parent 447b88b784eecc7c474953477ac8c81d5cb0f5cc merge U and V statistics, 33% reduction in memory requirement, compression rate better for some files worse for others, worst compression rate loss 0.05% diff -r 447b88b784ee -r daf951f32697 ffv1.c --- a/ffv1.c Sat Jul 05 08:31:08 2003 +0000 +++ b/ffv1.c Sat Jul 05 14:18:07 2003 +0000 @@ -487,7 +487,7 @@ s->version=0; s->ac= avctx->coder_type; - s->plane_count=3; + s->plane_count=2; for(i=0; i<256; i++){ s->quant_table[0][i]= quant11[i]; s->quant_table[1][i]= 11*quant11[i]; @@ -606,7 +606,7 @@ encode_plane(f, p->data[0], width, height, p->linesize[0], 0); encode_plane(f, p->data[1], chroma_width, chroma_height, p->linesize[1], 1); - encode_plane(f, p->data[2], chroma_width, chroma_height, p->linesize[2], 2); + encode_plane(f, p->data[2], chroma_width, chroma_height, p->linesize[2], 1); } emms_c(); @@ -751,7 +751,7 @@ f->chroma_h_shift= get_symbol(c, state, 0, 7); f->chroma_v_shift= get_symbol(c, state, 0, 7); get_cabac(c, state); //transparency plane - f->plane_count= 3; + f->plane_count= 2; switch(16*f->chroma_h_shift + f->chroma_v_shift){ case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P; break; @@ -870,7 +870,7 @@ decode_plane(f, p->data[0], width, height, p->linesize[0], 0); decode_plane(f, p->data[1], chroma_width, chroma_height, p->linesize[1], 1); - decode_plane(f, p->data[2], chroma_width, chroma_height, p->linesize[2], 2); + decode_plane(f, p->data[2], chroma_width, chroma_height, p->linesize[2], 1); } emms_c();