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

-- 
2.27.0.windows.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to