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