diff options
author | Eunhae Choi <eunhae1.choi@samsung.com> | 2015-12-21 20:09:38 +0900 |
---|---|---|
committer | Eunhae Choi <eunhae1.choi@samsung.com> | 2015-12-21 20:10:33 +0900 |
commit | 76da6e24ed4a68175262794e32e7567989cd0cfc (patch) | |
tree | 0e3860e41822b4d421bdaa3fc2fd717a8b47f96f | |
parent | 54594f8f4f818a256def9176a265e56038396797 (diff) | |
download | libmm-player-accepted/tizen/tv/20151224.102427.tar.gz libmm-player-accepted/tizen/tv/20151224.102427.tar.bz2 libmm-player-accepted/tizen/tv/20151224.102427.zip |
modify the stride&size calculation in case of sw codec.submit/tizen_common/20151229.154718submit/tizen_common/20151229.144031submit/tizen_common/20151229.142028submit/tizen/20151224.044916accepted/tizen/wearable/20151224.102444accepted/tizen/tv/20151224.102427accepted/tizen/mobile/20151224.102411
according to the video-info in gst-plugins-base.
Change-Id: I266fb26500ed5540d4802600eb154e6698c4f5d2
-rw-r--r-- | src/server/mm_player_priv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/mm_player_priv.c b/src/server/mm_player_priv.c index 7782a1b..12eb863 100644 --- a/src/server/mm_player_priv.c +++ b/src/server/mm_player_priv.c @@ -5544,9 +5544,10 @@ __mmplayer_video_stream_probe (GstPad *pad, GstPadProbeInfo *info, gpointer user stream.internal_buffer = buffer; } else { tbm_bo_handle thandle; - int stride = ((stream.width + 3) & (~3)); + int stride = GST_ROUND_UP_4 (stream.width); int elevation = stream.height; - int size = stride * elevation * 3 / 2; + int size = 0; + gboolean gst_ret; gst_ret = gst_memory_map(dataBlock, &mapinfo, GST_MAP_READWRITE); if(!gst_ret) { @@ -5557,7 +5558,7 @@ __mmplayer_video_stream_probe (GstPad *pad, GstPadProbeInfo *info, gpointer user stream.stride[0] = stride; stream.elevation[0] = elevation; if(stream.format == MM_PIXEL_FORMAT_I420) { - stream.stride[1] = stream.stride[2] = stride / 2; + stream.stride[1] = stream.stride[2] = GST_ROUND_UP_4 (GST_ROUND_UP_2 (stream.width) / 2); stream.elevation[1] = stream.elevation[2] = elevation / 2; } else { @@ -5566,6 +5567,7 @@ __mmplayer_video_stream_probe (GstPad *pad, GstPadProbeInfo *info, gpointer user return GST_PAD_PROBE_OK; } + size = (stream.stride[0] + stream.stride[1]) * elevation; stream.bo[0] = tbm_bo_alloc(player->bufmgr, size, TBM_BO_DEFAULT); if(!stream.bo[0]) { LOGE("Fail to tbm_bo_alloc!!"); |