[haiku-commits] haiku: hrev50390 - in src: add-ons/media/plugins/ffmpeg apps/mediaplayer/media_node_framework/video

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 6 Jul 2016 05:46:45 +0200 (CEST)

hrev50390 adds 3 changesets to branch 'master'
old head: 7dc0c7b52db2ffce92a2acf4505afb7c250e57c6
new head: 4b99d297b5a4f56387e667dced4d4aeb3572d3a6
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=4b99d297b5a4+%5E7dc0c7b52db2

----------------------------------------------------------------------------

d1175e07f816: media/ffmpeg: Fix a few minor x86_64 warnings

7d842421ab4a: media/ffmpeg: Fix a few parentheses warnings; no change

4b99d297b5a4: mediaplayer/consumer: Fix 64-bit debug tracing

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 17 insertions(+), 16 deletions(-)
src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp     |  8 ++++----
src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp         | 12 ++++++------
.../media_node_framework/video/VideoConsumer.cpp        | 13 +++++++------

############################################################################

Commit:      d1175e07f816bc105d7b0cd586ef7b2d98574f87
URL:         http://cgit.haiku-os.org/haiku/commit/?id=d1175e07f816
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Wed Jul  6 02:49:34 2016 UTC

media/ffmpeg: Fix a few minor x86_64 warnings

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp 
b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp
index d04294f..27ec813 100644
--- a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp
@@ -142,7 +142,7 @@ AVCodecDecoder::~AVCodecDecoder()
 {
        TRACE("[%c] AVCodecDecoder::~AVCodecDecoder()\n", fIsAudio?('a'):('v'));
 
-#ifdef DO_PROFILING
+#if DO_PROFILING
        if (profileCounter > 0) {
                printf("[%c] profile: d1 = %lld, d2 = %lld (%Ld)\n",
                        fIsAudio?('a'):('v'), decodingTime / profileCounter,
@@ -857,7 +857,7 @@ 
AVCodecDecoder::_CheckAndFixConditionsThatHintAtBrokenAudioCodeBelow()
 {
        if (fDecodedDataBufferSize < 0) {
                fprintf(stderr, "Decoding read past the end of the decoded data 
"
-                       "buffer! %ld\n", fDecodedDataBufferSize);
+                       "buffer! %" B_PRId32 "\n", fDecodedDataBufferSize);
                fDecodedDataBufferSize = 0;
        }
        if (fTempPacket.size < 0) {
@@ -1040,8 +1040,8 @@ AVCodecDecoder::_DecodeNextAudioFrameChunk()
                                // Report failure if not done already
                                int32 chunkBufferOffset = fTempPacket.data - 
fChunkBuffer;
                                printf("########### audio decode error, "
-                                       "fTempPacket.size %d, fChunkBuffer data 
offset %ld\n",
-                                       fTempPacket.size, chunkBufferOffset);
+                                       "fTempPacket.size %d, fChunkBuffer data 
offset %" B_PRId32
+                                       "\n", fTempPacket.size, 
chunkBufferOffset);
                                fAudioDecodeError = true;
                        }
 

############################################################################

Commit:      7d842421ab4a9a4adb86d8cdfb491088b1d832a1
URL:         http://cgit.haiku-os.org/haiku/commit/?id=7d842421ab4a
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Wed Jul  6 03:02:04 2016 UTC

media/ffmpeg: Fix a few parentheses warnings; no change

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp 
b/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp
index 77e5de0..e9bb102 100644
--- a/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp
@@ -48,7 +48,7 @@ gfx_conv_yuv410p_ycbcr422_c(AVFrame *in, AVFrame *out, int 
width, int height)
                                | ((v & 0x0FF) << 24));
                        b = (long)(((y1 & 0x0FF0000) >> 16) | ((u& 0x0FF) << 8)
                                | ((y1 & 0x0FF000000) >> 8) | ((v & 0x0FF) << 
24));
-                       c = (long)(y2 & 0x0FF | ((u& 0x0FF00)) | ((y2 & 
0x0FF00) << 8)
+                       c = (long)((y2 & 0x0FF) | (u & 0x0FF00) | ((y2 & 
0x0FF00) << 8)
                                | ((v & 0x0FF00) << 16));
                        d = (long)(((y2 & 0x0FF0000) >> 16) | ((u& 0x0FF00))
                                | ((y2 & 0x0FF000000) >> 8) | ((v & 0x0FF00) << 
16));
@@ -113,13 +113,13 @@ gfx_conv_yuv420p_ycbcr422_c(AVFrame *in, AVFrame *out, 
int width, int height)
                        y2 = *pi++;
                        u = *pi2++;
                        v = *pi3++;
-                       a = (long)(y1 & 0x0FF | ((u& 0x0FF) << 8) | ((y1 & 
0x0FF00) << 8)
+                       a = (long)((y1 & 0x0FF) | ((u & 0x0FF) << 8) | ((y1 & 
0x0FF00) << 8)
                                | ((v & 0x0FF) << 24));
-                       b = (long)(((y1 & 0x0FF0000) >> 16) | ((u& 0x0FF00))
+                       b = (long)(((y1 & 0x0FF0000) >> 16) | ((u & 0x0FF00))
                                | ((y1 & 0x0FF000000) >> 8) | ((v & 0x0FF00) << 
16));
-                       c = (long)(y2 & 0x0FF | ((u& 0x0FF0000) >> 8)
+                       c = (long)((y2 & 0x0FF) | ((u & 0x0FF0000) >> 8)
                                | ((y2 & 0x0FF00) << 8) | ((v & 0x0FF0000) << 
8));
-                       d = (long)(((y2 & 0x0FF0000) >> 16) | ((u& 0x0FF000000) 

16)
+                       d = (long)(((y2 & 0x0FF0000) >> 16) | ((u & 
0x0FF000000) >> 16)
                                | ((y2 & 0x0FF000000) >> 8) | ((v & 
0x0FF000000)));
 
                        *(p++) = a;
@@ -272,7 +272,7 @@ gfx_conv_YCbCr422_RGB32_c(AVFrame *in, AVFrame *out, int 
width, int height)
 
                uvIndex = 0;
 
-               for (uint32 j=0; j < width; j+=2) {
+               for (int32 j = 0; j < width; j += 2) {
                        rgbBase[j] = YUV444TORGBA8888(yBase[j], uBase[uvIndex],
                                vBase[uvIndex]);
                        rgbBase[j + 1] = YUV444TORGBA8888(yBase[j + 1], 
uBase[uvIndex],

############################################################################

Revision:    hrev50390
Commit:      4b99d297b5a4f56387e667dced4d4aeb3572d3a6
URL:         http://cgit.haiku-os.org/haiku/commit/?id=4b99d297b5a4
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Wed Jul  6 03:38:37 2016 UTC

mediaplayer/consumer: Fix 64-bit debug tracing

----------------------------------------------------------------------------

diff --git a/src/apps/mediaplayer/media_node_framework/video/VideoConsumer.cpp 
b/src/apps/mediaplayer/media_node_framework/video/VideoConsumer.cpp
index 5dad0ad..7ad7505 100644
--- a/src/apps/mediaplayer/media_node_framework/video/VideoConsumer.cpp
+++ b/src/apps/mediaplayer/media_node_framework/video/VideoConsumer.cpp
@@ -143,7 +143,7 @@ VideoConsumer::HandleMessage(int32 message, const void* 
data, size_t size)
 void
 VideoConsumer::BufferReceived(BBuffer* buffer)
 {
-       LOOP("VideoConsumer::Buffer #%ld received\n", buffer->ID());
+       LOOP("VideoConsumer::Buffer #%" B_PRId32 " received\n", buffer->ID());
 
        if (RunState() == B_STOPPED) {
                buffer->Recycle();
@@ -182,8 +182,9 @@ VideoConsumer::CreateBuffers(const media_format& format)
        uint32 width = format.u.raw_video.display.line_width;
        uint32 height = format.u.raw_video.display.line_count;  
        color_space colorSpace = format.u.raw_video.display.format;
-       PROGRESS("VideoConsumer::CreateBuffers - Width = %ld - Height = %ld - "
-               "Colorspace = %d\n", width, height, colorSpace);
+       PROGRESS("VideoConsumer::CreateBuffers - Width = %" B_PRIu32 " - "
+               "Height = %" B_PRIu32 " - Colorspace = %d\n",
+               width, height, colorSpace);
 
        fBuffers = new BBufferGroup();
        status = fBuffers->InitCheck();
@@ -606,9 +607,9 @@ VideoConsumer::_HandleBuffer(BBuffer* buffer)
                        fManager->Unlock();
                }
                PROGRESS("VideoConsumer::HandleEvent - DROPPED FRAME\n"
-                       "   start_time: %lld, current: %lld, latency: %lld\n",
-                       buffer->Header()->start_time, TimeSource()->Now(),
-                       SchedulingLatency());
+                       "   start_time: %" B_PRIdBIGTIME ", current: %" 
B_PRIdBIGTIME ", "
+                       "latency: %" B_PRIdBIGTIME "\n",  
buffer->Header()->start_time,
+                       TimeSource()->Now(), SchedulingLatency());
        }
        if (recycle)
                buffer->Recycle();


Other related posts:

  • » [haiku-commits] haiku: hrev50390 - in src: add-ons/media/plugins/ffmpeg apps/mediaplayer/media_node_framework/video - kallisti5