Page 1 of 1

Strange artefacts on vc1 decoder introduced after 20110120?

Posted: Mon Jan 30, 2012 8:03 am
by MaHoff
Hi,

i'm trying to encode my HDDVD's (yes :-)) mp4 to be able viewing them via apple tv2.
Using latest stable build 0.9.5 from january 2011 there is no problem with the decoding - same holds true for nightly build from 20th january 2011. However i still have a nightly from 3rd november 2011 and also last nights build have this strange artifact bug.
Still scenes are okay - moving scenes show strange "noise" around high contrast areas.
So i believe this is a bug, because it seems to be introduced in last years development!?

It's already visible in the preview pane!

Logs:

Code: Select all

[08:50:46] hb_init: starting libhb thread
[08:50:46] macgui: Handbrake Version: 4424svn x86_64 (2012012901)
[08:50:46] hb_init: starting libhb thread
[08:50:46] hb_init: starting libhb thread
[08:50:46] macgui: hbInstances path to this instance: /Applications/HandBrake svn build20120128 svn4424.app
[08:50:46] macgui: hbInstance found instance pidnum:61078 at path: /Applications/HandBrake svn build20120128 svn4424.app
[08:50:46] macgui: hbInstance MATCH FOUND, our pidnum is:61078
[08:50:46] macgui: Pid for this instance:61078
[08:50:46] macgui: HBQueueController : My Pidnum is 61078
[08:50:46] macgui: Could not remove existing preview at : 61051
[08:50:49] macgui: trying to open video_ts folder (parent directory chosen)
[08:50:49] macgui: Preview: Disabling HUD Controls
[08:50:49] macgui: Minimum length of title for scan: 900000
[08:50:49] hb_scan: path=/Volumes/Macintosh HD 2/Users/Martin/Movies/Temp/MKV_HULK/HULK.mkv, title_index=0
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening /Volumes/Macintosh HD 2/Users/Martin/Movies/Temp/MKV_HULK/HULK.mkv/BDMV/index.bdmv
libbluray/bluray.c:1471: nav_get_title_list(/Volumes/Macintosh HD 2/Users/Martin/Movies/Temp/MKV_HULK/HULK.mkv) failed (0x102101200)
[08:50:49] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[08:50:49] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Volumes/Macintosh HD 2/Users/Martin/Movies/Temp/MKV_HULK/HULK.mkv':
  Metadata:
    title           : Main Movie
  Duration: 02:18:06.86, start: 0.000000, bitrate: 768 kb/s
    Chapter #0.0: start 0.000000, end 260.033000
    Metadata:
      title           : Main Titles
    Chapter #0.1: start 260.033000, end 681.000000
    Metadata:
      title           : The Banne Bloodline
    Chapter #0.2: start 681.000000, end 834.450000
    Metadata:
      title           : Dr. Krenzler
    Chapter #0.3: start 834.450000, end 1043.333000
    Metadata:
      title           : Nanomeds And Gamma Rays
    Chapter #0.4: start 1043.333000, end 1211.750000
    Metadata:
      title           : Talbot's Offer
    Chapter #0.5: start 1211.750000, end 1369.283000
    Metadata:
      title           : My First Memory
    Chapter #0.6: start 1369.283000, end 1755.250000
    Metadata:
      title           : My Bruce
    Chapter #0.7: start 1755.250000, end 1956.000000
    Metadata:
      title           : The Accident
    Chapter #0.8: start 1956.000000, end 2220.916000
    Metadata:
      title           : Your Name Is Banner
    Chapter #0.9: start 2220.916000, end 2362.583000
    Metadata:
      title           : Lunch With Dad
    Chapter #0.10: start 2362.583000, end 2710.250000
    Metadata:
      title           : The Beast Within
    Chapter #0.11: start 2710.250000, end 2938.200000
    Metadata:
      title           : The Morning After
    Chapter #0.12: start 2938.200000, end 3248.033000
    Metadata:
      title           : My Son Is Unique
    Chapter #0.13: start 3248.033000, end 3456.666000
    Metadata:
      title           : Forced Hand
    Chapter #0.14: start 3456.666000, end 3589.583000
    Metadata:
      title           : Talbot's Mistake
    Chapter #0.15: start 3589.583000, end 4270.666000
    Metadata:
      title           : Betty And The Beast
    Chapter #0.16: start 4270.666000, end 4566.166000
    Metadata:
      title           : His Father's Son
    Chapter #0.17: start 4566.166000, end 4749.666000
    Metadata:
      title           : The Essences Of All Things
    Chapter #0.18: start 4749.666000, end 5089.450000
    Metadata:
      title           : Home
    Chapter #0.19: start 5089.450000, end 5235.700000
    Metadata:
      title           : Talbot In Charge
    Chapter #0.20: start 5235.700000, end 5518.916000
    Metadata:
      title           : My Downfall
    Chapter #0.21: start 5518.916000, end 5768.916000
    Metadata:
      title           : Out Of Control
    Chapter #0.22: start 5768.916000, end 6096.250000
    Metadata:
      title           : Desert Fury
    Chapter #0.23: start 6096.250000, end 6424.333000
    Metadata:
      title           : Target: Hulk
    Chapter #0.24: start 6424.333000, end 6582.500000
    Metadata:
      title           : Top Of The World
    Chapter #0.25: start 6582.500000, end 6930.116000
    Metadata:
      title           : A Chance To Calm Down
    Chapter #0.26: start 6930.116000, end 7368.533000
    Metadata:
      title           : Give Back Your Life
    Chapter #0.27: start 7368.533000, end 7646.666000
    Metadata:
      title           : Battle Of The Banners
    Chapter #0.28: start 7646.666000, end 7703.666000
    Metadata:
      title           : Sweet Dreams
    Chapter #0.29: start 7703.666000, end 7859.500000
    Metadata:
      title           : One Year Later...
    Chapter #0.30: start 7859.500000, end 7953.666000
    Metadata:
      title           : Me Esta Enojando
    Chapter #0.31: start 7953.666000, end 8286.861000
    Metadata:
      title           : End Titles
    Stream #0.0(eng): Video: vc1 (Advanced), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
    Stream #0.1(ger): Audio: eac3, 48000 Hz, 5.1, s16, 768 kb/s (default)
    Metadata:
      title           : 3/2+1
