[XviD-devel] on-the-fly encoding (AIR)

Helder Aranha xvid-devel@xvid.org
Fri, 20 Dec 2002 19:09:37 -0000


 my work is precisely on realtime/dynamic encoding, or *adaptive* encoding
to be precise. being able to dynamically change the nr of IntraBlocks per
frame is really AIR (Aptive Intra Refresh), a technique for error
resilience. I want to show how effective AIR can be in improving visual
quality of video encoded streams transmitted over error-prone (ie. radio)
channels.

I'm sure the encoder does a good (i.e. efficient) job at deciding the MB
type. Forcing AIR-coded MB's is about giving up a bit of that efficiency in
encoding, plus spreading a little redundacy over the video stream, so that
the overall result to the viewer is better. I reckon AIR would be a good
feature for Xvid and all the people who use it for realtime
encoding/streaming.

in fact, some really neat error resilient 'thingies' for Xvid to have
(thinking about future realeses now) would be:

encoder: Data partitioning, byte aligment and resynchronization;
decoder: Reversible Varialbe Length Coding;

maybe some of these features are already implemented (I'm new to Xvis as I
said), but I add some quotations below to explain them better. they're
effective in both realtime and non-realtime scenarios, and they can do a lot
for mpeg-4 streaming:
1) Resynchronization: Resynchronization marker can reduce the error
propagation caused by the nature of VLC (Variable Length Code) into
singleframe. In MPEG-4, the resynchronization marker is inserted at the top
of a new GOB with the header information (MB number,quantization parameters)
and optional HEC, so that decoding can be done independently. It is a good
idea to place the resynchronization marker prior to important objects like
people to improve error resilience with minimum increase of overhead.

(2) Byte alignment: Bit-stuffing for the byte alignment gives additional
error detection capability through its violation check.

(3) Data partitioning:New synchronization code named Motion Marker separates
the MV and DCT field to prevent from inter-field error propagation. The
effective error concealment can be performed. When errors are detected
solely in the DCT field, that MB will be reconstructed using correct MV.
This result in natural motion better than simple MB replacement of the
previous frame.

(4) Reversible Variable Length Code (RVLC): The RVLC is designed to enable
forward and backward decoding without significant impact on coding
efficiency. This feature localizes error propagation ideally into single MB.

Helder

> > the XVID ENC STATS::kblks returns the Number of MacroBlocks coded as
Intra
> > blocks.
> >
> > can one set (force) the number of MacroBlocks to be coded  as
IntraBlocks
> > within a frame? That would *really* be neat.
>
> we dont currently support this.
> if could be implemented, but why bother? the inter/intra decision does a
> reasonable job at deciding the macroblock type.
>
> btw, {k,m,u}blks are used to calculate/estimate motion for 2pass
> encoding.
>
> it sounds like you are working on a realtime/dynamic encoder. if there's
> is something you want specific control over, now is the time to speak
> up. the new api is coming soon, and with it a feature freeze (if i can
> convince enough people...)