Commit Graph

51250 Commits

Author SHA1 Message Date
Jérôme Duval
fdfe641dca JPEG2000Translator: use outsourced Jasper package
* fixes for API changes with newer version of Jasper.
2014-08-26 17:47:25 +02:00
Jérôme Duval
e14f00e5e6 WebPTranslator: fix build breakage introduced in hrev47739. 2014-08-26 17:05:46 +02:00
Paweł Dziepak
2268a48350 kernel/x86_64: use C++11 style static assert
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 23:07:32 +02:00
Paweł Dziepak
4b75a1e237 kernel/x86_64: implement x86_swap_pgdir in C++
No reason not to inline this function.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 23:07:29 +02:00
Paweł Dziepak
1eba40776d kernel/x86_64: rewrite cpuid.S -> cpuid.cpp
Just getting rid of some assembly, no functional change.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 23:07:22 +02:00
Paweł Dziepak
721a07ac24 libroot: remove ATOMIC_FUNCS_ARE_SYSCALLS
GCC knows whether these functions need to be implemented using syscalls
(or more clever solutions like in Linux) and calls libgcc in such case.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 23:07:18 +02:00
Paweł Dziepak
a4cdc6072c build: remove B_USE_BUILTIN_ATOMIC_FUNCTIONS
No reason not to use GCC atomic support on non-x86 archs.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 23:06:58 +02:00
Paweł Dziepak
d3b1caa62d kernel, libroot: use C++11 atomics in atomic_*()
The less assembler in our sources the better. These functions wouldn't
be used very much since SupportDef.h inlines them, but the symbols should
be available.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 23:06:08 +02:00
Paweł Dziepak
aa58f7e431 os/arch: implement all atomic_*() using std::atomic<>
Time to get rid of some asm code. Surprisingly, it appears that
on x86[_64] the emitted code for atomic_test_and_get() isn't as efficient
as it could be, even with -O2, but cmpxchg is so expensive that this slight
difference shouldn't matter much.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 23:06:08 +02:00
Paweł Dziepak
2e2c9bd3d0 os/support: implement atomic_*() using GCC builtin helpers
If GCC knows what these functions are actually doing the resulting
code can be optimized better what is especially noticeable in case of
invocations of atomic_{or,and}() that ignore the result. Obviously,
everything is inlined what also improves performance.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 23:05:07 +02:00
Paweł Dziepak
54b314f15f add-ons/kernel: add casts when calling atomic_*()
Soon GCC is going to be a bit stricter about the type of pointer passed
to atomic_*() functions.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 23:02:32 +02:00
Oliver Tappe
ae18461ec1 Fix #11155 - missing WebPositive in x86_gcc2 repository.
* Instead of just checking the primary architecture, we need to check
  all architectures whether the webpositive build feature is enabled.
2014-08-25 20:49:23 +02:00
Jérôme Duval
d07f0c9396 WebPTranslator: use the outsourced package. 2014-08-25 20:26:49 +02:00
Jérôme Duval
af56dec460 Add libwebp as a mandatory package. 2014-08-25 20:24:46 +02:00
Jérôme Duval
cbe75ce5b7 BuildFeatures: add Giflib, Libwebp, Jasper features. 2014-08-25 20:24:04 +02:00
Jérôme Duval
8e66aa5157 Add jasper packages. 2014-08-25 18:48:54 +02:00
Jérôme Duval
6c04acf612 Add/Update libwebp packages. 2014-08-25 18:41:34 +02:00
Jérôme Duval
a5b44d1a56 Add giflib packages for x86 and x86_64 2014-08-25 18:41:33 +02:00
Colin Günther
4ff7c2cc61 FFMPEG Plugin: Small refactoring in audio path.
- Lazy initializing the fDecodedData variable fits best in
  _ResetRawDecodedAudio() as fRawDecodedAudio is all about managing properties
  of fDecodedData. So fDecodedData having some memory allocated is seen as a
  property here.

- Updated documentation accordingly

