codec/dirac: Rewrite libdirac(-research) encoding support
codec/dirac: Rewrite libdirac(-research) encoding support

libdirac is currently a higher quality (albeit much slower) encoder than
libschroedinger.  The intention is to port its algorithim to schro and
depricate the codebase.

A previous patch removes libdirac decoding support in preference
to the schroedinger module which is designed to be much faster.

This patch corrects previous attempts at doing an encoder module. It
takes into account:
 - input PTS
 - correctly forming output pts&dts (progressive and field coding modes)
 - gathering dirac data units into encapsulation units
 - encoder options
 - simplified encoder options (block overlap)
 - choosing of suitable parameters from input frame parameters
 - OggDirac compliant stashing of headers in p_extra

Signed-off-by: David Flynn <38ae1b48ed96d57c9e166f6cc6ffdf619b4856ab@rd.bbc.co.uk>
Signed-off-by: Laurent Aimar <2e4ef4899efb9d4b7a6d090f80ae8072b0abe38d@videolan.org>

krichter722/vlc,shyamalschandra/vlc,vlc-mirror/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,vlc-mirror/vlc,vlc-mirror/vlc-2.1,xkfz007/vlc,vlc-mirror/vlc-2.1,krichter722/vlc,xkfz007/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc,vlc-mirror/vlc-2.1,xkfz007/vlc,vlc-mirror/vlc-2.1,vlc-mirror/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,shyamalschandra/vlc,xkfz007/vlc,shyamalschandra/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,krichter722/vlc,shyamalschandra/vlc,jomanmuk/vlc-2.1,jomanmuk/vlc-2.1,shyamalschandra/vlc,krichter722/vlc,xkfz007/vlc,krichter722/vlc,jomanmuk/vlc-2.1,jomanmuk/vlc-2.2,vlc-mirror/vlc,vlc-mirror/vlc,jomanmuk/vlc-2.1,krichter722/vlc,xkfz007/vlc,shyamalschandra/vlc,xkfz007/vlc,vlc-mirror/vlc-2.1,vlc-mirror/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,krichter722/vlc,shyamalschandra/vlc,jomanmuk/vlc-2.2