[08:50:49] scan: decoding previews for title 1
[08:50:50] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 16/24/0/0, aspect 16:9, PAR 1:1
[08:50:50] scan: title (0) job->width:1920, job->height:1040
[08:50:50] libhb: scan thread found 1 valid title(s)
[08:50:50] macgui: showNewScan: This is a new source item scan
[08:50:50] macgui: Preview: Enabling HUD Controls
[08:51:12] 1 job(s) to process
[08:51:12] starting job
[08:51:12] sync: expecting 383 video frames
[08:51:12] job configuration:
[08:51:12]  * source
[08:51:12]    + /Volumes/Macintosh HD 2/Users/Martin/Movies/Temp/MKV_HULK/HULK.mkv
[08:51:12]    + title 1, start 0:0:0.00 stop 0:0:15.00
[08:51:12]    + container: matroska,webm
[08:51:12]    + data rate: 768 kbps
[08:51:12]  * destination
[08:51:12]    + /Users/Martin/Library/Application Support/HandBrake/Previews/61078/preview_temp.m4v
[08:51:12]    + container: MPEG-4 (.mp4 and .m4v)
[08:51:12]  * video track
[08:51:12]    + decoder: vc1
[08:51:12]    + frame rate: same as source (around 23.976 fps)
[08:51:12]    + strict anamorphic
[08:51:12]      + storage dimensions: 1920 * 1080 -> 1920 * 1040, crop 16/24/0/0, mod 16
[08:51:12]      + pixel aspect ratio: 1 / 1
[08:51:12]      + display dimensions: 1920 * 1040
[08:51:12]    + encoder: H.264 (x264)
[08:51:12]      + options: ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=0
[08:51:12]      + quality: 20.00 (RF)
[08:51:12]  * audio track 1
[08:51:12]    + decoder: Deutsch (eac3) (5.1 ch) (track 1, id 0x1)
[08:51:12]    + mixdown: Dolby Pro Logic II
[08:51:12]    + encoder: AAC (CoreAudio)
[08:51:12]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:51:12] encx264: min-keyint: 24, keyint: 240
[08:51:12] encx264: encoding with stored aspect 1/1
[08:51:12] encx264: Encoding at constant RF 20.000000
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
x264 [info]: profile Main, level 4.0
[08:51:12] reader: first SCR 67758210 id 0x0 DTS 67758210
[08:51:12] sync: adding 73 ms of silence to audio 0x1  start 6570, next 0
[08:51:20] sync: reached pts 1351350, exiting early
[08:51:21] work: average encoding speed for job is 45.384075 fps
[08:51:21] reader: done. 1 scr changes
[08:51:21] sync: got 359 frames, 383 expected
[08:51:21] vc1-decoder done: 410 frames, 1 decoder errors, 0 drops
[08:51:21] render: lost time: 0 (0 frames)
[08:51:21] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:6     Avg QP:18.73  size:162546  PSNR Mean Y:45.88 U:52.15 V:52.85 Avg:47.19 Global:47.16
x264 [info]: frame P:175   Avg QP:21.57  size: 63980  PSNR Mean Y:42.73 U:48.85 V:49.93 Avg:44.04 Global:43.98
x264 [info]: frame B:178   Avg QP:22.71  size: 24918  PSNR Mean Y:41.82 U:48.62 V:49.49 Avg:43.18 Global:43.12
x264 [info]: consecutive B-frames: 15.6% 42.3% 37.6%  4.5%
x264 [info]: mb I  I16..4: 33.9%  0.0% 66.1%
x264 [info]: mb P  I16..4: 24.8%  0.0%  3.1%  P16..4: 44.0% 15.4%  8.8%  0.0%  0.0%    skip: 3.9%
x264 [info]: mb B  I16..4:  6.8%  0.0%  0.2%  B16..8: 35.4%  6.6%  0.4%  direct:14.5%  skip:36.0%  L0:27.9% L1:46.4% BI:25.7%
x264 [info]: coded y,uvDC,uvAC intra: 81.0% 43.3% 6.4% inter: 30.9% 16.0% 0.1%
x264 [info]: i16 v,h,dc,p: 27% 12% 48% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 21% 21%  6%  6%  6%  6%  5%  5%
x264 [info]: i8c dc,h,v,p: 51% 18% 29%  3%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: SSIM Mean Y:0.9674100 (14.869db)
x264 [info]: PSNR Mean Y:42.360 U:48.807 V:49.780 Avg:43.696 Global:43.593 kb/s:8857.77
[08:51:21] eac3-decoder done: 0 frames, 0 decoder errors, 0 drops
[08:51:21] mux: track 0, 359 frames, 16607010 bytes, 8848.22 kbps, fifo 256
[08:51:21] mux: track 1, 704 frames, 308210 bytes, 164.21 kbps, fifo 1024
[08:51:21] libhb: work result = 0
For some image showing the artifacts see my public disk:
https://public.me.com/m.hoffmann.bs/

