[XviD-devel] Has this bug been fixed yet?
Edouard Gomez
ed.gomez at free.fr
Sat Aug 16 02:30:34 CEST 2003
Edouard Gomez (ed.gomez at free.fr) wrote:
> In an IFrame, if we want only Luminance information we should
> initialize the DC value to 128 (U/V_OFFSET for the zero value) not 0 ?
Experimenting that 128 value showed that 0 was fine :)
> In a PFrame like it's predicted frame, we should just say the block
> ignored. Btw we set the DC value is actually set to 0, which is
> probably safe.
The problem was in the PFrame INTRA blocks coding, greyscale handling
was simply missing. Patches attached
> In bframes, there is not even greyscale handling ?!
That question is still waiting for a clear answer... any volunteer ?
--
Edouard Gomez-------------- next part --------------
--- orig/src/encoder.c
+++ mod/src/encoder.c
@@ -1568,6 +1568,11 @@
current->sStat.kblks++;
+ if (pEnc->current->vop_flags & XVID_VOP_GREYSCALE)
+ { pMB->cbp &= 0x3C; /* keep only bits 5-2 */
+ qcoeff[4*64+0]=0; /* zero, because for INTRA MBs DC value is saved */
+ qcoeff[5*64+0]=0;
+ }
MBCoding(current, pMB, qcoeff, bs, ¤t->sStat);
stop_coding_timer();
continue;
-------------- next part --------------
--- orig/src/encoder.c
+++ mod/src/encoder.c
@@ -1817,6 +1817,11 @@
pEnc->current->sStat.kblks++;
+ if (pEnc->current->global_flags & XVID_GREYSCALE)
+ { pMB->cbp &= 0x3C; /* keep only bits 5-2 */
+ qcoeff[4*64+0]=0; /* zero, because for INTRA MBs DC value is saved */
+ qcoeff[5*64+0]=0;
+ }
MBCoding(pEnc->current, pMB, qcoeff, bs, &pEnc->current->sStat);
stop_coding_timer();
continue;
More information about the XviD-devel
mailing list