mbox

[FFmpeg-devel,0/2] avcodec/dolby_e: Add a parser

Message ID 20210114162610.1385-1-nicolas.gaullier@cji.paris
Headers show

Message

Nicolas Gaullier Jan. 14, 2021, 4:26 p.m. UTC
I have limited duplicated code by making the decoder calling the parser.
An option would be to leave all common code to dolby_e.c and move decoding to dolby_edec.c,
but that would require either to duplicate 3 "very-internal" functions (skip_input/parse_key/convert_input) 3x times instead of twice currently,
or to share them with ff_ prefix although they are very-low level and difficult to document etc.

If you have an idea for a better design, please tell me.

Nicolas Gaullier (2):
  avcodec/dolby_e: Add a parser
  avcodec/dolby_e: Split decoder/parser files

 Changelog                            |   1 +
 libavcodec/Makefile                  |   1 +
 libavcodec/dolby_e.c                 | 209 ++++-----
 libavcodec/dolby_e.h                 | 608 +--------------------------
 libavcodec/dolby_e_parser.c          | 227 ++++++++++
 libavcodec/dolby_e_parser.h          |  41 ++
 libavcodec/dolby_e_parser_internal.h |  46 ++
 libavcodec/dolby_edec.h              | 607 ++++++++++++++++++++++++++
 libavcodec/parsers.c                 |   1 +
 libavcodec/version.h                 |   2 +-
 10 files changed, 1019 insertions(+), 724 deletions(-)
 create mode 100644 libavcodec/dolby_e_parser.c
 create mode 100644 libavcodec/dolby_e_parser.h
 create mode 100644 libavcodec/dolby_e_parser_internal.h
 create mode 100644 libavcodec/dolby_edec.h