/*****************************************************************************
* set: header writing
*****************************************************************************
- * Copyright (C) 2003-2014 x264 project
+ * Copyright (C) 2003-2016 x264 project
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Loren Merritt <lorenm@u.washington.edu>
while( (1 << sps->i_log2_max_frame_num) <= max_frame_num )
sps->i_log2_max_frame_num++;
- sps->i_poc_type = param->i_bframe || param->b_interlaced ? 0 : 2;
+ sps->i_poc_type = param->i_bframe || param->b_interlaced || param->i_avcintra_class ? 0 : 2;
if( sps->i_poc_type == 0 )
{
int max_delta_poc = (param->i_bframe + 2) * (!!param->i_bframe_pyramid + 1) * 2;
void x264_sei_recovery_point_write( x264_t *h, bs_t *s, int recovery_frame_cnt )
{
bs_t q;
- uint8_t tmp_buf[100];
+ ALIGNED_4( uint8_t tmp_buf[100] );
+ M32( tmp_buf ) = 0; // shut up gcc
bs_init( &q, tmp_buf, 100 );
bs_realign( &q );
memcpy( payload, uuid, 16 );
sprintf( payload+16, "x264 - core %d%s - H.264/MPEG-4 AVC codec - "
- "Copy%s 2003-2014 - http://www.videolan.org/x264.html - options: %s",
+ "Copy%s 2003-2016 - http://www.videolan.org/x264.html - options: %s",
X264_BUILD, X264_VERSION, HAVE_GPL?"left":"right", opts );
length = strlen(payload)+1;
{
x264_sps_t *sps = h->sps;
bs_t q;
- uint8_t tmp_buf[100];
+ ALIGNED_4( uint8_t tmp_buf[100] );
+ M32( tmp_buf ) = 0; // shut up gcc
bs_init( &q, tmp_buf, 100 );
bs_realign( &q );
{
x264_sps_t *sps = h->sps;
bs_t q;
- uint8_t tmp_buf[100];
+ ALIGNED_4( uint8_t tmp_buf[100] );
+ M32( tmp_buf ) = 0; // shut up gcc
bs_init( &q, tmp_buf, 100 );
bs_realign( &q );
{
int quincunx_sampling_flag = h->param.i_frame_packing == 0;
bs_t q;
- uint8_t tmp_buf[100];
+ ALIGNED_4( uint8_t tmp_buf[100] );
+ M32( tmp_buf ) = 0; // shut up gcc
bs_init( &q, tmp_buf, 100 );
bs_realign( &q );
bs_write1( &q, quincunx_sampling_flag ); // quincunx_sampling_flag
// 0: views are unrelated, 1: left view is on the left, 2: left view is on the right
- bs_write ( &q, 6, 1 ); // content_interpretation_type
+ bs_write ( &q, 6, h->param.i_frame_packing != 6 ); // content_interpretation_type
bs_write1( &q, 0 ); // spatial_flipping_flag
bs_write1( &q, 0 ); // frame0_flipped_flag
{
x264_slice_header_t *sh = &h->sh_backup;
bs_t q;
- uint8_t tmp_buf[100];
+ ALIGNED_4( uint8_t tmp_buf[100] );
+ M32( tmp_buf ) = 0; // shut up gcc
bs_init( &q, tmp_buf, 100 );
bs_realign( &q );
data[20] = 0x13;
/* These bytes appear to be some sort of frame/seconds counter in certain applications,
* but others jump around, so leave them as zero for now */
- data[21] = data[22] = 0;
-
+ data[22] = data[23] = data[25] = data[26] = 0;
data[28] = 0x14;
+ data[30] = data[31] = data[33] = data[34] = 0;
data[36] = 0x60;
data[41] = 0x22; /* Believed to be some sort of end of basic UMID identifier */
+ data[60] = 0x62;
+ data[62] = data[63] = data[65] = data[66] = 0;
+ data[68] = 0x63;
+ data[70] = data[71] = data[73] = data[74] = 0;
x264_sei_write( &h->out.bs, data, len, SEI_USER_DATA_UNREGISTERED );