x264 preset system: miscellaneous improvements.

See https://reviews.handbrake.fr/r/421/ for details.



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5225 b64f7644-9d1e-0410-96f1-a4d463321fa5
MacGUI: make the preview window HiDPI aware, so that the preview images will be shown with the same pixel count on Retina and non Retina screens (instead of 2x on Retina).

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5226 b64f7644-9d1e-0410-96f1-a4d463321fa5
MacGUI: Fix build on 10.6sdk.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5228 b64f7644-9d1e-0410-96f1-a4d463321fa5
MacGUI: Reworked a bit of HBPreviewController, the main differences are:
- CALayer instead of NSImageView, we don't need to center the layer manually, plus a lot of free animations.
- Reworked the scale to screen code, now it resize the window to the max size and then resize the picture layer, a bit simpler then before but the previous code had a weird issue were the window increased in size each time the slider changed until the control box was outside the window.
- Fixed an issue where the preview window would be unusable if it was closed while it was encoding a preview.
- Added a fEncodeState int to keep track of the encoding status like in HBController.
- Removed some unused code and variables. 
- The preview images are no longer 4px smaller than the said size.
- Added some nice image to the player controller.
- keyboard controls for the movie player.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5230 b64f7644-9d1e-0410-96f1-a4d463321fa5
LinGui: fix crash caused by bug in newer versions of gtk2

GtkCombobBoxText is not initialized correctly by gtk2.  Reading out it's
current value fails and returns NULL.  So explicitely initialize the
text column value and guard against future bugs by checking return value.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5231 b64f7644-9d1e-0410-96f1-a4d463321fa5
MacGUI: make the control box in preview window 10 px larger to avoid splitting text on two lines, and expand the keyboard control to the still images.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5232 b64f7644-9d1e-0410-96f1-a4d463321fa5
LinGui: add tooltips for subtitle options


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5233 b64f7644-9d1e-0410-96f1-a4d463321fa5
WinGui: Add support for the tray icon.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5235 b64f7644-9d1e-0410-96f1-a4d463321fa5
MacGUI: add a missing else statement. Don't pass key event down the response chain after we handled it it.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5237 b64f7644-9d1e-0410-96f1-a4d463321fa5
Prevent OSX ML sleep during encoding, thanks to Jerome Lacube

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5238 b64f7644-9d1e-0410-96f1-a4d463321fa5
MacGui: re enable deinterlaced still preview images when deinterlace is selected.
- Also add a deinterlaced preview still image when decomb is selected as libhb does not notice decomb for still previews. Do a quick shell game when decomb is selected only to grab a deinterlaced preview.
- As a side note, remove some extremely vestigial code from controller.m as far as a min preview size.
- fwiw, lingui already apparently does this.

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

Works with encoders that accept 16-bit signed integers as input (currently, only ffflac).

When supported, the default method is standard triangular.

CLI users can request a specific dither algorithm via the --adither option.



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5241 b64f7644-9d1e-0410-96f1-a4d463321fa5
Set AVCodecContext.request_channel_layout when decoding.

Allows extracting a 5.1 or 2-channel downmix from a dedicated substream (TrueHD).

Also works around a bug when decoding TrueHD Mono.



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