TComWeightPrediction: add braces to prevent errors for an optional else statement
TComWeightPrediction: initialising pointers to NULL

getWPScaling will assign appropriate weight pred tables to these.
scan order tables

--HG--
extra : rebase_source : 8c7eae15ee3f2895be8fecf6e1adb4077c0e1ed5
trquant: store QpParam for each component

--HG--
extra : rebase_source : 4b82124ed6d796fb791f0e410d5965b55edc1a24
rc: add 2 pass logic in rateEstimateQscale

--HG--
extra : rebase_source : 2855cd86ea6a12c4354326eb7cf9c9524eca5481
rc: fix sliceType of 2nd pass from prev pass stats

avoid doing sliceAnalyse in lookahead for 2nd pass

--HG--
extra : rebase_source : 773cf6d0d1668b9c1fc7bdce3c26758d65b98719
rc: generate cutree offsets for 2nd pass from stats

--HG--
extra : rebase_source : bc1325c5895d8d3c862b3d81b0e63d4b8673d699
rc: fix warnings in ratecontrol

--HG--
extra : rebase_source : 0d56e4c128bc4cece7811aa0b728bdf0f305b8d0
rc: prevent deadlock on encoder flush or close

1. add a terminate() function to unblock any blocked rate control methods
2. never block if the order ordinal is already above the required ordinal
3. simulate start events when encoder is flushing

Without these changes, closing the encoder without flushing (CTRL+C in the CLI)
or encoding fewer frames than frame encoders (-F8 -f4) could cause deadlocks

--HG--
extra : rebase_source : be451e95d69065fca0e2907da1c6cb611e966c43
cmake: only create SONAME shared lib on POSIX systems (closes #62)
cmake: tabs to spaces
entropy: settle on Entropy class name and member names

Through all these various refactors the SBAC/CABAC/entropy classes have all
merged together and the member variables were a scattered mix
fix for GCC warning about loop bounds
level: fix typo
slice: add ProfileTierLevel instance to VPS

The PTL data is coded in the VPS (first) and thus belongs with that data
structure, as it allows us to simplify arguments to the level set and
determination functions.
ptl: move enums from TypeDef.h to slice.h
level: move m_vps.maxDecPicBuffering logic into one function

This prevents duplicate logic from existing in two separate files
level: nit
cli: expose x265_param_apply_profile() via --profile

This is repairing an egregious oversight
param: fix profile warnings in x265_param_apply_profile()

This function was likely never used since it was not supported by the CLI till
now.  When the user specifies --profile Main10, they intend that the output
stream is decodable by a Main10 decoder. This is true of any Main encode.

The reverse is not true for --profile Main and a Main10 encode.  We must return
an error and abort the encode if --profile Main is specified and the encoder
was compiled for Main10 (HIGH_BIT_DEPTH).

--HG--
extra : amend_source : c5b955aa6eb1fc2b83ea65fa4828e908fc24ed5d