- No functional change intended.
2014-08-25 14:33:45 +02:00
Colin Günther
fe1eb3c1c1 FFMPEG Plugin: Fix performance regression on video path.
- For best performance the color conversion function expects a memory location
  aligned to 32 bytes. Without that alignment the color conversion function
  falls back to a slower conversion path. This fix was measured via
  DO_PROFILING and tested with various 1080p video files.
2014-08-25 14:33:41 +02:00
Colin Günther
1c5f18308c FFMPEG Plugin: Fix correct decoding of first video frame.
- The first decoded video frame was always zero bytes large, due to passing the
  wrong linesize to the color conversion function. The field containing the
  right linesize (fHeader.u.raw_video.bytes_per_row) simply wasn't initialized
  yet. Fix it by updating fHeader first before applying deinterlacing and color
  converting to the decoded video frame.
  Tested with mpeg2_decoder_test where the first picture now isn't empty
  (black) anymore.
2014-08-25 14:33:37 +02:00
Colin Günther
f7f6702203 FFMPEG Plugin: Implement audio input buffer padding.
- Padding is required by FFMPEG for correct operation of all audio decoders.
  FFMPEG performs some speed optimizations under the hood that may lead to
  reading over the end of the chunk buffer wouldn't there have been padding
  applied.

- Resolve TODOs by unifying fVideoChunkBuffer and fChunkBuffer back into
  fChunkBuffer because audio path is responsible for freeing fChunkBuffer now.
  Resolved TODOs apply to the replacing fVideoChunkBuffer variable by
  fChunkBuffer, rename some methods by removing the "Video" part, collapse two
  methods into one (_LoadNextChunkIfNeededAndAssignStartTime()).
  No functional change intended.

- Enhance "logging stream to file" functionality to write to distinct logging
  files for audio and video. Before this commit one could only log video
  streams. But with unifying the _LoadNextChunkIfNeededAndAssignStartTime()
  audio streams gained the logging functionality for free. But now audio and
  video streams would be written in the same log file when watching a media
  file containing both audio and video. This is prevented by the distinct
  logging mentioned above.

- Update documentation accordingly.
2014-08-25 14:33:33 +02:00
Colin Günther
3c68ae7c58 FFMPEG Plugin: Refactor out copying of audio format properties.
- Main reasons for this refactoring of negotiation steps are to increase
  readability and to be on par with the video path.

- Rearrange some negotiation steps in video path to be on par with audio path.

- Add documentation for the new method and update existing documentation
  accordingly.

- No functional change intended.
2014-08-25 14:33:29 +02:00
Colin Günther
38738909a4 dvb.media_addon: Fix some coding style.
- Fix max line length, switch statement style and some pointer comparisons in
  if statements. No functional change intended.
  Note: There may be more coding style violations lurking.
2014-08-25 14:33:25 +02:00
Colin Günther
75a6d51e8a dvb.media_addon: Support dumping of the raw mpeg ts data.
- Main purpose is to debug a/v synchronization issues by playing the dumped
  mpeg ts data in alternative video players (like ffplay or MediaPlayer) and
  see how those behave.

- The commit diffs shows some coding style violations (max. line length) that
  show up throughout the whole DVBMediaNode class. Those will be fixed in the
  next commit to keep a clean separation between the different code changes.
2014-08-25 14:33:21 +02:00
Rene Gollent
bf29cdd777 power_daemon: Refactor to handle multiple exported power devices.
- Each PowerMonitor now exports a set of descriptors rather than
  only a single one. This allows e.g. PowerButtonMonitor to watch
  multiple possible button event sources rather than one.

This gets power button working again on some hardware that exports
multiple ACPI power buttons, but offers no obvious way to determine
which one is actually active/being used. In the long term though, it'd
be nice to have a well-defined kernel power event interface that an app
could subscribe to, rather than having to watch individual devfs
descriptors.

