[FFmpeg-cvslog] avcodec/mips: [loongson] simplify the usage of intermediate variable addr.

2018-09-04 Thread Shiyou Yin
ffmpeg | branch: master | Shiyou Yin  | Tue Sep  4 
16:05:33 2018 +0800| [17c635e605af5a708ce6e29f18946f4089e66c6f] | committer: 
Michael Niedermayer

avcodec/mips: [loongson] simplify the usage of intermediate variable addr.

Simplify the usage of intermediate variable addr in following functions:
1. ff_put_pixels4_8_mmi
2. ff_put_pixels8_8_mmi
3. ff_put_pixels16_8_mmi
4. ff_avg_pixels16_8_mmi.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17c635e605af5a708ce6e29f18946f4089e66c6f
---

 libavcodec/mips/hpeldsp_mmi.c | 181 --
 1 file changed, 87 insertions(+), 94 deletions(-)

diff --git a/libavcodec/mips/hpeldsp_mmi.c b/libavcodec/mips/hpeldsp_mmi.c
index 2dbef22ccd..db2fa10fba 100644
--- a/libavcodec/mips/hpeldsp_mmi.c
+++ b/libavcodec/mips/hpeldsp_mmi.c
@@ -29,36 +29,35 @@
 void ff_put_pixels4_8_mmi(uint8_t *block, const uint8_t *pixels,
 ptrdiff_t line_size, int h)
 {
-double ftmp[2];
-mips_reg addr[2];
+double ftmp[4];
 DECLARE_VAR_LOW32;
-DECLARE_VAR_ADDRT;
 
 __asm__ volatile (
-PTR_ADDU   "%[addr1],   %[line_size],   %[line_size]\n\t"
 "1: \n\t"
-PTR_ADDU   "%[addr0],   %[pixels],  %[line_size]\n\t"
 MMI_ULWC1(%[ftmp0], %[pixels], 0x00)
-MMI_ULWC1(%[ftmp1], %[addr0], 0x00)
-MMI_SWC1(%[ftmp0], %[block], 0x00)
-MMI_SWXC1(%[ftmp1], %[block], %[line_size], 0x00)
-PTR_ADDU   "%[pixels],  %[pixels],  %[addr1]\n\t"
-PTR_ADDU   "%[block],   %[block],   %[addr1]\n\t"
+PTR_ADDU   "%[pixels],   %[pixels],  %[line_size]   \n\t"
+MMI_ULWC1(%[ftmp1], %[pixels], 0x00)
+PTR_ADDU   "%[pixels],   %[pixels],  %[line_size]   \n\t"
+MMI_ULWC1(%[ftmp2], %[pixels], 0x00)
+PTR_ADDU   "%[pixels],   %[pixels],  %[line_size]   \n\t"
+MMI_ULWC1(%[ftmp3], %[pixels], 0x00)
+PTR_ADDU   "%[pixels],   %[pixels],  %[line_size]   \n\t"
+
+PTR_ADDI   "%[h],   %[h],   -0x04   \n\t"
 
-PTR_ADDU   "%[addr0],   %[pixels],  %[line_size]\n\t"
-MMI_ULWC1(%[ftmp0], %[pixels], 0x00)
-MMI_ULWC1(%[ftmp1], %[addr0], 0x00)
 MMI_SWC1(%[ftmp0], %[block], 0x00)
-MMI_SWXC1(%[ftmp1], %[block], %[line_size], 0x00)
-PTR_ADDU   "%[pixels],  %[pixels],  %[addr1]\n\t"
-PTR_ADDU   "%[block],   %[block],   %[addr1]\n\t"
+PTR_ADDU   "%[block],   %[block],   %[line_size]\n\t"
+MMI_SWC1(%[ftmp1], %[block], 0x00)
+PTR_ADDU   "%[block],   %[block],   %[line_size]\n\t"
+MMI_SWC1(%[ftmp2], %[block], 0x00)
+PTR_ADDU   "%[block],   %[block],   %[line_size]\n\t"
+MMI_SWC1(%[ftmp3], %[block], 0x00)
+PTR_ADDU   "%[block],   %[block],   %[line_size]\n\t"
 
-PTR_ADDI   "%[h],   %[h],   -0x04   \n\t"
 "bnez   %[h],   1b  \n\t"
 : [ftmp0]"=&f"(ftmp[0]),[ftmp1]"=&f"(ftmp[1]),
+  [ftmp2]"=&f"(ftmp[2]),[ftmp3]"=&f"(ftmp[3]),
   RESTRICT_ASM_LOW32
-  RESTRICT_ASM_ADDRT
-  [addr0]"=&r"(addr[0]),[addr1]"=&r"(addr[1]),
   [block]"+&r"(block),  [pixels]"+&r"(pixels),
   [h]"+&r"(h)
 : [line_size]"r"((mips_reg)line_size)
@@ -69,37 +68,35 @@ void ff_put_pixels4_8_mmi(uint8_t *block, const uint8_t 
*pixels,
 void ff_put_pixels8_8_mmi(uint8_t *block, const uint8_t *pixels,
 ptrdiff_t line_size, int h)
 {
-double ftmp[2];
-mips_reg addr[3];
+double ftmp[4];
 DECLARE_VAR_ALL64;
 
 __asm__ volatile (
-PTR_ADDU   "%[addr1],   %[line_size],   %[line_size]\n\t"
 "1: \n\t"
 MMI_ULDC1(%[ftmp0], %[pixels], 0x00)
-PTR_ADDU   "%[addr0],   %[pixels],  %[line_size]\n\t"
-MMI_ULDC1(%[ftmp1], %[addr0], 0x00)
-MMI_SDC1(%[ftmp0], %[block], 0x00)
-PTR_ADDU   "%[addr2],   %[block],   %[line_size]\n\t"
-MMI_SDC1(%[ftmp1], %[addr2], 0x00)
-PTR_ADDU   "%[pixels],  %[pixels],  %[addr1]\n\t"
-PTR_ADDU   "%[block],   %[block],   %[addr1]\n\t"
+PTR_ADDU   "%[pixels],   %[pixels],  %[line_size]   \n\t"
+MMI_ULDC1(%[ftmp1], %[pixels], 0x00)
+PTR_ADDU   "%[pixels],   %[pixels],  %[line_size]   \n\t"
+MMI_ULDC1(%[ftmp2], %[pixels], 0x00)
+PTR_ADDU   "%[pixels],   %[pixels],  %[line_size]   \n\t"
+MMI_ULDC1(%[ftmp3],

[FFmpeg-cvslog] avcodec: [loongson] fix bug of mss2-wmv failed in fate test.

2018-09-04 Thread Shiyou Yin
ffmpeg | branch: master | Shiyou Yin  | Mon Sep  3 
11:31:46 2018 +0800| [61eeb40a62d0fa7e5dd9f816c5a756a4e1199f03] | committer: 
Michael Niedermayer

avcodec: [loongson] fix bug of mss2-wmv failed in fate test.

Failed case: mss2-wmv
In following functions, pmullh was used to multiply two 16-bit data, this will 
cause data overflow.
1. ff_vc1_inv_trans_8x8_dc_mmi
2. ff_vc1_inv_trans_8x8_mmi
3. ff_vc1_inv_trans_8x4_mmi
4. ff_vc1_inv_trans_4x8_mmi
5. ff_vc1_inv_trans_4x4_mmi

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61eeb40a62d0fa7e5dd9f816c5a756a4e1199f03
---

 libavcodec/mips/vc1dsp_mmi.c | 1493 +++---
 1 file changed, 957 insertions(+), 536 deletions(-)

diff --git a/libavcodec/mips/vc1dsp_mmi.c b/libavcodec/mips/vc1dsp_mmi.c
index ec2fdca987..d78e0c3158 100644
--- a/libavcodec/mips/vc1dsp_mmi.c
+++ b/libavcodec/mips/vc1dsp_mmi.c
@@ -27,118 +27,99 @@
 #include "hpeldsp_mips.h"
 #include "libavutil/mips/mmiutils.h"
 
-
-#define VC1_INV_TRANCS_8_STEP1_MMI(fp1,   fp2,   fp3,   fp4,\
-   o1,o2,o3,o4, \
-   t1,t2,t3,t4, \
-   ff_p1, ff_p2, ff_p3, ff_p4)  \
-"pmullh "#t1"   ,   "#fp1"  ,   "#ff_p1"\n\t"   \
-"pmullh "#t2"   ,   "#fp2"  ,   "#ff_p2"\n\t"   \
-"pmullh "#t3"   ,   "#fp3"  ,   "#ff_p3"\n\t"   \
-"pmullh "#t4"   ,   "#fp4"  ,   "#ff_p4"\n\t"   \
-"paddh  "#o1"   ,   "#t1"   ,   "#t2"   \n\t"   \
-"paddh  "#o1"   ,   "#o1"   ,   "#t3"   \n\t"   \
-"paddh  "#o1"   ,   "#o1"   ,   "#t4"   \n\t"   \
-\
-"pmullh "#t1"   ,   "#fp1"  ,   "#ff_p2"\n\t"   \
-"pmullh "#t2"   ,   "#fp2"  ,   "#ff_p4"\n\t"   \
-"pmullh "#t3"   ,   "#fp3"  ,   "#ff_p1"\n\t"   \
-"pmullh "#t4"   ,   "#fp4"  ,   "#ff_p3"\n\t"   \
-"psubh  "#o2"   ,   "#t1"   ,   "#t2"   \n\t"   \
-"psubh  "#o2"   ,   "#o2"   ,   "#t3"   \n\t"   \
-"psubh  "#o2"   ,   "#o2"   ,   "#t4"   \n\t"   \
-\
-"pmullh "#t1"   ,   "#fp1"  ,   "#ff_p3"\n\t"   \
-"pmullh "#t2"   ,   "#fp2"  ,   "#ff_p1"\n\t"   \
-"pmullh "#t3"   ,   "#fp3"  ,   "#ff_p4"\n\t"   \
-"pmullh "#t4"   ,   "#fp4"  ,   "#ff_p2"\n\t"   \
-"psubh  "#o3"   ,   "#t1"   ,   "#t2"   \n\t"   \
-"paddh  "#o3"   ,   "#o3"   ,   "#t3"   \n\t"   \
-"paddh  "#o3"   ,   "#o3"   ,   "#t4"   \n\t"   \
-\
-"pmullh "#t1"   ,   "#fp1"  ,   "#ff_p4"\n\t"   \
-"pmullh "#t2"   ,   "#fp2"  ,   "#ff_p3"\n\t"   \
-"pmullh "#t3"   ,   "#fp3"  ,   "#ff_p2"\n\t"   \
-"pmullh "#t4"   ,   "#fp4"  ,   "#ff_p1"\n\t"   \
-"psubh  "#o4"   ,   "#t1"   ,   "#t2"   \n\t"   \
-"paddh  "#o4"   ,   "#o4"   ,   "#t3"   \n\t"   \
-"psubh  "#o4"   ,   "#o4"   ,   "#t4"   \n\t"
-
-
-#define VC1_INV_TRANCS_8_STEP2_MMI(fp1,   fp2,   fp3,   fp4,\
-   fp5,   fp6,   fp7,   fp8,\
-   o1,o2,o3,o4, \
-   ff_p1, ff_p2, ff_p3, ff_pw)  \
-"paddh  "#fp5"  ,   "#fp1"  ,   "#fp2"  \n\t"   \
-"psubh  "#fp6"  ,   "#fp1"  ,   "#fp2"  \n\t"   \
-"pmullh "#fp5"  ,   "#fp5"  ,   "#ff_p1"\n\t"   \
-"pmullh "#fp6"  ,   "#fp6"  ,   "#ff_p1"\n\t"   \
-"paddh  "#fp5"  ,   "#fp5"  ,   "#ff_pw"\n\t"   \
-"paddh  "#fp6"  ,   "#fp6"  ,   "#ff_pw"\n\t"   \
-\
-"pmullh "#fp1"  ,   "#fp3"  ,   "#ff_p2"\n\t"   \
-"pmullh "#fp2"  ,   "#fp4"  ,   "#ff_p3"\n\t"   \
-"pmullh "#fp3"  ,   "#fp3"  ,   "#ff_p3"\n\t"   \
-"pmullh "#fp4"  ,   "#fp4"  ,   "#ff_p2"\n\t"   \
-"paddh  "#

[FFmpeg-cvslog] avformat/dashdec: refine compute current fragment for presentation_timeoffset mode

2018-09-04 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Sep  5 
14:33:53 2018 +0800| [ad9b4ecc26bef7babb31b58f19c869f6464c2db9] | committer: 
Steven Liu

avformat/dashdec: refine compute current fragment for presentation_timeoffset 
mode

fix ticket id: #7369 #7382.
use ((wallclock - availability_start_time) * timescale 
-presentation_timeoffset) / duration

Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad9b4ecc26bef7babb31b58f19c869f6464c2db9
---

 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index e8c57a51c5..154b1426b9 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1341,7 +1341,7 @@ static int64_t calc_cur_seg_no(AVFormatContext *s, struct 
representation *pls)
 } else if (pls->fragment_duration){
 av_log(s, AV_LOG_TRACE, "in fragment_duration mode 
fragment_timescale = %"PRId64", presentation_timeoffset = %"PRId64"\n", 
pls->fragment_timescale, pls->presentation_timeoffset);
 if (pls->presentation_timeoffset) {
-num = pls->presentation_timeoffset * pls->fragment_timescale / 
pls->fragment_duration;
+num = pls->first_seq_no + (((get_current_time_in_sec() - 
c->availability_start_time) * 
pls->fragment_timescale)-pls->presentation_timeoffset) / pls->fragment_duration;
 } else if (c->publish_time > 0 && !c->availability_start_time) {
 if (c->min_buffer_time) {
 num = pls->first_seq_no + (((c->publish_time + 
pls->fragment_duration) - c->suggested_presentation_delay) * 
pls->fragment_timescale) / pls->fragment_duration - c->min_buffer_time;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/hlsenc: rename option from use_localtime to strftime

2018-09-04 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Mon Sep  3 
11:10:35 2018 +0800| [fbd8746efabe441469eb410d2ffa6af64987ca80] | committer: 
Steven Liu

avformat/hlsenc: rename option from use_localtime to strftime

fix ticket: 7393
indent option name to segment

Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fbd8746efabe441469eb410d2ffa6af64987ca80
---

 doc/muxers.texi   | 26 --
 libavformat/hlsenc.c  | 22 ++
 libavformat/version.h |  7 +--
 3 files changed, 35 insertions(+), 20 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 268c152023..f18543e83d 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -617,7 +617,7 @@ This example will produce the playlist, @file{out.m3u8}, 
and segment files:
 but only the file name part without any path info will be contained in the 
m3u8 segment list.
 Should a relative path be specified, the path of the created segment
 files will be relative to the current working directory.
-When use_localtime_mkdir is set, the whole expanded value of @var{filename} 
will be written into the m3u8 segment list.
+When strftime_mkdir is set, the whole expanded value of @var{filename} will be 
written into the m3u8 segment list.
 
 When @code{var_stream_map} is set with two or more variant streams, the
 @var{filename} pattern must contain the string "%v", this string specifies
@@ -646,34 +646,40 @@ This example will produce the playlists segment file sets:
 @file{vs1/file_000.ts}, @file{vs1/file_001.ts}, @file{vs1/file_002.ts}, etc.
 
 @item use_localtime
+Same as strftime option, will be deprecated.
+
+@item strftime
 Use strftime() on @var{filename} to expand the segment filename with localtime.
 The segment number is also available in this mode, but to use it, you need to 
specify second_level_segment_index
 hls_flag and %%d will be the specifier.
 @example
-ffmpeg -i in.nut -use_localtime 1 -hls_segment_filename 'file-%Y%m%d-%s.ts' 
out.m3u8
+ffmpeg -i in.nut -strftime 1 -hls_segment_filename 'file-%Y%m%d-%s.ts' out.m3u8
 @end example
 This example will produce the playlist, @file{out.m3u8}, and segment files:
 @file{file-20160215-1455569023.ts}, @file{file-20160215-1455569024.ts}, etc.
 Note: On some systems/environments, the @code{%s} specifier is not available. 
See
   @code{strftime()} documentation.
 @example
-ffmpeg -i in.nut -use_localtime 1 -hls_flags second_level_segment_index 
-hls_segment_filename 'file-%Y%m%d-%%04d.ts' out.m3u8
+ffmpeg -i in.nut -strftime 1 -hls_flags second_level_segment_index 
-hls_segment_filename 'file-%Y%m%d-%%04d.ts' out.m3u8
 @end example
 This example will produce the playlist, @file{out.m3u8}, and segment files:
 @file{file-20160215-0001.ts}, @file{file-20160215-0002.ts}, etc.
 
 @item use_localtime_mkdir
-Used together with -use_localtime, it will create all subdirectories which
+Same as strftime_mkdir option, will be deprecated .
+
+@item strftime_mkdir
+Used together with -strftime_mkdir, it will create all subdirectories which
 is expanded in @var{filename}.
 @example
-ffmpeg -i in.nut -use_localtime 1 -use_localtime_mkdir 1 -hls_segment_filename 
'%Y%m%d/file-%Y%m%d-%s.ts' out.m3u8
+ffmpeg -i in.nut -strftime 1 -strftime_mkdir 1 -hls_segment_filename 
'%Y%m%d/file-%Y%m%d-%s.ts' out.m3u8
 @end example
 This example will create a directory 201560215 (if it does not exist), and then
 produce the playlist, @file{out.m3u8}, and segment files:
 @file{20160215/file-20160215-1455569023.ts}, 
@file{20160215/file-20160215-1455569024.ts}, etc.
 
 @example
-ffmpeg -i in.nut -use_localtime 1 -use_localtime_mkdir 1 -hls_segment_filename 
'%Y/%m/%d/file-%Y%m%d-%s.ts' out.m3u8
+ffmpeg -i in.nut -strftime 1 -strftime_mkdir 1 -hls_segment_filename 
'%Y/%m/%d/file-%Y%m%d-%s.ts' out.m3u8
 @end example
 This example will create a directory hierarchy 2016/02/15 (if any of them do 
not exist), and then
 produce the playlist, @file{out.m3u8}, and segment files:
@@ -833,24 +839,24 @@ Generate @code{EXT-X-PROGRAM-DATE-TIME} tags.
 
 @item second_level_segment_index
 Makes it possible to use segment indexes as %%d in hls_segment_filename 
expression
-besides date/time values when use_localtime is on.
+besides date/time values when strftime is on.
 To get fixed width numbers with trailing zeroes, %%0xd format is available 
where x is the required width.
 
 @item second_level_segment_size
 Makes it possible to use segment sizes (counted in bytes) as %%s in 
hls_segment_filename
-expression besides date/time values when use_localtime is on.
+expression besides date/time values when strftime is on.
 To get fixed width numbers with trailing zeroes, %%0xs format is available 
where x is the required width.
 
 @item second_level_segment_duration
 Makes it possible to use segment duration (calculated  in microseconds) as %%t 
in hls_segment_filename
-expression besides date/time values when use_localtime is on.
+expression besides date/time values when strftime is on.
 To ge

[FFmpeg-cvslog] avformat/dashdec: add min_buffer_time process logic

2018-09-04 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Sep  5 
14:20:52 2018 +0800| [8eac027cd14eb507d7d1bddf2606a01e1d118d38] | committer: 
Steven Liu

avformat/dashdec: add min_buffer_time process logic

if there have min_buffer_time in playlist, use the min_buffer_time
value for realtime.

Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8eac027cd14eb507d7d1bddf2606a01e1d118d38
---

 libavformat/dashdec.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index adcdd51dae..91d4e36432 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1343,7 +1343,11 @@ static int64_t calc_cur_seg_no(AVFormatContext *s, 
struct representation *pls)
 if (pls->presentation_timeoffset) {
 num = pls->presentation_timeoffset * pls->fragment_timescale / 
pls->fragment_duration;
 } else if (c->publish_time > 0 && !c->availability_start_time) {
+if (c->min_buffer_time) {
+num = pls->first_seq_no + (((c->publish_time + 
pls->fragment_duration) - c->suggested_presentation_delay) * 
pls->fragment_timescale) / pls->fragment_duration - c->min_buffer_time;
+} else {
 num = pls->first_seq_no + (((c->publish_time - 
c->time_shift_buffer_depth + pls->fragment_duration) - 
c->suggested_presentation_delay) * pls->fragment_timescale) / 
pls->fragment_duration;
+}
 } else {
 num = pls->first_seq_no + (((get_current_time_in_sec() - 
c->availability_start_time) - c->suggested_presentation_delay) * 
pls->fragment_timescale) / pls->fragment_duration;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/dashdec: refine mpd element of attribute name availabilityEndTime

2018-09-04 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Sep  5 
14:13:56 2018 +0800| [f499679e17cc6c8dc4e1e4e906c325946e43ec92] | committer: 
Steven Liu

avformat/dashdec: refine mpd element of attribute name availabilityEndTime

Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f499679e17cc6c8dc4e1e4e906c325946e43ec92
---

 libavformat/dashdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 0435f25412..ad7e7d6cdb 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -132,6 +132,7 @@ typedef struct DASHContext {
 uint64_t media_presentation_duration;
 uint64_t suggested_presentation_delay;
 uint64_t availability_start_time;
+uint64_t availability_end_time;
 uint64_t publish_time;
 uint64_t minimum_update_period;
 uint64_t time_shift_buffer_depth;
@@ -1191,6 +1192,8 @@ static int parse_manifest(AVFormatContext *s, const char 
*url, AVIOContext *in)
 
 if (!av_strcasecmp(attr->name, (const char 
*)"availabilityStartTime")) {
 c->availability_start_time = get_utc_date_time_insec(s, (const 
char *)val);
+} else if (!av_strcasecmp(attr->name, (const char 
*)"availabilityEndTime")) {
+c->availability_end_time = get_utc_date_time_insec(s, (const 
char *)val);
 } else if (!av_strcasecmp(attr->name, (const char 
*)"publishTime")) {
 c->publish_time = get_utc_date_time_insec(s, (const char 
*)val);
 } else if (!av_strcasecmp(attr->name, (const char 
*)"minimumUpdatePeriod")) {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/dashdec: add trace message for get the logic output message

2018-09-04 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Sep  5 
14:19:43 2018 +0800| [e35e91546551a236a1db6266c8e91b6049220337] | committer: 
Steven Liu

avformat/dashdec: add trace message for get the logic output message

Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e35e91546551a236a1db6266c8e91b6049220337
---

 libavformat/dashdec.c | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index bcb19f49a2..adcdd51dae 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -919,18 +919,22 @@ static int parse_manifest_representation(AVFormatContext 
*s, const char *url,
 
 if (presentation_timeoffset_val) {
 rep->presentation_timeoffset = (int64_t) 
strtoll(presentation_timeoffset_val, NULL, 10);
+av_log(s, AV_LOG_TRACE, "rep->presentation_timeoffset = 
[%"PRId64"]\n", rep->presentation_timeoffset);
 xmlFree(presentation_timeoffset_val);
 }
 if (duration_val) {
 rep->fragment_duration = (int64_t) strtoll(duration_val, NULL, 
10);
+av_log(s, AV_LOG_TRACE, "rep->fragment_duration = 
[%"PRId64"]\n", rep->fragment_duration);
 xmlFree(duration_val);
 }
 if (timescale_val) {
 rep->fragment_timescale = (int64_t) strtoll(timescale_val, 
NULL, 10);
+av_log(s, AV_LOG_TRACE, "rep->fragment_timescale = 
[%"PRId64"]\n", rep->fragment_timescale);
 xmlFree(timescale_val);
 }
 if (startnumber_val) {
 rep->first_seq_no = (int64_t) strtoll(startnumber_val, NULL, 
10);
+av_log(s, AV_LOG_TRACE, "rep->first_seq_no = [%"PRId64"]\n", 
rep->first_seq_no);
 xmlFree(startnumber_val);
 }
 if (adaptionset_supplementalproperty_node) {
@@ -988,10 +992,12 @@ static int parse_manifest_representation(AVFormatContext 
*s, const char *url,
 timescale_val = get_val_from_nodes_tab(segmentlists_tab, 2, 
"timescale");
 if (duration_val) {
 rep->fragment_duration = (int64_t) strtoll(duration_val, NULL, 
10);
+av_log(s, AV_LOG_TRACE, "rep->fragment_duration = 
[%"PRId64"]\n", rep->fragment_duration);
 xmlFree(duration_val);
 }
 if (timescale_val) {
 rep->fragment_timescale = (int64_t) strtoll(timescale_val, 
NULL, 10);
+av_log(s, AV_LOG_TRACE, "rep->fragment_timescale = 
[%"PRId64"]\n", rep->fragment_timescale);
 xmlFree(timescale_val);
 }
 fragmenturl_node = 
xmlFirstElementChild(representation_segmentlist_node);
@@ -1219,20 +1225,28 @@ static int parse_manifest(AVFormatContext *s, const 
char *url, AVIOContext *in)
 
 if (!av_strcasecmp(attr->name, (const char 
*)"availabilityStartTime")) {
 c->availability_start_time = get_utc_date_time_insec(s, (const 
char *)val);
+av_log(s, AV_LOG_TRACE, "c->availability_start_time = 
[%"PRId64"]\n", c->availability_start_time);
 } else if (!av_strcasecmp(attr->name, (const char 
*)"availabilityEndTime")) {
 c->availability_end_time = get_utc_date_time_insec(s, (const 
char *)val);
+av_log(s, AV_LOG_TRACE, "c->availability_end_time = 
[%"PRId64"]\n", c->availability_end_time);
 } else if (!av_strcasecmp(attr->name, (const char 
*)"publishTime")) {
 c->publish_time = get_utc_date_time_insec(s, (const char 
*)val);
+av_log(s, AV_LOG_TRACE, "c->publish_time = [%"PRId64"]\n", 
c->publish_time);
 } else if (!av_strcasecmp(attr->name, (const char 
*)"minimumUpdatePeriod")) {
 c->minimum_update_period = get_duration_insec(s, (const char 
*)val);
+av_log(s, AV_LOG_TRACE, "c->minimum_update_period = 
[%"PRId64"]\n", c->minimum_update_period);
 } else if (!av_strcasecmp(attr->name, (const char 
*)"timeShiftBufferDepth")) {
 c->time_shift_buffer_depth = get_duration_insec(s, (const char 
*)val);
+av_log(s, AV_LOG_TRACE, "c->time_shift_buffer_depth = 
[%"PRId64"]\n", c->time_shift_buffer_depth);
 } else if (!av_strcasecmp(attr->name, (const char 
*)"minBufferTime")) {
 c->min_buffer_time = get_duration_insec(s, (const char *)val);
+av_log(s, AV_LOG_TRACE, "c->min_buffer_time = [%"PRId64"]\n", 
c->min_buffer_time);
 } else if (!av_strcasecmp(attr->name, (const char 
*)"suggestedPresentationDelay")) {
 c->suggested_presentation_delay = get_duration_insec(s, (const 
char *)val);
+av_log(s, AV_LOG_TRACE, "c->suggested_presentation_delay = 
[%"PRId64"]\n", c->suggested_presentation_delay);
 } else if (!av_strcasecmp(attr->name, (const char 
*)"mediaP

[FFmpeg-cvslog] avformat/dashdec: refine adaptionset attribute members

2018-09-04 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Sep  5 
14:15:47 2018 +0800| [e134c20374ee3cbc6d04885d306b02c9871683a2] | committer: 
Steven Liu

avformat/dashdec: refine adaptionset attribute members

Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e134c20374ee3cbc6d04885d306b02c9871683a2
---

 libavformat/dashdec.c | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index ad7e7d6cdb..ad60d2ab6f 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -122,6 +122,19 @@ struct representation {
 typedef struct DASHContext {
 const AVClass *class;
 char *base_url;
+char *adaptionset_contenttype_val;
+char *adaptionset_par_val;
+char *adaptionset_lang_val;
+char *adaptionset_minbw_val;
+char *adaptionset_maxbw_val;
+char *adaptionset_minwidth_val;
+char *adaptionset_maxwidth_val;
+char *adaptionset_minheight_val;
+char *adaptionset_maxheight_val;
+char *adaptionset_minframerate_val;
+char *adaptionset_maxframerate_val;
+char *adaptionset_segmentalignment_val;
+char *adaptionset_bitstreamswitching_val;
 
 int n_videos;
 struct representation **videos;
@@ -1061,12 +1074,26 @@ static int parse_manifest_adaptationset(AVFormatContext 
*s, const char *url,
 xmlNodePtr period_segmentlist_node)
 {
 int ret = 0;
+DASHContext *c = s->priv_data;
 xmlNodePtr fragment_template_node = NULL;
 xmlNodePtr content_component_node = NULL;
 xmlNodePtr adaptionset_baseurl_node = NULL;
 xmlNodePtr adaptionset_segmentlist_node = NULL;
 xmlNodePtr adaptionset_supplementalproperty_node = NULL;
 xmlNodePtr node = NULL;
+c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, 
"contentType");
+c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
+c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
+c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
+c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
+c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
+c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
+c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
+c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
+c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, 
"minFrameRate");
+c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, 
"maxFrameRate");
+c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, 
"segmentAlignment");
+c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, 
"bitstreamSwitching");
 
 node = xmlFirstElementChild(adaptionset_node);
 while (node) {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/dashdec: reindent code for previous commit

2018-09-04 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Sep  5 
14:21:33 2018 +0800| [d0be0de06557e344ee0142ab0a88f8f14825f5ae] | committer: 
Steven Liu

avformat/dashdec: reindent code for previous commit

Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0be0de06557e344ee0142ab0a88f8f14825f5ae
---

 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 91d4e36432..e8c57a51c5 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1346,7 +1346,7 @@ static int64_t calc_cur_seg_no(AVFormatContext *s, struct 
representation *pls)
 if (c->min_buffer_time) {
 num = pls->first_seq_no + (((c->publish_time + 
pls->fragment_duration) - c->suggested_presentation_delay) * 
pls->fragment_timescale) / pls->fragment_duration - c->min_buffer_time;
 } else {
-num = pls->first_seq_no + (((c->publish_time - 
c->time_shift_buffer_depth + pls->fragment_duration) - 
c->suggested_presentation_delay) * pls->fragment_timescale) / 
pls->fragment_duration;
+num = pls->first_seq_no + (((c->publish_time - 
c->time_shift_buffer_depth + pls->fragment_duration) - 
c->suggested_presentation_delay) * pls->fragment_timescale) / 
pls->fragment_duration;
 }
 } else {
 num = pls->first_seq_no + (((get_current_time_in_sec() - 
c->availability_start_time) - c->suggested_presentation_delay) * 
pls->fragment_timescale) / pls->fragment_duration;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/dashdec: remove redundant code

2018-09-04 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Sep  5 
14:16:29 2018 +0800| [28578e61431b8cb9783d80f2ff5aa0cd69ae35b9] | committer: 
Steven Liu

avformat/dashdec: remove redundant code

Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=28578e61431b8cb9783d80f2ff5aa0cd69ae35b9
---

 libavformat/dashdec.c | 19 +++
 1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index ad60d2ab6f..6aa4d53ff0 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1568,14 +1568,8 @@ static struct fragment *get_current_fragment(struct 
representation *pls)
 return seg;
 }
 
-enum ReadFromURLMode {
-READ_NORMAL,
-READ_COMPLETE,
-};
-
 static int read_from_url(struct representation *pls, struct fragment *seg,
- uint8_t *buf, int buf_size,
- enum ReadFromURLMode mode)
+ uint8_t *buf, int buf_size)
 {
 int ret;
 
@@ -1583,14 +1577,7 @@ static int read_from_url(struct representation *pls, 
struct fragment *seg,
 if (seg->size >= 0)
 buf_size = FFMIN(buf_size, pls->cur_seg_size - pls->cur_seg_offset);
 
-if (mode == READ_COMPLETE) {
-ret = avio_read(pls->input, buf, buf_size);
-if (ret < buf_size) {
-av_log(pls->parent, AV_LOG_WARNING, "Could not read complete 
fragment.\n");
-}
-} else {
 ret = avio_read(pls->input, buf, buf_size);
-}
 if (ret > 0)
 pls->cur_seg_offset += ret;
 
@@ -1666,7 +1653,7 @@ static int update_init_section(struct representation *pls)
 av_fast_malloc(&pls->init_sec_buf, &pls->init_sec_buf_size, sec_size);
 
 ret = read_from_url(pls, pls->init_section, pls->init_sec_buf,
-pls->init_sec_buf_size, READ_COMPLETE);
+pls->init_sec_buf_size);
 ff_format_io_close(pls->parent, &pls->input);
 
 if (ret < 0)
@@ -1737,7 +1724,7 @@ restart:
 ret = AVERROR_EOF;
 goto end;
 }
-ret = read_from_url(v, v->cur_seg, buf, buf_size, READ_NORMAL);
+ret = read_from_url(v, v->cur_seg, buf, buf_size);
 if (ret > 0)
 goto end;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/dashdec: reindent code for previous commit

2018-09-04 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Sep  5 
14:17:03 2018 +0800| [a222798ef34f1e291adc8086781946d1c1aff56d] | committer: 
Steven Liu

avformat/dashdec: reindent code for previous commit

Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a222798ef34f1e291adc8086781946d1c1aff56d
---

 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 6aa4d53ff0..bcb19f49a2 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1577,7 +1577,7 @@ static int read_from_url(struct representation *pls, 
struct fragment *seg,
 if (seg->size >= 0)
 buf_size = FFMIN(buf_size, pls->cur_seg_size - pls->cur_seg_offset);
 
-ret = avio_read(pls->input, buf, buf_size);
+ret = avio_read(pls->input, buf, buf_size);
 if (ret > 0)
 pls->cur_seg_offset += ret;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog