On Sat, Aug 18, 2012 at 05:30:36PM +0200, Guillaume Martres wrote:
> From: Guillaume Martres <[email protected]>
>
> ---
> doc/general.texi | 1 +
> libavcodec/Makefile | 1 +
> libavcodec/allcodecs.c | 1 +
> libavcodec/avcodec.h | 1 +
> libavcodec/hevc_parser.c | 154
> ++++++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 158 insertions(+)
> create mode 100644 libavcodec/hevc_parser.c
This is missing a version bump.
> --- /dev/null
> +++ b/libavcodec/hevc_parser.c
> @@ -0,0 +1,154 @@
> +
> +#define START_CODE 0x000001 ///< start_code_prefix_one_3bytes
> +#define EMULATION_CODE 0x03 ///< emulation_prevention_three_byte
> +
> +/**
> + * Annex B.1: Byte stream NAL unit syntax and semantics
> + */
These are Doxygen comments - why?
> + switch (pc->state & mask) {
> + case START_CODE:
> + pc->frame_start_found = 0;
> + pc->state = -1;
align
> +static int hevc_parse_nal_unit(HEVCParserContext *hpc, uint8_t **poutbuf,
> + int *poutbuf_size, const uint8_t *buf,
> + int buf_size)
> +{
> +
> + buf += header;
> + buf_size -= header;
> + *poutbuf = (uint8_t*)buf;
> +static int hevc_parse(AVCodecParserContext *s,
> + AVCodecContext *avctx,
> + const uint8_t **poutbuf, int *poutbuf_size,
> + const uint8_t *buf, int buf_size)
> +{
> + HEVCParserContext *hpc = s->priv_data;
> + ParseContext *pc = &hpc->pc;
> + int combine_next = 0;
> + int next = hevc_parse_nal_unit(hpc, (uint8_t**)poutbuf, poutbuf_size,
> buf, buf_size);
Your use of const makes you cast a lot, maybe just drop some consts.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel