#include <vlc_bits.h>
#include "../codec/cc.h"
#include "packetizer_helper.h"
+#include "../demux/mpeg/mpeg_parser_helpers.h"
/*****************************************************************************
* Module descriptor
/* ref_idc == 0 for 6,9,10,11,12 */
};
+/* Defined in H.264 annex D */
+enum sei_type_e
+{
+ SEI_USER_DATA_REGISTERED = 4,
+ SEI_RECOVERY_POINT = 6
+};
+
#define BLOCK_FLAG_PRIVATE_AUD (1 << BLOCK_FLAG_PRIVATE_SHIFT)
static block_t *Packetize( decoder_t *, block_t ** );
*pp_ret = dst;
if( dst )
- {
- while( src < end )
- {
- if( src < end - 3 && src[0] == 0x00 && src[1] == 0x00 &&
- src[2] == 0x03 )
- {
- *dst++ = 0x00;
- *dst++ = 0x00;
-
- src += 3;
- continue;
- }
- *dst++ = *src++;
- }
- }
- *pi_ret = dst - *pp_ret;
-}
-
-static inline int bs_read_ue( bs_t *s )
-{
- int i = 0;
-
- while( bs_read1( s ) == 0 && s->p < s->p_end && i < 32 )
- {
- i++;
- }
- return( ( 1 << i) - 1 + bs_read( s, i ) );
-}
-
-static inline int bs_read_se( bs_t *s )
-{
- int val = bs_read_ue( s );
-
- return val&0x01 ? (val+1)/2 : -(val/2);
+ *pi_ret = nal_decode(src, dst, i_src);
}
/*****************************************************************************
break;
/* Look for user_data_registered_itu_t_t35 */
- if( i_type == 4 )
+ if( i_type == SEI_USER_DATA_REGISTERED )
{
static const uint8_t p_dvb1_data_start_code[] = {
0xb5,
}
/* Look for SEI recovery point */
- if( i_type == 6 )
+ if( i_type == SEI_RECOVERY_POINT )
{
bs_t s;
const int i_rec = i_size;