Search Results

Search found 3577 results on 144 pages for 'conversion operators'.

Page 16/144 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • How does one convert 16-bit RGB565 to 24-bit RGB888?

    - by jleedev
    I’ve got my hands on a 16-bit rgb565 image (specifically, an Android framebuffer dump), and I would like to convert it to 24-bit rgb888 for viewing on a normal monitor. The question is, how does one convert a 5- or 6-bit channel to 8 bits? The obvious answer is to shift it. I started out by writing this: uint16_t buf; while (read(0, &buf, sizeof buf)) { unsigned char red = (buf & 0xf800) >> 11; unsigned char green = (buf & 0x07c0) >> 5; unsigned char blue = buf & 0x003f; putchar(red << 3); putchar(green << 2); putchar(blue << 3); } However, this doesn’t have one property I would like, which is for 0xffff to map to 0xffffff, instead of 0xf8fcf8. I need to expand the value in some way, but I’m not sure how that should work. The Android SDK comes with a tool called ddms (Dalvik Debug Monitor) that takes screen captures. As far as I can tell from reading the code, it implements the same logic; yet its screenshots are coming out different, and white is mapping to white. Here’s the raw framebuffer, the smart conversion by ddms, and the dumb conversion by the above algorithm. (By the way, this conversion is implemented in ffmpeg, but it’s just performing the dumb conversion listed above, leaving the LSBs at all zero.) I guess I have two questions: What’s the most sensible way to convert rgb565 to rgb888? How is DDMS converting its screenshots?

    Read the article

  • rpm file conflict after alien conversion

    - by Zitrax
    I have a program for which I generate a .deb file. The .deb file works fine on the systems I have tried it on (also tested with lintian). Previously it has worked to use alien to convert this to .rpm and install it on Suse. However it is now about a year since I tried it the last time and now I get an error when trying to install the alien made rpm on Fedora 11, I get this error: file /usr/share/icons/default.kde from install of testpkg-0.2-2.i386 conflicts with file from package kdelibs3-3.5.10-13.fc11.1.i586 Listing the content of the rpm file: $ rpm -qlp testpkg-0.2-2.i386.rpm / /usr /usr/games /usr/games/testpkg /usr/lib /usr/lib/libfmod-3.75.so /usr/share /usr/share/app-install /usr/share/app-install/icons /usr/share/app-install/icons/testpkg.png /usr/share/applications /usr/share/applications/testpkg.desktop /usr/share/doc /usr/share/doc/testpkg /usr/share/doc/testpkg/changelog.gz /usr/share/doc/testpkg/copyright /usr/share/games /usr/share/games/testpkg /usr/share/games/testpkg/images /usr/share/games/testpkg/images/bb.dat /usr/share/games/testpkg/images/bb_bg.dat /usr/share/games/testpkg/images/bubblemad_8x8.png /usr/share/games/testpkg/images/goldfont.png /usr/share/games/testpkg/lvl /usr/share/games/testpkg/lvl/lvl001.txt /usr/share/games/testpkg/lvl/lvl002.txt /usr/share/games/testpkg/lvl/lvl003.txt /usr/share/games/testpkg/lvl/lvl004.txt /usr/share/games/testpkg/lvl/lvl005.txt /usr/share/games/testpkg/lvl/lvl006.txt /usr/share/games/testpkg/lvl/lvl007.txt /usr/share/games/testpkg/music /usr/share/games/testpkg/music/alfa.it /usr/share/games/testpkg/music/beta.it /usr/share/games/testpkg/sounds /usr/share/games/testpkg/sounds/bounce.wav /usr/share/games/testpkg/sounds/click.wav /usr/share/games/testpkg/sounds/warning.wav /usr/share/icons /usr/share/icons/default.kde /usr/share/icons/default.kde/16x16 /usr/share/icons/default.kde/16x16/apps /usr/share/icons/default.kde/16x16/apps/testpkg.png /usr/share/man /usr/share/man/man6 /usr/share/man/man6/testpkg.6.gz Am I wrong in putting the kde icons in /usr/share/icons/default.kde which seem to be a symbolic link ? It's a symbolic link on both Kubuntu 9.10 and Fedora 11 though. Sounds like a common situation that the same directory is needed for different packages, so why is it a conflict ?

    Read the article

  • CentOS 5.5 ext4 conversion problem - ext4 partition is recognized as ext3

    - by FractalizeR
    Hello. I had 5.4 machine. Upgraded to 5.5 today via yum upgrade. All went fine. Rebooted. Wanted to convert root partition to ext4 (I have three partitions: /boot, / and swap). All of them on software RAID 1 (root is /dev/md2). I did the following for converting yum install e4fsprogs tune2fs -O extents,uninit_bg,dir_index /dev/md2 nano /etc/fstab # I indicated here that my /dev/md2 is of ext4 uname -a mkinitrd -f /boot/initrd-2.6.18-194.3.1.el5.img 2.6.18-194.3.1.el5 Rebooted. I expected fsck to start automatically as said on some site. But it did not. Threw some error (don't remember exactly which). Ok, I booted linux rescue and executed fsck: fsck -t ext4 -fy /dev/md2 Partition went fine. But still when I boot main system, it says in log: "ext3-fs:" then something about not being able to mount ext3 partition due to unknown extended attributed (200). I booted linux rescue again. It loads fine and correctly determines all my machine partitions both ext3 (boot) and ext4 (/) under /mnt/sysimage just fine. I retried mkinitrd thing again watching it's output and ensured ext4 module is included into the system. I also edited menu.lst grub file to include rootfstype=ext4 kernel parameter. Bad luck. I still have message from ext3-fs about not being able to mount filesystem because of attributes and kernel panic immediately after. I checked /etc/fstab - it's fine and saying that root is of ext4. What did I do wrong? This machine is empty so I can just reformat it with 5.5 and recreate partitions to be originally ext4. But... I just want to know what did I do wrong.

    Read the article

  • SVG to JPEG/BMP conversion

    - by stanigator
    I have a svg file that I want to convert to jpeg or bmp (or any other image formats). However, all the conversions that I have used on the various online tools yielded very unclear output images. I don't want to use svg as it is very inconvenient. What would be your suggestions to get around that?

    Read the article

  • DTS to AC3 conversion for LG TV using mediatomb DLNA server

    - by prion crawler
    I want to convert a MKV video file containing DTS audio to a stream with AC3 audio. I want to pass this resulting stream to mediatomb's transcoding feature. Mediatomb will transfer the stream via DLNA to a LG TV, which does not support DTS audio. I have tried the VLC command below but the TV does not recognize the stream, and playing the destination stream on PC does not produce sound. vlc -vvv -I dummy INPUT.file --sout \ '#transcode{acodec=ac3,ab=256k,channels=2,threads=4} \ :std{mux=ts,access=file,dst=DEST.file}' The following ffmpeg command give a stream that plays on the TV with sound, but the ffmpeg process gets killed (with signal 15) within 10-15 seconds, and then the TV restarts the playback from the beginning. This goes on in loops. ffmpeg -i INPUT.file -acodec ac3 -ab 384k -vcodec copy \ -vbsf h264_mp4toannexb -f mpegts -y DEST.file I want to have a working DLNA server which transcodes DTS to AC3, any help is appreciated.

    Read the article

  • 2nd Bootable partition P2V conversion

    - by Vendoran
    I have a dual boot machine (Win7 RC and Win2008) and want to migrate one of the partitions (Win2008) into a Virtual Hard Drive and the be able to use it in VPC or Virtual Server (not Hyper-V). The ways I've seen via Linked Virtual Disks or WinImage take the entire physical drive instead of just the partition. Any ideas? Thanks in Advance, --Aaron

    Read the article

  • Seeking automated toolchain for WAV cleanup and conversion to MP3 (currently using Audacity manually

    - by Andrew M. Greene
    I use Finale with the Garritan sounds to convert my music into WAV files; after that I manually load each one into Audacity and select all use the "normalize" effect (with default settings) manually select the silence at the beginning of the file and delete it manually select the silence at the end of the file and delete it finally export the whole thing as an MP3 (with specific tag data) This gets tedious, especially as I work on a ten-movement piece with six part-prominent rehearsal "tapes" to accompany the full-score rendition. And there are too many variations in what's going on for me to trust AutoHotKey for this one. Is there a way to script Audacity, or is there another toolchain that would do what I want? I'm running on a WindowsXP laptop with cygwin installed. Thanks!

    Read the article

  • Solaris to Linux conversion: Use VxFS or GFS?

    - by w00t
    We're a Solaris shop looking at RedHat Enterprise Linux and one of the things we're wondering is if we should keep Veritas Volume Manager + FileSystem or go with LVM+ext3 or RedHat's preferred cluster filesystem solution, GFS. One of the things we like about Veritas is that it can use Veritas Volume Replicator to have a remote copy of important filesystems. This functionality seems to be missing from RedHat, DRBD doesn't seem to be packaged in RHEL... So my questions are: Does anybody use VxFS/VxVM/VVR on Linux? Thoughts, experiences? Comparison with LVM+ext3? Anybody using GFS? Thoughts, experiences? Do you do remote replication for disaster recovery, and if so, how? Is there a standard RedHat way?

    Read the article

  • P2V conversion using Synchronization

    - by vitea1
    I'm currently P2Ving over my 2003 exchange server and would like to know the best way to use the synchronization feature? I already P2V'd this server over about 5 times and had great success without any outages of service etc. I would like to set it up where just as it finishes the full clone that it starts synchronizing the change automatically. How and can I set this up and what is the best version? I'm using version 4.0. Thanks.

    Read the article

  • ffmpeg conversion problem

    - by user33126
    installed ffmpeg and it shows version and all correctly. but even info ffmpeg command itself shows ffmpeg -i Alice_In_Wonderland.mp4 gives messgae like FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --extra-cflags=-fPIC --enable-libamr-nb --enable-libamr-wb --enable-libdirac --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-x11grab libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Nov 6 2009 19:11:04, gcc: 4.1.2 20080704 (Red Hat 4.1.2-46) Seems stream 1 codec frame rate differs from container frame rate: 49.93 (9986/200) - 49.92 (599/12) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Alice_In_Wonderland.mp4': Duration: 00:01:39.65, start: 0.000000, bitrate: 542 kb/s Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16 Stream #0.1(und): Video: h264, yuv420p, 480x270, 49.92 tbr, 24.96 tbn, 49.93 tbc At least one output file must be specified Please tell me whats the problem

    Read the article

  • ffmpeg conversion problem

    - by Elamurugan
    installed ffmpeg and it shows version and all correctly. but even info ffmpeg command itself shows ffmpeg -i Alice_In_Wonderland.mp4 gives messgae like FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --extra-cflags=-fPIC --enable-libamr-nb --enable-libamr-wb --enable-libdirac --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-x11grab libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Nov 6 2009 19:11:04, gcc: 4.1.2 20080704 (Red Hat 4.1.2-46) Seems stream 1 codec frame rate differs from container frame rate: 49.93 (9986/200) - 49.92 (599/12) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Alice_In_Wonderland.mp4': Duration: 00:01:39.65, start: 0.000000, bitrate: 542 kb/s Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16 Stream #0.1(und): Video: h264, yuv420p, 480x270, 49.92 tbr, 24.96 tbn, 49.93 tbc At least one output file must be specified Please tell me whats the problem

    Read the article

  • Lighttpd mod_rewrite conversion from .htaccess format

    - by hoball
    Hello, I am using lighttpd as webserver and is having an issue about mod_rewrite. Currently I have a set of Apache .htaccess rewrite rules from a PHP script: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)$ index.php [QSA,L] In my understanding, if the requested URI is not a file/directory/sym-link, append it to index.php eg. www.a.com/hello/world --> www.a.com/index.php/hello/world I attempted to convert to lighttpd specification: url.rewrite-if-not-file = ( "^(.*)$" = "index.php/$1" ) However, it doesn't work. I suspect that is due to misuse of $1. I tried to use $0/%0 or something else but they fail. Would you please provide me a hint on making the syntax work? Thank you!

    Read the article

  • Mini DV and DVI Conversion

    - by Kairan
    Video card is: AMD HD 6950 My video card comes with 1xHDMI, 2xDVI, and 2xMini DV ports. I have always used VGA and DVI only. I have the HDMI already connected. I want to hook up 2 more display. One of the display can take a VGA only, the other is an LCD TV so it has VGA, HDMI, Component. I am wondering: 1) What is the best output port to use for the second two monitors? The miniDV or the DVI? 2) I need to run a long cable maybe 15-25 feet, this might change the answer to question 1, is an HDMI long cable 20+ ft going to be better than a 20ft DVI or miniDV ?

    Read the article

  • Google veut stopper la conversion des vidéos YouTube en MP3, la société menace de poursuivre en justice les sites offrant ce service

    Google veut stopper la conversion des vidéos YouTube en MP3, la société menace de poursuivre en justice les sites offrant ce service Google s'attaque aux services de conversion gratuite des streaming YouTube en MP3. Le géant de la recherche a envoyé une lettre de mise en demeure aux sites de conversion YouTube-mp3.org et Music-Clips.net, menaçant ceux-ci de poursuites en justice au cas où ils ne cesseraient pas leur activité. En effet, des dizaines de sites Web offrent des services en ligne, permettant de convertir des vidéos YouTube en MP3, en renseignant uniquement l'URL de la vidéo YouTube. Ces services, qui jouissent d'une certaine popularité, sont utili...

    Read the article

  • Java operator precedence guidelines

    - by trashgod
    Misunderstanding Java operator precedence is a source of frequently asked questions and subtle errors. I was intrigued to learn that even the Java Language Specification says, "It is recommended that code not rely crucially on this specification." JLS §15.7 Preferring clear to clever, are there any useful guidelines in this area? Here are a number of resources on the topic: JLS Operators JLS Precedence Java Glossary Princeton Sun Tutorial University of West Florida Usenet discussion Additions or corrections welcome.

    Read the article

  • How to use ternary operator instead of if-else in PHP

    - by Mac Taylor
    hey guys i need to shorten or better to say ., harden my codes this is my original code : if ($type = "recent") { $OrderType = "sid DESC"; }elseif ($type = "pop"){ $OrderType = "counter DESC"; }else { $OrderType = "RAND()"; } now how can i use markers like this : $OrderType = ($type = "recent") ? "sid DESC" : "counter DESC" ; i tried but i didnt know how to write elseif in operators

    Read the article

  • Perl ||= operator for PHP and Javascript

    - by zaf
    Just been re-introduced to the Perl '||=' operator from the classic Orcish Maneuver example: keys my %or_cache = @in; @out = sort { ($or_cache{$a} ||= KEY($a)) cmp ($or_cache{$b} ||= KEY($b)) } @in; Is this operator available in PHP and Javascript? And if not, do these two languages allow user defined operators?

    Read the article

  • 'AND' vs '&&' as operator

    - by ts
    Actually, i am facing a codebase where developpers decided to use 'AND' and 'OR' instead of '&&' and '||'. I know that there is difference in operators precedence (&& goes before 'and'), but with given framework (prestashop to be precise) is clearly not a reason. So, my question: which version are you using? Is 'and' more readable than '&&'? || there is ~ difference?

    Read the article

  • In what situation should the built-in 'operator' module be used in python?

    - by apphacker
    I'm speaking of this module: http://docs.python.org/library/operator.html From the article: The operator module exports a set of functions implemented in C corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. The function names are those used for special class methods; variants without leading and trailing __ are also provided for convenience. I'm not sure I understand the benefit or purpose of this module.

    Read the article

  • Are +=, |=, &= etc atomic?

    - by SF.
    Are the "modify" operators like +=, |=, &= etc atomic? I know ++ is atomic (if you perform x++; in two different threads "simultaneously", you will always end up with x increased by 2, as opposed to x=x+1 with optimization switched off.) What I wonder is whether variable |= constant, and the likes are thread-safe or do I have to protect them with a mutex? (...or is it CPU-dependent? In this case, how is it on ARM?)

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >