deccc608sub: fix roll-up subtitles

Roll-up CC timestamps need similar treatment as the popup CC timestamps.
Also, the simulated carriage return command that was added during
a rollup command was inserting blank lines in the CC, so fix that.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6144 b64f7644-9d1e-0410-96f1-a4d463321fa5
enc_qsv: general cleanup.

Mainly:

 - coding style
 - formatting
 - indentation

Also:

 - fix two warnings
 - remove unnecessary header
 - remove unused parameter in parse_nalus


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6145 b64f7644-9d1e-0410-96f1-a4d463321fa5
enc_qsv: simplify encqsvClose.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6146 b64f7644-9d1e-0410-96f1-a4d463321fa5
enc_qsv: simplify qsv_enc_init.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6147 b64f7644-9d1e-0410-96f1-a4d463321fa5
enc_qsv: cleanup encoding loop, part 1.

Mainly:

 - allocate frame surface data in qsv_enc_init
 - setup input frame surface outside the loop
 - remove unnecessary variable
 - handle errors via a common path


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6148 b64f7644-9d1e-0410-96f1-a4d463321fa5
enc_qsv: cleanup encoding loop, part 2.

Move related code to separate functions whenever
possible; simplify or improve the code where applicable.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6149 b64f7644-9d1e-0410-96f1-a4d463321fa5
enc_qsv: cleanup encoding loop, part 3.

Move encoding loop to its own function and simplify encqsvWork.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6150 b64f7644-9d1e-0410-96f1-a4d463321fa5
CLI: enable the --qsv-implementation option.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6151 b64f7644-9d1e-0410-96f1-a4d463321fa5
pgssubs: fix pgs passthru

Subtitles were being dropped because of the new condition I added that
drops subtitles when start == end.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6152 b64f7644-9d1e-0410-96f1-a4d463321fa5
QSV: reset the encoder at chapter points to force a keyframe

This replaces the mfxEncodeCtrl-based solution used up to this point,
as it's not guaranteed to work with some parameter combinations.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6153 b64f7644-9d1e-0410-96f1-a4d463321fa5
QSV: fix previous commit (outdated version of the same patch, sorry9.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6154 b64f7644-9d1e-0410-96f1-a4d463321fa5
Fix previous commit again. This is not my day.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6155 b64f7644-9d1e-0410-96f1-a4d463321fa5
libhb: add generic code for converting NAL
unit bitstreams (H.264, HEVC) to and from
Annex B format.

Only used by QSV for now, but could
always come in handy down the road.

May also fix an issue introduced
by the recent QSV cleanup patchset.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6156 b64f7644-9d1e-0410-96f1-a4d463321fa5
QSV: fix logging of whether B-frames are enabled.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6157 b64f7644-9d1e-0410-96f1-a4d463321fa5
QSV: always use our own DTS.

Previously, the DTS provided by MSDK was used
if it was available and the frame rate was constant.

Our own DTS is indentical to MSDK's (when the
frame rate is constant), but MSDK will sometimes
provide 1 or 2 bogus DTS over the duration of a
file, causing the encode to abort (lavf is picky).


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6158 b64f7644-9d1e-0410-96f1-a4d463321fa5
CLI: fix SRT passthru and add SRT burn option

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6159 b64f7644-9d1e-0410-96f1-a4d463321fa5
rendersub: fix rendering SRT markup in CC subs

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6160 b64f7644-9d1e-0410-96f1-a4d463321fa5
Interop: Support for rotation and reflection.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6161 b64f7644-9d1e-0410-96f1-a4d463321fa5
Fix livavcodec-based downmixing of DTS-ES 6.1 to Stereo. 


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6162 b64f7644-9d1e-0410-96f1-a4d463321fa5
Convert all text subtitles to ASS subs
Add support for font color to tx3g.
Allow more than one style flag at time in tx3g.
Add positioning support to CC subs


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6163 b64f7644-9d1e-0410-96f1-a4d463321fa5