Monday, 2016-08-08

*** tpb has joined #timvideos00:00
*** cr1901 has joined #timvideos00:09
*** miselin has joined #timvideos01:02
*** sb0 has joined #timvideos01:25
mithrocr1901_modern: Do you have an example of this being connected up?02:48
cr1901mithro: Check the master branch of my copy of the repo. It has an extra commit showing how to connect it to minispartan6_base and video02:50
mithrocr1901: Link?02:50
mithro ?02:51
tpbTitle: HDMI2USB-misoc-firmware/ at master · cr1901/HDMI2USB-misoc-firmware · GitHub (at
cr1901mithro: Yes, that02:52
cr1901Netbook is currently having a stroke, sorry02:52
mithrocr1901: I don't quite understand the arguments...02:52
mithroBe back in 30 minutes02:52
cr1901mithro: Hopefully by that time my netbook will have decided to STOP  USING SWAP02:54
cr1901mithro: First input argument is the clock frequency of the counter. The second input argument is the max bit width of pulse counter attached to the signal of interest, that resets to zero every clock cycle. The third input argument is the accumulator width, which is incremented by the number of pulses counted every clock cycle until 1 second has elapsed.03:01
cr1901So a 6-bit pulse counter would let you count a signal that's up to 64 times higher frequency that the clock frequency of the counter (within reason; you'll hit the bandwidth of the IO pin before that)03:02
cr1901mithro: My energy has left me. I need to sleep, sorry :(...03:10
*** Bertl_oO is now known as Bertl_zZ03:37
*** sb0 has quit IRC04:25
mithrocr1901: Have a good sleep04:39
*** rohitksingh_work has joined #timvideos04:39
*** rohitksingh_work has quit IRC04:41
*** rohitksingh_work has joined #timvideos04:43
mithroconda has been really unreliable lately :(05:28
mithrohey rohitksingh_work05:28
rohitksingh_workmithro: hi!05:28
*** CarlFK has quit IRC05:33
*** CarlFK has joined #timvideos05:33
*** ChanServ sets mode: +v CarlFK05:33
*** ssk1328 has joined #timvideos05:39
*** sb0 has joined #timvideos05:41
ssk1328mithro: Looking at the block diagrams I had some questions05:42
mithrossk1328: shoot!05:43
ssk1328mithro: Earlier the pixel stream first goes through VTG, (which does timing hsync vsync stuff), and then through the Driver(which does the all the mixing)05:43
mithrossk1328: BTW your photo link is broken on your snippets is a 40405:43
tpbTitle: Sign in - Google Accounts (at
mithrossk1328: Earlier? You mean currently, or?05:46
ssk1328mithro: But now you propose that the mixing be done before timing, correct? And the timing generator is connected to Output blocks05:46
ssk1328mithro: Earlier means the connections before any reworking05:46
mithrossk1328: Well, it is unclear to me if the timing generator would need to be connected to the mixing bit05:47
mithrossk1328: What I'm actually saying is that we move the mixing out into its own module05:48
ssk1328mithro: So I think that the new Mixer block will have existing VTG module followed by Driver module05:48
ssk1328mithro: The mixing float modules will be used in the Driver module as before05:49
mithrossk1328: The Mixing module shouldn't really be inside the driver module05:51
mithrossk1328: Really the mixing module is just an "adapter" it takes N pixels layout in and produces a single pixel output05:52
ssk1328mithro: Yes05:52
ssk1328mithro: So, the driver should remain as before05:53
ssk1328mithro: One driver module per ouput05:53
mithrossk1328: well, previously the driver contained the dma engine, right?05:53
ssk1328mithro: dma was defined independently, outside driven, directly in the file of hdmi_out folder05:54
mithroaah, yean I'm getting the "HDMIOut" and "Driver" modules confused05:54
ssk1328mithro: HDMIOut is the big thing that contained everthing05:55
mithrogah, I understood this yesterday and now I've already forgotten everything05:56
mithrossk1328: How does the VTG work?05:56
mithro        self.timing = Sink(timing_layout)05:56
mithro        self.pixels = Sink(pixel_layout(pack_factor))05:56
mithro        self.phy = Source(phy_layout(pack_factor))05:56
mithroIt has two sinks and a source05:57
ssk1328mithro: VTG takes timing parameters from FrameInitiator and pixels from VTG05:57
ssk1328mithro: And there is an FSM which controls when to send pixels as per the timing parameters received05:57
ssk1328mithro: And I guess the Async FIFO at the start of Driver maintains the output correctly06:00
mithroSo, looking at
ssk1328mithro: Yes06:00
mithrossk1328: So, looking at the diagram in your document I labelled "P1" - does that make sense?06:03
ssk1328mithro: I just think that VTG should be before Mixer Block06:06
mithrossk1328: Why?06:06
ssk1328mithro: And Mixer output is directly connected to HDMI_OUT06:06
ssk1328mithro: The existing mixing is done after VTG does its magic, so I am not sure this will work before VTG06:07
mithrossk1328: Does the mixing use any of the VTG created signals?06:14
ssk1328mithro: Just the pixel layout signals06:15
mithrossk1328: Yeah - which I think means it should be before the VTG...06:17
ssk1328mithro: Okay06:17
ssk1328mithro: I am gonna test this without mixing first just in case06:18
mithrossk1328: If it becomes an independent module, then it should be pretty easy to move it after the VTG if it ends up being needed, right?06:19
ssk1328mithro: Yes06:19
ssk1328mithro: That shouldn't be much of an hassle06:19
mithrossk1328: You could replace the mixing block with something which just takes the [pixel, pixel, pixel](sink) layout into [pixel](source), [pixel](source), [pixel](source) output?06:20
mithrossk1328: I think it might make sense to start a totally new branch and create the structure in Diagram P1/P2 with a dummy mixing block06:24
mithrossk1328: We can then merge that bit and add the mixing block in a seperate pull request?06:25
ssk1328mithro: Okay06:25
mithrossk1328: Does that make sense to you?06:25
ssk1328mithro: Yeah so first rework the HDMI_OUT as per the blopck diagram without any mixing just direct conections, and then once this is one add mixing to the mixer module06:26
mithrossk1328: I mean, does it make sense to you for us to split the work into this structure?06:27
ssk1328mithro: Yeah, so I have another technical doubt06:27
ssk1328mithro: Earlier Till the driver module each layout has packfactor number of pixels per clock cycle06:28
ssk1328mithro: And in the driver module (somewhere int he FIFO module) this is separated into individual pixels, after which mixing is done06:29
ssk1328mithro: Plus we need to take care of fact that multiplier value will later depend upon (x,y) value in frame, which comes from timing stuff in VTG06:30
ssk1328mithro: These are two separate concers actually06:31
mithrossk1328: The pixel gather already knows the "address" of the pixel...06:32
mithrossk1328: Lets give it a go and see? If it doesn't work we can change it06:34
ssk1328mithro: Thats just the base address, the pixel gather, should have some counters and all to count this06:34
ssk1328mithro: Okay06:34
mithrossk1328: Diagram P4 would be how it connects up in your scenario, right?06:38
ssk1328mithro: Yes06:38
ssk1328mithro: It shouldn't be too difficult to rework it though06:39
mithrossk1328: okay06:41
mithrocr1901: So I added the freq detector to the hdmi input and the numbers don't seem to make sense06:54
mithrocr1901: The computer says it is sending a pixel clock of 74.250MHz06:54
mithrocr1901: The counter is saying; -- freq: Frequency: 118 MHz (118801418 Hz)06:55
mithrocr1901: I wonder if I'm using the wrong values for the parameters06:55
mithrocr1901: It might be because I'm giving the wrong value for the first parameter, trying the same value as clk_freq now...07:14
mithrocr1901: It works!07:20
mithrocr1901: freq: Frequency: 74 MHz (74250845 Hz)07:20
tpbTitle: Comparing timvideos:master...mithro:hdmi-freq-counter · timvideos/HDMI2USB-misoc-firmware · GitHub (at
*** sb0 has quit IRC08:28
xfxfthaytan: are you around?  i have some gstreamer questions i'd love some help with08:30
xfxfin short, trying to sync hdmi2usb v4l video with USB audio + voctomix using a central network clock.  the biggest sync issues appeared to be solved by using alsasrc provide-clock=false slave-method=resample, but we're still a few frames mismatched on the machine taking in the camera - i assume the camera delays the picture by a few frames doing internal08:31
xfxfcurious how i introduce a delay into one part of a muxed pipeline08:31
xfxf(also, is using slave-method=resample advised, or use another?)08:32
xfxfthaytan: i ported over the set_offset() stuff into carl's script which is sort of working, see:09:21
tpbTitle: voctomix-outcasts/ at master · xfxf/voctomix-outcasts · GitHub (at
xfxfis there a better way of doing this?  i note if i make the delay too long (i.e. 1) then everything breaks.  need to increase video/audio buffers or something?09:22
xfxfCarlFK: you may also be interested in above, appears to fix your 1 second audio delay issue09:22
CarlFKxfxf: what does it do when it doesn't need fixing?09:24
xfxfaudio video totally out of sync09:30
mithrobe back after dinner09:31
*** Bertl_zZ is now known as Bertl09:39
*** sb0 has joined #timvideos09:50
xfxfCarlFK: i suspect you'd only see this if displaying hdmi2usb video with audio from your camera.  for this conf i'm not using blackmagic cards, instead hdmi2usb+usb audio on mixer pc, hdmi2usb over network for presenter laptop capture09:57
CarlFKxfxf:  I had audio into camera, camera into bm card, and 'sometimes' (like 5%?) I get the 1 second problem10:18
xfxfhmm, with my altered script above, i seem to now have perfectly synced video with --delay-video arguments on both computers10:19
xfxfwill let it run for ages10:19
xfxfi'll correct an issue i found in the script and send you a PR10:19
xfxfassuming this is actually fixed, it may not be10:20
xfxfwait, nope, audio getting out of sync. sigh10:25
*** danielki has joined #timvideos10:25
CarlFKxfxf: I seem to remember somthing like "oh, alsa src isn't using the right clock..."10:29
xfxfyes, the patch above addresses that10:29
CarlFKwhat patch?10:30
xfxfthe url i pasted above10:31
xfxfi forked your repo10:31
xfxfoh wait, audio didn't get out of sync.  voctomix's gui just did, restarted it, back in sync10:32
xfxfthat's annoying, i thought that was fixed10:32
xfxfdo you still get that?10:32
CarlFKnot sure.  I haven't seen any sync issues from PyOhio.  4 machines, one of them only had 2 gig.. so things got ... icky, but stayed in sync10:48
xfxfand all of yoru audio was via blackmagic, or any via alsa or pulse?10:52
CarlFKI haven't done any alsa/pulse10:57
xfxfright, that's what i thought, so i'm dealing with a new problemset10:58
*** ssk1328 has quit IRC11:15
*** ssk1328 has joined #timvideos11:17
*** rohitksingh_work has quit IRC11:25
*** rohitksingh_work has joined #timvideos11:26
*** cr1901 has quit IRC11:55
tpbTitle: Frequency Counter for Debugging by cr1901 · Pull Request #283 · timvideos/HDMI2USB-misoc-firmware · GitHub (at
*** cr1901 has joined #timvideos12:09
thaytanxfxf, In a python script you can adjust delays on a pad using gst_pad_set_offset() that will affect all data going through it12:28
thaytanby adjusting Segment events12:28
thaytanah, that's the 2nd link12:30
thaytanslave-method=resample is OK if it's working12:30
thaytanI think we could improve it12:30
thaytanit's a bit too eager to switch resampling rate12:31
thaytanand the resampling is only linear interpolation - but that's almost certainly fine for speech12:31
xfxfis slave-method=re-timestamp any better?12:35
xfxf(i had some sync issues before, restarted using this)12:43
mithrossk1328: How are thing going?12:55
mithroxfxf: You should point thaytan to your script to see if he can see any obivous other problems?12:55
xfxfi did, above12:56
tpbTitle: voctomix-outcasts/ at master · xfxf/voctomix-outcasts · GitHub (at
cr1901mithro: Excellent!13:20
mithrocr1901: Do you want to reset your branch to my code and fix up the comments? Then I can merge it13:20
cr1901mithro: Sure, except I'm not actually sure what you did :P. Did you accept my pull request, checkout a new branch (hdmi_freq_counter), roll back your master, and then add your new changes to hdmi_freq_counter?13:22
cr1901Ah, no you didn't accept the pull request. Must've manually made the changes13:23
mithrocr1901: I pulled your change into my repo and then modified it13:23
cr1901mithro: Okay I see. You removed the C files I added, prob b/c they were not really necessary13:25
cr1901mithro: Should I include the Opsis changes in the pull request as well?13:30
mithrocr1901: "git remote add mithro; git fetch mithro; git reset --hard mithro/hdmi-freq-counter"13:31
cr1901mithro: try now13:39
mithrocr1901: Looks like the right things are in your pull request13:40
cr1901mithro: After you accept, let me know... I accidentally pulled your changes into the wrong branch and need to somehow undo them XD13:40
cr1901God I hate git... but DVCS is too good to pass up13:41
mithrocr1901: Hrm?13:42
cr1901mithro: I'm ranting how easy it is to screw up in git. When you accept my pull request, I will somehow need to sync it to master/figure out which commits to remove from my master branch which is now in an inconsistent state13:43
mithrocr1901: I wanted you to do more stuff on the pull request13:44
cr1901mithro: Oh, nevermind then :P13:44
cr1901Erm what else do you need?13:44
mithrocr1901: I've left comments on the pull request13:50
mithrocr1901: basically it would be nice to fix up the documentation13:51
mithrocr1901: It would also be nice to have some tests, but I won't hold my breath for that...13:51
cr1901well I tested this module by combining two boards GPIO; one generating a clock signal at 240MHz,  the other receiving it13:52
*** ssk1328 has quit IRC13:55
*** rohitksingh_work has quit IRC13:58
cr1901mithro: Warning bikeshedding: Is have a separate commit solely for formatting noise for you?14:28
mithromithro: It's find to add another commit to add documentation?14:30
mithrocr1901: Or are you talking about pep8 formatting fixes?14:30
cr1901mithro ^^14:31
mithrocr1901: Fine for that to be a seperate commit14:32
cr1901mithro: git seems to think that the HEAD of your repo is after you committed pull request #280. I'm really stumped as to why I can't seem to get the rest of your commits14:45
mithrocr1901: ?14:45
mithrocr1901: Do you know about gitk?14:46
mithrocr1901: It lets you see the git history in a nice graphical tree structure14:46
mithrocr1901: makes it easy to see what commits are where14:51
cr1901mithro: Yea I installed it. Uploading an image now14:52
cr1901(Netbook was slow)14:52
tpbTitle: Imgur: The most awesome images on the Internet (at
cr1901This is what git thinks is the current head14:55
mithrocr1901: gitk --all14:55
mithroCarlFK: I'm going to have a couple of things for you to test on an Atlys in an hour14:56
cr1901Okay, now I see commits from Aug 814:56
cr1901Now what in the world did I do to this poor repo XD?14:56
mithrocr1901: screenshot?14:58
CarlFKmithro: k - give me a 10 min warning, I need to hobble out to my car in the garage14:58
CarlFKdid you know I broke my foot (again)14:58
mithroCarlFK: No I did not14:59
mithroCarlFK: I think I fixed the atlys-memtest issue14:59
CarlFK"Acute nondisplaced fifth metatarsal base fracture. Soft tissue   swelling. No dislocation"14:59
CarlFKI cracked the long bone that goes to my little toe14:59
CarlFKnow I need to make sure I don't break it the rest of the way.  so protective boot and crutches.  no pain, just a hassle15:00
cr1901mithro: 2 seconds please15:01
tpbTitle: Imgur: The most awesome images on the Internet (at
mithrocr1901: so, "git checkout freq_count"15:03
mithrocr1901: Oh, I also have a lot of branches :P15:04
cr1901mithro: That's not a horrible thing. It's just that git seems to think a bunch of commits are missing15:04
mithrocr1901: What commits are missing?15:04
cr1901mithro: Small fixes to output logging15:05
cr1901mithro: Merge pull request #28515:06
cr1901mithro: Adding fifo_depth to HDMI outputs15:06
cr1901everything on master after "merge #280"15:06
mithrocr1901: Why do you think git things commits are missing?15:06
cr1901Why aren't these commits showing up when I pull?15:07
cr1901mithro: Because when I pull, everything is "up to date" as of "merge #280"15:07
mithrocr1901: your master is at the same point as mithro/master15:08
mithrocr1901: If you want to move master to some other point, move it to some other point15:08
mithrocr1901: You also don't have an upstream remote either15:08
mithrocr1901: I recommend doing "git remote add upstream; git fetch upstream"15:09
cr1901Oh f*** me...15:10
cr1901Yea, that's the problem LOL15:10
mithrocr1901: But your master branch isn't all that useful15:10
mithrocr1901: you want to be on the freq_count branch15:10
cr1901Okay, fixing rectifying that now15:11
*** RattusRattus has joined #timvideos15:35
RattusRattusmithro: oh one last thing before I head out.  This is not just OSH projects I see this.  The company I work for has similar problems, and right now 26 products of their scandinavion product line have show stopping problems due to tollerance stackup issues caused by letting the factory pick which parts to fit (and it is costing them a fortune and a lot of time to put right)15:38
mithroRattusRattus: It's likely I'm going to end up hand soldering these - so I'm not to worried about that bit15:39
mithroRattusRattus: but yeah, I understand it makes difference when you are trying to do larger things15:39
RattusRattusor just go back to them 1 or 2 years later and build a couple more....15:41
CarlFKmithro: it will make RattusRattus stop talking about it :p15:46
CarlFKRattusRattus: (thank you for talking about it.  sounds very reasonable to me)15:47
mithroHe is very welcome to send a patch fixing it! :P15:48
*** danielki has quit IRC15:49
mithrotwo more pull requests to merge before I can head to bed...15:52
cr1901mithro: Can you show me a docstring example suitable for HDMI2USB>15:55
cr1901?* I don't really see any other modules using docstrings15:55
tpbTitle: migen/ at master · m-labs/migen · GitHub (at
mithrocr1901: just the migen style15:56
mithrocr1901: seems to be this style ->
tpbTitle: Simple Formatting Rules (at
mithrocr1901: some links to hamster's explaination stuff would be good too16:02
cr1901mithro: Ack. I'll need to finish later today (if you were waiting for me)16:08
mithrocr1901: Nope - trying to merge some other stuff16:29
mithroCarlFK: There are a bunch of firmware revisions which will land in the prebuilt repo over the next hour or two17:08
mithroCarlFK: can you test them on the Atlys?17:08
CarlFKmithro: yes17:09
mithroCarlFK: v0.0.2-63-g24c11c0 should hopefully fix the memtest problem17:10
CarlFKmithro: how many revs?  wondering if I should use my autoated tester script or just do 2 or 3 by hand17:11
mithroCarlFK: there are 3 revs which I'd like you to do by hand17:11
mithroCarlFK: but it would be good to use your autotester script for all the other revisions17:12
mithroCarlFK: If I'm correct, they should be17:12
mithrov0.0.2-63-g24c11c0 <- atlys-memtest-fix17:12
mithrov0.0.2-61-ga02ee1a <- bunch of timing fixes17:13
mithrov0.0.2-41-g00d86be <- fifo adjustments17:13
mithroCarlFK: can you test them properly for ability to record and graphical issues on the inputs/outputs/encoding17:14
mithroCarlFK: I would like to know if you can find any difference between the three17:14
mithroCarlFK: The builds on travis are here ->
tpbTitle: Travis CI - Test and Deploy Your Code with Confidence (at
CarlFKmithro: maybe.  I am not sure I have any hdmi monitors right now17:16
CarlFKI own 8, they all went to PyOhio and I think they are all in the shipping container which has not come back yet17:16
CarlFKbut there may be one in my car.. brb  may be 10 min...17:16
mithroCarlFK: I'm going to head to bed in a moment17:21
*** rohitksingh has joined #timvideos17:23
*** rohitksingh has quit IRC17:28
*** rohitksingh has joined #timvideos17:29
*** ssk1328 has joined #timvideos18:22
*** danielki has joined #timvideos18:23
*** Bertl is now known as Bertl_oO18:34
*** Bertl_oO_ has joined #timvideos18:54
*** Bertl_oO has quit IRC18:54
*** sb0 has quit IRC19:22
*** danielki has quit IRC19:24
*** rohitksingh has quit IRC19:30
*** Bertl_oO_ is now known as Bertl_zZ21:34
*** ssk1328 has quit IRC23:15
*** cr1901 has quit IRC23:55

Generated by 2.13.1 by Marius Gedminas - find it at!