Guillaume Martres | 18 Aug 2012 17:30
Picon

[PATCH 1/4] cabac: move some tables to cabac.h for sharing between h264 and hevc

From: Guillaume Martres <smarter@...>

---
 libavcodec/cabac.c |   16 ++++++++--------
 libavcodec/cabac.h |    4 ++++
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index bd7d949..f51e79c 100644
--- a/libavcodec/cabac.c
+++ b/libavcodec/cabac.c
 <at>  <at>  -54,7 +54,7  <at>  <at>  uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63] = {
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 };

-static const uint8_t lps_range[64][4]= {
+const uint8_t ff_lps_range[64][4]= {
 {128,176,208,240}, {128,167,197,227}, {128,158,187,216}, {123,150,178,205},
 {116,142,169,195}, {111,135,160,185}, {105,128,152,175}, {100,122,144,166},
 { 95,116,137,158}, { 90,110,130,150}, { 85,104,123,142}, { 81, 99,117,135},
 <at>  <at>  -75,7 +75,7  <at>  <at>  static const uint8_t lps_range[64][4]= {

 static uint8_t h264_mps_state[2 * 64];

-static const uint8_t mps_state[64]= {
+const uint8_t ff_mps_state[64]= {
   1, 2, 3, 4, 5, 6, 7, 8,
   9,10,11,12,13,14,15,16,
  17,18,19,20,21,22,23,24,
 <at>  <at>  -86,7 +86,7  <at>  <at>  static const uint8_t mps_state[64]= {
(Continue reading)

Guillaume Martres | 18 Aug 2012 17:30
Picon

[PATCH 2/4] hevc: parser for raw HEVC files

From: Guillaume Martres <smarter@...>

---
 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

diff --git a/doc/general.texi b/doc/general.texi
index a14e888..836e8c4 100644
--- a/doc/general.texi
+++ b/doc/general.texi
 <at>  <at>  -262,6 +262,7  <at>  <at>  library:
  <at> item raw H.261                  <at> tab X  <at> tab X
  <at> item raw H.263                  <at> tab X  <at> tab X
  <at> item raw H.264                  <at> tab X  <at> tab X
+ <at> item raw HEVC                   <at> tab    <at> tab X
  <at> item raw Ingenient MJPEG        <at> tab    <at> tab X
  <at> item raw MJPEG                  <at> tab X  <at> tab X
  <at> item raw MLP                    <at> tab    <at> tab X
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 51a45bd..e8fda89 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
 <at>  <at>  -624,6 +624,7  <at>  <at>  OBJS-$(CONFIG_H264_PARSER)             += h264_parser.o h264.o            \
                                           h264_refs.o h264_sei.o h264_direct.o \
                                           h264_loopfilter.o h264_cabac.o \
(Continue reading)

Diego Biurrun | 19 Aug 2012 18:27
Picon
Gravatar

Re: [PATCH 2/4] hevc: parser for raw HEVC files

On Sat, Aug 18, 2012 at 05:30:36PM +0200, Guillaume Martres wrote:
> From: Guillaume Martres <smarter@...>
> 
> ---
>  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
>  <at>  <at>  -0,0 +1,154  <at>  <at> 
> +
> +#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;
(Continue reading)

Guillaume Martres | 18 Aug 2012 17:30
Picon

[PATCH 4/4] hevc: add a dummy demuxer

From: Guillaume Martres <smarter@...>

---
 libavformat/Makefile     |    1 +
 libavformat/allformats.c |    1 +
 libavformat/hevcdec.c    |   30 ++++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+)
 create mode 100644 libavformat/hevcdec.c

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 82dc1c1..b853cde 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
 <at>  <at>  -108,6 +108,7  <at>  <at>  OBJS-$(CONFIG_H263_DEMUXER)              += h263dec.o rawdec.o
 OBJS-$(CONFIG_H263_MUXER)                += rawenc.o
 OBJS-$(CONFIG_H264_DEMUXER)              += h264dec.o rawdec.o
 OBJS-$(CONFIG_H264_MUXER)                += rawenc.o
+OBJS-$(CONFIG_HEVC_DEMUXER)              += hevcdec.o rawdec.o
 OBJS-$(CONFIG_HLS_DEMUXER)               += hls.o
 OBJS-$(CONFIG_IDCIN_DEMUXER)             += idcin.o
 OBJS-$(CONFIG_IFF_DEMUXER)               += iff.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 40770e5..5b636f1 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
 <at>  <at>  -106,6 +106,7  <at>  <at>  void av_register_all(void)
     REGISTER_MUXDEMUX (H261, h261);
     REGISTER_MUXDEMUX (H263, h263);
     REGISTER_MUXDEMUX (H264, h264);
+    REGISTER_DEMUXER  (HEVC, hevc);
(Continue reading)

Diego Biurrun | 19 Aug 2012 18:29
Picon
Gravatar

Re: [PATCH 4/4] hevc: add a dummy demuxer

On Sat, Aug 18, 2012 at 05:30:38PM +0200, Guillaume Martres wrote:
> From: Guillaume Martres <smarter@...>
> 
> ---
>  libavformat/Makefile     |    1 +
>  libavformat/allformats.c |    1 +
>  libavformat/hevcdec.c    |   30 ++++++++++++++++++++++++++++++
>  3 files changed, 32 insertions(+)
>  create mode 100644 libavformat/hevcdec.c

Version bump and changelog entry missing, see the dev docs.

> --- /dev/null
> +++ b/libavformat/hevcdec.c
>  <at>  <at>  -0,0 +1,30  <at>  <at> 
> +
> +static int hevc_probe(AVProbeData *p)
> +{
> +    return AVPROBE_SCORE_MAX/2;

spaces around /

> +FF_DEF_RAWVIDEO_DEMUXER(hevc, "raw HEVC video format", hevc_probe, "hevc,h265,265", AV_CODEC_ID_HEVC)

Drop "format" and maybe even "video" from the string.

Diego
Guillaume Martres | 18 Aug 2012 17:36
Picon

Re: [PATCH 1/4] cabac: move some tables to cabac.h for sharing between h264 and hevc

Hi,

I fail at git send-email again, this is supposed to be v2 of
"[WIP] [RFC] hevc: HEVC decoder"
--

-- 
Guillaume Martres - http://smarter.free.fr
Guillaume Martres | 18 Aug 2012 17:30
Picon

[PATCH 3/4] hevc: HEVC video decoder

From: Guillaume Martres <smarter-GeWIH/nMZzLQT0dZR+AlfA <at> public.gmane.org>

---
 configure                      |    1 +
 doc/general.texi               |    1 +
 libavcodec/Makefile            |    2 +
 libavcodec/allcodecs.c         |    1 +
 libavcodec/hevc.c              | 1400 ++++++++++++++++++++++++++++++++++++++++
 libavcodec/hevc.h              |  585 +++++++++++++++++
 libavcodec/hevc_cabac.c        |  892 +++++++++++++++++++++++++
 libavcodec/hevc_ps.c           |  527 +++++++++++++++
 libavcodec/hevcdata.h          |  270 ++++++++
 libavcodec/hevcdsp.c           |   70 ++
 libavcodec/hevcdsp.h           |   39 ++
 libavcodec/hevcdsp_template.c  |  283 ++++++++
 libavcodec/hevcpred.c          |   50 ++
 libavcodec/hevcpred.h          |   41 ++
 libavcodec/hevcpred_template.c |  308 +++++++++
 15 files changed, 4470 insertions(+)
 create mode 100644 libavcodec/hevc.c
 create mode 100644 libavcodec/hevc.h
 create mode 100644 libavcodec/hevc_cabac.c
 create mode 100644 libavcodec/hevc_ps.c
 create mode 100644 libavcodec/hevcdata.h
 create mode 100644 libavcodec/hevcdsp.c
 create mode 100644 libavcodec/hevcdsp.h
 create mode 100644 libavcodec/hevcdsp_template.c
 create mode 100644 libavcodec/hevcpred.c
 create mode 100644 libavcodec/hevcpred.h
 create mode 100644 libavcodec/hevcpred_template.c
(Continue reading)

Diego Biurrun | 19 Aug 2012 20:07
Picon
Gravatar

Re: [PATCH 3/4] hevc: HEVC video decoder

On Sat, Aug 18, 2012 at 05:30:37PM +0200, Guillaume Martres wrote:
> From: Guillaume Martres <smarter@...>
> [...]

All the comments from my first review still apply; please fix them.

The patch is still huge and will be cumbersome to review.  Maybe you
can split off the data and dsp parts (or similar) into separate
patches?  The parts will not be standalone anymore and will need to
be squashed before pushing, but will be more manageable for review.

Diego
Diego Biurrun | 19 Aug 2012 18:20
Picon
Gravatar

Re: [PATCH 1/4] cabac: move some tables to cabac.h for sharing between h264 and hevc

On Sat, Aug 18, 2012 at 05:30:35PM +0200, Guillaume Martres wrote:
> From: Guillaume Martres <smarter@...>
> 
> ---
>  libavcodec/cabac.c |   16 ++++++++--------
>  libavcodec/cabac.h |    4 ++++
>  2 files changed, 12 insertions(+), 8 deletions(-)

The log message is wrong; you seem to have missed amending it
after changing what the patch does.

Patch itself is OK, minor nits below.

> --- a/libavcodec/cabac.c
> +++ b/libavcodec/cabac.c
>  <at>  <at>  -54,7 +54,7  <at>  <at>  uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63] = {
>  
> -static const uint8_t lps_range[64][4]= {
> +const uint8_t ff_lps_range[64][4]= {

Extra good karma for adding a space before = while you're changing
the line anyway, more below.

> --- a/libavcodec/cabac.h
> +++ b/libavcodec/cabac.h
>  <at>  <at>  -39,6 +39,10  <at>  <at> 
>  #define CABAC_BITS 16
>  #define CABAC_MASK ((1<<CABAC_BITS)-1)
>  
> +extern const uint8_t ff_lps_range[64][4];
(Continue reading)


Gmane