[vlc-devel] [PATCH 1/2] Add a trivial hevc packetizer

Jean-Baptiste Kempf jb at videolan.org
Mon Feb 10 16:44:11 CET 2014


On 09 Feb, Denis Charmet wrote :
> +    set_description(N_("H.265/HEVC video packetizer"))

HEVC/H.265? H.265/HEVC?

> +enum nal_unit_type_e
> +{
> +    TRAIL_N    = 0,
> +    TRAIL_R    = 1,
> +    TSA_N      = 2,
> +    TSA_R      = 3,
> +    STSA_N     = 4,
> +    STSA_R     = 5,
> +    RADL_N     = 6,
> +    RADL_R     = 7,
> +    RASL_N     = 8,
> +    RASL_R     = 9,
> +    /* 10 to 15 reserved */
> +    /* Key frames */
> +    BLA_W_LP   = 16,
> +    BLA_W_RADL = 17,
> +    BLA_N_LP   = 18,
> +    IDR_W_RADL = 19,
> +    IDR_N_LP   = 20,
> +    CRA        = 21,
> +    /* 22 to 31 reserved */
> +    /* Non VCL NAL*/
> +    VPS        = 32,
> +    SPS        = 33,
> +    PPS        = 34,
> +    AUD        = 35, /* Access unit delimiter */
> +    EOS        = 36, /* End of sequence */
> +    EOB        = 37, /* End of bitstream */
> +    FD         = 38, /* Filler data*/
> +    PREF_SEI   = 39, /* Prefix SEI */
> +    SUFF_SEI   = 40, /* Suffix SEI */
> +    UNKNOWN_NAL
> +};

A comment with the doc would be nice for the future.

> +static block_t *PacketizeParse(void *p_private, bool *pb_ts_used, block_t *p_block)
> +{
> +    decoder_t *p_dec = p_private;
> +    decoder_sys_t *p_sys = p_dec->p_sys;
> +
> +    block_t * p_nal = NULL;
> +    

Trailing space.

> +    /* Remove trailing 0 bytes */

This was not 100% clear at first read.

> +    while (p_block->i_buffer > 5 && p_block->p_buffer[p_block->i_buffer-1] == 0x00 )
> +        p_block->i_buffer--;
> +

> +static int PacketizeValidate( void *p_private, block_t *p_au )
> +{
> +    VLC_UNUSED(p_private);
> +    VLC_UNUSED(p_au);
> +    return VLC_SUCCESS;
> +}
> +

Seems OK to me.

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list