param->analyse.i_mv_range = 512;
param->analyse.i_chroma_qp_offset = 0;
param->analyse.b_psnr = 1;
+
+ param->b_aud = 0;
}
/****************************************************************************
struct
{
int i_nal;
- x264_nal_t nal[4]; /* for now 4 is enough */
+ x264_nal_t nal[5]; /* for now 5 is enough */
int i_bitstream; /* size of p_bitstream */
uint8_t *p_bitstream; /* will hold data for all nal */
bs_t bs;
h->out.i_nal = 0;
bs_init( &h->out.bs, h->out.p_bitstream, h->out.i_bitstream );
+ if(h->param.b_aud){
+ int pic_type;
+
+ if(i_slice_type == SLICE_TYPE_I)
+ pic_type = 0;
+ else if(i_slice_type == SLICE_TYPE_P)
+ pic_type = 1;
+ else if(i_slice_type == SLICE_TYPE_B)
+ pic_type = 2;
+ else
+ pic_type = 7;
+
+ x264_nal_start(h, NAL_AUD, NAL_PRIORITY_DISPOSABLE);
+ bs_write(&h->out.bs, 3, pic_type);
+ x264_nal_end(h);
+ }
+
/* Write SPS and PPS */
if( i_nal_type == NAL_SLICE_IDR )
{
" --no-psnr Disable PSNR computaion\n"
" --quiet Quiet Mode\n"
" -v, --verbose Print stats for each frame\n"
+ " --aud Use access unit delimiters\n"
"\n",
X264_BUILD, X264_VERSION,
defaults->i_keyint_max,
#define OPT_CHROMA_QP 280
#define OPT_NO_CHROMA_ME 281
#define OPT_NO_CABAC 282
+#define OPT_AUD 283
static struct option long_options[] =
{
{ "no-psnr", no_argument, NULL, OPT_NOPSNR },
{ "quiet", no_argument, NULL, OPT_QUIET },
{ "verbose", no_argument, NULL, 'v' },
+ { "aud", no_argument, NULL, OPT_AUD },
{0, 0, 0, 0}
};
case 'v':
param->i_log_level = X264_LOG_DEBUG;
break;
+ case OPT_AUD:
+ param->b_aud = 1;
+ break;
default:
fprintf( stderr, "unknown option (%c)\n", optopt );
return -1;
float f_complexity_blur; /* temporally blur complexity */
} rc;
+ int b_aud; /* generate access unit delimiters */
} x264_param_t;
/* x264_param_default:
NAL_SLICE_IDR = 5, /* ref_idc != 0 */
NAL_SEI = 6, /* ref_idc == 0 */
NAL_SPS = 7,
- NAL_PPS = 8
+ NAL_PPS = 8,
+ NAL_AUD = 9,
/* ref_idc == 0 for 6,9,10,11,12 */
};
enum nal_priority_e