History

Merge remote-tracking branch 'qatar/master'

* qatar/master: (25 commits) rtpenc: Add support for G726 audio rtpdec: Interpret the different G726 names as bits_per_coded_sample rtpenc: Change rtp_send_samples to handle sample sizes other than even bytes rtpenc: Cast a rescaling parameter to int64_t h264: cap max has_b_frames at MAX_DELAYED_PIC_COUNT - 1. ARM: fix indentation in ff_dsputil_init_neon() ARM: NEON put/avg_pixels8/16 cosmetics ARM: add remaining NEON avg_pixels8/16 functions ARM: clean up NEON put/avg_pixels macros fate: split acodec-pcm into individual tests swscale: #include "libavutil/mathematics.h" pmpdec: don't use deprecated av_set_pts_info. rv34: align temporary block of "dct" coefs Add PlayStation Portable PMP format demuxer proto: Realign struct initializers proto: Use .priv_data_size to allocate the private context mmsh: Properly clean up if the second ffurl_alloc failed rtmp: Clean up properly if the handshake failed md5proto: Remove the get_file_handle function applehttpproto: Use the close function if the open function fails ... Conflicts: libavcodec/vble.c libavformat/mmsh.c libavformat/pmpdec.c libavformat/udp.c tests/ref/acodec/pcm

Michael Niedermayer committed 14 years ago

Commit 7b0b10c2 parents 8b08f81 04403ec42 files · +466 −491Browse files

Unified · Split

42 files
  1. Changelog +1 −0
  2. libavcodec/arm/dsputil_init_neon.c +51 −26
  3. libavcodec/arm/dsputil_neon.S +191 −126
  4. libavcodec/h264.c +1 −1
  5. libavcodec/rv34.c +2 −2
  6. libavformat/applehttpproto.c +18 −22
  7. libavformat/cache.c +2 −9
  8. libavformat/concat.c +7 −13
  9. libavformat/gopher.c +7 −13
  10. libavformat/http.c +1 −1
  11. libavformat/librtmp.c +11 −13
  12. libavformat/md5proto.c +0 −5
  13. libavformat/mmsh.c +10 −13
  14. libavformat/mmst.c +6 −9
  15. libavformat/pmpdec.c +12 −7
  16. libavformat/rtmpproto.c +8 −12
  17. libavformat/rtpdec_g726.c +2 −4
  18. libavformat/rtpenc.c +18 −10
  19. libavformat/rtpproto.c +2 −8
  20. libavformat/sdp.c +8 −0
  21. libavformat/tcp.c +2 −8
  22. libavformat/udp.c +2 −8
  23. libswscale/utils.c +1 −0
  24. tests/codec-regression.sh +43 −7
  25. tests/ref/acodec/pcm +0 −68
  26. tests/ref/acodec/pcm_alaw +4 −0
  27. tests/ref/acodec/pcm_f32be +4 −0
  28. tests/ref/acodec/pcm_f32le +4 −0
  29. tests/ref/acodec/pcm_f64be +4 −0
  30. tests/ref/acodec/pcm_f64le +4 −0
  31. tests/ref/acodec/pcm_mulaw +4 −0
  32. tests/ref/acodec/pcm_s16be +4 −0
  33. tests/ref/acodec/pcm_s16le +4 −0
  34. tests/ref/acodec/pcm_s24be +4 −0
  35. tests/ref/acodec/pcm_s24daud +4 −0
  36. tests/ref/acodec/pcm_s24le +4 −0
  37. tests/ref/acodec/pcm_s32be +4 −0
  38. tests/ref/acodec/pcm_s32le +4 −0
  39. tests/ref/acodec/pcm_s8 +4 −0
  40. tests/ref/acodec/pcm_u8 +4 −0
  41. tests/ref/seek/pcm_s16be_mkv +0 −53
  42. tests/ref/seek/pcm_s16le_mkv +0 −53
