jstebbins [Sat, 5 May 2012 19:29:01 +0000 (19:29 +0000)]
libhb: yet another fix for ssa burn-in positioning problem
We must offset the position that libass gives us by the top and left
cropping since the frame size we are telling libass to render into has
the cropping removed.
jstebbins [Sat, 5 May 2012 18:22:37 +0000 (18:22 +0000)]
libhb: Fix problem with positions of burned-in subs
When cropping and/or scaling, the position of burned-in SSA subs was broken.
Also, when scaling, the position of all other burned-in subs was broken.
Part of this fix is to revert a bit of filter initialization changes that
were made in this commit https://trac.handbrake.fr/changeset/4605
The other part of the fix is to add cropping parameters to the initialization
of the subtitle rendering filter. This filter needs the *original* title
dimensions and the crop values in order to compute the positions properly.
The changes that I am reverting gave it the scaled job dimensions and the
crop values. This was wrong in so many ways it's embarassing :p
jstebbins [Sat, 5 May 2012 18:12:00 +0000 (18:12 +0000)]
LinGui: use "allowed passthru" options even when hidden by preference option
If you don't do this, then presets that use these will not function as
advertised.
Rodeo [Tue, 1 May 2012 13:53:12 +0000 (13:53 +0000)]
Simplify Foreign Audio Search code:
- move all subtitle hit counting to the decoders instead of reader
---> allows us to count actual subtitles rather than just packets
- always count subtitles, even when not doing a scan (may be useful in the future)
Miscellaneous improvements:
- always insert select_subtitle at the head of the output subtitle list, to make it less likely to be dropped
- when multiple subtitle tracks have forced hits, pick the track with the fewest forced hits
---> Foreign Audio Search should now work with Star Wars on Blu-ray
- logging improvements (more readable, and log job->select_subtitle configuration - Forced Only vs. All, Render vs. Passthrough)
jstebbins [Tue, 1 May 2012 10:05:53 +0000 (10:05 +0000)]
libhb: fix problem with incorrect addition of audio silence
sync needs the precise duration of a frame of audio and has
no way to compute it for passthru audio. So add a duration
member to hb_buffer_t and set it in the audio decoders.
This should eventually supersede hb_buffer_t member "stop"
since it provides redundant information.
jstebbins [Tue, 1 May 2012 07:55:41 +0000 (07:55 +0000)]
libhb: allow arbitrary number of preview images, fixes potential crash
scan.c had a limit of 30 previews due to fixed array size. But test.c didn't
limit the max number of previews, so it was possible to generate a crash
by specifying > 30. This removes the limitation.
WinGui (WPF) Fix a bug in the GongSolutions WPF Drag/Drop Library to prevent a crash with dropdowns when clicking an item outside of the listbox control area.
LinGui: allow the user to select and use a bitrate for audio autopassthru
If the fallback encoder is used, the user should be able to set the
bitrate that is used.
libhb: fix crash when subtitle render filter fails to initialize
This can happen for non-fatal reasons when doing foreign audio search.
This makes all filter init failures non-fatal. We may want to introduce
fatal errors at some point. I need to inspect all the filters and see
if there are any errors that really must be fatal.
libhb: fix problem with fps calculation in 2 pass encodes
interjob was not getting initialized at the end of the 1st pass
because for some unfathomable reason, I did not save the job in
the filter objects private data even though I had a job variable there.
libhb: fix estimated number of frames expected
we don't need to overestimate it anymore since we do not terminate
the encode when this value is reached.
libhb: fix problem with rendering burned in subtitles
Remove unnecessary test of uninitialized alpha channel pointer. If the
uninitialized value was NULL, alpha wasn't factored into the blend.
Revision 4546 lost a call to hb_set_anamorphic_size, which in turn called hb_reduce on PAR values. Restore the call to hb_reduce, as the MacGui's custom anamorphic code doesn't reduce fractions on its own.
Also, call hb_reduce after each modification to the PAR in libavcodec compatibility code. This should reduce the loss of precision somewhat, by avoiding another division when the divided PAR width & height can be reduced to values <= 255.
libhb: fix incorrect audio gaps
When the duratation of an audio packet is not evenly divisible by the
90khz clock, we were loosing a fraction of a tick per audio packet. This
causes every packet to be tagged with a timestamp that is a little early
and eventually a gap must be filled to maintain sync.
jstebbins [Sat, 31 Mar 2012 15:03:16 +0000 (15:03 +0000)]
libhb: fix cfr encoding
when frames are duplicated, the frame was not copied properly and resulted
in divide by 0 later when the frame is processed.
This fix is a bit larger than the minimum size necessary to fix the problem.
I took the oportunity to clean up some buffer initialization and copy
operations.
Rodeo [Thu, 29 Mar 2012 23:17:34 +0000 (23:17 +0000)]
cqm=/some/path has the same effect as cqmfile=/some/path AND param.psz_cqm_file overrides param.i_cqm_preset so you can effectively use cqm in place of cqmfile (but not the opposite).
jstebbins [Tue, 27 Mar 2012 20:11:26 +0000 (20:11 +0000)]
Rework filter pipeline
This patch enhances the filter objects. The 2 key improvements are:
1. A filter can change the image dimensions as frames pass through it.
2. A filter can output more than one frame.
In addition, I have:
Moved cropping & scalling into a filter object
Added 90 degree rotation to the rotate filter
Moved subtitle burn-in rendering to a filter object.
Moved VFR/CFR handling into a framerate shaping filter object.
Removed render.c since all it's responsibilities got moved to filters.
Improves VOBSUB and SSA subtitle handling. Allows subtitle animations.
SSA karaoke support.
sr55 [Sun, 25 Mar 2012 18:14:10 +0000 (18:14 +0000)]
WinGuWinGui:(WPF) Remove some legacy queue code with the queue models and fix up some issues with the quality slider on the new video tab. Improve the User settings service code.
Rodeo [Sat, 24 Mar 2012 19:26:12 +0000 (19:26 +0000)]
Add hb_apply_h264_level(). Sets and ensures compliance with the specified H.264 level. Does not modify framerate and resolution but prints warnings when they are incompatible with the requested level.
Exposed to CLI users only via the --h264-level option. GUI support may come later, once we decide how to handle x264 presets/tunes/profiles.
sr55 [Fri, 23 Mar 2012 20:00:02 +0000 (20:00 +0000)]
WinGui: (WPF) Wired up the queue window and added missing functionality. Fixed issues on the main windows with regards to GUI widgets not updating during encoding.
WinGui: (WinForms): Added >=30fps options in framerate dropdown
Rodeo [Wed, 21 Mar 2012 22:09:35 +0000 (22:09 +0000)]
Fix loop counter decrement in CFR frame duplication code. CFR would never duplicate a frame more than once, causing major A/V desync when the output framerate was over twice that of the input.