Thanks to tqh and korli for advice/review.
2014-08-24 18:14:30 -04:00
Rene Gollent
74f7623716 acpi_button: Fix several issues with multiple devices.
- On some hardware, both the fixed function FADT as well as the
  device-based power interfaces are present. In such a case we
  would fail to publish one or the other, depending on which was
  enumerated first, since we'd always attempt to publish the same
  name regardless. Now we differentiate the device name for fixed vs
  device.
- Only enable fixed function for actual fixed devices.
- Improve tracing.
2014-08-24 18:14:30 -04:00
Jérôme Duval
79c1d45cee libshared: fix x86_64 build 2014-08-24 21:34:20 +02:00
Stephan Aßmus
95e4ca3d00 HaikuDepot: Fill some categories and rating summary from web app response.
This still uses the request I had prepared earlier, not the new bulk
request which can get information for the entire package list in one
request. It also has no caching, so it runs for quite a while in the
background (dedicated thread, so hopefully no harm done by keeping it
enabled).

Thanks Augustin, for the parser!
2014-08-24 19:21:50 +02:00
Stephan Aßmus
3c16b0159b HaikuDepot: Use JSON parser provided by Augustin to parse response. 2014-08-24 19:21:05 +02:00
Stephan Aßmus
7d0dab121a PackageInfo: Added setting rating summary before any ratings are known.
Fleshed out RatingSummary.
2014-08-24 19:17:19 +02:00
Stephan Aßmus
e7babe14ba MessageBuilder: Whoops, stringDeleter must be detached when adding succeeded. 2014-08-24 18:19:10 +02:00
Stephan Aßmus
edc46535ed MessageBuilder: Fix potential leaks in PushObject(). 2014-08-24 18:18:12 +02:00
Stephan Aßmus
8f16f634d7 MessageBuilder: Fix leaking BMessages.
The initial message is not deleted, since the current message is not
on the stack.
2014-08-24 18:10:24 +02:00
Stephan Aßmus
2f23e09d9d MessageBuilder: Fix init order to match header. 2014-08-24 18:09:44 +02:00
Stephan Aßmus
836bf24917 Json: Don't force someone including to use BPrivate. 2014-08-24 18:08:50 +02:00
Augustin Cavalier
e4d2963e01 libshared: Introduce JSON parser and MessageBuilder.
Based on an earlier piece of source code of mine that parsed JSON into
QObjects, this JSON parser creates a BMessage tree.

Will be used by Stephan in HaikuDepot for communication with the web app.
2014-08-24 17:36:20 +02:00
Colin Günther
ffb0f5db8e FFMPEG Plugin: Automatic detection of audio decoding parameters.
- Kudos to Marcus Overhagen for laying out the general idea of automatic
  detection by sharing some of his dvb code examples with me.
- Automatically detect the audio frame rate, channel count and sample format.
- Share audio sample format conversion code between AVFormatReader and
  AVCodecDecoder.
- Tested with several video and audio files via MediaPlayer.
- Tested also with test case mp3_decoder_test -after- removing the hard coded
  audio decoding parameters. Although the test shows that auto detection is
  working (via stepping through the auto detection code path) the complete test
  is still failing, due to missing implementation of incomplete audio frame
  decoding.
- Add and update the documentation accordingly.
2014-08-24 00:26:52 +02:00
Colin Günther
1a963de4e0 FFMPEG Plugin: Refactor out audio frames chunk decoding.
- Main purpose is to prepare auto detection of audio frame properties for
  media formats that encode those properties in the frames themself (e.g. MP3)
  instead of in the container format (e.g. WMA).
  The main difference between akin named methods _DecodeNextAudioFrame() and
  _DecodeNextAudioFrameChunk() is that the former method deals with providing
  the exact number of audio frames expected by the caller of
  BMediaDecoder::Decode() and the latter deals with decoding any number of
  audio frames at all.

- New documentation added and existing documentationupdated accordingly.

