The bitstream named fg+alpha.264 that accompanies this note contains 40 frames of combined 
foreground and alpha video as described in JVT-L013.doc

The foreground can be decoded by the reference software directly, since the reference software 
ignores NAL Units it does not understand.

The alpha video can be decoded by inserting the code below into the decoder image.c function 
read_new_slice() as indicated.


#define DECODE_ALPHA	//place this code near the top of read_new_slice()
#ifdef DECODE_ALPHA	
static int au_is_IDR;
#endif



			//place this code just above  "switch (nalu->nal_unit_type)"
#ifdef DECODE_ALPHA		//decode alpha channel
#define NALU_TYPE_ALPHA  19
    switch (nalu->nal_unit_type)
    {
      case NALU_TYPE_SLICE:
		  au_is_IDR = FALSE;
		  nalu->nal_unit_type = 0;	//disable the foreground
			  break;
      case NALU_TYPE_IDR:
		  au_is_IDR = TRUE;
		  nalu->nal_unit_type = 0;	//disable the foreground
			  break;
      case NALU_TYPE_ALPHA:
		  if(au_is_IDR)
			  nalu->nal_unit_type=NALU_TYPE_IDR;
		  else 
			  nalu->nal_unit_type=NALU_TYPE_SLICE;
				break;
      default: ;
    }
#endif