Changelog+1−0
@@ -126,6 +126,7 @@ easier to use. The changes are: · 125 unmodified lines
126126 - IFF Amiga Continuous Bitmap (ACBM) decoder
127127 - ass filter
128128 - CRI ADX audio format demuxer
129+- Playstation Portable PMP format demuxer
129130
130131
131132 version 0.8:
libavcodec/arm/dsputil_init_neon.c+51−26
@@ -53,7 +53,19 @@ void ff_put_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); · 52 unmodified lines
5353 void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
5454
5555 void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
56+void ff_avg_pixels16_x2_neon(uint8_t *, const uint8_t *, int, int);
57+void ff_avg_pixels16_y2_neon(uint8_t *, const uint8_t *, int, int);
58+void ff_avg_pixels16_xy2_neon(uint8_t *, const uint8_t *, int, int);
5659 void ff_avg_pixels8_neon(uint8_t *, const uint8_t *, int, int);
60+void ff_avg_pixels8_x2_neon(uint8_t *, const uint8_t *, int, int);
61+void ff_avg_pixels8_y2_neon(uint8_t *, const uint8_t *, int, int);
62+void ff_avg_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, int);
63+void ff_avg_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
64+void ff_avg_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
65+void ff_avg_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
66+void ff_avg_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
67+void ff_avg_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
68+void ff_avg_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
5769
5870 void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
5971 void ff_put_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
@@ -189,37 +201,51 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx) · 129 unmodified lines
189201 }
190202
191203 if (!high_bit_depth) {
192− c->clear_block = ff_clear_block_neon;
193− c->clear_blocks = ff_clear_blocks_neon;
194−
195− c->put_pixels_tab[0][0] = ff_put_pixels16_neon;
196− c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon;
197− c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon;
198− c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon;
199− c->put_pixels_tab[1][0] = ff_put_pixels8_neon;
200− c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon;
201− c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon;
202− c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon;
203−
204− c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon;
205− c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon;
206− c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon;
207− c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon;
208− c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon;
209− c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon;
210− c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon;
211− c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon;
212−
213− c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
214− c->avg_pixels_tab[1][0] = ff_avg_pixels8_neon;
204+ c->clear_block = ff_clear_block_neon;
205+ c->clear_blocks = ff_clear_blocks_neon;
206+
207+ c->put_pixels_tab[0][0] = ff_put_pixels16_neon;
208+ c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon;
209+ c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon;
210+ c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon;
211+ c->put_pixels_tab[1][0] = ff_put_pixels8_neon;
212+ c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon;
213+ c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon;
214+ c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon;
215+
216+ c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon;
217+ c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon;
218+ c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon;
219+ c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon;
220+ c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon;
221+ c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon;
222+ c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon;
223+ c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon;
224+
225+ c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
226+ c->avg_pixels_tab[0][1] = ff_avg_pixels16_x2_neon;
227+ c->avg_pixels_tab[0][2] = ff_avg_pixels16_y2_neon;
228+ c->avg_pixels_tab[0][3] = ff_avg_pixels16_xy2_neon;
229+ c->avg_pixels_tab[1][0] = ff_avg_pixels8_neon;
230+ c->avg_pixels_tab[1][1] = ff_avg_pixels8_x2_neon;
231+ c->avg_pixels_tab[1][2] = ff_avg_pixels8_y2_neon;
232+ c->avg_pixels_tab[1][3] = ff_avg_pixels8_xy2_neon;
233+
234+ c->avg_no_rnd_pixels_tab[0][0] = ff_avg_pixels16_neon;
235+ c->avg_no_rnd_pixels_tab[0][1] = ff_avg_pixels16_x2_no_rnd_neon;
236+ c->avg_no_rnd_pixels_tab[0][2] = ff_avg_pixels16_y2_no_rnd_neon;
237+ c->avg_no_rnd_pixels_tab[0][3] = ff_avg_pixels16_xy2_no_rnd_neon;
238+ c->avg_no_rnd_pixels_tab[1][0] = ff_avg_pixels8_neon;
239+ c->avg_no_rnd_pixels_tab[1][1] = ff_avg_pixels8_x2_no_rnd_neon;
240+ c->avg_no_rnd_pixels_tab[1][2] = ff_avg_pixels8_y2_no_rnd_neon;
241+ c->avg_no_rnd_pixels_tab[1][3] = ff_avg_pixels8_xy2_no_rnd_neon;
215242 }
216243
217244 c->add_pixels_clamped = ff_add_pixels_clamped_neon;
218245 c->put_pixels_clamped = ff_put_pixels_clamped_neon;
219246 c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
220247
221− if (CONFIG_H264_DECODER) {
222− if (!high_bit_depth) {
248+ if (CONFIG_H264_DECODER && !high_bit_depth) {
223249 c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
224250 c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon;
225251 c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_neon;
@@ -295,7 +321,6 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx) · 69 unmodified lines
295321 c->avg_h264_qpel_pixels_tab[1][13] = ff_avg_h264_qpel8_mc13_neon;
296322 c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon;
297323 c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon;
298− }
299324 }
300325
301326 if (CONFIG_VP3_DECODER) {
libavcodec/arm/dsputil_neon.S+191−126
@@ -40,75 +40,89 @@ function ff_clear_blocks_neon, export=1 · 39 unmodified lines
4040 bx lr
4141 endfunc
4242
43− .macro pixels16 avg=0
44−.if \avg
45− mov ip, r0
46−.endif
47−1: vld1.64 {d0, d1}, [r1], r2
48− vld1.64 {d2, d3}, [r1], r2
49− vld1.64 {d4, d5}, [r1], r2
43+.macro pixels16 rnd=1, avg=0
44+ .if \avg
45+ mov r12, r0
46+ .endif
47+1: vld1.64 {q0}, [r1], r2
48+ vld1.64 {q1}, [r1], r2
49+ vld1.64 {q2}, [r1], r2
5050 pld [r1, r2, lsl #2]
51− vld1.64 {d6, d7}, [r1], r2
51+ vld1.64 {q3}, [r1], r2
5252 pld [r1]
5353 pld [r1, r2]
5454 pld [r1, r2, lsl #1]
55−.if \avg
56− vld1.64 {d16,d17}, [ip,:128], r2
55+ .if \avg
56+ vld1.64 {q8}, [r12,:128], r2
5757 vrhadd.u8 q0, q0, q8
58− vld1.64 {d18,d19}, [ip,:128], r2
58+ vld1.64 {q9}, [r12,:128], r2
5959 vrhadd.u8 q1, q1, q9
60− vld1.64 {d20,d21}, [ip,:128], r2
60+ vld1.64 {q10}, [r12,:128], r2
6161 vrhadd.u8 q2, q2, q10
62− vld1.64 {d22,d23}, [ip,:128], r2
62+ vld1.64 {q11}, [r12,:128], r2
6363 vrhadd.u8 q3, q3, q11
64−.endif
64+ .endif
6565 subs r3, r3, #4
66− vst1.64 {d0, d1}, [r0,:128], r2
67− vst1.64 {d2, d3}, [r0,:128], r2
68− vst1.64 {d4, d5}, [r0,:128], r2
69− vst1.64 {d6, d7}, [r0,:128], r2
66+ vst1.64 {q0}, [r0,:128], r2
67+ vst1.64 {q1}, [r0,:128], r2
68+ vst1.64 {q2}, [r0,:128], r2
69+ vst1.64 {q3}, [r0,:128], r2
7070 bne 1b
7171 bx lr
72− .endm
72+.endm
7373
74− .macro pixels16_x2 vhadd=vrhadd.u8
75−1: vld1.64 {d0-d2}, [r1], r2
76− vld1.64 {d4-d6}, [r1], r2
74+.macro pixels16_x2 rnd=1, avg=0
75+1: vld1.64 {d0-d2}, [r1], r2
76+ vld1.64 {d4-d6}, [r1], r2
7777 pld [r1]
7878 pld [r1, r2]
7979 subs r3, r3, #2
8080 vext.8 q1, q0, q1, #1
81− \vhadd q0, q0, q1
81+ avg q0, q0, q1
8282 vext.8 q3, q2, q3, #1
83− \vhadd q2, q2, q3
84− vst1.64 {d0, d1}, [r0,:128], r2
85− vst1.64 {d4, d5}, [r0,:128], r2
83+ avg q2, q2, q3
84+ .if \avg
85+ vld1.8 {q1}, [r0,:128], r2
86+ vld1.8 {q3}, [r0,:128]
87+ vrhadd.u8 q0, q0, q1
88+ vrhadd.u8 q2, q2, q3
89+ sub r0, r0, r2
90+ .endif
91+ vst1.64 {q0}, [r0,:128], r2
92+ vst1.64 {q2}, [r0,:128], r2
8693 bne 1b
8794 bx lr
88− .endm
95+.endm
8996
90− .macro pixels16_y2 vhadd=vrhadd.u8
91− vld1.64 {d0, d1}, [r1], r2
92− vld1.64 {d2, d3}, [r1], r2
97+.macro pixels16_y2 rnd=1, avg=0
98+ vld1.64 {q0}, [r1], r2
99+ vld1.64 {q1}, [r1], r2
93100 1: subs r3, r3, #2
94− \vhadd q2, q0, q1
95− vld1.64 {d0, d1}, [r1], r2
96− \vhadd q3, q0, q1
97− vld1.64 {d2, d3}, [r1], r2
101+ avg q2, q0, q1
102+ vld1.64 {q0}, [r1], r2
103+ avg q3, q0, q1
104+ vld1.64 {q1}, [r1], r2
98105 pld [r1]
99106 pld [r1, r2]
100− vst1.64 {d4, d5}, [r0,:128], r2
101− vst1.64 {d6, d7}, [r0,:128], r2
107+ .if \avg
108+ vld1.8 {q8}, [r0,:128], r2
109+ vld1.8 {q9}, [r0,:128]
110+ vrhadd.u8 q2, q2, q8
111+ vrhadd.u8 q3, q3, q9
112+ sub r0, r0, r2
113+ .endif
114+ vst1.64 {q2}, [r0,:128], r2
115+ vst1.64 {q3}, [r0,:128], r2
102116 bne 1b
103117 bx lr
104− .endm
118+.endm
105119
106− .macro pixels16_xy2 vshrn=vrshrn.u16 no_rnd=0
107− vld1.64 {d0-d2}, [r1], r2
108− vld1.64 {d4-d6}, [r1], r2
109−.if \no_rnd
120+.macro pixels16_xy2 rnd=1, avg=0
121+ vld1.64 {d0-d2}, [r1], r2
122+ vld1.64 {d4-d6}, [r1], r2
123+ .ifeq \rnd
110124 vmov.i16 q13, #1
111−.endif
125+ .endif
112126 pld [r1]
113127 pld [r1, r2]
114128 vext.8 q1, q0, q1, #1
@@ -118,109 +132,129 @@ endfunc · 3 unmodified lines
118132 vaddl.u8 q9, d4, d6
119133 vaddl.u8 q11, d5, d7
120134 1: subs r3, r3, #2
121− vld1.64 {d0-d2}, [r1], r2
135+ vld1.64 {d0-d2}, [r1], r2
122136 vadd.u16 q12, q8, q9
123137 pld [r1]
124−.if \no_rnd
138+ .ifeq \rnd
125139 vadd.u16 q12, q12, q13
126−.endif
140+ .endif
127141 vext.8 q15, q0, q1, #1
128142 vadd.u16 q1 , q10, q11
129− \vshrn d28, q12, #2
130−.if \no_rnd
143+ shrn d28, q12, #2
144+ .ifeq \rnd
131145 vadd.u16 q1, q1, q13
132−.endif
133− \vshrn d29, q1, #2
146+ .endif
147+ shrn d29, q1, #2
148+ .if \avg
149+ vld1.8 {q8}, [r0,:128]
150+ vrhadd.u8 q14, q14, q8
151+ .endif
134152 vaddl.u8 q8, d0, d30
135− vld1.64 {d2-d4}, [r1], r2
153+ vld1.64 {d2-d4}, [r1], r2
136154 vaddl.u8 q10, d1, d31
137− vst1.64 {d28,d29}, [r0,:128], r2
155+ vst1.64 {q14}, [r0,:128], r2
138156 vadd.u16 q12, q8, q9
139157 pld [r1, r2]
140−.if \no_rnd
158+ .ifeq \rnd
141159 vadd.u16 q12, q12, q13
142−.endif
160+ .endif
143161 vext.8 q2, q1, q2, #1
144162 vadd.u16 q0, q10, q11
145− \vshrn d30, q12, #2
146−.if \no_rnd
163+ shrn d30, q12, #2
164+ .ifeq \rnd
147165 vadd.u16 q0, q0, q13
148−.endif
149− \vshrn d31, q0, #2
166+ .endif
167+ shrn d31, q0, #2
168+ .if \avg
169+ vld1.8 {q9}, [r0,:128]
170+ vrhadd.u8 q15, q15, q9
171+ .endif
150172 vaddl.u8 q9, d2, d4
151173 vaddl.u8 q11, d3, d5
152− vst1.64 {d30,d31}, [r0,:128], r2
174+ vst1.64 {q15}, [r0,:128], r2
153175 bgt 1b
154176 bx lr
155− .endm
177+.endm
156178
157− .macro pixels8 avg=0
158−1: vld1.64 {d0}, [r1], r2
159− vld1.64 {d1}, [r1], r2
160− vld1.64 {d2}, [r1], r2
179+.macro pixels8 rnd=1, avg=0
180+1: vld1.64 {d0}, [r1], r2
181+ vld1.64 {d1}, [r1], r2
182+ vld1.64 {d2}, [r1], r2
161183 pld [r1, r2, lsl #2]
162− vld1.64 {d3}, [r1], r2
184+ vld1.64 {d3}, [r1], r2
163185 pld [r1]
164186 pld [r1, r2]
165187 pld [r1, r2, lsl #1]
166−.if \avg
167− vld1.64 {d4}, [r0,:64], r2
188+ .if \avg
189+ vld1.64 {d4}, [r0,:64], r2
168190 vrhadd.u8 d0, d0, d4
169− vld1.64 {d5}, [r0,:64], r2
191+ vld1.64 {d5}, [r0,:64], r2
170192 vrhadd.u8 d1, d1, d5
171− vld1.64 {d6}, [r0,:64], r2
193+ vld1.64 {d6}, [r0,:64], r2
172194 vrhadd.u8 d2, d2, d6
173− vld1.64 {d7}, [r0,:64], r2
195+ vld1.64 {d7}, [r0,:64], r2
174196 vrhadd.u8 d3, d3, d7
175197 sub r0, r0, r2, lsl #2
176−.endif
198+ .endif
177199 subs r3, r3, #4
178− vst1.64 {d0}, [r0,:64], r2
179− vst1.64 {d1}, [r0,:64], r2
180− vst1.64 {d2}, [r0,:64], r2
181− vst1.64 {d3}, [r0,:64], r2
200+ vst1.64 {d0}, [r0,:64], r2
201+ vst1.64 {d1}, [r0,:64], r2
202+ vst1.64 {d2}, [r0,:64], r2
203+ vst1.64 {d3}, [r0,:64], r2
182204 bne 1b
183205 bx lr
184− .endm
206+.endm
185207
186− .macro pixels8_x2 vhadd=vrhadd.u8
187−1: vld1.64 {d0, d1}, [r1], r2
208+.macro pixels8_x2 rnd=1, avg=0
209+1: vld1.64 {q0}, [r1], r2
188210 vext.8 d1, d0, d1, #1
189− vld1.64 {d2, d3}, [r1], r2
211+ vld1.64 {q1}, [r1], r2
190212 vext.8 d3, d2, d3, #1
191213 pld [r1]
192214 pld [r1, r2]
193215 subs r3, r3, #2
194216 vswp d1, d2
195− \vhadd q0, q0, q1
196− vst1.64 {d0}, [r0,:64], r2
197− vst1.64 {d1}, [r0,:64], r2
217+ avg q0, q0, q1
218+ .if \avg
219+ vld1.8 {d4}, [r0,:64], r2
220+ vld1.8 {d5}, [r0,:64]
221+ vrhadd.u8 q0, q0, q2
222+ sub r0, r0, r2
223+ .endif
224+ vst1.64 {d0}, [r0,:64], r2
225+ vst1.64 {d1}, [r0,:64], r2
198226 bne 1b
199227 bx lr
200− .endm
228+.endm
201229
202− .macro pixels8_y2 vhadd=vrhadd.u8
203− vld1.64 {d0}, [r1], r2
204− vld1.64 {d1}, [r1], r2
230+.macro pixels8_y2 rnd=1, avg=0
231+ vld1.64 {d0}, [r1], r2
232+ vld1.64 {d1}, [r1], r2
205233 1: subs r3, r3, #2
206− \vhadd d4, d0, d1
207− vld1.64 {d0}, [r1], r2
208− \vhadd d5, d0, d1
209− vld1.64 {d1}, [r1], r2
234+ avg d4, d0, d1
235+ vld1.64 {d0}, [r1], r2
236+ avg d5, d0, d1
237+ vld1.64 {d1}, [r1], r2
210238 pld [r1]
211239 pld [r1, r2]
212− vst1.64 {d4}, [r0,:64], r2
213− vst1.64 {d5}, [r0,:64], r2
240+ .if \avg
241+ vld1.8 {d2}, [r0,:64], r2
242+ vld1.8 {d3}, [r0,:64]
243+ vrhadd.u8 q2, q2, q1
244+ sub r0, r0, r2
245+ .endif
246+ vst1.64 {d4}, [r0,:64], r2
247+ vst1.64 {d5}, [r0,:64], r2
214248 bne 1b
215249 bx lr
216− .endm
250+.endm
217251
218− .macro pixels8_xy2 vshrn=vrshrn.u16 no_rnd=0
219− vld1.64 {d0, d1}, [r1], r2
220− vld1.64 {d2, d3}, [r1], r2
221−.if \no_rnd
252+.macro pixels8_xy2 rnd=1, avg=0
253+ vld1.64 {q0}, [r1], r2
254+ vld1.64 {q1}, [r1], r2
255+ .ifeq \rnd
222256 vmov.i16 q11, #1
223−.endif
257+ .endif
224258 pld [r1]
225259 pld [r1, r2]
226260 vext.8 d4, d0, d1, #1
@@ -228,70 +262,101 @@ endfunc · 1 unmodified line
228262 vaddl.u8 q8, d0, d4
229263 vaddl.u8 q9, d2, d6
230264 1: subs r3, r3, #2
231− vld1.64 {d0, d1}, [r1], r2
265+ vld1.64 {q0}, [r1], r2
232266 pld [r1]
233267 vadd.u16 q10, q8, q9
234268 vext.8 d4, d0, d1, #1
235−.if \no_rnd
269+ .ifeq \rnd
236270 vadd.u16 q10, q10, q11
237−.endif
271+ .endif
238272 vaddl.u8 q8, d0, d4
239− \vshrn d5, q10, #2
240− vld1.64 {d2, d3}, [r1], r2
273+ shrn d5, q10, #2
274+ vld1.64 {q1}, [r1], r2
241275 vadd.u16 q10, q8, q9
242276 pld [r1, r2]
243−.if \no_rnd
277+ .if \avg
278+ vld1.8 {d7}, [r0,:64]
279+ vrhadd.u8 d5, d5, d7
280+ .endif
281+ .ifeq \rnd
244282 vadd.u16 q10, q10, q11
245−.endif
246− vst1.64 {d5}, [r0,:64], r2
247− \vshrn d7, q10, #2
283+ .endif
284+ vst1.64 {d5}, [r0,:64], r2
285+ shrn d7, q10, #2
286+ .if \avg
287+ vld1.8 {d5}, [r0,:64]
288+ vrhadd.u8 d7, d7, d5
289+ .endif
248290 vext.8 d6, d2, d3, #1
249291 vaddl.u8 q9, d2, d6
250− vst1.64 {d7}, [r0,:64], r2
292+ vst1.64 {d7}, [r0,:64], r2
251293 bgt 1b
252294 bx lr
253− .endm
254−
255− .macro pixfunc pfx name suf rnd_op args:vararg
295+.endm
296+
297+.macro pixfunc pfx, name, suf, rnd=1, avg=0
298+ .if \rnd
299+ .macro avg rd, rn, rm
300+ vrhadd.u8 \rd, \rn, \rm
301+ .endm
302+ .macro shrn rd, rn, rm
303+ vrshrn.u16 \rd, \rn, \rm
304+ .endm
305+ .else
306+ .macro avg rd, rn, rm
307+ vhadd.u8 \rd, \rn, \rm
308+ .endm
309+ .macro shrn rd, rn, rm
310+ vshrn.u16 \rd, \rn, \rm
311+ .endm
312+ .endif
256313 function ff_\pfx\name\suf\()_neon, export=1
257− \name \rnd_op \args
314+ \name \rnd, \avg
258315 endfunc
259− .endm
316+ .purgem avg
317+ .purgem shrn
318+.endm
260319
261− .macro pixfunc2 pfx name args:vararg
262− pixfunc \pfx \name
263− pixfunc \pfx \name \args
264− .endm
320+.macro pixfunc2 pfx, name, avg=0
321+ pixfunc \pfx, \name, rnd=1, avg=\avg
322+ pixfunc \pfx, \name, _no_rnd, rnd=0, avg=\avg
323+.endm
265324
266325 function ff_put_h264_qpel16_mc00_neon, export=1
267326 mov r3, #16
268327 endfunc
269328
270− pixfunc put_ pixels16
271− pixfunc2 put_ pixels16_x2, _no_rnd, vhadd.u8
272− pixfunc2 put_ pixels16_y2, _no_rnd, vhadd.u8
273− pixfunc2 put_ pixels16_xy2, _no_rnd, vshrn.u16, 1
329+ pixfunc put_, pixels16, avg=0
330+ pixfunc2 put_, pixels16_x2, avg=0
331+ pixfunc2 put_, pixels16_y2, avg=0
332+ pixfunc2 put_, pixels16_xy2, avg=0
274333
275334 function ff_avg_h264_qpel16_mc00_neon, export=1
276335 mov r3, #16
277336 endfunc
278337
279− pixfunc avg_ pixels16,, 1
338+ pixfunc avg_, pixels16, avg=1
339+ pixfunc2 avg_, pixels16_x2, avg=1
340+ pixfunc2 avg_, pixels16_y2, avg=1
341+ pixfunc2 avg_, pixels16_xy2, avg=1
280342
281343 function ff_put_h264_qpel8_mc00_neon, export=1
282344 mov r3, #8
283345 endfunc
284346
285− pixfunc put_ pixels8
286− pixfunc2 put_ pixels8_x2, _no_rnd, vhadd.u8
287− pixfunc2 put_ pixels8_y2, _no_rnd, vhadd.u8
288− pixfunc2 put_ pixels8_xy2, _no_rnd, vshrn.u16, 1
347+ pixfunc put_, pixels8, avg=0
348+ pixfunc2 put_, pixels8_x2, avg=0
349+ pixfunc2 put_, pixels8_y2, avg=0
350+ pixfunc2 put_, pixels8_xy2, avg=0
289351
290352 function ff_avg_h264_qpel8_mc00_neon, export=1
291353 mov r3, #8
292354 endfunc
293355
294− pixfunc avg_ pixels8,, 1
356+ pixfunc avg_, pixels8, avg=1
357+ pixfunc2 avg_, pixels8_x2, avg=1
358+ pixfunc2 avg_, pixels8_y2, avg=1
359+ pixfunc2 avg_, pixels8_xy2, avg=1
295360
296361 function ff_put_pixels_clamped_neon, export=1
297362 vld1.64 {d16-d19}, [r0,:128]!
libavcodec/h264.c+1−1
@@ -1471,7 +1471,7 @@ static void decode_postinit(H264Context *h, int setup_finished){ · 1470 unmodified lines
14711471
14721472 if( s->avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT
14731473 && !h->sps.bitstream_restriction_flag){
1474− s->avctx->has_b_frames= MAX_DELAYED_PIC_COUNT;
1474+ s->avctx->has_b_frames = MAX_DELAYED_PIC_COUNT - 1;
14751475 s->low_delay= 0;
14761476 }
14771477
libavcodec/rv34.c+2−2
@@ -1112,7 +1112,7 @@ static int rv34_decode_macroblock(RV34DecContext *r, int8_t *intra_types) · 1111 unmodified lines
11121112 GetBitContext *gb = &s->gb;
11131113 int cbp, cbp2;
11141114 int i, blknum, blkoff;
1115− DCTELEM block16[64];
1115+ LOCAL_ALIGNED_16(DCTELEM, block16, [64]);
11161116 int luma_dc_quant;
11171117 int dist;
11181118 int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
@@ -1147,7 +1147,7 @@ static int rv34_decode_macroblock(RV34DecContext *r, int8_t *intra_types) · 28 unmodified lines
11471147
11481148 luma_dc_quant = r->block_type == RV34_MB_P_MIX16x16 ? r->luma_dc_quant_p[s->qscale] : r->luma_dc_quant_i[s->qscale];
11491149 if(r->is16){
1150− memset(block16, 0, sizeof(block16));
1150+ memset(block16, 0, 64 * sizeof(*block16));
11511151 rv34_decode_block(block16, gb, r->cur_vlcs, 3, 0);
11521152 rv34_dequant4x4_16x16(block16, rv34_qscale_tab[luma_dc_quant],rv34_qscale_tab[s->qscale]);
11531153 r->rdsp.rv34_inv_transform_tab[1](block16);
libavformat/applehttpproto.c+18−22
@@ -174,19 +174,25 @@ fail: · 173 unmodified lines
174174 return ret;
175175 }
176176
177+static int applehttp_close(URLContext *h)
178+{
179+ AppleHTTPContext *s = h->priv_data;
180+
181+ free_segment_list(s);
182+ free_variant_list(s);
183+ ffurl_close(s->seg_hd);
184+ return 0;
185+}
186+
177187 static int applehttp_open(URLContext *h, const char *uri, int flags)
178188 {
179− AppleHTTPContext *s;
189+ AppleHTTPContext *s = h->priv_data;
180190 int ret, i;
181191 const char *nested_url;
182192
183193 if (flags & AVIO_FLAG_WRITE)
184194 return AVERROR(ENOSYS);
185195
186− s = av_mallocz(sizeof(AppleHTTPContext));
187− if (!s)
188− return AVERROR(ENOMEM);
189− h->priv_data = s;
190196 h->is_streamed = 1;
191197
192198 if (av_strstart(uri, "applehttp+", &nested_url)) {
@@ -229,7 +235,7 @@ static int applehttp_open(URLContext *h, const char *uri, int flags) · 36 unmodified lines
229235 return 0;
230236
231237 fail:
232− av_free(s);
238+ applehttp_close(h);
233239 return ret;
234240 }
235241
@@ -287,21 +293,11 @@ retry: · 51 unmodified lines
287293 goto start;
288294 }
289295
290−static int applehttp_close(URLContext *h)
291−{
292− AppleHTTPContext *s = h->priv_data;
293−
294− free_segment_list(s);
295− free_variant_list(s);
296− ffurl_close(s->seg_hd);
297− av_free(s);
298− return 0;
299−}
300−
301296 URLProtocol ff_applehttp_protocol = {
302− .name = "applehttp",
303− .url_open = applehttp_open,
304− .url_read = applehttp_read,
305− .url_close = applehttp_close,
306− .flags = URL_PROTOCOL_FLAG_NESTED_SCHEME,
297+ .name = "applehttp",
298+ .url_open = applehttp_open,
299+ .url_read = applehttp_read,
300+ .url_close = applehttp_close,
301+ .flags = URL_PROTOCOL_FLAG_NESTED_SCHEME,
302+ .priv_data_size = sizeof(AppleHTTPContext),
307303 };
libavformat/cache.c+2−9
@@ -53,13 +53,7 @@ static int cache_open(URLContext *h, const char *arg, int flags) · 52 unmodified lines
5353 {
5454 int access;
5555 const char *buffername;
56− Context *c;
57−
58− c = av_mallocz(sizeof(Context));
59− if (!c) {
60− return AVERROR(ENOMEM);
61− }
62− h->priv_data = c;
56+ Context *c= h->priv_data;
6357
6458 av_strstart(arg, "cache:", &arg);
6559
@@ -130,8 +124,6 @@ static int cache_close(URLContext *h) · 64 unmodified lines
130124 close(c->fd);
131125 ffurl_close(c->inner);
132126
133− av_freep(&h->priv_data);
134−
135127 return 0;
136128 }
137129
@@ -141,4 +133,5 @@ URLProtocol ff_cache_protocol = { · 3 unmodified lines
141133 .url_read = cache_read,
142134 .url_seek = cache_seek,
143135 .url_close = cache_close,
136+ .priv_data_size = sizeof(Context),
144137 };
libavformat/concat.c+7−13
@@ -50,7 +50,6 @@ static av_cold int concat_close(URLContext *h) · 49 unmodified lines
5050 err |= ffurl_close(nodes[i].uc);
5151
5252 av_freep(&data->nodes);
53− av_freep(&h->priv_data);
5453
5554 return err < 0 ? -1 : 0;
5655 }
@@ -62,16 +61,11 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags) · 5 unmodified lines
6261 int64_t size;
6362 size_t len, i;
6463 URLContext *uc;
65− struct concat_data *data;
64+ struct concat_data *data = h->priv_data;
6665 struct concat_nodes *nodes;
6766
6867 av_strstart(uri, "concat:", &uri);
6968
70− /* creating data */
71− if (!(data = av_mallocz(sizeof(*data))))
72− return AVERROR(ENOMEM);
73− h->priv_data = data;
74−
7569 for (i = 0, len = 1; uri[i]; i++)
7670 if (uri[i] == *AV_CAT_SEPARATOR)
7771 /* integer overflow */
@@ -81,7 +75,6 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags) · 3 unmodified lines
8175 }
8276
8377 if (!(nodes = av_malloc(sizeof(*nodes) * len))) {
84− av_freep(&h->priv_data);
8578 return AVERROR(ENOMEM);
8679 } else
8780 data->nodes = nodes;
@@ -191,9 +184,10 @@ static int64_t concat_seek(URLContext *h, int64_t pos, int whence) · 103 unmodified lines
191184 }
192185
193186 URLProtocol ff_concat_protocol = {
194− .name = "concat",
195− .url_open = concat_open,
196− .url_read = concat_read,
197− .url_seek = concat_seek,
198− .url_close = concat_close,
187+ .name = "concat",
188+ .url_open = concat_open,
189+ .url_read = concat_read,
190+ .url_seek = concat_seek,
191+ .url_close = concat_close,
192+ .priv_data_size = sizeof(struct concat_data),
199193 };
libavformat/gopher.c+7−13
@@ -72,24 +72,17 @@ static int gopher_close(URLContext *h) · 71 unmodified lines
7272 ffurl_close(s->hd);
7373 s->hd = NULL;
7474 }
75− av_freep(&h->priv_data);
7675 return 0;
7776 }
7877
7978 static int gopher_open(URLContext *h, const char *uri, int flags)
8079 {
81− GopherContext *s;
80+ GopherContext *s = h->priv_data;
8281 char hostname[1024], auth[1024], path[1024], buf[1024];
8382 int port, err;
8483
8584 h->is_streamed = 1;
8685
87− s = av_malloc(sizeof(GopherContext));
88− if (!s) {
89− return AVERROR(ENOMEM);
90− }
91− h->priv_data = s;
92−
9386 /* needed in any case to build the host string */
9487 av_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port,
9588 path, sizeof(path), uri);
@@ -122,9 +115,10 @@ static int gopher_read(URLContext *h, uint8_t *buf, int size) · 26 unmodified lines
122115
123116
124117 URLProtocol ff_gopher_protocol = {
125− .name = "gopher",
126− .url_open = gopher_open,
127− .url_read = gopher_read,
128− .url_write = gopher_write,
129− .url_close = gopher_close,
118+ .name = "gopher",
119+ .url_open = gopher_open,
120+ .url_read = gopher_read,
121+ .url_write = gopher_write,
122+ .url_close = gopher_close,
123+ .priv_data_size = sizeof(GopherContext),
130124 };
libavformat/http.c+1−1
@@ -93,7 +93,7 @@ static int http_open_cnx(URLContext *h) · 92 unmodified lines
9393 {
9494 const char *path, *proxy_path, *lower_proto = "tcp", *local_path;
9595 char hostname[1024], hoststr[1024], proto[10];
96− char auth[1024], proxyauth[1024];
96+ char auth[1024], proxyauth[1024] = "";
9797 char path1[1024];
9898 char buf[1024], urlbuf[1024];
9999 int port, use_proxy, err, location_changed = 0, redirects = 0;
libavformat/librtmp.c+11−13
@@ -52,7 +52,6 @@ static int rtmp_close(URLContext *s) · 51 unmodified lines
5252 RTMP *r = s->priv_data;
5353
5454 RTMP_Close(r);
55− av_free(r);
5655 return 0;
5756 }
5857
@@ -70,13 +69,9 @@ static int rtmp_close(URLContext *s) · 11 unmodified lines
7069 */
7170 static int rtmp_open(URLContext *s, const char *uri, int flags)
7271 {
73− RTMP *r;
72+ RTMP *r = s->priv_data;
7473 int rc;
7574
76− r = av_mallocz(sizeof(RTMP));
77− if (!r)
78− return AVERROR(ENOMEM);
79−
8075 switch (av_log_get_level()) {
8176 default:
8277 case AV_LOG_FATAL: rc = RTMP_LOGCRIT; break;
@@ -103,11 +98,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) · 20 unmodified lines
10398 goto fail;
10499 }
105100
106− s->priv_data = r;
107101 s->is_streamed = 1;
108102 return 0;
109103 fail:
110− av_free(r);
111104 return rc;
112105 }
113106
@@ -167,7 +160,8 @@ URLProtocol ff_rtmp_protocol = { · 53 unmodified lines
167160 .url_close = rtmp_close,
168161 .url_read_pause = rtmp_read_pause,
169162 .url_read_seek = rtmp_read_seek,
170− .url_get_file_handle = rtmp_get_file_handle
163+ .url_get_file_handle = rtmp_get_file_handle,
164+ .priv_data_size = sizeof(RTMP),
171165 };
172166
173167 URLProtocol ff_rtmpt_protocol = {
@@ -178,7 +172,8 @@ URLProtocol ff_rtmpt_protocol = { · 4 unmodified lines
178172 .url_close = rtmp_close,
179173 .url_read_pause = rtmp_read_pause,
180174 .url_read_seek = rtmp_read_seek,
181− .url_get_file_handle = rtmp_get_file_handle
175+ .url_get_file_handle = rtmp_get_file_handle,
176+ .priv_data_size = sizeof(RTMP),
182177 };
183178
184179 URLProtocol ff_rtmpe_protocol = {
@@ -189,7 +184,8 @@ URLProtocol ff_rtmpe_protocol = { · 4 unmodified lines
189184 .url_close = rtmp_close,
190185 .url_read_pause = rtmp_read_pause,
191186 .url_read_seek = rtmp_read_seek,
192− .url_get_file_handle = rtmp_get_file_handle
187+ .url_get_file_handle = rtmp_get_file_handle,
188+ .priv_data_size = sizeof(RTMP),
193189 };
194190
195191 URLProtocol ff_rtmpte_protocol = {
@@ -200,7 +196,8 @@ URLProtocol ff_rtmpte_protocol = { · 4 unmodified lines
200196 .url_close = rtmp_close,
201197 .url_read_pause = rtmp_read_pause,
202198 .url_read_seek = rtmp_read_seek,
203− .url_get_file_handle = rtmp_get_file_handle
199+ .url_get_file_handle = rtmp_get_file_handle,
200+ .priv_data_size = sizeof(RTMP),
204201 };
205202
206203 URLProtocol ff_rtmps_protocol = {
@@ -211,5 +208,6 @@ URLProtocol ff_rtmps_protocol = { · 4 unmodified lines
211208 .url_close = rtmp_close,
212209 .url_read_pause = rtmp_read_pause,
213210 .url_read_seek = rtmp_read_seek,
214− .url_get_file_handle = rtmp_get_file_handle
211+ .url_get_file_handle = rtmp_get_file_handle,
212+ .priv_data_size = sizeof(RTMP),
215213 };
libavformat/md5proto.c+0−5
@@ -79,16 +79,11 @@ static int md5_close(URLContext *h) · 78 unmodified lines
7979 return err;
8080 }
8181
82−static int md5_get_handle(URLContext *h)
83−{
84− return (intptr_t)h->priv_data;
85−}
8682
8783 URLProtocol ff_md5_protocol = {
8884 .name = "md5",
8985 .url_open = md5_open,
9086 .url_write = md5_write,
9187 .url_close = md5_close,
92− .url_get_file_handle = md5_get_handle,
9388 .priv_data_size = PRIV_SIZE,
9489 };
libavformat/mmsh.c+10−13
@@ -69,7 +69,6 @@ static int mmsh_close(URLContext *h) · 68 unmodified lines
6969 ffurl_close(mms->mms_hd);
7070 av_free(mms->streams);
7171 av_free(mms->asf_header);
72− av_freep(&h->priv_data);
7372 return 0;
7473 }
7574
@@ -218,12 +217,9 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim · 142 unmodified lines
218217 char httpname[256], path[256], host[128];
219218 char *stream_selection = NULL;
220219 char headers[1024];
221− MMSHContext *mmsh;
220+ MMSHContext *mmsh = h->priv_data;
222221 MMSContext *mms;
223222
224− mmsh = h->priv_data = av_mallocz(sizeof(MMSHContext));
225− if (!h->priv_data)
226− return AVERROR(ENOMEM);
227223 mmsh->request_seq = h->is_streamed = 1;
228224 mms = &mmsh->mms;
229225 av_strlcpy(mmsh->location, uri, sizeof(mmsh->location));
@@ -263,9 +259,9 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim · 33 unmodified lines
263259 // close the socket and then reopen it for sending the second play request.
264260 ffurl_close(mms->mms_hd);
265261 memset(headers, 0, sizeof(headers));
266− if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ,
267− &h->interrupt_callback) < 0) {
268− return AVERROR(EIO);
262+ if ((err = ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ,
263+ &h->interrupt_callback)) < 0) {
264+ goto fail;
269265 }
270266 stream_selection = av_mallocz(mms->stream_num * 19 + 1);
271267 if (!stream_selection)
@@ -403,10 +399,11 @@ static int64_t mmsh_seek(URLContext *h, int64_t pos, int whence) · 131 unmodified lines
403399 }
404400
405401 URLProtocol ff_mmsh_protocol = {
406− .name = "mmsh",
407− .url_open = mmsh_open,
408− .url_read = mmsh_read,
409− .url_seek = mmsh_seek,
410− .url_close = mmsh_close,
402+ .name = "mmsh",
403+ .url_open = mmsh_open,
404+ .url_read = mmsh_read,
405+ .url_seek = mmsh_seek,
406+ .url_close = mmsh_close,
411407 .url_read_seek = mmsh_read_seek,
408+ .priv_data_size = sizeof(MMSHContext),
412409 };
libavformat/mmst.c+6−9
@@ -470,7 +470,6 @@ static int mms_close(URLContext *h) · 469 unmodified lines
470470 /* free all separately allocated pointers in mms */
471471 av_free(mms->streams);
472472 av_free(mms->asf_header);
473− av_freep(&h->priv_data);
474473
475474 return 0;
476475 }
@@ -502,15 +501,12 @@ static void clear_stream_buffers(MMSContext *mms) · 25 unmodified lines
502501
503502 static int mms_open(URLContext *h, const char *uri, int flags)
504503 {
505− MMSTContext *mmst;
504+ MMSTContext *mmst = h->priv_data;
506505 MMSContext *mms;
507506 int port, err;
508507 char tcpname[256];
509508
510509 h->is_streamed = 1;
511− mmst = h->priv_data = av_mallocz(sizeof(MMSTContext));
512− if (!h->priv_data)
513− return AVERROR(ENOMEM);
514510 mms = &mmst->mms;
515511
516512 // only for MMS over TCP, so set proto = NULL
@@ -624,8 +620,9 @@ static int mms_read(URLContext *h, uint8_t *buf, int size) · 107 unmodified lines
624620 }
625621
626622 URLProtocol ff_mmst_protocol = {
627− .name = "mmst",
628− .url_open = mms_open,
629− .url_read = mms_read,
630− .url_close = mms_close,
623+ .name = "mmst",
624+ .url_open = mms_open,
625+ .url_read = mms_read,
626+ .url_close = mms_close,
627+ .priv_data_size = sizeof(MMSTContext),
631628 };
libavformat/pmpdec.c+12−7
@@ -38,7 +38,8 @@ static int pmp_probe(AVProbeData *p) { · 37 unmodified lines
3838 return 0;
3939 }
4040
41−static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) {
41+static int pmp_header(AVFormatContext *s, AVFormatParameters *ap)
42+{
4243 PMPContext *pmp = s->priv_data;
4344 AVIOContext *pb = s->pb;
4445 int tb_num, tb_den;
@@ -93,7 +94,6 @@ static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) { · 48 unmodified lines
9394 AVStream *ast = avformat_new_stream(s, NULL);
9495 if (!ast)
9596 return AVERROR(ENOMEM);
96− ast->id = i;
9797 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
9898 ast->codec->codec_id = audio_codec_id;
9999 ast->codec->channels = channels;
@@ -111,7 +111,8 @@ static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) { · 11 unmodified lines
111111 return 0;
112112 }
113113
114−static int pmp_packet(AVFormatContext *s, AVPacket *pkt) {
114+static int pmp_packet(AVFormatContext *s, AVPacket *pkt)
115+{
115116 PMPContext *pmp = s->priv_data;
116117 AVIOContext *pb = s->pb;
117118 int ret = 0;
@@ -128,14 +129,18 @@ static int pmp_packet(AVFormatContext *s, AVPacket *pkt) { · 10 unmodified lines
128129 av_fast_malloc(&pmp->packet_sizes,
129130 &pmp->packet_sizes_alloc,
130131 num_packets * sizeof(*pmp->packet_sizes));
132+ if (!pmp->packet_sizes_alloc) {
133+ av_log(s, AV_LOG_ERROR, "Cannot (re)allocate packet buffer\n");
134+ return AVERROR(ENOMEM);
135+ }
131136 for (i = 0; i < num_packets; i++)
132137 pmp->packet_sizes[i] = avio_rl32(pb);
133138 }
134139 ret = av_get_packet(pb, pkt, pmp->packet_sizes[pmp->current_packet]);
135140 if (ret >= 0) {
136141 ret = 0;
137− // FIXME: this is a hack that should be remove once
138− // compute_pkt_fields can handle
142+ // FIXME: this is a hack that should be removed once
143+ // compute_pkt_fields() can handle timestamps properly
139144 if (pmp->cur_stream == 0)
140145 pkt->dts = s->streams[0]->cur_dts++;
141146 pkt->stream_index = pmp->cur_stream;
@@ -146,8 +151,8 @@ static int pmp_packet(AVFormatContext *s, AVPacket *pkt) { · 4 unmodified lines
146151 return ret;
147152 }
148153
149−static int pmp_seek(AVFormatContext *s, int stream_index,
150− int64_t ts, int flags) {
154+static int pmp_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
155+{
151156 PMPContext *pmp = s->priv_data;
152157 pmp->cur_stream = 0;
153158 // fallback to default seek now
libavformat/rtmpproto.c+8−12
@@ -784,7 +784,6 @@ static int rtmp_close(URLContext *h) · 783 unmodified lines
784784
785785 av_freep(&rt->flv_data);
786786 ffurl_close(rt->stream);
787− av_free(rt);
788787 return 0;
789788 }
790789
@@ -799,16 +798,12 @@ static int rtmp_close(URLContext *h) · 8 unmodified lines
799798 */
800799 static int rtmp_open(URLContext *s, const char *uri, int flags)
801800 {
802− RTMPContext *rt;
801+ RTMPContext *rt = s->priv_data;
803802 char proto[8], hostname[256], path[1024], *fname;
804803 uint8_t buf[2048];
805804 int port;
806805 int ret;
807806
808− rt = av_mallocz(sizeof(RTMPContext));
809− if (!rt)
810− return AVERROR(ENOMEM);
811− s->priv_data = rt;
812807 rt->is_input = !(flags & AVIO_FLAG_WRITE);
813808
814809 av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), &port,
@@ -826,7 +821,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) · 11 unmodified lines
826821
827822 rt->state = STATE_START;
828823 if (rtmp_handshake(s, rt))
829− return -1;
824+ goto fail;
830825
831826 rt->chunk_size = 128;
832827 rt->state = STATE_HANDSHAKED;
@@ -997,9 +992,10 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size) · 164 unmodified lines
997992 }
998993
999994 URLProtocol ff_rtmp_protocol = {
1000− .name = "rtmp",
1001− .url_open = rtmp_open,
1002− .url_read = rtmp_read,
1003− .url_write = rtmp_write,
1004− .url_close = rtmp_close,
995+ .name = "rtmp",
996+ .url_open = rtmp_open,
997+ .url_read = rtmp_read,
998+ .url_write = rtmp_write,
999+ .url_close = rtmp_close,
1000+ .priv_data_size = sizeof(RTMPContext),
10051001 };
libavformat/rtpdec_g726.c+2−4
@@ -27,10 +27,8 @@ static int g726_ ## bitrate ##_init(AVFormatContext *s, int st_index, PayloadCon · 26 unmodified lines
2727 AVStream *stream = s->streams[st_index]; \
2828 AVCodecContext *codec = stream->codec; \
2929 \
30− codec->bit_rate = bitrate*1000; \
31− if (codec->sample_rate) \
32− codec->bits_per_coded_sample = \
33− av_clip((codec->bit_rate + codec->sample_rate/2) / codec->sample_rate, 2, 5); \
30+ codec->bits_per_coded_sample = bitrate/8; \
31+ codec->bit_rate = codec->bits_per_coded_sample * codec->sample_rate; \
3432 \
3533 return 0; \
3634 } \
libavformat/rtpenc.c+18−10
@@ -72,6 +72,7 @@ static int is_supported(enum CodecID id) · 71 unmodified lines
7272 case CODEC_ID_THEORA:
7373 case CODEC_ID_VP8:
7474 case CODEC_ID_ADPCM_G722:
75+ case CODEC_ID_ADPCM_G726:
7576 return 1;
7677 default:
7778 return 0;
@@ -121,7 +122,7 @@ static int rtp_write_header(AVFormatContext *s1) · 43 unmodified lines
121122 if (st->codec->frame_size == 0) {
122123 av_log(s1, AV_LOG_ERROR, "Cannot respect max delay: frame size = 0\n");
123124 } else {
124− s->max_frames_per_packet = av_rescale_rnd(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * st->codec->frame_size, AV_ROUND_DOWN);
125+ s->max_frames_per_packet = av_rescale_rnd(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * (int64_t)st->codec->frame_size, AV_ROUND_DOWN);
125126 }
126127 }
127128 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
@@ -248,14 +249,16 @@ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m) · 120 unmodified lines
248249 /* send an integer number of samples and compute time stamp and fill
249250 the rtp send buffer before sending. */
250251 static void rtp_send_samples(AVFormatContext *s1,
251− const uint8_t *buf1, int size, int sample_size)
252+ const uint8_t *buf1, int size, int sample_size_bits)
252253 {
253254 RTPMuxContext *s = s1->priv_data;
254255 int len, max_packet_size, n;
256+ /* Calculate the number of bytes to get samples aligned on a byte border */
257+ int aligned_samples_size = sample_size_bits/av_gcd(sample_size_bits, 8);
255258
256− max_packet_size = (s->max_payload_size / sample_size) * sample_size;
257− /* not needed, but who nows */
258− if ((size % sample_size) != 0)
259+ max_packet_size = (s->max_payload_size / aligned_samples_size) * aligned_samples_size;
260+ /* Not needed, but who knows. Don't check if samples aren't an even number of bytes. */
261+ if ((sample_size_bits % 8) == 0 && ((8 * size) % sample_size_bits) != 0)
259262 av_abort();
260263 n = 0;
261264 while (size > 0) {
@@ -267,7 +270,7 @@ static void rtp_send_samples(AVFormatContext *s1, · 5 unmodified lines
267270 s->buf_ptr += len;
268271 buf1 += len;
269272 size -= len;
270− s->timestamp = s->cur_timestamp + n / sample_size;
273+ s->timestamp = s->cur_timestamp + n * 8 / sample_size_bits;
271274 ff_rtp_send_data(s1, s->buf, s->buf_ptr - s->buf, 0);
272275 n += (s->buf_ptr - s->buf);
273276 }
@@ -394,19 +397,24 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) · 120 unmodified lines
394397 case CODEC_ID_PCM_ALAW:
395398 case CODEC_ID_PCM_U8:
396399 case CODEC_ID_PCM_S8:
397− rtp_send_samples(s1, pkt->data, size, 1 * st->codec->channels);
400+ rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels);
398401 break;
399402 case CODEC_ID_PCM_U16BE:
400403 case CODEC_ID_PCM_U16LE:
401404 case CODEC_ID_PCM_S16BE:
402405 case CODEC_ID_PCM_S16LE:
403− rtp_send_samples(s1, pkt->data, size, 2 * st->codec->channels);
406+ rtp_send_samples(s1, pkt->data, size, 16 * st->codec->channels);
404407 break;
405408 case CODEC_ID_ADPCM_G722:
406409 /* The actual sample size is half a byte per sample, but since the
407410 * stream clock rate is 8000 Hz while the sample rate is 16000 Hz,
408− * the correct parameter for send_samples is 1 byte per stream clock. */
409− rtp_send_samples(s1, pkt->data, size, 1 * st->codec->channels);
411+ * the correct parameter for send_samples_bits is 8 bits per stream
412+ * clock. */
413+ rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels);
414+ break;
415+ case CODEC_ID_ADPCM_G726:
416+ rtp_send_samples(s1, pkt->data, size,
417+ st->codec->bits_per_coded_sample * st->codec->channels);
410418 break;
411419 case CODEC_ID_MP2:
412420 case CODEC_ID_MP3:
libavformat/rtpproto.c+2−8
@@ -137,7 +137,7 @@ static void build_udp_url(char *buf, int buf_size, · 136 unmodified lines
137137
138138 static int rtp_open(URLContext *h, const char *uri, int flags)
139139 {
140− RTPContext *s;
140+ RTPContext *s = h->priv_data;
141141 int rtp_port, rtcp_port,
142142 ttl, connect,
143143 local_rtp_port, local_rtcp_port, max_packet_size;
@@ -146,11 +146,6 @@ static int rtp_open(URLContext *h, const char *uri, int flags) · 2 unmodified lines
146146 char path[1024];
147147 const char *p;
148148
149− s = av_mallocz(sizeof(RTPContext));
150− if (!s)
151− return AVERROR(ENOMEM);
152− h->priv_data = s;
153−
154149 av_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &rtp_port,
155150 path, sizeof(path), uri);
156151 /* extract parameters */
@@ -214,7 +209,6 @@ static int rtp_open(URLContext *h, const char *uri, int flags) · 57 unmodified lines
214209 ffurl_close(s->rtp_hd);
215210 if (s->rtcp_hd)
216211 ffurl_close(s->rtcp_hd);
217− av_free(s);
218212 return AVERROR(EIO);
219213 }
220214
@@ -291,7 +285,6 @@ static int rtp_close(URLContext *h) · 70 unmodified lines
291285
292286 ffurl_close(s->rtp_hd);
293287 ffurl_close(s->rtcp_hd);
294− av_free(s);
295288 return 0;
296289 }
297290
@@ -337,4 +330,5 @@ URLProtocol ff_rtp_protocol = { · 39 unmodified lines
337330 .url_write = rtp_write,
338331 .url_close = rtp_close,
339332 .url_get_file_handle = rtp_get_file_handle,
333+ .priv_data_size = sizeof(RTPContext),
340334 };
libavformat/sdp.c+8−0
@@ -517,6 +517,14 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, · 516 unmodified lines
517517 payload_type,
518518 8000, c->channels);
519519 break;
520+ case CODEC_ID_ADPCM_G726: {
521+ if (payload_type >= RTP_PT_PRIVATE)
522+ av_strlcatf(buff, size, "a=rtpmap:%d G726-%d/%d\r\n",
523+ payload_type,
524+ c->bits_per_coded_sample*8,
525+ c->sample_rate);
526+ break;
527+ }
520528 default:
521529 /* Nothing special to do here... */
522530 break;
libavformat/tcp.c+2−8
@@ -39,7 +39,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) · 38 unmodified lines
3939 {
4040 struct addrinfo hints, *ai, *cur_ai;
4141 int port, fd = -1;
42− TCPContext *s = NULL;
42+ TCPContext *s = h->priv_data;
4343 int listen_socket = 0;
4444 const char *p;
4545 char buf[256];
@@ -135,12 +135,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags) · 89 unmodified lines
135135 goto fail;
136136 }
137137 }
138− s = av_malloc(sizeof(TCPContext));
139− if (!s) {
140− freeaddrinfo(ai);
141− return AVERROR(ENOMEM);
142− }
143− h->priv_data = s;
144138 h->is_streamed = 1;
145139 s->fd = fd;
146140 freeaddrinfo(ai);
@@ -193,7 +187,6 @@ static int tcp_close(URLContext *h) · 46 unmodified lines
193187 {
194188 TCPContext *s = h->priv_data;
195189 closesocket(s->fd);
196− av_free(s);
197190 return 0;
198191 }
199192
@@ -210,4 +203,5 @@ URLProtocol ff_tcp_protocol = { · 10 unmodified lines
210203 .url_write = tcp_write,
211204 .url_close = tcp_close,
212205 .url_get_file_handle = tcp_get_file_handle,
206+ .priv_data_size = sizeof(TCPContext),
213207 };
libavformat/udp.c+2−8
@@ -381,7 +381,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) · 380 unmodified lines
381381 {
382382 char hostname[1024], localaddr[1024] = "";
383383 int port, udp_fd = -1, tmp, bind_ret = -1;
384− UDPContext *s = NULL;
384+ UDPContext *s = h->priv_data;
385385 int is_output;
386386 const char *p;
387387 char buf[256];
@@ -394,11 +394,6 @@ static int udp_open(URLContext *h, const char *uri, int flags) · 6 unmodified lines
394394
395395 is_output = !(flags & AVIO_FLAG_READ);
396396
397− s = av_mallocz(sizeof(UDPContext));
398− if (!s)
399− return AVERROR(ENOMEM);
400−
401− h->priv_data = s;
402397 s->ttl = 16;
403398 s->buffer_size = is_output ? UDP_TX_BUF_SIZE : UDP_MAX_PKT_SIZE;
404399
@@ -533,7 +528,6 @@ static int udp_open(URLContext *h, const char *uri, int flags) · 128 unmodified lines
533528 if (udp_fd >= 0)
534529 closesocket(udp_fd);
535530 av_fifo_free(s->fifo);
536− av_free(s);
537531 return AVERROR(EIO);
538532 }
539533
@@ -614,7 +608,6 @@ static int udp_close(URLContext *h) · 74 unmodified lines
614608 udp_leave_multicast_group(s->udp_fd, (struct sockaddr *)&s->dest_addr);
615609 closesocket(s->udp_fd);
616610 av_fifo_free(s->fifo);
617− av_free(s);
618611 return 0;
619612 }
620613
@@ -625,4 +618,5 @@ URLProtocol ff_udp_protocol = { · 4 unmodified lines
625618 .url_write = udp_write,
626619 .url_close = udp_close,
627620 .url_get_file_handle = udp_get_file_handle,
621+ .priv_data_size = sizeof(UDPContext),
628622 };
libswscale/utils.c+1−0
@@ -44,6 +44,7 @@ · 43 unmodified lines
4444 #include "libavutil/cpu.h"
4545 #include "libavutil/avutil.h"
4646 #include "libavutil/bswap.h"
47+#include "libavutil/mathematics.h"
4748 #include "libavutil/opt.h"
4849 #include "libavutil/pixdesc.h"
4950 #include "libavutil/avassert.h"
tests/codec-regression.sh+43−7
@@ -395,26 +395,62 @@ do_audio_enc_dec() { · 394 unmodified lines
395395 do_audio_decoding
396396 }
397397
398−if [ -n "$do_pcm" ] ; then
398+if [ -n "$do_pcm_alaw" ] ; then
399399 do_audio_enc_dec wav s16 pcm_alaw
400+fi
401+if [ -n "$do_pcm_mulaw" ] ; then
400402 do_audio_enc_dec wav s16 pcm_mulaw
403+fi
404+if [ -n "$do_pcm_s8" ] ; then
401405 do_audio_enc_dec mov u8 pcm_s8
406+fi
407+if [ -n "$do_pcm_u8" ] ; then
402408 do_audio_enc_dec wav u8 pcm_u8
409+fi
410+if [ -n "$do_pcm_s16be" ] ; then
403411 do_audio_enc_dec mov s16 pcm_s16be
412+fi
413+if [ -n "$do_pcm_s16le" ] ; then
404414 do_audio_enc_dec wav s16 pcm_s16le
405−do_audio_enc_dec mkv s16 pcm_s16be
406−do_audio_enc_dec mkv s16 pcm_s16le
415+fi
416+if [ -n "$do_pcm_s24be" ] ; then
407417 do_audio_enc_dec mov s32 pcm_s24be
418+fi
419+if [ -n "$do_pcm_s24le" ] ; then
408420 do_audio_enc_dec wav s32 pcm_s24le
409−#do_audio_enc_dec ??? s32 pcm_u24be #no compatible muxer or demuxer
410−#do_audio_enc_dec ??? s32 pcm_u24le #no compatible muxer or demuxer
421+fi
422+# no compatible muxer or demuxer
423+# if [ -n "$do_pcm_u24be" ] ; then
424+# do_audio_enc_dec ??? u32 pcm_u24be
425+# fi
426+# if [ -n "$do_pcm_u24le" ] ; then
427+# do_audio_enc_dec ??? u32 pcm_u24le
428+# fi
429+if [ -n "$do_pcm_s32be" ] ; then
411430 do_audio_enc_dec mov s32 pcm_s32be
431+fi
432+if [ -n "$do_pcm_s32le" ] ; then
412433 do_audio_enc_dec wav s32 pcm_s32le
413−#do_audio_enc_dec ??? s32 pcm_u32be #no compatible muxer or demuxer
414−#do_audio_enc_dec ??? s32 pcm_u32le #no compatible muxer or demuxer
434+fi
435+# no compatible muxer or demuxer
436+# if [ -n "$do_pcm_u32be" ] ; then
437+# do_audio_enc_dec ??? u32 pcm_u32be
438+# fi
439+# if [ -n "$do_pcm_u32le" ] ; then
440+# do_audio_enc_dec ??? u32 pcm_u32le
441+# fi
442+if [ -n "$do_pcm_f32be" ] ; then
415443 do_audio_enc_dec au flt pcm_f32be
444+fi
445+if [ -n "$do_pcm_f32le" ] ; then
416446 do_audio_enc_dec wav flt pcm_f32le
447+fi
448+if [ -n "$do_pcm_f64be" ] ; then
417449 do_audio_enc_dec au dbl pcm_f64be
450+fi
451+if [ -n "$do_pcm_f64le" ] ; then
418452 do_audio_enc_dec wav dbl pcm_f64le
453+fi
454+if [ -n "$do_pcm_s24daud" ] ; then
419455 do_audio_enc_dec 302 s16 pcm_s24daud "-ac 6 -ar 96000"
420456 fi
tests/ref/acodec/pcm+0−68
@@ -1,68 +0,0 @@
1−ede2da07839a00c255a43129922f2c7b *./tests/data/acodec/pcm_alaw.wav
2−529258 ./tests/data/acodec/pcm_alaw.wav
3−f323f7551ffad91de8613f44dcb198b6 *./tests/data/pcm.acodec.out.wav
4−stddev: 101.67 PSNR: 56.19 MAXDIFF: 515 bytes: 1058400/ 1058400
5−0c2a55850fb46ad5385a69b15b271f10 *./tests/data/acodec/pcm_mulaw.wav
6−529258 ./tests/data/acodec/pcm_mulaw.wav
7−7ae8c3fc804bd574006fd547fe28980c *./tests/data/pcm.acodec.out.wav
8−stddev: 103.38 PSNR: 56.04 MAXDIFF: 644 bytes: 1058400/ 1058400
9−b78d2a30df75af08ecf86f201281fec2 *./tests/data/acodec/pcm_s8.mov
10−529793 ./tests/data/acodec/pcm_s8.mov
11−651d4eb8d98dfcdda96ae6c43d8f156b *./tests/data/pcm.acodec.out.wav
12−stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400
13−70fecbae732f81143a560c7315eda49a *./tests/data/acodec/pcm_u8.wav
14−529246 ./tests/data/acodec/pcm_u8.wav
15−651d4eb8d98dfcdda96ae6c43d8f156b *./tests/data/pcm.acodec.out.wav
16−stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400
17−9686b93d1439fc2df991a004ab0298f4 *./tests/data/acodec/pcm_s16be.mov
18−1058993 ./tests/data/acodec/pcm_s16be.mov
19−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
20−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
21−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/acodec/pcm_s16le.wav
22−1058446 ./tests/data/acodec/pcm_s16le.wav
23−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
24−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
25−af717ca95eaca310772eb1238c745d1b *./tests/data/acodec/pcm_s16be.mkv
26−1060638 ./tests/data/acodec/pcm_s16be.mkv
27−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
28−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
29−c4f51bf32fad2f7af8ea5beedb56168b *./tests/data/acodec/pcm_s16le.mkv
30−1060638 ./tests/data/acodec/pcm_s16le.mkv
31−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
32−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
33−22c5c3df0a4765e28c205a4fb95b3cdc *./tests/data/acodec/pcm_s24be.mov
34−1588193 ./tests/data/acodec/pcm_s24be.mov
35−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
36−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
37−a85380fb79b0d4fff38e24ac1e34bb94 *./tests/data/acodec/pcm_s24le.wav
38−1587668 ./tests/data/acodec/pcm_s24le.wav
39−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
40−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
41−b36ac7a1b4fc28248a565a676e555bd1 *./tests/data/acodec/pcm_s32be.mov
42−2117393 ./tests/data/acodec/pcm_s32be.mov
43−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
44−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
45−da6ed80f4f40f0082577dea80827e014 *./tests/data/acodec/pcm_s32le.wav
46−2116868 ./tests/data/acodec/pcm_s32le.wav
47−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
48−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
49−118ff3dc83c62ce9ce669eef57e55bb2 *./tests/data/acodec/pcm_f32be.au
50−2116824 ./tests/data/acodec/pcm_f32be.au
51−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
52−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
53−46f44f86a18984a832206ab9e29a79f2 *./tests/data/acodec/pcm_f32le.wav
54−2116880 ./tests/data/acodec/pcm_f32le.wav
55−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
56−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
57−8112296b1ed94f72f20d04b1a54850a7 *./tests/data/acodec/pcm_f64be.au
58−4233624 ./tests/data/acodec/pcm_f64be.au
59−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
60−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
61−ba17c6d1a270e1333e981f239bf7eb45 *./tests/data/acodec/pcm_f64le.wav
62−4233680 ./tests/data/acodec/pcm_f64le.wav
63−64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
64−stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
65−1b75d5198ae789ab3c48f7024e08f4a9 *./tests/data/acodec/pcm_s24daud.302
66−10368730 ./tests/data/acodec/pcm_s24daud.302
67−4708f86529c594e29404603c64bb208c *./tests/data/pcm.acodec.out.wav
68−stddev: 8967.92 PSNR: 17.28 MAXDIFF:42548 bytes: 6911796/ 1058400
tests/ref/acodec/pcm_alaw+4−0
@@ -0,0 +1,4 @@
1+ede2da07839a00c255a43129922f2c7b *./tests/data/acodec/pcm_alaw.wav
2+529258 ./tests/data/acodec/pcm_alaw.wav
3+f323f7551ffad91de8613f44dcb198b6 *./tests/data/pcm_alaw.acodec.out.wav
4+stddev: 101.67 PSNR: 56.19 MAXDIFF: 515 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_f32be+4−0
@@ -0,0 +1,4 @@
1+118ff3dc83c62ce9ce669eef57e55bb2 *./tests/data/acodec/pcm_f32be.au
2+2116824 ./tests/data/acodec/pcm_f32be.au
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_f32be.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_f32le+4−0
@@ -0,0 +1,4 @@
1+46f44f86a18984a832206ab9e29a79f2 *./tests/data/acodec/pcm_f32le.wav
2+2116880 ./tests/data/acodec/pcm_f32le.wav
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_f32le.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_f64be+4−0
@@ -0,0 +1,4 @@
1+8112296b1ed94f72f20d04b1a54850a7 *./tests/data/acodec/pcm_f64be.au
2+4233624 ./tests/data/acodec/pcm_f64be.au
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_f64be.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_f64le+4−0
@@ -0,0 +1,4 @@
1+ba17c6d1a270e1333e981f239bf7eb45 *./tests/data/acodec/pcm_f64le.wav
2+4233680 ./tests/data/acodec/pcm_f64le.wav
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_f64le.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_mulaw+4−0
@@ -0,0 +1,4 @@
1+0c2a55850fb46ad5385a69b15b271f10 *./tests/data/acodec/pcm_mulaw.wav
2+529258 ./tests/data/acodec/pcm_mulaw.wav
3+7ae8c3fc804bd574006fd547fe28980c *./tests/data/pcm_mulaw.acodec.out.wav
4+stddev: 103.38 PSNR: 56.04 MAXDIFF: 644 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_s16be+4−0
@@ -0,0 +1,4 @@
1+9686b93d1439fc2df991a004ab0298f4 *./tests/data/acodec/pcm_s16be.mov
2+1058993 ./tests/data/acodec/pcm_s16be.mov
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s16be.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_s16le+4−0
@@ -0,0 +1,4 @@
1+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/acodec/pcm_s16le.wav
2+1058446 ./tests/data/acodec/pcm_s16le.wav
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s16le.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_s24be+4−0
@@ -0,0 +1,4 @@
1+22c5c3df0a4765e28c205a4fb95b3cdc *./tests/data/acodec/pcm_s24be.mov
2+1588193 ./tests/data/acodec/pcm_s24be.mov
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s24be.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_s24daud+4−0
@@ -0,0 +1,4 @@
1+1b75d5198ae789ab3c48f7024e08f4a9 *./tests/data/acodec/pcm_s24daud.302
2+10368730 ./tests/data/acodec/pcm_s24daud.302
3+4708f86529c594e29404603c64bb208c *./tests/data/pcm_s24daud.acodec.out.wav
4+stddev: 8967.92 PSNR: 17.28 MAXDIFF:42548 bytes: 6911796/ 1058400
tests/ref/acodec/pcm_s24le+4−0
@@ -0,0 +1,4 @@
1+a85380fb79b0d4fff38e24ac1e34bb94 *./tests/data/acodec/pcm_s24le.wav
2+1587668 ./tests/data/acodec/pcm_s24le.wav
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s24le.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_s32be+4−0
@@ -0,0 +1,4 @@
1+b36ac7a1b4fc28248a565a676e555bd1 *./tests/data/acodec/pcm_s32be.mov
2+2117393 ./tests/data/acodec/pcm_s32be.mov
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s32be.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_s32le+4−0
@@ -0,0 +1,4 @@
1+da6ed80f4f40f0082577dea80827e014 *./tests/data/acodec/pcm_s32le.wav
2+2116868 ./tests/data/acodec/pcm_s32le.wav
3+64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s32le.acodec.out.wav
4+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_s8+4−0
@@ -0,0 +1,4 @@
1+b78d2a30df75af08ecf86f201281fec2 *./tests/data/acodec/pcm_s8.mov
2+529793 ./tests/data/acodec/pcm_s8.mov
3+651d4eb8d98dfcdda96ae6c43d8f156b *./tests/data/pcm_s8.acodec.out.wav
4+stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400
tests/ref/acodec/pcm_u8+4−0
@@ -0,0 +1,4 @@
1+70fecbae732f81143a560c7315eda49a *./tests/data/acodec/pcm_u8.wav
2+529246 ./tests/data/acodec/pcm_u8.wav
3+651d4eb8d98dfcdda96ae6c43d8f156b *./tests/data/pcm_u8.acodec.out.wav
4+stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400
tests/ref/seek/pcm_s16be_mkv+0−53
@@ -1,53 +0,0 @@
1−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
2−ret: 0 st:-1 flags:0 ts:-1.000000
3−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
4−ret: 0 st:-1 flags:1 ts: 1.894167
5−ret: 0 st: 0 flags:1 dts: 1.881000 pts: 1.881000 pos: 332755 size: 4096
6−ret: 0 st: 0 flags:0 ts: 0.788000
7−ret: 0 st: 0 flags:1 dts: 0.789000 pts: 0.789000 pos: 139914 size: 4096
8−ret: 0 st: 0 flags:1 ts:-0.317000
9−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
10−ret: 0 st:-1 flags:0 ts: 2.576668
11−ret: 0 st: 0 flags:1 dts: 2.577000 pts: 2.577000 pos: 455845 size: 4096
12−ret: 0 st:-1 flags:1 ts: 1.470835
13−ret: 0 st: 0 flags:1 dts: 1.463000 pts: 1.463000 pos: 258901 size: 4096
14−ret: 0 st: 0 flags:0 ts: 0.365000
15−ret: 0 st: 0 flags:1 dts: 0.372000 pts: 0.372000 pos: 66060 size: 4096
16−ret: 0 st: 0 flags:1 ts:-0.741000
17−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
18−ret: 0 st:-1 flags:0 ts: 2.153336
19−ret: 0 st: 0 flags:1 dts: 2.159000 pts: 2.159000 pos: 381991 size: 4096
20−ret: 0 st:-1 flags:1 ts: 1.047503
21−ret: 0 st: 0 flags:1 dts: 1.045000 pts: 1.045000 pos: 185047 size: 4096
22−ret: 0 st: 0 flags:0 ts:-0.058000
23−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
24−ret: 0 st: 0 flags:1 ts: 2.836000
25−ret: 0 st: 0 flags:1 dts: 2.833000 pts: 2.833000 pos: 500978 size: 4096
26−ret: 0 st:-1 flags:0 ts: 1.730004
27−ret: 0 st: 0 flags:1 dts: 1.741000 pts: 1.741000 pos: 308137 size: 4096
28−ret: 0 st:-1 flags:1 ts: 0.624171
29−ret: 0 st: 0 flags:1 dts: 0.604000 pts: 0.604000 pos: 107090 size: 4096
30−ret: 0 st: 0 flags:0 ts:-0.482000
31−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
32−ret: 0 st: 0 flags:1 ts: 2.413000
33−ret: 0 st: 0 flags:1 dts: 2.392000 pts: 2.392000 pos: 423021 size: 4096
34−ret: 0 st:-1 flags:0 ts: 1.306672
35−ret: 0 st: 0 flags:1 dts: 1.324000 pts: 1.324000 pos: 234283 size: 4096
36−ret: 0 st:-1 flags:1 ts: 0.200839
37−ret: 0 st: 0 flags:1 dts: 0.186000 pts: 0.186000 pos: 33236 size: 4096
38−ret: 0 st: 0 flags:0 ts:-0.905000
39−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
40−ret: 0 st: 0 flags:1 ts: 1.989000
41−ret: 0 st: 0 flags:1 dts: 1.974000 pts: 1.974000 pos: 349167 size: 4096
42−ret: 0 st:-1 flags:0 ts: 0.883340
43−ret: 0 st: 0 flags:1 dts: 0.906000 pts: 0.906000 pos: 160429 size: 4096
44−ret: 0 st:-1 flags:1 ts:-0.222493
45−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
46−ret: 0 st: 0 flags:0 ts: 2.672000
47−ret: 0 st: 0 flags:1 dts: 2.694000 pts: 2.694000 pos: 476360 size: 4096
48−ret: 0 st: 0 flags:1 ts: 1.566000
49−ret: 0 st: 0 flags:1 dts: 1.556000 pts: 1.556000 pos: 275313 size: 4096
50−ret: 0 st:-1 flags:0 ts: 0.460008
51−ret: 0 st: 0 flags:1 dts: 0.464000 pts: 0.464000 pos: 82472 size: 4096
52−ret: 0 st:-1 flags:1 ts:-0.645825
53−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
tests/ref/seek/pcm_s16le_mkv+0−53
@@ -1,53 +0,0 @@
1−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
2−ret: 0 st:-1 flags:0 ts:-1.000000
3−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
4−ret: 0 st:-1 flags:1 ts: 1.894167
5−ret: 0 st: 0 flags:1 dts: 1.881000 pts: 1.881000 pos: 332755 size: 4096
6−ret: 0 st: 0 flags:0 ts: 0.788000
7−ret: 0 st: 0 flags:1 dts: 0.789000 pts: 0.789000 pos: 139914 size: 4096
8−ret: 0 st: 0 flags:1 ts:-0.317000
9−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
10−ret: 0 st:-1 flags:0 ts: 2.576668
11−ret: 0 st: 0 flags:1 dts: 2.577000 pts: 2.577000 pos: 455845 size: 4096
12−ret: 0 st:-1 flags:1 ts: 1.470835
13−ret: 0 st: 0 flags:1 dts: 1.463000 pts: 1.463000 pos: 258901 size: 4096
14−ret: 0 st: 0 flags:0 ts: 0.365000
15−ret: 0 st: 0 flags:1 dts: 0.372000 pts: 0.372000 pos: 66060 size: 4096
16−ret: 0 st: 0 flags:1 ts:-0.741000
17−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
18−ret: 0 st:-1 flags:0 ts: 2.153336
19−ret: 0 st: 0 flags:1 dts: 2.159000 pts: 2.159000 pos: 381991 size: 4096
20−ret: 0 st:-1 flags:1 ts: 1.047503
21−ret: 0 st: 0 flags:1 dts: 1.045000 pts: 1.045000 pos: 185047 size: 4096
22−ret: 0 st: 0 flags:0 ts:-0.058000
23−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
24−ret: 0 st: 0 flags:1 ts: 2.836000
25−ret: 0 st: 0 flags:1 dts: 2.833000 pts: 2.833000 pos: 500978 size: 4096
26−ret: 0 st:-1 flags:0 ts: 1.730004
27−ret: 0 st: 0 flags:1 dts: 1.741000 pts: 1.741000 pos: 308137 size: 4096
28−ret: 0 st:-1 flags:1 ts: 0.624171
29−ret: 0 st: 0 flags:1 dts: 0.604000 pts: 0.604000 pos: 107090 size: 4096
30−ret: 0 st: 0 flags:0 ts:-0.482000
31−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
32−ret: 0 st: 0 flags:1 ts: 2.413000
33−ret: 0 st: 0 flags:1 dts: 2.392000 pts: 2.392000 pos: 423021 size: 4096
34−ret: 0 st:-1 flags:0 ts: 1.306672
35−ret: 0 st: 0 flags:1 dts: 1.324000 pts: 1.324000 pos: 234283 size: 4096
36−ret: 0 st:-1 flags:1 ts: 0.200839
37−ret: 0 st: 0 flags:1 dts: 0.186000 pts: 0.186000 pos: 33236 size: 4096
38−ret: 0 st: 0 flags:0 ts:-0.905000
39−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
40−ret: 0 st: 0 flags:1 ts: 1.989000
41−ret: 0 st: 0 flags:1 dts: 1.974000 pts: 1.974000 pos: 349167 size: 4096
42−ret: 0 st:-1 flags:0 ts: 0.883340
43−ret: 0 st: 0 flags:1 dts: 0.906000 pts: 0.906000 pos: 160429 size: 4096
44−ret: 0 st:-1 flags:1 ts:-0.222493
45−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096
46−ret: 0 st: 0 flags:0 ts: 2.672000
47−ret: 0 st: 0 flags:1 dts: 2.694000 pts: 2.694000 pos: 476360 size: 4096
48−ret: 0 st: 0 flags:1 ts: 1.566000
49−ret: 0 st: 0 flags:1 dts: 1.556000 pts: 1.556000 pos: 275313 size: 4096
50−ret: 0 st:-1 flags:0 ts: 0.460008
51−ret: 0 st: 0 flags:1 dts: 0.464000 pts: 0.464000 pos: 82472 size: 4096
52−ret: 0 st:-1 flags:1 ts:-0.645825
53−ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t