- No functional change intended.
2014-08-24 00:26:48 +02:00
Colin Günther
3c6f9c1087 FFMPEG Plugin: Fill out more media header fields in audio path.
- Some small refactoring when resetting fRawDecodedAudio. Instead of letting
  FFMPEG reset fRawDecodedAudio we do it manually to preserve the allocated
  memory in fRawDecodedAudio->opaque (otherwise FFMPEG's
  avcodec_get_frame_defaults() would NULLify the opaque pointer without
  releasing the allocated memory.

- Keep track of the total size of fDecodedData in fRawDecodedAudio->linesize[0]
  instead of relying on calculating it every time it is needed. This makes the
  code more comprehensible.
2014-08-24 00:26:44 +02:00
Adrien Destugues
f4df6bfab7 BEntry::Unset doc: missing \fn, better description. 2014-08-23 17:37:33 +02:00
Fredrik Holmqvist
454ca0b1aa Accidently push tracing on device_manager. Fixing. 2014-08-23 16:35:32 +02:00
Fredrik Holmqvist
ad5bbfb8e1 Update ACPICA to 20140724.
Previous update was 20121018. So it was about time don't you think? I think so :)

 * ACPI 5.1 is fully supported in ACPICA as of this release.

Changes are so many that I can just point to the Changelog:
  https://acpica.org/sites/acpica/files/changes_13.txt

Here is the work in progress: http://instagram.com/p/sCxrHnh2sU/
2014-08-23 16:30:50 +02:00
Colin Günther
1b8bbb509a FFMPEG Plugin: Refactor out checking of invalid conditions in audio path.
- Main reason for this refactoring is to increase readability and thus make
  audio decode path more comprehensible.

- Added documentation for the new method accordingly.

- Small change in calculating the decoded data size to clear when error occurs
  during decoding. This way it is more readable and more consistent with
  calculations of decoded data size on other locations.

- No functional change intended.
2014-08-22 23:34:13 +02:00
Colin Günther
ca5c686d93 FFMPEG Plugin: Refactor out moving audio frames from buffer.
- Main reason for this refactoring is to increase readability and thus make the
  audio decode path more comprehensible.

- Added documentation for the new method accordingly.

- No functional change intended.
2014-08-22 23:34:09 +02:00
Colin Günther
7dc2773cff FFMPEG Plugin: Refactor out chunk loading in audio path.
- Main reasons are to increase readability of audio path and to demonstrate
  that chunk loading in audio and video path is the same code that can be
  focused in one method (instead of two at the moment). Added a TODO for
  collapsing both methods into one and the conditions that must hold true to
  do so (just in case I'll be hitted by a bus and someone else has to proceed).
  Collapsing is scheduled for a later commit.

- Added documentation for the new method accordingly.

- Make use of full line length in comments of
  _LoadNextVideoChunkIfNeededAndAssignStartTime().

- No functional change intended.
2014-08-22 23:34:05 +02:00
Colin Günther
463f34021e FFMPEG Plugin: Refactor out actual audio decoding part.
- Main reason for this refactoring is to increase readability and thus make the
  audio decode path more comprehensible.

- Added documentation for the new method accordingly.

- Small refactoring for detecting when to update fRawDecodedAudio's properties.
  This is a preparation step for factoring out the flushing of the
  fDecodedDataBuffer in a later commit.

- No functional change intended.
2014-08-22 23:34:01 +02:00
Adrien Destugues
4ddea1f862 ScreenSaver: rework some of the fixes
* Use a BTextView for the "no preview" text again, as Skipp_OSX pointed
this allows it to word wrap as needed with any font bigger than 10pt.
* Show a black screen rather than the "no preview" text for Darkness and
when a screensaver fails to load. This matches what screen_blanker will
do.
2014-08-22 22:40:08 +02:00
PulkoMandy
da2ec759d7 ARM: Add the gcc_syslibs package.
Let's see if this gets the non-bootstrap build further...
2014-08-22 17:34:18 +02:00
Adrien Destugues
1e8185d903 SerialConnect: even more style fixes.
Thanks to Korli for reviewing...
2014-08-22 16:38:36 +02:00