HULK.png - see this was nearly a still picture, only the girl was moving a little and the artifacts are everywhere around her!

Any idea?

Re: Strange artefacts on vc1 decoder introduced after 201101

Posted: Mon Jan 30, 2012 7:00 pm
by Deleted User 11865
It's indeed a decoding bug, introduced in svn 4291 (Libav 0.7.1 -> Libav-git-5f3fb59).

It was fixed upstream in http://git.libav.org/?p=libav.git;a=commit;h=498605b

Re: Strange artefacts on vc1 decoder introduced after 201101

Posted: Mon Jan 30, 2012 8:06 pm
by Deleted User 11865
This should be fixed in tomorrow's nightly build: https://trac.handbrake.fr/changeset/4427

Re: Strange artefacts on vc1 decoder introduced after 201101

Posted: Tue Jan 31, 2012 5:30 am
by auf_krawall_gebürstet
A bit OT: What about interlaced VC-1 support?
It's still not there.

Re: Strange artefacts on vc1 decoder introduced after 201101

Posted: Tue Jan 31, 2012 7:11 am
by TedJ
HandBrake requires Libav for VC-1 decoding... as yet, interlaced VC-1 decoding in Libav is only partially supported.

Re: Strange artefacts on vc1 decoder introduced after 201101

Posted: Tue Jan 31, 2012 8:35 am
by MaHoff
@Rodeo - looks good!
Quite impressive how fast you fixed this one :-)

I'll try to encode the whole movie now ...

Re: Strange artefacts on vc1 decoder introduced after 201101

Posted: Tue Jan 31, 2012 11:56 am
by rachel
Wasn't aware of this bug; checked, with an encode from a vc1-progressive source (The Dark Knight) done 20 November 2011 (using handbrake 4360svn according to mediainfo) and there's no sign of these artifacts. It all looks great, including in motion. Presumably it's significant for certain sources only? (That libav bug report looks like it's related to mixed progressive and interlaced video in one source? so part of vc1-interlaced support not being fully there yet? Wouldn't have though the Hulk movie would have had any interlaced either though...)

edit: just adding notify flag

Re: Strange artefacts on vc1 decoder introduced after 201101

Posted: Wed Feb 01, 2012 5:39 am
by MaHoff
@rachel: I did not notice any sign of interlaced parts in HULK and these artifacts appeared in all scenes ...

@Rodeo: i encoded the whole movie and no problems appeared with latest nightly!
Thank you very much - keep up the good work!

Regards, Martin