[Ffmpeg-devel-irc] ffmpeg-devel.log.20170310
burek
burek021 at gmail.com
Sat Mar 11 03:05:03 EET 2017
[00:15:12 CET] <nevcairiel> you can use _ref and afterwards call av_frame_make_writable one the one you want to modify
[00:15:23 CET] <nevcairiel> it'll copy the data to ensure existing copies dont get modified
[01:17:14 CET] <ZeroWalker> anyone that can help me with writing a frame (encoded package) to a file, i fail at avformat_write_header, http://sprunge.us/BVVL
[01:42:43 CET] <ZeroWalker> no one;(?
[01:59:38 CET] <reeskm> if i built my own custom ffmpeg and i'm having problems with using libxvid, should I ask my question here or on #ffmpeg?
[02:06:32 CET] <reeskm> basically i linked it against libxvidcore but when i try and specify -c:v libxvid it crashes with an illegal instruction. encoding using the builtin mpeg4 succeeds.
[02:06:40 CET] <RiCON> in #ffmpeg
[02:07:08 CET] <RiCON> this is a channel for developing FFmpeg, not using it
[02:08:20 CET] <reeskm> i know how to use ffmpeg, but seem to have hit a bug?
[02:12:18 CET] <RiCON> still better to make an issue in the trac
[02:13:15 CET] <reeskm> ok i'll do that! thanks
[02:21:04 CET] <cone-106> ffmpeg 03Thomas Guilbert 07master:9bbc73ae9fde: avcodec/vp8: Fix hang with slice threads
[02:21:40 CET] <nevcairiel> vp8 supports slice threads?
[02:22:52 CET] <nevcairiel> guess it does
[03:00:27 CET] <BBB> nevcairiel: its strictly speaking partition threading"
[03:01:00 CET] <BBB> jamrial: increase the count
[03:01:06 CET] <BBB> jamrial: it runs only 1000x
[03:01:16 CET] <BBB> jamrial: if you run 5000x, it will be faster
[03:01:39 CET] <jamrial> BBB: i took that from BtbN's paste, and he ran 10k
[03:01:42 CET] <BBB> oh
[03:01:45 CET] <BBB> thats strange
[03:02:05 CET] <BBB> no clue then
[03:02:45 CET] <jamrial> ryzen has a 128bit execution unit, so i find it strange that it's faster in some functions. i'd expect it to be slower in all
[03:03:23 CET] <jamrial> maybe it depends on the instruction. like, once you get into the whole cross lane bullshit that's where it gets hit the most
[05:58:11 CET] <rcombs> any objections to https://ffmpeg.org/pipermail/ffmpeg-devel/2017-March/208207.html
[06:00:02 CET] <cone-067> ffmpeg 03Aaron Boxer 07master:195784ec9526: libavcodec/libopenjpegenc: enable lossless option, remove layer option, and improve defaults
[11:05:36 CET] <durandal_1707> vlc opengl stuff and lavc stuff is really buggy
[12:19:45 CET] <kierank> If anyone is merging from libav, please don't merge their cineform. It's full of breaking cosmetic changes
[12:35:36 CET] <wm4> don't worry, nobody is merging from libav
[12:35:48 CET] <wm4> and if they are they get actively fought
[12:45:33 CET] <durandal_1707> kierank: how that possible?
[12:53:03 CET] <durandal_1707> wm4: how so? will now get only clusterfu* changes
[13:24:49 CET] <durandal_1707> i will merge bitstream stuff
[13:28:29 CET] <kierank> wm4: good to see both projects are in batshit insane mode as usual
[15:22:43 CET] <BBB> Ive got a second vmaf gsoc task student
[15:22:49 CET] <BBB> anyone can think of a good qualification task?
[15:23:11 CET] <BBB> Im thinking maybe implement a ansnr filter (like psnr filter), which would probably be the simplest step in the vmaf filter?
[16:01:26 CET] <durandal_1707> BBB: a stuff is reserved for audio
[16:01:57 CET] <BBB> vf_ansnr
[16:02:03 CET] <BBB> that should be non-confusing right?
[16:03:56 CET] <durandal_1707> what ansnr stands for?
[16:07:51 CET] <BBB> it applies a filter before calculating the snr& the n stands for noise
[16:07:58 CET] <BBB> I dont know what the a stands for
[16:10:39 CET] <BBB> its essentially a low-pass filter
[16:47:12 CET] <nightlingo> hello
[16:47:48 CET] <nightlingo> I need to be able to stream to stdout when converting into .mp4 format, for example:
[16:47:49 CET] <nightlingo> ffmpeg -i file.avi -f mp4 - > file.mp4
[16:47:50 CET] <nightlingo> However, I get the following error: muxer does not support non seekable output - I get the reason why the mp4 writer doesn't support this. But is there any work around for this? I've beel searching for days! Thank you
[16:48:41 CET] <nevcairiel> mp4 is not a format designed for such an output
[16:49:23 CET] <nightlingo> yes, but maybe a workaround ? like, writing the moov atom in the and of the file or something?
[16:49:51 CET] <DHE> inappropriate question for this channel
[16:50:27 CET] <nightlingo> DHE: where could I ask about this?
[16:50:29 CET] <Rathann> nightlingo: /j #ffmpeg
[16:50:48 CET] <nightlingo> ok thank you
[16:50:56 CET] <durandal_1707> he is already there
[16:55:30 CET] <nightlingo> is there a channel related to the mp4 format to ask a format-level question?
[16:58:45 CET] <BBB> nightlingo: not that I know...
[17:34:23 CET] <adeel1> durandal_1707: the image dimensions are: 15x16 and the outer for loop get stuck stack 14; meaning at the last row. Could this have something to do with wroning XPM file formatting?
[17:36:34 CET] <adeel1> atomnuker: did durandal_1707 change their nickname? I can't view it in the list.
[18:17:25 CET] <atomnuker> adeel1: no, he just disconnected himself
[18:18:37 CET] <adeel1> atomnuker: oh, ok. Well, I am having some issues with xpmdec. Could you help me out?
[18:19:54 CET] <atomnuker> sure, what's the problem??
[18:24:13 CET] <adeel1> atomnuker: so, I finished the functionality for the decoder. For one example, I'm getting a distored output (purple boundries), and for the other the output window doesn't open and it show 'nan'.
[18:24:33 CET] <adeel1> Please let me know if I need to share the latest code
[18:35:50 CET] <atomnuker> can you post a screenshot?
[19:02:20 CET] <atana> michaelni, after fft overlap total of 9 failures
[19:08:17 CET] <adeel1> atomnuker: there you go: https://snag.gy/afNAPT.jpg
[19:08:53 CET] <adeel1> durandal_1707: the image dimensions are: 15x16 and the outer for loop gets stuck at 14; meaning at the last row. Could this have something to do with wrong XPM file formatting?
[19:12:49 CET] <durandal_1707> adeel1: another student did 99% of qualification task he just need to send patch to mailing list
[19:14:05 CET] <adeel1> durandal_1707: you know I completed this as well. The XPM file was getting fully decoded. It's on the other file that I'm having the issue on.
[19:14:42 CET] <durandal_1707> nope,where is > 256 colors support
[19:21:00 CET] <durandal_1707> adeel1: it could hang if it enters loop but then it should start to consume cpu
[19:21:48 CET] <adeel1> durandal_1707: The CPU is idle. yet it still hangs.
[19:24:16 CET] <adeel1> durandal_1707: for adding > 256 color support, does the file has somehow to be linked with parseutils.c?
[19:24:36 CET] <adeel1> I've noticed new colors were added in the patch file
[19:25:49 CET] <durandal_1707> nope, if you look at code you will see that number of colors are read from line in xpm file
[19:26:24 CET] <knight___> Hi, I want to send my patches and git send-email is not getting setup, please advise
[19:26:40 CET] <durandal_1707> color names from parseutils are just for colors given as name instead of hex
[19:27:10 CET] <durandal_1707> knight___: you can attach patch too
[19:27:51 CET] <durandal_1707> for send mail via git you need to add 2 lines in git conf file
[19:28:09 CET] <durandal_1707> inside relevant git repo
[19:28:29 CET] <adeel1> durandal_1707: yes, but that only check if no. of colors are > 256 and logs errors. I assume adding the > 256 support is not as easy as just removing that code block? or is it?
[19:28:39 CET] <knight___> Where can I find the those lines?
[19:29:01 CET] <durandal_1707> adeel1: not just removing, few lines shoulbe added
[19:29:42 CET] <knight___> Attaching patch as in attachement in the mail?
[19:29:48 CET] <durandal_1707> knight___: blame doc you read, for time being just attach patches to email
[19:30:09 CET] <knight___> patches in git-format patch style?
[19:30:16 CET] <durandal_1707> knight___: yes
[19:30:31 CET] <durandal_1707> please no git diff
[19:33:25 CET] <adeel1> durandal_1707: okay, I've removed it. As for the addition, I'm assuming the for loop that runs for ncolors has to be modified?
[19:34:46 CET] <durandal_1707> adeel1: you need to use another pix fmt
[19:35:57 CET] <durandal_1707> for loops are only slightly modified
[19:36:27 CET] <durandal_1707> adeel1: does it hang with other XPM files?
[19:38:19 CET] <adeel1> durandal_1707: I've tried 2 other examples, and it works fine for them
[19:42:54 CET] <adeel1> durandal_1707: currenty we're using pal8 which has 4 color channels, sholdn't this already be > 256?
[19:47:37 CET] <c3r1c3-Win> adeel1: are you sure that fourth channel is a color and not an alpha channel?
[19:47:52 CET] <c3r1c3-Win> adeel1: and what bit depth are you channels?
[19:49:07 CET] <adeel1> c3r1c3-Win: bith depth is 8, i'm not so sure about the alpha channel, though.
[19:54:53 CET] <durandal_1707> adeel1: pal8 means palette 8bit
[19:55:03 CET] <durandal_1707> max 256 colors
[19:55:30 CET] <durandal_1707> 2 ^8 is guess what 256
[19:57:00 CET] <durandal_1707> adeel1: it may hang because av parse doesnt check if color is actually found
[19:57:57 CET] <adeel1> durandal_1707: okay. Going by this list[http://ffmpeg.org/pipermail/ffmpeg-devel/2007-May/035617.html] only gray16be and gray16le have 16bit depth. Should I use one of these?
[19:59:04 CET] <adeel1> so, there's a bug in av_parse_color?
[20:04:44 CET] <durandal_1707> adeel1: what? have you ever heard of rgba ?
[20:05:00 CET] <adeel1> yes
[20:05:30 CET] <durandal_1707> so use it
[20:06:23 CET] <durandal_1707> AV_PIX_FMT_RGBA/BGRA
[20:06:44 CET] <durandal_1707> am really helping to much
[20:06:58 CET] <paras2052> :durandal_1707 hi, thank you for the guidance. I have submitted the patch
[20:07:16 CET] <durandal_1707> adeel1: i cannot point you every single step you need to do
[20:08:01 CET] <paras2052> :durandal_1707 I want to contribute more. Can you assign me some other task or any bug to fix ?
[20:08:17 CET] <durandal_1707> paras2052: you need to simplify colors entry and use uint32t
[20:09:29 CET] <paras2052> :durandal_1707 okay, let me do that
[20:10:38 CET] <paras2052> :durandal_1707 but after making it uint32, i will have to change all the individual colors defined in color_table
[20:11:50 CET] <durandal_1707> paras2052: yes, they were origibally uint32t anyway
[20:12:04 CET] <durandal_1707> make them opaque
[20:12:18 CET] <durandal_1707> with 0xff for alpha
[20:12:29 CET] <paras2052> okay, i am on it
[20:12:47 CET] <durandal_1707> and check please dont ignore bsearch return value
[20:13:36 CET] <durandal_1707> and improve your code style to be same as file you first opened
[20:14:24 CET] <durandal_1707> eg else should be on same line as enclosing }
[20:14:48 CET] <paras2052> i am having a confuson there, if there is any error occurs in bsearch, can i return AVERROR_INVALIDDATA or something else ?
[20:15:00 CET] <paras2052> yes i will make code style improvements too
[20:15:53 CET] <durandal_1707> no just return black
[20:16:04 CET] <paras2052> okay, got it
[20:16:12 CET] <paras2052> any other suggestions/changes ?
[20:16:52 CET] <durandal_1707> paras2052: are you subscribed to ml?
[20:17:54 CET] <durandal_1707> to ffmpeg-devel?
[20:18:45 CET] <paras2052> yes
[20:23:23 CET] <durandal_1707> paras2052: have you tried ppmtoxpm with big images?
[20:25:43 CET] <paras2052> durandal_1707: i have not used ppmtoxpm. i was using GIMP to convert images to XPM and i have tested for one 3.3 MB image containing 10^5 colors
[20:26:33 CET] <paras2052> durandal_1707: should i test for more larger images ?
[20:28:12 CET] <adeel1> durandal_1707: I'm getting a segmentation fault with AV_PIX_FMT_RGBA and AV_PIX_FMT_BGRA. I tried increasing the length of rgba array (not sure why), but that didnt help
[20:28:38 CET] <durandal_1707> paras2052: nope
[20:29:20 CET] <durandal_1707> adeel1: because it uses only one plane data0
[20:35:36 CET] <adeel1> durandal_1707: okay, fixed. its working now. please let me know what to do next.
[20:36:35 CET] <durandal_1707> adeel1: you are too late to the party
[20:37:04 CET] <adeel1> durandal_1707: really? I was the first to get started -_-
[20:37:40 CET] <durandal_1707> adeel1: show your code
[20:37:47 CET] <adeel1> okay
[20:39:45 CET] <adeel1> durandal_1707: https://gist.github.com/adl1995/ea13cce3f4dfe3d8198087b4609db76e
[20:42:49 CET] <durandal_1707> adeel1: check for 256 is still there
[20:43:09 CET] <adeel1> dang
[20:43:16 CET] <adeel1> let me remove it
[20:43:51 CET] <durandal_1707> adeel1: and try to test it with more than 256 colors
[20:45:11 CET] <adeel1> durandal_1707: can't find many xpm images online. should i try to convert regular PNG image and decode that?
[20:46:59 CET] <adeel1> durandal_1707: just decoded a 4.9mb xpm file. its working
[20:49:50 CET] <durandal_1707> adeel1: really, let me see the code?
[20:50:41 CET] <adeel1> durandal_1707: https://gist.github.com/adl1995/9d3e1a310e66a399794e0a89b1f7e69c
[20:52:40 CET] <durandal_1707> adeel1: stiil missing skiping comments
[20:55:03 CET] <adeel1> durandal_1707: yes, that was my first task, if I remember correctly. I did write some code for it at the time. If the image is getting decoded correctly even with comments in the files, doesn't it mean they're already skipped?
[20:56:10 CET] <durandal_1707> nope, just add " middle of comments
[20:59:24 CET] <adeel1> durandal_1707: just added this comment /* colors " */ it's still decoding
[20:59:48 CET] <llogan> git: 'checkoot' is not a git command.
[20:59:54 CET] <llogan> guess it doesn't like scottish
[21:00:39 CET] <durandal_1707> adeel1: its important where
[21:01:16 CET] <adeel1> durandal_1707: where the " is placed?
[21:02:10 CET] <nightlingo> Hello, Im trying to understand how the mp4 format works. I read that ffmpeg cannot write mp4 to stdout because it requires a seekable stream so as to be able to go back and write the header. Is the heaer the moov atom, or the ftyp atom?
[21:02:40 CET] <nightlingo> *header
[21:09:48 CET] <llogan> nightlingo: wrong channel. try #ffmpeg
[21:10:31 CET] <nightlingo> ok
[21:11:50 CET] <durandal_1707> adeel1: in middle of
[22:49:42 CET] <Guest84632> hii
[22:50:01 CET] <Guest84632> I' Mirage
[22:51:32 CET] <Guest84632> benchmark result shows lower speedup for AVX2
[22:51:40 CET] <Guest84632> pred16x16_tm_vp8_sse2: 52.5 pred16x16_tm_vp8_avx2: 52.2
[22:55:03 CET] <Guest31122> @BBB hello
[22:55:12 CET] <BBB> hi
[22:55:23 CET] <BBB> ah good, lets talk avx2
[22:55:27 CET] <BBB> more avx2! more avx2!
[22:55:33 CET] <Guest31122> Hi
[22:55:52 CET] <BBB> you should choose a real nickname
[22:56:04 CET] <BBB> /nick <name>
[22:56:13 CET] <BBB> e.g. /nick Mirage
[22:56:14 CET] <Guest31122> i ran the benchmark and got pred16x16_tm_vp8_sse2: 52.5 pred16x16_tm_vp8_avx2: 52.2
[22:56:15 CET] <Guest31122> sure
[22:56:49 CET] <BBB> in tests/checkasm/checkasm.h, change BENCH_RUNS from 1000 to 5000
[22:57:22 CET] <BBB> then, in tests/checkasm/checkasm.c, disable all modules in tests[] except h264pred
[22:58:03 CET] <BBB> and in tests/checkasm/h264pred.c, optionally, disable all tests in checkasm_check_h264pred() except 16x16 tm for vp8
[22:58:13 CET] <BBB> (that just helps speed testing up a bit)
[22:58:29 CET] <BBB> and then re-compile and re-run tests/checkasm/checkasm --bench
[23:00:52 CET] <Mirage20> pred16x16_tm_vp8_sse2: 90.9
[23:00:53 CET] <Mirage20> pred16x16_tm_vp8_avx2: 49.2
[23:01:10 CET] <Mirage20> is it lower numbers are better?
[23:01:14 CET] <BBB> yes
[23:01:17 CET] <Mirage20> I thought its speedup
[23:01:18 CET] <BBB> its cycle count
[23:01:23 CET] <Mirage20> ah ok :)
[23:01:29 CET] <BBB> so sse2 takes 90 cycles, avx2 takes 49 cycles
[23:01:34 CET] <BBB> ok now lets look at your code
[23:01:45 CET] <BBB> your cosmetics need some work
[23:01:56 CET] <BBB> cglobal pred16x16_tm_vp8_8, 2,9,5 -> after every comma comes a space
[23:02:22 CET] <BBB> I want you to learn to use named arguments. r0/r1/r2 are incomprehensible. use cglobal pred16x16_tm_vp8_8, 2, 9, 5, dst, stride
[23:02:26 CET] <BBB> and then instead of r0, use dstq
[23:02:31 CET] <BBB> and instead of r1, use strideq
[23:02:49 CET] <BBB> you can do the same for r2 etc. but well get rid of those in a bit...
[23:03:26 CET] <BBB> vpxor ymm0, ymm0
[23:03:26 CET] <BBB> movdqa xmm0, [r0]
[23:03:27 CET] <BBB> vpmovzxbw ymm0,xmm0
[23:03:41 CET] <BBB> the v prefix isnt necessary
[23:03:47 CET] <BBB> we do that automatically for most instructions
[23:03:52 CET] <BBB> dont use ymm<num>
[23:04:01 CET] <BBB> after INIT_YMM avx2, m<num> refers to ymm<num>
[23:04:04 CET] <BBB> so use m<num>
[23:04:11 CET] <BBB> e.g. pxor m0, m0 is identical to vpxor ymm0, ymm0
[23:04:14 CET] <BBB> but shorter
[23:04:35 CET] <BBB> pmovzxbw can read from memory and both undo the result of pxor
[23:04:50 CET] <BBB> so the three instructions can be rewritten as: pmovzxbw m0, [dstq]
[23:05:00 CET] <Mirage20> how it will identify the registers?
[23:05:21 CET] <BBB> what do you mean?
[23:05:55 CET] <Mirage20> for example when I want to use both xmm and ymm
[23:06:02 CET] <BBB> xm<num> is short for xmm
[23:06:19 CET] <BBB> the advantage of xm<num>/m<num> will become apparent later when you start using SWAP
[23:06:37 CET] <BBB> you wont be using it for the qualification task, but SWAP allows you to assign a new number to a register
[23:06:57 CET] <BBB> look at TRANSPOSE8x8W in libavutil/x86/x86util.asm as an example of why SWAP is so critically important
[23:07:31 CET] <BBB> ok, so use a single instruction for loading top& then, do the same for topleft: movzx r3d, byte [r0-1] is silly, dont move it to a GPR
[23:07:58 CET] <BBB> juse use vpbroadcastb xm1, [r0-1] and then pmovzxbw m1, xm1
[23:08:27 CET] <BBB> and once you have that, you can psubw m0, m1 to get the intermediate result of top-topleft
[23:08:35 CET] <BBB> that means you dont have to do that in the loop anymore
[23:09:03 CET] <BBB> and then, using what you just learned, I want you to try and rewrite the inner loop so it takes a quarter of the code that it currently does ;-)
[23:10:02 CET] <Mirage20> which inner loop?
[23:10:04 CET] <BBB> dont have two registers r0/r2, just assign an extra register stride3 (lea stride3q, strideq*3] and use that, so you can use r0 for all memory addresses
[23:10:13 CET] <BBB> .loop: until jg .loop
[23:10:41 CET] <BBB> for vpermq, if you choose to use that, dont use literal numbers, instead use qABCD
[23:10:45 CET] <BBB> (probably q3120)
[23:10:59 CET] <BBB> merge two packuswbs together
[23:11:25 CET] <BBB> and then mova from xm + vextracti128 from the same m register
[23:12:15 CET] <BBB> after youve done that and it works, you can send the patch to the ML for review
[23:12:32 CET] <Mirage20> suree
[23:12:51 CET] <Mirage20> can you provide me some good reference for x86 assembly?
[23:13:00 CET] <Mirage20> currently I used this https://software.intel.com/sites/landingpage/IntrinsicsGuide/
[23:13:10 CET] <BBB> that should work
[23:13:16 CET] <BBB> I usually use the intel handbook
[23:14:01 CET] <Mirage20> also how should I debug the ffmpeg code
[23:14:04 CET] <Mirage20> ?
[23:15:28 CET] <Mirage20> sometimes breakpoints are not working
[23:17:58 CET] <Mirage20> used this configuration ./configure --disable-stripping --enable-debug=3 --extra-cflags="-gstabs+" --disable-optimizations
[23:18:11 CET] <BBB> breakpoints should work&
[23:18:17 CET] <BBB> needmoreinfo :)
[23:21:08 CET] <Mirage20> for example I create a breakpoint in the SSE function pred16x16_tm_vp8_8 in the asm file. It brakes in the first line then cant step over because other thread get scheduled and it also hit the same brakepoint
[23:22:08 CET] <Mirage20> I tried with --disable-pthreads and also used -thread 1 parameter but no luck
[23:25:22 CET] <BBB> how did you step?
[23:25:29 CET] <BBB> using "step"?
[23:25:40 CET] <BBB> (you need to use stepi)
[23:27:10 CET] <Mirage20> I used eclipse ide for debugging
[23:30:11 CET] <kylophone> Question about the AVCodec API: If the init function fails, does the close function still get called?
[23:30:29 CET] <BBB> kylophone: no
[23:30:31 CET] <kierank> Mirage20: https://wiki.videolan.org/X264_asm_intro/
[23:30:35 CET] <kierank> a little bit out of date
[23:30:46 CET] <BBB> Mirage20: use gdb/lldb directly, and use stepi to step
[23:31:25 CET] <kylophone> BBB: Thanks
[23:33:21 CET] <Mirage20> ok thanks :)
[00:00:00 CET] --- Sat Mar 11 2017
More information about the Ffmpeg-devel-irc
mailing list