History

Merge remote-tracking branch 'qatar/master'

* qatar/master: (26 commits) avconv: deprecate the -deinterlace option doc: Fix the name of the new function aacenc: make sure to encode enough frames to cover all input samples. aacenc: only use the number of input samples provided by the user. wmadec: Verify bitstream size makes sense before calling init_get_bits. kmvc: Log into a context at a log level constant. mpeg12: Pad framerate tab to 16 entries. kgv1dec: Increase offsets array size so it is large enough. kmvc: Check palsize. nsvdec: Propagate errors nsvdec: Be more careful with av_malloc(). nsvdec: Fix use of uninitialized streams. movenc: cosmetics: Get rid of camelCase identifiers swscale: more generic check for planar destination formats with alpha doc: Document mov/mp4 fragmentation options build: Use order-only prerequisites for creating FATE reference file dirs. x86 dsputil: provide SSE2/SSSE3 versions of bswap_buf rtsp: Remove some unused variables from ff_rtsp_connect(). avutil: make intfloat api public avformat_write_header(): detail error message ... Conflicts: doc/APIchanges doc/ffmpeg.texi doc/muxers.texi ffmpeg.c libavcodec/kmvc.c libavcodec/x86/Makefile libavcodec/x86/dsputil_yasm.asm libavcodec/x86/pngdsp-init.c libavformat/movenc.c libavformat/movenc.h libavformat/mpegtsenc.c libavformat/nsvdec.c libavformat/utils.c libavutil/avutil.h libswscale/swscale.c

Michael Niedermayer committed 14 years ago

Commit 151ecc22 parents b8c1655 d7edd3525 files · +608 −303Browse files

Unified · Split

25 files
  1. doc/APIchanges +5 −1
  2. doc/ffmpeg.texi +2 −0
  3. doc/muxers.texi +57 −5
  4. ffmpeg.c +10 −3
  5. libavcodec/aacenc.c +13 −11
  6. libavcodec/kmvc.c +7 −5
  7. libavcodec/mpc7.c +1 −1
  8. libavcodec/mpeg12data.c +1 −1
  9. libavcodec/wmadec.c +2 −0
  10. libavcodec/x86/Makefile +1 −0
  11. libavcodec/x86/dsputil_mmx.c +5 −0
  12. libavcodec/x86/dsputil_yasm.asm +124 −0
  13. libavcodec/x86/pngdsp-init.c +19 −104
  14. libavcodec/x86/pngdsp.asm +174 −0
  15. libavformat/movenc.c +149 −148
  16. libavformat/movenc.h +8 −8
  17. libavformat/mpegtsenc.c +1 −1
  18. libavformat/nsvdec.c +11 −2
  19. libavformat/rtsp.c +0 −1
  20. libavformat/utils.c +5 −1
  21. libavformat/yuv4mpeg.c +3 −0
  22. libavutil/Makefile +1 −0
  23. libavutil/avutil.h +2 −2
  24. libswscale/swscale.c +1 −1
  25. tests/Makefile +6 −8
doc/APIchanges+5−1
@@ -16,6 +16,10 @@ API changes, most recent first: · 15 unmodified lines
1616 2012-01-24 - xxxxxxx - lavfi 2.60.100
1717 Add avfilter_graph_dump.
1818
19+2012-01-30 - xxxxxxx - lavu 51.22.0 - intfloat.h
20+ Add a new installed header libavutil/intfloat.h with int/float punning
21+ functions.
22+
1923 2012-01-25 - lavf 53.22.0
2024 f1caf01 Allow doing av_write_frame(ctx, NULL) for flushing possible
2125 buffered data within a muxer. Added AVFMT_ALLOW_FLUSH for
@@ -109,7 +113,7 @@ API changes, most recent first: · 87 unmodified lines
109113 Add av_toupper()/av_tolower()
110114
111115 2011-11-05 - b6d08f4 - lavf 53.13.0
112− Add avformat_network_init()/avformat_network_uninit()
116+ Add avformat_network_init()/avformat_network_deinit()
113117
114118 2011-10-27 - 512557b - lavc 53.15.0
115119 Remove avcodec_parse_frame.
doc/ffmpeg.texi+2−0
@@ -620,6 +620,8 @@ Enable Unlimited Motion Vector (h263+) · 619 unmodified lines
620620
621621 @item -deinterlace
622622 Deinterlace pictures.
623+This option is deprecated since the deinterlacing is very low quality.
624+Use the yadif filter with @code{-filter:v yadif}.
623625 @item -ilme
624626 Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
625627 Use this option if your input file is interlaced and you want
doc/muxers.texi+57−5
@@ -148,18 +148,70 @@ each of the YUV420P components. To read or write this image file format, · 147 unmodified lines
148148 specify the name of the '.Y' file. The muxer will automatically open the
149149 '.U' and '.V' files as required.
150150
151−@section mov
152−
153−MOV / MP4 muxer
154−
155−The muxer options are:
151+@section MOV/MP4/ISMV
152+
153+The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4
154+file has all the metadata about all packets stored in one location
155+(written at the end of the file, it can be moved to the start for
156+better playback using the @command{qt-faststart} tool). A fragmented
157+file consists of a number of fragments, where packets and metadata
158+about these packets are stored together. Writing a fragmented
159+file has the advantage that the file is decodable even if the
160+writing is interrupted (while a normal MOV/MP4 is undecodable if
161+it is not properly finished), and it requires less memory when writing
162+very long files (since writing normal MOV/MP4 files stores info about
163+every single packet in memory until the file is closed). The downside
164+is that it is less compatible with other applications.
165+
166+Fragmentation is enabled by setting one of the AVOptions that define
167+how to cut the file into fragments:
156168
157169 @table @option
158170 @item -moov_size @var{bytes}
159171 Reserves space for the moov atom at the beginning of the file instead of placing the
160172 moov atom at the end. If the space reserved is insufficient, muxing will fail.
173+@item -movflags frag_keyframe
174+Start a new fragment at each video keyframe.
175+@item -frag_duration @var{duration}
176+Create fragments that are @var{duration} microseconds long.
177+@item -frag_size @var{size}
178+Create fragments that contain up to @var{size} bytes of payload data.
179+@item -movflags frag_custom
180+Allow the caller to manually choose when to cut fragments, by
181+calling @code{av_write_frame(ctx, NULL)} to write a fragment with
182+the packets written so far. (This is only useful with other
183+applications integrating libavformat, not from @command{avconv}.)
184+@end table
185+
186+Additionally, the way the output file is written can be adjusted
187+through a few other options:
188+
189+@table @option
190+@item -movflags empty_moov
191+Write an initial moov atom directly at the start of the file, without
192+describing any samples in it. Generally, an mdat/moov pair is written
193+at the start of the file, as a normal MOV/MP4 file, containing only
194+a short portion of the file. With this option set, there is no initial
195+mdat atom, and the moov atom only describes the tracks but has
196+a zero duration.
197+
198+Files written with this option set do not work in QuickTime.
199+This option is implicitly set when writing ismv (Smooth Streaming) files.
200+@item -movflags separate_moof
201+Write a separate moof (movie fragment) atom for each track. Normally,
202+packets for all tracks are written in a moof atom (which is slightly
203+more efficient), but with this option set, the muxer writes one moof/mdat
204+pair for each track, making it easier to separate tracks.
205+
206+This option is implicitly set when writing ismv (Smooth Streaming) files.
161207 @end table
162208
209+Smooth Streaming content can be pushed in real time to a publishing
210+point on IIS with this muxer. Example:
211+@example
212+avconv -re @var{<normal input/transcoding options>} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1)
213+@end example
214+
163215 @section mpegts
164216
165217 MPEG transport stream muxer.
ffmpeg.c+10−3
@@ -471,7 +471,7 @@ static void reset_options(OptionsContext *o, int is_input) · 470 unmodified lines
471471 static int alloc_buffer(AVCodecContext *s, InputStream *ist, FrameBuffer **pbuf)
472472 {
473473 FrameBuffer *buf = av_mallocz(sizeof(*buf));
474− int ret, i;
474+ int i, ret;
475475 const int pixel_size = av_pix_fmt_descriptors[s->pix_fmt].comp[0].step_minus1+1;
476476 int h_chroma_shift, v_chroma_shift;
477477 int edge = 32; // XXX should be avcodec_get_edge_width(), but that fails on svq1
@@ -4939,6 +4939,13 @@ static int opt_vsync(const char *opt, const char *arg) · 4461 unmodified lines
49394939 return 0;
49404940 }
49414941
4942+static int opt_deinterlace(const char *opt, const char *arg)
4943+{
4944+ av_log(NULL, AV_LOG_WARNING, "-%s is deprecated, use -filter:v yadif instead\n", opt);
4945+ do_deinterlace = 1;
4946+ return 0;
4947+}
4948+
49424949 #define OFFSET(x) offsetof(OptionsContext, x)
49434950 static const OptionDef options[] = {
49444951 /* main options */
@@ -5018,8 +5025,8 @@ static const OptionDef options[] = { · 73 unmodified lines
50185025 "use same quantizer as source (implies VBR)" },
50195026 { "pass", HAS_ARG | OPT_VIDEO, {(void*)opt_pass}, "select the pass number (1 or 2)", "n" },
50205027 { "passlogfile", HAS_ARG | OPT_VIDEO, {(void*)&opt_passlogfile}, "select two pass log file name prefix", "prefix" },
5021− { "deinterlace", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_deinterlace},
5022− "deinterlace pictures" },
5028+ { "deinterlace", OPT_EXPERT | OPT_VIDEO, {(void*)opt_deinterlace},
5029+ "this option is deprecated, use the yadif filter instead" },
50235030 { "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" },
50245031 { "vstats", OPT_EXPERT | OPT_VIDEO, {(void*)&opt_vstats}, "dump video coding statistics to file" },
50255032 { "vstats_file", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_vstats_file}, "dump video coding statistics to file", "file" },
libavcodec/aacenc.c+13−11
@@ -223,8 +223,9 @@ WINDOW_FUNC(eight_short) · 222 unmodified lines
223223 const float *pwindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
224224 const float *in = audio + 448;
225225 float *out = sce->ret;
226+ int w;
226227
227− for (int w = 0; w < 8; w++) {
228+ for (w = 0; w < 8; w++) {
228229 dsp->vector_fmul (out, in, w ? pwindow : swindow, 128);
229230 out += 128;
230231 in += 128;
@@ -476,7 +477,7 @@ static void put_bitstream_info(AVCodecContext *avctx, AACEncContext *s, · 245 unmodified lines
476477 * Channels are reordered from Libav's default order to AAC order.
477478 */
478479 static void deinterleave_input_samples(AACEncContext *s,
479− const float *samples)
480+ const float *samples, int nb_samples)
480481 {
481482 int ch, i;
482483 const int sinc = s->channels;
@@ -490,10 +491,12 @@ static void deinterleave_input_samples(AACEncContext *s, · 7 unmodified lines
490491 memcpy(&s->planar_samples[ch][1024], &s->planar_samples[ch][2048], 1024 * sizeof(s->planar_samples[0][0]));
491492
492493 /* deinterleave */
493− for (i = 2048; i < 3072; i++) {
494+ for (i = 2048; i < 2048 + nb_samples; i++) {
494495 s->planar_samples[ch][i] = *sptr;
495496 sptr += sinc;
496497 }
498+ memset(&s->planar_samples[ch][i], 0,
499+ (3072 - i) * sizeof(s->planar_samples[0][0]));
497500 }
498501 }
499502
@@ -507,14 +510,12 @@ static int aac_encode_frame(AVCodecContext *avctx, · 7 unmodified lines
507510 int chan_el_counter[4];
508511 FFPsyWindowInfo windows[AAC_MAX_CHANNELS];
509512
510− if (s->last_frame)
513+ if (s->last_frame == 2)
511514 return 0;
512515
513− if (data) {
514− deinterleave_input_samples(s, data);
515− if (s->psypp)
516− ff_psy_preprocess(s->psypp, s->planar_samples, s->channels);
517− }
516+ deinterleave_input_samples(s, data, data ? avctx->frame_size : 0);
517+ if (s->psypp)
518+ ff_psy_preprocess(s->psypp, s->planar_samples, s->channels);
518519
519520 if (!avctx->frame_number)
520521 return 0;
@@ -645,7 +646,7 @@ static int aac_encode_frame(AVCodecContext *avctx, · 124 unmodified lines
645646 }
646647
647648 if (!data)
648− s->last_frame = 1;
649+ s->last_frame++;
649650
650651 return put_bits_count(&s->pb)>>3;
651652 }
@@ -686,11 +687,12 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s) · 34 unmodified lines
686687
687688 static av_cold int alloc_buffers(AVCodecContext *avctx, AACEncContext *s)
688689 {
690+ int ch;
689691 FF_ALLOCZ_OR_GOTO(avctx, s->buffer.samples, 3 * 1024 * s->channels * sizeof(s->buffer.samples[0]), alloc_fail);
690692 FF_ALLOCZ_OR_GOTO(avctx, s->cpe, sizeof(ChannelElement) * s->chan_map[0], alloc_fail);
691693 FF_ALLOCZ_OR_GOTO(avctx, avctx->extradata, 5 + FF_INPUT_BUFFER_PADDING_SIZE, alloc_fail);
692694
693− for(int ch = 0; ch < s->channels; ch++)
695+ for(ch = 0; ch < s->channels; ch++)
694696 s->planar_samples[ch] = s->buffer.samples + 3 * 1024 * ch;
695697
696698 return 0;
libavcodec/kmvc.c+7−5
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333 #define KMVC_KEYFRAME 0x80
3434 #define KMVC_PALETTE 0x40
3535 #define KMVC_METHOD 0x0F
36+#define MAX_PALSIZE 256
3637
3738 /*
3839 * Decoder context
@@ -43,7 +44,7 @@ typedef struct KmvcContext { · 4 unmodified lines
4344
4445 int setpal;
4546 int palsize;
46− uint32_t pal[256];
47+ uint32_t pal[MAX_PALSIZE];
4748 uint8_t *cur, *prev;
4849 uint8_t *frm0, *frm1;
4950 GetByteContext g;
@@ -376,14 +377,15 @@ static av_cold int decode_init(AVCodecContext * avctx) · 326 unmodified lines
376377 }
377378
378379 if (avctx->extradata_size < 12) {
379− av_log(NULL, 0, "Extradata missing, decoding may not work properly...\n");
380+ av_log(avctx, AV_LOG_WARNING,
381+ "Extradata missing, decoding may not work properly...\n");
380382 c->palsize = 127;
381383 } else {
382384 c->palsize = AV_RL16(avctx->extradata + 10);
383− if (c->palsize > 255U) {
385+ if (c->palsize >= (unsigned)MAX_PALSIZE) {
384386 c->palsize = 127;
385− av_log(NULL, AV_LOG_ERROR, "palsize too big\n");
386− return -1;
387+ av_log(avctx, AV_LOG_ERROR, "KMVC palette too large\n");
388+ return AVERROR_INVALIDDATA;
387389 }
388390 }
389391
libavcodec/mpc7.c+1−1
@@ -53,7 +53,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) · 52 unmodified lines
5353 int i, j;
5454 MPCContext *c = avctx->priv_data;
5555 GetBitContext gb;
56− uint8_t buf[16];
56+ LOCAL_ALIGNED_16(uint8_t, buf, [16]);
5757 static int vlc_initialized = 0;
5858
5959 static VLC_TYPE scfi_table[1 << MPC7_SCFI_BITS][2];
libavcodec/mpeg12data.c+1−1
@@ -305,7 +305,7 @@ const uint8_t ff_mpeg12_mbMotionVectorTable[17][2] = { · 304 unmodified lines
305305 { 0xc, 10 },
306306 };
307307
308−const AVRational avpriv_frame_rate_tab[] = {
308+const AVRational avpriv_frame_rate_tab[16] = {
309309 { 0, 0},
310310 {24000, 1001},
311311 { 24, 1},
libavcodec/wmadec.c+2−0
@@ -891,6 +891,8 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data, · 890 unmodified lines
891891
892892 /* read each frame starting from bit_offset */
893893 pos = bit_offset + 4 + 4 + s->byte_offset_bits + 3;
894+ if (pos >= MAX_CODED_SUPERFRAME_SIZE * 8)
895+ return AVERROR_INVALIDDATA;
894896 init_get_bits(&s->gb, buf + (pos >> 3), (MAX_CODED_SUPERFRAME_SIZE - (pos >> 3))*8);
895897 len = pos & 7;
896898 if (len > 0)
libavcodec/x86/Makefile+1−0
@@ -48,6 +48,7 @@ MMX-OBJS-$(CONFIG_GPL) += x86/idct_mmx.o · 47 unmodified lines
4848 MMX-OBJS-$(CONFIG_LPC) += x86/lpc_mmx.o
4949 YASM-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp.o
5050 MMX-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp-init.o
51+YASM-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp.o
5152 MMX-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp-init.o
5253 YASM-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp.o
5354 MMX-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp-init.o
libavcodec/x86/dsputil_mmx.c+5−0
@@ -2392,6 +2392,9 @@ void ff_apply_window_int16_ssse3 (int16_t *output, const int16_t *input, · 2391 unmodified lines
23922392 void ff_apply_window_int16_ssse3_atom(int16_t *output, const int16_t *input,
23932393 const int16_t *window, unsigned int len);
23942394
2395+void ff_bswap32_buf_ssse3(uint32_t *dst, const uint32_t *src, int w);
2396+void ff_bswap32_buf_sse2(uint32_t *dst, const uint32_t *src, int w);
2397+
23952398 void ff_add_hfyu_median_prediction_mmx2(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top);
23962399 int ff_add_hfyu_left_prediction_ssse3(uint8_t *dst, const uint8_t *src, int w, int left);
23972400 int ff_add_hfyu_left_prediction_sse4(uint8_t *dst, const uint8_t *src, int w, int left);
@@ -2880,6 +2883,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) · 482 unmodified lines
28802883 c->apply_window_int16 = ff_apply_window_int16_sse2;
28812884 }
28822885 }
2886+ c->bswap_buf = ff_bswap32_buf_sse2;
28832887 #endif
28842888 }
28852889 if (mm_flags & AV_CPU_FLAG_SSSE3) {
@@ -2892,6 +2896,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) · 6 unmodified lines
28922896 if (!(mm_flags & (AV_CPU_FLAG_SSE42|AV_CPU_FLAG_3DNOW))) { // cachesplit
28932897 c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3;
28942898 }
2899+ c->bswap_buf = ff_bswap32_buf_ssse3;
28952900 #endif
28962901 }
28972902
libavcodec/x86/dsputil_yasm.asm+124−0
@@ -30,6 +30,7 @@ pb_zzzz3333zzzzbbbb: db -1,-1,-1,-1,3,3,3,3,-1,-1,-1,-1,11,11,11,11 · 29 unmodified lines
3030 pb_zz11zz55zz99zzdd: db -1,-1,1,1,-1,-1,5,5,-1,-1,9,9,-1,-1,13,13
3131 pb_revwords: db 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1
3232 pd_16384: times 4 dd 16384
33+pb_bswap32: db 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12
3334
3435 SECTION_TEXT
3536
@@ -1180,3 +1181,126 @@ BUTTERFLIES_FLOAT_INTERLEAVE · 1144 unmodified lines
11801181 INIT_YMM avx
11811182 BUTTERFLIES_FLOAT_INTERLEAVE
11821183 %endif
1184+
1185+INIT_XMM sse2
1186+; %1 = aligned/unaligned
1187+%macro BSWAP_LOOPS_SSE2 1
1188+ mov r3, r2
1189+ sar r2, 3
1190+ jz .left4_%1
1191+.loop8_%1:
1192+ mov%1 m0, [r1 + 0]
1193+ mov%1 m1, [r1 + 16]
1194+ pshuflw m0, m0, 10110001b
1195+ pshuflw m1, m1, 10110001b
1196+ pshufhw m0, m0, 10110001b
1197+ pshufhw m1, m1, 10110001b
1198+ mova m2, m0
1199+ mova m3, m1
1200+ psllw m0, 8
1201+ psllw m1, 8
1202+ psrlw m2, 8
1203+ psrlw m3, 8
1204+ por m2, m0
1205+ por m3, m1
1206+ mova [r0 + 0], m2
1207+ mova [r0 + 16], m3
1208+ add r1, 32
1209+ add r0, 32
1210+ dec r2
1211+ jnz .loop8_%1
1212+.left4_%1:
1213+ mov r2, r3
1214+ and r3, 4
1215+ jz .left
1216+ mov%1 m0, [r1]
1217+ pshuflw m0, m0, 10110001b
1218+ pshufhw m0, m0, 10110001b
1219+ mova m2, m0
1220+ psllw m0, 8
1221+ psrlw m2, 8
1222+ por m2, m0
1223+ mova [r0], m2
1224+ add r1, 16
1225+ add r0, 16
1226+%endmacro
1227+
1228+; void bswap_buf(uint32_t *dst, const uint32_t *src, int w);
1229+cglobal bswap32_buf, 3,4,5
1230+ mov r3, r1
1231+ and r3, 15
1232+ jz .start_align
1233+ BSWAP_LOOPS_SSE2 u
1234+ jmp .left
1235+.start_align:
1236+ BSWAP_LOOPS_SSE2 a
1237+.left:
1238+ and r2, 3
1239+ jz .end
1240+.loop2:
1241+ mov r3d, [r1]
1242+ bswap r3d
1243+ mov [r0], r3d
1244+ add r1, 4
1245+ add r0, 4
1246+ dec r2
1247+ jnz .loop2
1248+.end
1249+ RET
1250+
1251+; %1 = aligned/unaligned
1252+%macro BSWAP_LOOPS_SSSE3 1
1253+ mov r3, r2
1254+ sar r2, 3
1255+ jz .left4_%1
1256+.loop8_%1:
1257+ mov%1 m0, [r1 + 0]
1258+ mov%1 m1, [r1 + 16]
1259+ pshufb m0, m2
1260+ pshufb m1, m2
1261+ mova [r0 + 0], m0
1262+ mova [r0 + 16], m1
1263+ add r0, 32
1264+ add r1, 32
1265+ dec r2
1266+ jnz .loop8_%1
1267+.left4_%1:
1268+ mov r2, r3
1269+ and r3, 4
1270+ jz .left2
1271+ mov%1 m0, [r1]
1272+ pshufb m0, m2
1273+ mova [r0], m0
1274+ add r1, 16
1275+ add r0, 16
1276+%endmacro
1277+
1278+INIT_XMM ssse3
1279+; void bswap_buf(uint32_t *dst, const uint32_t *src, int w);
1280+cglobal bswap32_buf, 3,4,3
1281+ mov r3, r1
1282+ mova m2, [pb_bswap32]
1283+ and r3, 15
1284+ jz .start_align
1285+ BSWAP_LOOPS_SSSE3 u
1286+ jmp .left2
1287+.start_align:
1288+ BSWAP_LOOPS_SSSE3 a
1289+.left2:
1290+ mov r3, r2
1291+ and r2, 2
1292+ jz .left1
1293+ movq m0, [r1]
1294+ pshufb m0, m2
1295+ movq [r0], m0
1296+ add r1, 8
1297+ add r0, 8
1298+.left1:
1299+ and r3, 1
1300+ jz .end
1301+ mov r2d, [r1]
1302+ bswap r2d
1303+ mov [r0], r2d
1304+.end:
1305+ RET
1306+
libavcodec/x86/pngdsp-init.c+19−104
@@ -19,118 +19,33 @@ · 18 unmodified lines
1919 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2020 */
2121
22+#include "libavutil/common.h"
2223 #include "libavutil/cpu.h"
23−#include "libavutil/x86_cpu.h"
2424 #include "libavcodec/pngdsp.h"
25−#include "dsputil_mmx.h"
2625
27−#define PAETH(cpu, abs3)\
28−static void add_png_paeth_prediction_##cpu(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp)\
29−{\
30− x86_reg i, end;\
31− if(bpp>4) add_png_paeth_prediction_##cpu(dst+bpp/2, src+bpp/2, top+bpp/2, w-bpp/2, -bpp);\
32− if(bpp<0) bpp=-bpp;\
33− i= -bpp;\
34− end = w-3;\
35− __asm__ volatile(\
36− "pxor %%mm7, %%mm7 \n"\
37− "movd (%1,%0), %%mm0 \n"\
38− "movd (%2,%0), %%mm1 \n"\
39− "punpcklbw %%mm7, %%mm0 \n"\
40− "punpcklbw %%mm7, %%mm1 \n"\
41− "add %4, %0 \n"\
42− "1: \n"\
43− "movq %%mm1, %%mm2 \n"\
44− "movd (%2,%0), %%mm1 \n"\
45− "movq %%mm2, %%mm3 \n"\
46− "punpcklbw %%mm7, %%mm1 \n"\
47− "movq %%mm2, %%mm4 \n"\
48− "psubw %%mm1, %%mm3 \n"\
49− "psubw %%mm0, %%mm4 \n"\
50− "movq %%mm3, %%mm5 \n"\
51− "paddw %%mm4, %%mm5 \n"\
52− abs3\
53− "movq %%mm4, %%mm6 \n"\
54− "pminsw %%mm5, %%mm6 \n"\
55− "pcmpgtw %%mm6, %%mm3 \n"\
56− "pcmpgtw %%mm5, %%mm4 \n"\
57− "movq %%mm4, %%mm6 \n"\
58− "pand %%mm3, %%mm4 \n"\
59− "pandn %%mm3, %%mm6 \n"\
60− "pandn %%mm0, %%mm3 \n"\
61− "movd (%3,%0), %%mm0 \n"\
62− "pand %%mm1, %%mm6 \n"\
63− "pand %%mm4, %%mm2 \n"\
64− "punpcklbw %%mm7, %%mm0 \n"\
65− "paddw %%mm6, %%mm0 \n"\
66− "paddw %%mm2, %%mm3 \n"\
67− "paddw %%mm3, %%mm0 \n"\
68− "pand %6 , %%mm0 \n"\
69− "movq %%mm0, %%mm3 \n"\
70− "packuswb %%mm3, %%mm3 \n"\
71− "movd %%mm3, (%1,%0) \n"\
72− "add %4, %0 \n"\
73− "cmp %5, %0 \n"\
74− "jle 1b \n"\
75− :"+r"(i)\
76− :"r"(dst), "r"(top), "r"(src), "r"((x86_reg)bpp), "g"(end),\
77− "m"(ff_pw_255)\
78− :"memory"\
79− );\
80−}
81−
82−#define ABS3_MMX2\
83− "psubw %%mm5, %%mm7 \n"\
84− "pmaxsw %%mm7, %%mm5 \n"\
85− "pxor %%mm6, %%mm6 \n"\
86− "pxor %%mm7, %%mm7 \n"\
87− "psubw %%mm3, %%mm6 \n"\
88− "psubw %%mm4, %%mm7 \n"\
89− "pmaxsw %%mm6, %%mm3 \n"\
90− "pmaxsw %%mm7, %%mm4 \n"\
91− "pxor %%mm7, %%mm7 \n"
92−
93−#define ABS3_SSSE3\
94− "pabsw %%mm3, %%mm3 \n"\
95− "pabsw %%mm4, %%mm4 \n"\
96− "pabsw %%mm5, %%mm5 \n"
97−
98−PAETH(mmx2, ABS3_MMX2)
99−#if HAVE_SSSE3
100−PAETH(ssse3, ABS3_SSSE3)
101−#endif
102−
103−static void add_bytes_l2_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w)
104−{
105− x86_reg i=0;
106− __asm__ volatile(
107− "jmp 2f \n\t"
108− "1: \n\t"
109− "movq (%2, %0), %%mm0 \n\t"
110− "movq 8(%2, %0), %%mm1 \n\t"
111− "paddb (%3, %0), %%mm0 \n\t"
112− "paddb 8(%3, %0), %%mm1 \n\t"
113− "movq %%mm0, (%1, %0) \n\t"
114− "movq %%mm1, 8(%1, %0) \n\t"
115− "add $16, %0 \n\t"
116− "2: \n\t"
117− "cmp %4, %0 \n\t"
118− " js 1b \n\t"
119− : "+r" (i)
120− : "r"(dst), "r"(src1), "r"(src2), "r"((x86_reg) w - 15)
121− );
122− for (; i < w; i++)
123− dst[i] = src1[i] + src2[i];
124−}
26+void ff_add_png_paeth_prediction_mmx2 (uint8_t *dst, uint8_t *src,
27+ uint8_t *top, int w, int bpp);
28+void ff_add_png_paeth_prediction_ssse3(uint8_t *dst, uint8_t *src,
29+ uint8_t *top, int w, int bpp);
30+void ff_add_bytes_l2_mmx (uint8_t *dst, uint8_t *src1,
31+ uint8_t *src2, int w);
32+void ff_add_bytes_l2_sse2(uint8_t *dst, uint8_t *src1,
33+ uint8_t *src2, int w);
12534
12635 void ff_pngdsp_init_x86(PNGDSPContext *dsp)
12736 {
37+#if HAVE_YASM
12838 int flags = av_get_cpu_flags();
12939
40+#if ARCH_X86_32
13041 if (flags & AV_CPU_FLAG_MMX)
131− dsp->add_bytes_l2 = add_bytes_l2_mmx;
42+ dsp->add_bytes_l2 = ff_add_bytes_l2_mmx;
43+#endif
13244 if (flags & AV_CPU_FLAG_MMX2)
133− dsp->add_paeth_prediction = add_png_paeth_prediction_mmx2;
134− if (HAVE_SSSE3 && flags & AV_CPU_FLAG_SSSE3)
135− dsp->add_paeth_prediction = add_png_paeth_prediction_ssse3;
45+ dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmx2;
46+ if (flags & AV_CPU_FLAG_SSE2)
47+ dsp->add_bytes_l2 = ff_add_bytes_l2_sse2;
48+ if (flags & AV_CPU_FLAG_SSSE3)
49+ dsp->add_paeth_prediction = ff_add_png_paeth_prediction_ssse3;
50+#endif
13651 }
libavcodec/x86/pngdsp.asm+174−0
@@ -0,0 +1,174 @@
1+;******************************************************************************
2+;* x86 optimizations for PNG decoding
3+;*
4+;* Copyright (c) 2008 Loren Merritt <lorenm@u.washington.edu>
5+;* Copyright (c) 2012 Ronald S. Bultje <rsbultje@gmail.com>
6+;*
7+;* This file is part of Libav.
8+;*
9+;* Libav is free software; you can redistribute it and/or
10+;* modify it under the terms of the GNU Lesser General Public
11+;* License as published by the Free Software Foundation; either
12+;* version 2.1 of the License, or (at your option) any later version.
13+;*
14+;* Libav is distributed in the hope that it will be useful,
15+;* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17+;* Lesser General Public License for more details.
18+;*
19+;* You should have received a copy of the GNU Lesser General Public
20+;* License along with Libav; if not, write to the Free Software
21+;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22+;******************************************************************************
23+
24+%include "x86inc.asm"
25+%include "x86util.asm"
26+
27+SECTION_RODATA
28+
29+cextern pw_255
30+
31+section .text align=16
32+
33+; %1 = nr. of xmm registers used
34+%macro ADD_BYTES_FN 1
35+cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i
36+%if ARCH_X86_64
37+ movsxd waq, wad
38+%endif
39+ xor iq, iq
40+
41+ ; vector loop
42+ mov wq, waq
43+ and waq, ~(mmsize*2-1)
44+ jmp .end_v
45+.loop_v:
46+ mova m0, [src1q+iq]
47+ mova m1, [src1q+iq+mmsize]
48+ paddb m0, [src2q+iq]
49+ paddb m1, [src2q+iq+mmsize]
50+ mova [dstq+iq ], m0
51+ mova [dstq+iq+mmsize], m1
52+ add iq, mmsize*2
53+.end_v:
54+ cmp iq, waq
55+ jl .loop_v
56+
57+%if mmsize == 16
58+ ; vector loop
59+ mov wq, waq
60+ and waq, ~7
61+ jmp .end_l
62+.loop_l:
63+ movq mm0, [src1q+iq]
64+ paddb mm0, [src2q+iq]
65+ movq [dstq+iq ], mm0
66+ add iq, 8
67+.end_l:
68+ cmp iq, waq
69+ jl .loop_l
70+%endif
71+
72+ ; scalar loop for leftover
73+ jmp .end_s
74+.loop_s:
75+ mov wab, [src1q+iq]
76+ add wab, [src2q+iq]
77+ mov [dstq+iq], wab
78+ inc iq
79+.end_s:
80+ cmp iq, wq
81+ jl .loop_s
82+ REP_RET
83+%endmacro
84+
85+%if ARCH_X86_32
86+INIT_MMX mmx
87+ADD_BYTES_FN 0
88+%endif
89+
90+INIT_XMM sse2
91+ADD_BYTES_FN 2
92+
93+%macro ADD_PAETH_PRED_FN 1
94+cglobal add_png_paeth_prediction, 5, 7, %1, dst, src, top, w, bpp, end, cntr
95+%if ARCH_X86_64
96+ movsxd bppq, bppd
97+ movsxd wq, wd
98+%endif
99+ lea endq, [dstq+wq-(mmsize/2-1)]
100+ sub topq, dstq
101+ sub srcq, dstq
102+ sub dstq, bppq
103+ pxor m7, m7
104+
105+ PUSH dstq
106+ lea cntrq, [bppq-1]
107+ shr cntrq, 2 + mmsize/16
108+.bpp_loop:
109+ lea dstq, [dstq+cntrq*(mmsize/2)]
110+ movh m0, [dstq]
111+ movh m1, [topq+dstq]
112+ punpcklbw m0, m7
113+ punpcklbw m1, m7
114+ add dstq, bppq
115+.loop:
116+ mova m2, m1
117+ movh m1, [topq+dstq]
118+ mova m3, m2
119+ punpcklbw m1, m7
120+ mova m4, m2
121+ psubw m3, m1
122+ psubw m4, m0
123+ mova m5, m3
124+ paddw m5, m4
125+%if cpuflag(ssse3)
126+ pabsw m3, m3
127+ pabsw m4, m4
128+ pabsw m5, m5
129+%else ; !cpuflag(ssse3)
130+ psubw m7, m5
131+ pmaxsw m5, m7
132+ pxor m6, m6
133+ pxor m7, m7
134+ psubw m6, m3
135+ psubw m7, m4
136+ pmaxsw m3, m6
137+ pmaxsw m4, m7
138+ pxor m7, m7
139+%endif ; cpuflag(ssse3)
140+ mova m6, m4
141+ pminsw m6, m5
142+ pcmpgtw m3, m6
143+ pcmpgtw m4, m5
144+ mova m6, m4
145+ pand m4, m3
146+ pandn m6, m3
147+ pandn m3, m0
148+ movh m0, [srcq+dstq]
149+ pand m6, m1
150+ pand m2, m4
151+ punpcklbw m0, m7
152+ paddw m0, m6
153+ paddw m3, m2
154+ paddw m0, m3
155+ pand m0, [pw_255]
156+ mova m3, m0
157+ packuswb m3, m3
158+ movh [dstq], m3
159+ add dstq, bppq
160+ cmp dstq, endq
161+ jle .loop
162+
163+ mov dstq, [rsp]
164+ dec cntrq
165+ jge .bpp_loop
166+ POP dstq
167+ RET
168+%endmacro
169+
170+INIT_MMX mmx2
171+ADD_PAETH_PRED_FN 0
172+
173+INIT_MMX ssse3
174+ADD_PAETH_PRED_FN 0
libavformat/movenc.c+149−148
@@ -70,7 +70,7 @@ static const AVClass flavor ## _muxer_class = {\ · 69 unmodified lines
7070 };
7171
7272 //FIXME support 64 bit variant with wide placeholders
73−static int64_t updateSize(AVIOContext *pb, int64_t pos)
73+static int64_t update_size(AVIOContext *pb, int64_t pos)
7474 {
7575 int64_t curpos = avio_tell(pb);
7676 avio_seek(pb, pos, SEEK_SET);
@@ -102,7 +102,7 @@ static int mov_write_stco_tag(AVIOContext *pb, MOVTrack *track) · 25 unmodified lines
102102 else
103103 avio_wb32(pb, track->cluster[i].pos);
104104 }
105− return updateSize(pb, pos);
105+ return update_size(pb, pos);
106106 }
107107
108108 /* Sample size atom */
@@ -140,7 +140,7 @@ static int mov_write_stsz_tag(AVIOContext *pb, MOVTrack *track) · 31 unmodified lines
140140 }
141141 }
142142 }
143− return updateSize(pb, pos);
143+ return update_size(pb, pos);
144144 }
145145
146146 /* Sample to chunk atom */
@@ -156,12 +156,12 @@ static int mov_write_stsc_tag(AVIOContext *pb, MOVTrack *track) · 9 unmodified lines
156156 entryPos = avio_tell(pb);
157157 avio_wb32(pb, track->chunkCount); // entry count
158158 for (i=0; i<track->entry; i++) {
159− if(oldval != track->cluster[i].samplesInChunk && track->cluster[i].chunkNum)
159+ if (oldval != track->cluster[i].samples_in_chunk && track->cluster[i].chunkNum)
160160 {
161161 avio_wb32(pb, track->cluster[i].chunkNum); // first chunk
162− avio_wb32(pb, track->cluster[i].samplesInChunk); // samples per chunk
162+ avio_wb32(pb, track->cluster[i].samples_in_chunk); // samples per chunk
163163 avio_wb32(pb, 0x1); // sample description index
164− oldval = track->cluster[i].samplesInChunk;
164+ oldval = track->cluster[i].samples_in_chunk;
165165 index++;
166166 }
167167 }
@@ -170,7 +170,7 @@ static int mov_write_stsc_tag(AVIOContext *pb, MOVTrack *track) · 2 unmodified lines
170170 avio_wb32(pb, index); // rewrite size
171171 avio_seek(pb, curpos, SEEK_SET);
172172
173− return updateSize(pb, pos);
173+ return update_size(pb, pos);
174174 }
175175
176176 /* Sync sample atom */
@@ -194,7 +194,7 @@ static int mov_write_stss_tag(AVIOContext *pb, MOVTrack *track, uint32_t flag) · 17 unmodified lines
194194 avio_seek(pb, entryPos, SEEK_SET);
195195 avio_wb32(pb, index); // rewrite size
196196 avio_seek(pb, curpos, SEEK_SET);
197− return updateSize(pb, pos);
197+ return update_size(pb, pos);
198198 }
199199
200200 static int mov_write_amr_tag(AVIOContext *pb, MOVTrack *track)
@@ -218,13 +218,13 @@ static int mov_write_ac3_tag(AVIOContext *pb, MOVTrack *track) · 17 unmodified lines
218218 uint8_t buf[3];
219219 int fscod, bsid, bsmod, acmod, lfeon, frmsizecod;
220220
221− if (track->vosLen < 7)
221+ if (track->vos_len < 7)
222222 return -1;
223223
224224 avio_wb32(pb, 11);
225225 ffio_wfourcc(pb, "dac3");
226226
227− init_get_bits(&gbc, track->vosData+4, (track->vosLen-4) * 8);
227+ init_get_bits(&gbc, track->vos_data + 4, (track->vos_len - 4) * 8);
228228 fscod = get_bits(&gbc, 2);
229229 frmsizecod = get_bits(&gbc, 6);
230230 bsid = get_bits(&gbc, 5);
@@ -273,7 +273,7 @@ static int mov_write_enda_tag(AVIOContext *pb) · 42 unmodified lines
273273 return 10;
274274 }
275275
276−static void putDescr(AVIOContext *pb, int tag, unsigned int size)
276+static void put_descr(AVIOContext *pb, int tag, unsigned int size)
277277 {
278278 int i = 3;
279279 avio_w8(pb, tag);
@@ -288,13 +288,13 @@ static unsigned compute_avg_bitrate(MOVTrack *track) · 8 unmodified lines
288288 int i;
289289 for (i = 0; i < track->entry; i++)
290290 size += track->cluster[i].size;
291− return size * 8 * track->timescale / track->trackDuration;
291+ return size * 8 * track->timescale / track->track_duration;
292292 }
293293
294294 static int mov_write_esds_tag(AVIOContext *pb, MOVTrack *track) // Basic
295295 {
296296 int64_t pos = avio_tell(pb);
297− int decoderSpecificInfoLen = track->vosLen ? 5+track->vosLen : 0;
297+ int decoder_specific_info_len = track->vos_len ? 5 + track->vos_len : 0;
298298 unsigned avg_bitrate;
299299
300300 avio_wb32(pb, 0); // size
@@ -302,12 +302,12 @@ static int mov_write_esds_tag(AVIOContext *pb, MOVTrack *track) // Basic · 1 unmodified line
302302 avio_wb32(pb, 0); // Version
303303
304304 // ES descriptor
305− putDescr(pb, 0x03, 3 + 5+13 + decoderSpecificInfoLen + 5+1);
306− avio_wb16(pb, track->trackID);
305+ put_descr(pb, 0x03, 3 + 5+13 + decoder_specific_info_len + 5+1);
306+ avio_wb16(pb, track->track_id);
307307 avio_w8(pb, 0x00); // flags (= no flags)
308308
309309 // DecoderConfig descriptor
310− putDescr(pb, 0x04, 13 + decoderSpecificInfoLen);
310+ put_descr(pb, 0x04, 13 + decoder_specific_info_len);
311311
312312 // Object type indication
313313 if ((track->enc->codec_id == CODEC_ID_MP2 ||
@@ -332,16 +332,16 @@ static int mov_write_esds_tag(AVIOContext *pb, MOVTrack *track) // Basic · 18 unmodified lines
332332 avio_wb32(pb, FFMAX3(track->enc->bit_rate, track->enc->rc_max_rate, avg_bitrate));
333333 avio_wb32(pb, avg_bitrate);
334334
335− if (track->vosLen) {
335+ if (track->vos_len) {
336336 // DecoderSpecific info descriptor
337− putDescr(pb, 0x05, track->vosLen);
338− avio_write(pb, track->vosData, track->vosLen);
337+ put_descr(pb, 0x05, track->vos_len);
338+ avio_write(pb, track->vos_data, track->vos_len);
339339 }
340340
341341 // SL descriptor
342− putDescr(pb, 0x06, 1);
342+ put_descr(pb, 0x06, 1);
343343 avio_w8(pb, 0x02);
344− return updateSize(pb, pos);
344+ return update_size(pb, pos);
345345 }
346346
347347 static int mov_pcm_le_gt16(enum CodecID codec_id)
@@ -359,7 +359,7 @@ static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track) · 11 unmodified lines
359359 avio_wl32(pb, track->tag); // store it byteswapped
360360 track->enc->codec_tag = av_bswap16(track->tag >> 16);
361361 ff_put_wav_header(pb, track->enc);
362− return updateSize(pb, pos);
362+ return update_size(pb, pos);
363363 }
364364
365365 static int mov_write_chan_tag(AVIOContext *pb, MOVTrack *track)
@@ -384,7 +384,7 @@ static int mov_write_chan_tag(AVIOContext *pb, MOVTrack *track) · 18 unmodified lines
384384 avio_wb32(pb, bitmap); // mChannelBitmap
385385 avio_wb32(pb, 0); // mNumberChannelDescriptions
386386
387− return updateSize(pb, pos);
387+ return update_size(pb, pos);
388388 }
389389
390390 static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track)
@@ -421,15 +421,15 @@ static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track) · 30 unmodified lines
421421 avio_wb32(pb, 8); /* size */
422422 avio_wb32(pb, 0); /* null tag */
423423
424− return updateSize(pb, pos);
424+ return update_size(pb, pos);
425425 }
426426
427427 static int mov_write_glbl_tag(AVIOContext *pb, MOVTrack *track)
428428 {
429− avio_wb32(pb, track->vosLen+8);
429+ avio_wb32(pb, track->vos_len + 8);
430430 ffio_wfourcc(pb, "glbl");
431− avio_write(pb, track->vosData, track->vosLen);
432− return 8+track->vosLen;
431+ avio_write(pb, track->vos_data, track->vos_len);
432+ return 8 + track->vos_len;
433433 }
434434
435435 /**
@@ -502,7 +502,7 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track) · 66 unmodified lines
502502 avio_wb32(pb, 0x7F000000);
503503 avio_wb32(pb, av_get_bits_per_sample(track->enc->codec_id));
504504 avio_wb32(pb, mov_get_lpcm_flags(track->enc->codec_id));
505− avio_wb32(pb, track->sampleSize);
505+ avio_wb32(pb, track->sample_size);
506506 avio_wb32(pb, track->enc->frame_size);
507507 } else {
508508 if (track->mode == MODE_MOV) {
@@ -526,8 +526,8 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track) · 17 unmodified lines
526526
527527 if(version == 1) { /* SoundDescription V1 extended info */
528528 avio_wb32(pb, track->enc->frame_size); /* Samples per packet */
529− avio_wb32(pb, track->sampleSize / track->enc->channels); /* Bytes per packet */
530− avio_wb32(pb, track->sampleSize); /* Bytes per frame */
529+ avio_wb32(pb, track->sample_size / track->enc->channels); /* Bytes per packet */
530+ avio_wb32(pb, track->sample_size); /* Bytes per frame */
531531 avio_wb32(pb, 2); /* Bytes per sample */
532532 }
533533
@@ -548,10 +548,10 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track) · 14 unmodified lines
548548 mov_write_ac3_tag(pb, track);
549549 else if(track->enc->codec_id == CODEC_ID_ALAC)
550550 mov_write_extradata_tag(pb, track);
551− else if(track->vosLen > 0)
551+ else if (track->vos_len > 0)
552552 mov_write_glbl_tag(pb, track);
553553
554− return updateSize(pb, pos);
554+ return update_size(pb, pos);
555555 }
556556
557557 static int mov_write_d263_tag(AVIOContext *pb)
@@ -585,8 +585,8 @@ static int mov_write_avcc_tag(AVIOContext *pb, MOVTrack *track) · 27 unmodified lines
585585
586586 avio_wb32(pb, 0);
587587 ffio_wfourcc(pb, "avcC");
588− ff_isom_write_avcc(pb, track->vosData, track->vosLen);
589− return updateSize(pb, pos);
588+ ff_isom_write_avcc(pb, track->vos_data, track->vos_len);
589+ return update_size(pb, pos);
590590 }
591591
592592 /* also used by all avid codecs (dv, imx, meridien) and their variants */
@@ -611,10 +611,10 @@ static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track) · 18 unmodified lines
611611 ffio_wfourcc(pb, "ARES");
612612 ffio_wfourcc(pb, "ARES");
613613 ffio_wfourcc(pb, "0001");
614− avio_wb32(pb, AV_RB32(track->vosData + 0x28)); /* dnxhd cid, some id ? */
614+ avio_wb32(pb, AV_RB32(track->vos_data + 0x28)); /* dnxhd cid, some id ? */
615615 avio_wb32(pb, track->enc->width);
616616 /* values below are based on samples created with quicktime and avid codecs */
617− if (track->vosData[5] & 2) { // interlaced
617+ if (track->vos_data[5] & 2) { // interlaced
618618 avio_wb32(pb, track->enc->height/2);
619619 avio_wb32(pb, 2); /* unknown */
620620 avio_wb32(pb, 0); /* unknown */
@@ -854,7 +854,7 @@ static int mov_write_subtitle_tag(AVIOContext *pb, MOVTrack *track) · 233 unmodified lines
854854 if (track->enc->extradata_size)
855855 avio_write(pb, track->enc->extradata, track->enc->extradata_size);
856856
857− return updateSize(pb, pos);
857+ return update_size(pb, pos);
858858 }
859859
860860 static int mov_write_pasp_tag(AVIOContext *pb, MOVTrack *track)
@@ -930,7 +930,7 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) · 69 unmodified lines
930930 mov_write_uuid_tag_ipod(pb);
931931 } else if (track->enc->field_order != AV_FIELD_UNKNOWN)
932932 mov_write_fiel_tag(pb, track);
933− else if(track->vosLen > 0)
933+ else if (track->vos_len > 0)
934934 mov_write_glbl_tag(pb, track);
935935
936936 if (track->enc->sample_aspect_ratio.den && track->enc->sample_aspect_ratio.num &&
@@ -938,7 +938,7 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) · 1 unmodified line
938938 mov_write_pasp_tag(pb, track);
939939 }
940940
941− return updateSize(pb, pos);
941+ return update_size(pb, pos);
942942 }
943943
944944 static int mov_write_rtp_tag(AVIOContext *pb, MOVTrack *track)
@@ -958,7 +958,7 @@ static int mov_write_rtp_tag(AVIOContext *pb, MOVTrack *track) · 13 unmodified lines
958958 ffio_wfourcc(pb, "tims");
959959 avio_wb32(pb, track->timescale);
960960
961− return updateSize(pb, pos);
961+ return update_size(pb, pos);
962962 }
963963
964964 static int mov_write_stsd_tag(AVIOContext *pb, MOVTrack *track)
@@ -976,7 +976,7 @@ static int mov_write_stsd_tag(AVIOContext *pb, MOVTrack *track) · 11 unmodified lines
976976 mov_write_subtitle_tag(pb, track);
977977 else if (track->enc->codec_tag == MKTAG('r','t','p',' '))
978978 mov_write_rtp_tag(pb, track);
979− return updateSize(pb, pos);
979+ return update_size(pb, pos);
980980 }
981981
982982 static int mov_write_ctts_tag(AVIOContext *pb, MOVTrack *track)
@@ -1022,7 +1022,7 @@ static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track) · 39 unmodified lines
10221022
10231023 if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO && !track->audio_vbr) {
10241024 stts_entries = av_malloc(sizeof(*stts_entries)); /* one entry */
1025− stts_entries[0].count = track->sampleCount;
1025+ stts_entries[0].count = track->sample_count;
10261026 stts_entries[0].duration = 1;
10271027 entries = 1;
10281028 } else {
@@ -1031,7 +1031,7 @@ static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track) · 2 unmodified lines
10311031 NULL;
10321032 for (i=0; i<track->entry; i++) {
10331033 int64_t duration = i + 1 == track->entry ?
1034− track->trackDuration - track->cluster[i].dts + track->start_dts : /* readjusting */
1034+ track->track_duration - track->cluster[i].dts + track->start_dts : /* readjusting */
10351035 track->cluster[i+1].dts - track->cluster[i].dts;
10361036 if (i && duration == stts_entries[entries].duration) {
10371037 stts_entries[entries].count++; /* compress */
@@ -1080,7 +1080,7 @@ static int mov_write_stbl_tag(AVIOContext *pb, MOVTrack *track) · 42 unmodified lines
10801080 mov_write_stts_tag(pb, track);
10811081 if ((track->enc->codec_type == AVMEDIA_TYPE_VIDEO ||
10821082 track->enc->codec_tag == MKTAG('r','t','p',' ')) &&
1083− track->hasKeyframes && track->hasKeyframes < track->entry)
1083+ track->has_keyframes && track->has_keyframes < track->entry)
10841084 mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE);
10851085 if (track->mode == MODE_MOV && track->flags & MOV_TRACK_STPS)
10861086 mov_write_stss_tag(pb, track, MOV_PARTIAL_SYNC_SAMPLE);
@@ -1090,7 +1090,7 @@ static int mov_write_stbl_tag(AVIOContext *pb, MOVTrack *track) · 3 unmodified lines
10901090 mov_write_stsc_tag(pb, track);
10911091 mov_write_stsz_tag(pb, track);
10921092 mov_write_stco_tag(pb, track);
1093− return updateSize(pb, pos);
1093+ return update_size(pb, pos);
10941094 }
10951095
10961096 static int mov_write_dinf_tag(AVIOContext *pb)
@@ -1099,7 +1099,7 @@ static int mov_write_dinf_tag(AVIOContext *pb) · 2 unmodified lines
10991099 avio_wb32(pb, 0); /* size */
11001100 ffio_wfourcc(pb, "dinf");
11011101 mov_write_dref_tag(pb);
1102− return updateSize(pb, pos);
1102+ return update_size(pb, pos);
11031103 }
11041104
11051105 static int mov_write_nmhd_tag(AVIOContext *pb)
@@ -1185,7 +1185,7 @@ static int mov_write_hdlr_tag(AVIOContext *pb, MOVTrack *track) · 79 unmodified lines
11851185 avio_write(pb, descr, strlen(descr)); /* handler description */
11861186 if (track && track->mode != MODE_MOV)
11871187 avio_w8(pb, 0); /* c string */
1188− return updateSize(pb, pos);
1188+ return update_size(pb, pos);
11891189 }
11901190
11911191 static int mov_write_hmhd_tag(AVIOContext *pb)
@@ -1222,12 +1222,12 @@ static int mov_write_minf_tag(AVIOContext *pb, MOVTrack *track) · 30 unmodified lines
12221222 mov_write_hdlr_tag(pb, NULL);
12231223 mov_write_dinf_tag(pb);
12241224 mov_write_stbl_tag(pb, track);
1225− return updateSize(pb, pos);
1225+ return update_size(pb, pos);
12261226 }
12271227
12281228 static int mov_write_mdhd_tag(AVIOContext *pb, MOVTrack *track)
12291229 {
1230− int version = track->trackDuration < INT32_MAX ? 0 : 1;
1230+ int version = track->track_duration < INT32_MAX ? 0 : 1;
12311231
12321232 (version == 1) ? avio_wb32(pb, 44) : avio_wb32(pb, 32); /* size */
12331233 ffio_wfourcc(pb, "mdhd");
@@ -1241,7 +1241,7 @@ static int mov_write_mdhd_tag(AVIOContext *pb, MOVTrack *track) · 7 unmodified lines
12411241 avio_wb32(pb, track->time); /* modification time */
12421242 }
12431243 avio_wb32(pb, track->timescale); /* time scale (sample rate for audio) */
1244− (version == 1) ? avio_wb64(pb, track->trackDuration) : avio_wb32(pb, track->trackDuration); /* duration */
1244+ (version == 1) ? avio_wb64(pb, track->track_duration) : avio_wb32(pb, track->track_duration); /* duration */
12451245 avio_wb16(pb, track->language); /* language */
12461246 avio_wb16(pb, 0); /* reserved (quality) */
12471247
@@ -1263,12 +1263,12 @@ static int mov_write_mdia_tag(AVIOContext *pb, MOVTrack *track) · 15 unmodified lines
12631263 mov_write_mdhd_tag(pb, track);
12641264 mov_write_hdlr_tag(pb, track);
12651265 mov_write_minf_tag(pb, track);
1266− return updateSize(pb, pos);
1266+ return update_size(pb, pos);
12671267 }
12681268
12691269 static int mov_write_tkhd_tag(AVIOContext *pb, MOVTrack *track, AVStream *st)
12701270 {
1271− int64_t duration = av_rescale_rnd(track->trackDuration, MOV_TIMESCALE,
1271+ int64_t duration = av_rescale_rnd(track->track_duration, MOV_TIMESCALE,
12721272 track->timescale, AV_ROUND_UP);
12731273 int version = duration < INT32_MAX ? 0 : 1;
12741274
@@ -1283,7 +1283,7 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVTrack *track, AVStream *st) · 8 unmodified lines
12831283 avio_wb32(pb, track->time); /* creation time */
12841284 avio_wb32(pb, track->time); /* modification time */
12851285 }
1286− avio_wb32(pb, track->trackID); /* track-id */
1286+ avio_wb32(pb, track->track_id); /* track-id */
12871287 avio_wb32(pb, 0); /* reserved */
12881288 (version == 1) ? avio_wb64(pb, duration) : avio_wb32(pb, duration);
12891289
@@ -1352,13 +1352,13 @@ static int mov_write_tapt_tag(AVIOContext *pb, MOVTrack *track) · 62 unmodified lines
13521352 avio_wb32(pb, track->enc->width << 16);
13531353 avio_wb32(pb, track->enc->height << 16);
13541354
1355− return updateSize(pb, pos);
1355+ return update_size(pb, pos);
13561356 }
13571357
13581358 // This box seems important for the psp playback ... without it the movie seems to hang
13591359 static int mov_write_edts_tag(AVIOContext *pb, MOVTrack *track)
13601360 {
1361− int64_t duration = av_rescale_rnd(track->trackDuration, MOV_TIMESCALE,
1361+ int64_t duration = av_rescale_rnd(track->track_duration, MOV_TIMESCALE,
13621362 track->timescale, AV_ROUND_UP);
13631363 int version = duration < INT32_MAX ? 0 : 1;
13641364 int entry_size, entry_count, size;
@@ -1466,13 +1466,13 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov, · 101 unmodified lines
14661466 if (track->mode == MODE_PSP)
14671467 mov_write_uuid_tag_psp(pb,track); // PSP Movies require this uuid box
14681468 if (track->tag == MKTAG('r','t','p',' '))
1469− mov_write_udta_sdp(pb, track->rtp_ctx, track->trackID);
1469+ mov_write_udta_sdp(pb, track->rtp_ctx, track->track_id);
14701470 if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO && track->mode == MODE_MOV) {
14711471 double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio);
14721472 if (0.0 != sample_aspect_ratio && 1.0 != sample_aspect_ratio)
14731473 mov_write_tapt_tag(pb, track);
14741474 };
1475− return updateSize(pb, pos);
1475+ return update_size(pb, pos);
14761476 }
14771477
14781478 static int mov_write_iods_tag(AVIOContext *pb, MOVMuxContext *mov)
@@ -1494,14 +1494,14 @@ static int mov_write_iods_tag(AVIOContext *pb, MOVMuxContext *mov) · 15 unmodified lines
14941494 avio_wb32(pb, 0x0); /* size */
14951495 ffio_wfourcc(pb, "iods");
14961496 avio_wb32(pb, 0); /* version & flags */
1497− putDescr(pb, 0x10, 7);
1497+ put_descr(pb, 0x10, 7);
14981498 avio_wb16(pb, 0x004f);
14991499 avio_w8(pb, 0xff);
15001500 avio_w8(pb, 0xff);
15011501 avio_w8(pb, audio_profile);
15021502 avio_w8(pb, video_profile);
15031503 avio_w8(pb, 0xff);
1504− return updateSize(pb, pos);
1504+ return update_size(pb, pos);
15051505 }
15061506
15071507 static int mov_write_trex_tag(AVIOContext *pb, MOVTrack *track)
@@ -1509,7 +1509,7 @@ static int mov_write_trex_tag(AVIOContext *pb, MOVTrack *track) · 1 unmodified line
15091509 avio_wb32(pb, 0x20); /* size */
15101510 ffio_wfourcc(pb, "trex");
15111511 avio_wb32(pb, 0); /* version & flags */
1512− avio_wb32(pb, track->trackID); /* track ID */
1512+ avio_wb32(pb, track->track_id); /* track ID */
15131513 avio_wb32(pb, 1); /* default sample description index */
15141514 avio_wb32(pb, 0); /* default sample duration */
15151515 avio_wb32(pb, 0); /* default sample size */
@@ -1525,29 +1525,29 @@ static int mov_write_mvex_tag(AVIOContext *pb, MOVMuxContext *mov) · 9 unmodified lines
15251525 ffio_wfourcc(pb, "mvex");
15261526 for (i = 0; i < mov->nb_streams; i++)
15271527 mov_write_trex_tag(pb, &mov->tracks[i]);
1528− return updateSize(pb, pos);
1528+ return update_size(pb, pos);
15291529 }
15301530
15311531 static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov)
15321532 {
1533− int maxTrackID = 1, i;
1534− int64_t maxTrackLenTemp, maxTrackLen = 0;
1533+ int max_track_id = 1, i;
1534+ int64_t max_track_len_temp, max_track_len = 0;
15351535 int version;
15361536
15371537 for (i=0; i<mov->nb_streams; i++) {
15381538 if(mov->tracks[i].entry > 0) {
1539− maxTrackLenTemp = av_rescale_rnd(mov->tracks[i].trackDuration,
1540− MOV_TIMESCALE,
1541− mov->tracks[i].timescale,
1542− AV_ROUND_UP);
1543− if(maxTrackLen < maxTrackLenTemp)
1544− maxTrackLen = maxTrackLenTemp;
1545− if(maxTrackID < mov->tracks[i].trackID)
1546− maxTrackID = mov->tracks[i].trackID;
1539+ max_track_len_temp = av_rescale_rnd(mov->tracks[i].track_duration,
1540+ MOV_TIMESCALE,
1541+ mov->tracks[i].timescale,
1542+ AV_ROUND_UP);
1543+ if (max_track_len < max_track_len_temp)
1544+ max_track_len = max_track_len_temp;
1545+ if (max_track_id < mov->tracks[i].track_id)
1546+ max_track_id = mov->tracks[i].track_id;
15471547 }
15481548 }
15491549
1550− version = maxTrackLen < UINT32_MAX ? 0 : 1;
1550+ version = max_track_len < UINT32_MAX ? 0 : 1;
15511551 (version == 1) ? avio_wb32(pb, 120) : avio_wb32(pb, 108); /* size */
15521552 ffio_wfourcc(pb, "mvhd");
15531553 avio_w8(pb, version);
@@ -1560,7 +1560,7 @@ static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov) · 6 unmodified lines
15601560 avio_wb32(pb, mov->time); /* modification time */
15611561 }
15621562 avio_wb32(pb, MOV_TIMESCALE);
1563− (version == 1) ? avio_wb64(pb, maxTrackLen) : avio_wb32(pb, maxTrackLen); /* duration of longest track */
1563+ (version == 1) ? avio_wb64(pb, max_track_len) : avio_wb32(pb, max_track_len); /* duration of longest track */
15641564
15651565 avio_wb32(pb, 0x00010000); /* reserved (preferred rate) 1.0 = normal */
15661566 avio_wb16(pb, 0x0100); /* reserved (preferred volume) 1.0 = normal */
@@ -1585,7 +1585,7 @@ static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov) · 18 unmodified lines
15851585 avio_wb32(pb, 0); /* reserved (selection time) */
15861586 avio_wb32(pb, 0); /* reserved (selection duration) */
15871587 avio_wb32(pb, 0); /* reserved (current time) */
1588− avio_wb32(pb, maxTrackID+1); /* Next track id */
1588+ avio_wb32(pb, max_track_id + 1); /* Next track id */
15891589 return 0x6c;
15901590 }
15911591
@@ -1632,7 +1632,7 @@ static int mov_write_string_tag(AVIOContext *pb, const char *name, const char *v · 40 unmodified lines
16321632 avio_wb32(pb, 0); /* size */
16331633 ffio_wfourcc(pb, name);
16341634 mov_write_string_data_tag(pb, value, lang, long_style);
1635− size= updateSize(pb, pos);
1635+ size = update_size(pb, pos);
16361636 }
16371637 return size;
16381638 }
@@ -1708,7 +1708,7 @@ static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov, · 69 unmodified lines
17081708 mov_write_string_metadata(s, pb, "tven", "episode_id",1);
17091709 mov_write_string_metadata(s, pb, "tvnn", "network" , 1);
17101710 mov_write_trkn_tag(pb, mov, s);
1711− return updateSize(pb, pos);
1711+ return update_size(pb, pos);
17121712 }
17131713
17141714 /* iTunes meta data tag */
@@ -1722,7 +1722,7 @@ static int mov_write_meta_tag(AVIOContext *pb, MOVMuxContext *mov, · 7 unmodified lines
17221722 avio_wb32(pb, 0);
17231723 mov_write_itunes_hdlr_tag(pb, mov, s);
17241724 mov_write_ilst_tag(pb, mov, s);
1725− size = updateSize(pb, pos);
1725+ size = update_size(pb, pos);
17261726 return size;
17271727 }
17281728
@@ -1772,7 +1772,7 @@ static int mov_write_3gp_udta_tag(AVIOContext *pb, AVFormatContext *s, · 43 unmodified lines
17721772 (t = av_dict_get(s->metadata, "track", NULL, 0)))
17731773 avio_w8(pb, atoi(t->value));
17741774 }
1775− return updateSize(pb, pos);
1775+ return update_size(pb, pos);
17761776 }
17771777
17781778 static int mov_write_chpl_tag(AVIOContext *pb, AVFormatContext *s)
@@ -1798,7 +1798,7 @@ static int mov_write_chpl_tag(AVIOContext *pb, AVFormatContext *s) · 19 unmodified lines
17981798 } else
17991799 avio_w8(pb, 0);
18001800 }
1801− return updateSize(pb, pos);
1801+ return update_size(pb, pos);
18021802 }
18031803
18041804 static int mov_write_udta_tag(AVIOContext *pb, MOVMuxContext *mov,
@@ -1898,8 +1898,8 @@ static int mov_write_uuidusmt_tag(AVIOContext *pb, AVFormatContext *s) · 93 unmodified lines
18981898 // snprintf(dt,32,"%04d/%02d/%02d %02d:%02d:%02d",t_st->tm_year+1900,t_st->tm_mon+1,t_st->tm_mday,t_st->tm_hour,t_st->tm_min,t_st->tm_sec);
18991899 mov_write_psp_udta_tag(pb, "2006/04/01 11:11:11", "und", 0x03);
19001900
1901− updateSize(pb, pos2);
1902− return updateSize(pb, pos);
1901+ update_size(pb, pos2);
1902+ return update_size(pb, pos);
19031903 }
19041904
19051905 return 0;
@@ -1916,7 +1916,7 @@ static void build_chunks(MOVTrack *trk) · 10 unmodified lines
19161916 if(chunk->pos + chunkSize == trk->cluster[i].pos &&
19171917 chunkSize + trk->cluster[i].size < (1<<20)){
19181918 chunkSize += trk->cluster[i].size;
1919− chunk->samplesInChunk += trk->cluster[i].entries;
1919+ chunk->samples_in_chunk += trk->cluster[i].entries;
19201920 }else{
19211921 trk->cluster[i].chunkNum = chunk->chunkNum+1;
19221922 chunk=&trk->cluster[i];
@@ -1939,7 +1939,7 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, · 16 unmodified lines
19391939 continue;
19401940
19411941 mov->tracks[i].time = mov->time;
1942− mov->tracks[i].trackID = i+1;
1942+ mov->tracks[i].track_id = i+1;
19431943
19441944 build_chunks(&mov->tracks[i]);
19451945 }
@@ -1947,13 +1947,13 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, · 1 unmodified line
19471947 if (mov->chapter_track)
19481948 for (i=0; i<s->nb_streams; i++) {
19491949 mov->tracks[i].tref_tag = MKTAG('c','h','a','p');
1950− mov->tracks[i].tref_id = mov->tracks[mov->chapter_track].trackID;
1950+ mov->tracks[i].tref_id = mov->tracks[mov->chapter_track].track_id;
19511951 }
19521952 for (i = 0; i < mov->nb_streams; i++) {
19531953 if (mov->tracks[i].tag == MKTAG('r','t','p',' ')) {
19541954 mov->tracks[i].tref_tag = MKTAG('h','i','n','t');
19551955 mov->tracks[i].tref_id =
1956− mov->tracks[mov->tracks[i].src_track].trackID;
1956+ mov->tracks[mov->tracks[i].src_track].track_id;
19571957 }
19581958 }
19591959
@@ -1973,7 +1973,7 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, · 13 unmodified lines
19731973 else
19741974 mov_write_udta_tag(pb, mov, s);
19751975
1976− return updateSize(pb, pos);
1976+ return update_size(pb, pos);
19771977 }
19781978
19791979 static void param_write_int(AVIOContext *pb, const char *name, int value)
@@ -2040,7 +2040,7 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov) · 60 unmodified lines
20402040 for (i = 0; i < mov->nb_streams; i++) {
20412041 MOVTrack *track = &mov->tracks[i];
20422042 const char *type;
2043− /* track->trackID is initialized in write_moov, and thus isn't known
2043+ /* track->track_id is initialized in write_moov, and thus isn't known
20442044 * here yet */
20452045 int track_id = i + 1;
20462046
@@ -2095,7 +2095,7 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov) · 48 unmodified lines
20952095 avio_printf(pb, "</body>\n");
20962096 avio_printf(pb, "</smil>\n");
20972097
2098− return updateSize(pb, pos);
2098+ return update_size(pb, pos);
20992099 }
21002100
21012101 static int mov_write_mfhd_tag(AVIOContext *pb, MOVMuxContext *mov)
@@ -2129,7 +2129,7 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track, · 27 unmodified lines
21292129 avio_w8(pb, 0); /* version */
21302130 avio_wb24(pb, flags);
21312131
2132− avio_wb32(pb, track->trackID); /* track-id */
2132+ avio_wb32(pb, track->track_id); /* track-id */
21332133 if (flags & 0x01)
21342134 avio_wb64(pb, moof_offset);
21352135 if (flags & 0x08) {
@@ -2149,7 +2149,7 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track, · 13 unmodified lines
21492149 avio_wb32(pb, track->default_sample_flags);
21502150 }
21512151
2152− return updateSize(pb, pos);
2152+ return update_size(pb, pos);
21532153 }
21542154
21552155 static uint32_t get_sample_flags(MOVTrack *track, MOVIentry *entry)
@@ -2165,7 +2165,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVTrack *track) · 9 unmodified lines
21652165
21662166 for (i = 0; i < track->entry; i++) {
21672167 int64_t duration = i + 1 == track->entry ?
2168− track->trackDuration - track->cluster[i].dts + track->start_dts :
2168+ track->track_duration - track->cluster[i].dts + track->start_dts :
21692169 track->cluster[i + 1].dts - track->cluster[i].dts;
21702170 if (duration != track->default_duration)
21712171 flags |= 0x100; /* sample-duration-present */
@@ -2192,7 +2192,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVTrack *track) · 20 unmodified lines
21922192
21932193 for (i = 0; i < track->entry; i++) {
21942194 int64_t duration = i + 1 == track->entry ?
2195− track->trackDuration - track->cluster[i].dts + track->start_dts :
2195+ track->track_duration - track->cluster[i].dts + track->start_dts :
21962196 track->cluster[i + 1].dts - track->cluster[i].dts;
21972197 if (flags & 0x100)
21982198 avio_wb32(pb, duration);
@@ -2204,7 +2204,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVTrack *track) · 5 unmodified lines
22042204 avio_wb32(pb, track->cluster[i].cts);
22052205 }
22062206
2207− return updateSize(pb, pos);
2207+ return update_size(pb, pos);
22082208 }
22092209
22102210 static int mov_write_tfxd_tag(AVIOContext *pb, MOVTrack *track)
@@ -2221,10 +2221,10 @@ static int mov_write_tfxd_tag(AVIOContext *pb, MOVTrack *track) · 10 unmodified lines
22212221 avio_w8(pb, 1);
22222222 avio_wb24(pb, 0);
22232223 avio_wb64(pb, track->frag_start);
2224− avio_wb64(pb, track->start_dts + track->trackDuration -
2224+ avio_wb64(pb, track->start_dts + track->track_duration -
22252225 track->cluster[0].dts);
22262226
2227− return updateSize(pb, pos);
2227+ return update_size(pb, pos);
22282228 }
22292229
22302230 static int mov_write_tfrf_tag(AVIOContext *pb, MOVMuxContext *mov,
@@ -2300,7 +2300,7 @@ static int mov_write_traf_tag(AVIOContext *pb, MOVMuxContext *mov, · 69 unmodified lines
23002300 }
23012301 }
23022302
2303− return updateSize(pb, pos);
2303+ return update_size(pb, pos);
23042304 }
23052305
23062306 static int mov_write_moof_tag(AVIOContext *pb, MOVMuxContext *mov, int tracks)
@@ -2334,7 +2334,7 @@ static int mov_write_moof_tag(AVIOContext *pb, MOVMuxContext *mov, int tracks) · 27 unmodified lines
23342334 }
23352335 avio_seek(pb, end, SEEK_SET);
23362336
2337− return updateSize(pb, pos);
2337+ return update_size(pb, pos);
23382338 }
23392339
23402340 static int mov_write_tfra_tag(AVIOContext *pb, MOVTrack *track)
@@ -2347,7 +2347,7 @@ static int mov_write_tfra_tag(AVIOContext *pb, MOVTrack *track) · 6 unmodified lines
23472347 avio_w8(pb, 1); /* version */
23482348 avio_wb24(pb, 0);
23492349
2350− avio_wb32(pb, track->trackID);
2350+ avio_wb32(pb, track->track_id);
23512351 avio_wb32(pb, 0); /* length of traf/trun/sample num */
23522352 avio_wb32(pb, track->nb_frag_info);
23532353 for (i = 0; i < track->nb_frag_info; i++) {
@@ -2358,7 +2358,7 @@ static int mov_write_tfra_tag(AVIOContext *pb, MOVTrack *track) · 4 unmodified lines
23582358 avio_w8(pb, 1); /* sample number */
23592359 }
23602360
2361− return updateSize(pb, pos);
2361+ return update_size(pb, pos);
23622362 }
23632363
23642364 static int mov_write_mfra_tag(AVIOContext *pb, MOVMuxContext *mov)
@@ -2371,7 +2371,7 @@ static int mov_write_mfra_tag(AVIOContext *pb, MOVMuxContext *mov) · 6 unmodified lines
23712371 /* An empty mfra atom is enough to indicate to the publishing point that
23722372 * the stream has ended. */
23732373 if (mov->flags & FF_MOV_FLAG_ISML)
2374− return updateSize(pb, pos);
2374+ return update_size(pb, pos);
23752375
23762376 for (i = 0; i < mov->nb_streams; i++) {
23772377 MOVTrack *track = &mov->tracks[i];
@@ -2384,7 +2384,7 @@ static int mov_write_mfra_tag(AVIOContext *pb, MOVMuxContext *mov) · 6 unmodified lines
23842384 avio_wb32(pb, 0); /* version + flags */
23852385 avio_wb32(pb, avio_tell(pb) + 4 - pos);
23862386
2387− return updateSize(pb, pos);
2387+ return update_size(pb, pos);
23882388 }
23892389
23902390 static int mov_write_mdat_tag(AVIOContext *pb, MOVMuxContext *mov)
@@ -2457,17 +2457,17 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s) · 66 unmodified lines
24572457 ffio_wfourcc(pb, "MSNV");
24582458 else if (mov->mode == MODE_MP4)
24592459 ffio_wfourcc(pb, "mp41");
2460− return updateSize(pb, pos);
2460+ return update_size(pb, pos);
24612461 }
24622462
24632463 static void mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s)
24642464 {
2465− AVCodecContext *VideoCodec = s->streams[0]->codec;
2466− AVCodecContext *AudioCodec = s->streams[1]->codec;
2467− int AudioRate = AudioCodec->sample_rate;
2468− int FrameRate = ((VideoCodec->time_base.den) * (0x10000))/ (VideoCodec->time_base.num);
2469− int audio_kbitrate= AudioCodec->bit_rate / 1000;
2470− int video_kbitrate= FFMIN(VideoCodec->bit_rate / 1000, 800 - audio_kbitrate);
2465+ AVCodecContext *video_codec = s->streams[0]->codec;
2466+ AVCodecContext *audio_codec = s->streams[1]->codec;
2467+ int audio_rate = audio_codec->sample_rate;
2468+ int frame_rate = ((video_codec->time_base.den) * (0x10000))/ (video_codec->time_base.num);
2469+ int audio_kbitrate = audio_codec->bit_rate / 1000;
2470+ int video_kbitrate = FFMIN(video_codec->bit_rate / 1000, 800 - audio_kbitrate);
24712471
24722472 avio_wb32(pb, 0x94); /* size */
24732473 ffio_wfourcc(pb, "uuid");
@@ -2495,14 +2495,14 @@ static void mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s) · 21 unmodified lines
24952495 avio_wb32(pb, 0x0);
24962496 avio_wb32(pb, audio_kbitrate);
24972497 avio_wb32(pb, audio_kbitrate);
2498− avio_wb32(pb, AudioRate);
2499− avio_wb32(pb, AudioCodec->channels);
2498+ avio_wb32(pb, audio_rate);
2499+ avio_wb32(pb, audio_codec->channels);
25002500
25012501 avio_wb32(pb, 0x34); /* size */
25022502 ffio_wfourcc(pb, "VPRF"); /* video */
25032503 avio_wb32(pb, 0x0);
25042504 avio_wb32(pb, 0x1); /* TrackID */
2505− if (VideoCodec->codec_id == CODEC_ID_H264) {
2505+ if (video_codec->codec_id == CODEC_ID_H264) {
25062506 ffio_wfourcc(pb, "avc1");
25072507 avio_wb16(pb, 0x014D);
25082508 avio_wb16(pb, 0x0015);
@@ -2514,10 +2514,10 @@ static void mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s) · 5 unmodified lines
25142514 avio_wb32(pb, 0x0);
25152515 avio_wb32(pb, video_kbitrate);
25162516 avio_wb32(pb, video_kbitrate);
2517− avio_wb32(pb, FrameRate);
2518− avio_wb32(pb, FrameRate);
2519− avio_wb16(pb, VideoCodec->width);
2520− avio_wb16(pb, VideoCodec->height);
2517+ avio_wb32(pb, frame_rate);
2518+ avio_wb32(pb, frame_rate);
2519+ avio_wb16(pb, video_codec->width);
2520+ avio_wb16(pb, video_codec->height);
25212521 avio_wb32(pb, 0x010001); /* ? */
25222522 }
25232523
@@ -2569,7 +2569,7 @@ static int mov_flush_fragment(AVFormatContext *s) · 45 unmodified lines
25692569 for (i = 0; i < mov->nb_streams; i++) {
25702570 if (mov->tracks[i].entry)
25712571 mov->tracks[i].frag_start += mov->tracks[i].start_dts +
2572− mov->tracks[i].trackDuration -
2572+ mov->tracks[i].track_duration -
25732573 mov->tracks[i].cluster[0].dts;
25742574 mov->tracks[i].entry = 0;
25752575 }
@@ -2600,7 +2600,7 @@ static int mov_flush_fragment(AVFormatContext *s) · 24 unmodified lines
26002600 int64_t duration = 0;
26012601
26022602 if (track->entry)
2603− duration = track->start_dts + track->trackDuration -
2603+ duration = track->start_dts + track->track_duration -
26042604 track->cluster[0].dts;
26052605 if (mov->flags & FF_MOV_FLAG_SEPARATE_MOOF) {
26062606 if (!track->mdat_buf)
@@ -2656,7 +2656,7 @@ static int mov_write_packet_internal(AVFormatContext *s, AVPacket *pkt) · 49 unmodified lines
26562656 AVIOContext *pb = s->pb;
26572657 MOVTrack *trk = &mov->tracks[pkt->stream_index];
26582658 AVCodecContext *enc = trk->enc;
2659− unsigned int samplesInChunk = 0;
2659+ unsigned int samples_in_chunk = 0;
26602660 int size= pkt->size;
26612661 uint8_t *reformatted_data = NULL;
26622662
@@ -2691,30 +2691,30 @@ static int mov_write_packet_internal(AVFormatContext *s, AVPacket *pkt) · 28 unmodified lines
26912691 {13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 1};
26922692 int len = 0;
26932693
2694− while (len < size && samplesInChunk < 100) {
2694+ while (len < size && samples_in_chunk < 100) {
26952695 len += packed_size[(pkt->data[len] >> 3) & 0x0F];
2696− samplesInChunk++;
2696+ samples_in_chunk++;
26972697 }
2698− if(samplesInChunk > 1){
2698+ if (samples_in_chunk > 1) {
26992699 av_log(s, AV_LOG_ERROR, "fatal error, input is not a single packet, implement a AVParser for it\n");
27002700 return -1;
27012701 }
27022702 } else if (enc->codec_id == CODEC_ID_ADPCM_MS ||
27032703 enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {
2704− samplesInChunk = enc->frame_size;
2705− } else if (trk->sampleSize)
2706− samplesInChunk = size/trk->sampleSize;
2704+ samples_in_chunk = enc->frame_size;
2705+ } else if (trk->sample_size)
2706+ samples_in_chunk = size / trk->sample_size;
27072707 else
2708− samplesInChunk = 1;
2708+ samples_in_chunk = 1;
27092709
27102710 /* copy extradata if it exists */
2711− if (trk->vosLen == 0 && enc->extradata_size > 0) {
2712− trk->vosLen = enc->extradata_size;
2713− trk->vosData = av_malloc(trk->vosLen);
2714− memcpy(trk->vosData, enc->extradata, trk->vosLen);
2711+ if (trk->vos_len == 0 && enc->extradata_size > 0) {
2712+ trk->vos_len = enc->extradata_size;
2713+ trk->vos_data = av_malloc(trk->vos_len);
2714+ memcpy(trk->vos_data, enc->extradata, trk->vos_len);
27152715 }
27162716
2717− if (enc->codec_id == CODEC_ID_H264 && trk->vosLen > 0 && *(uint8_t *)trk->vosData != 1) {
2717+ if (enc->codec_id == CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
27182718 /* from x264 or from bytestream h264 */
27192719 /* nal reformating needed */
27202720 if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) {
@@ -2733,13 +2733,13 @@ static int mov_write_packet_internal(AVFormatContext *s, AVPacket *pkt) · 12 unmodified lines
27332733 }
27342734
27352735 if ((enc->codec_id == CODEC_ID_DNXHD ||
2736− enc->codec_id == CODEC_ID_AC3) && !trk->vosLen) {
2736+ enc->codec_id == CODEC_ID_AC3) && !trk->vos_len) {
27372737 /* copy frame to create needed atoms */
2738− trk->vosLen = size;
2739− trk->vosData = av_malloc(size);
2740− if (!trk->vosData)
2738+ trk->vos_len = size;
2739+ trk->vos_data = av_malloc(size);
2740+ if (!trk->vos_data)
27412741 return AVERROR(ENOMEM);
2742− memcpy(trk->vosData, pkt->data, size);
2742+ memcpy(trk->vos_data, pkt->data, size);
27432743 }
27442744
27452745 if (!(trk->entry % MOV_INDEX_CLUSTER_SIZE)) {
@@ -2749,21 +2749,21 @@ static int mov_write_packet_internal(AVFormatContext *s, AVPacket *pkt) · 3 unmodified lines
27492749 }
27502750
27512751 trk->cluster[trk->entry].pos = avio_tell(pb) - size;
2752− trk->cluster[trk->entry].samplesInChunk = samplesInChunk;
2752+ trk->cluster[trk->entry].samples_in_chunk = samples_in_chunk;
27532753 trk->cluster[trk->entry].chunkNum = 0;
27542754 trk->cluster[trk->entry].size = size;
2755− trk->cluster[trk->entry].entries = samplesInChunk;
2755+ trk->cluster[trk->entry].entries = samples_in_chunk;
27562756 trk->cluster[trk->entry].dts = pkt->dts;
27572757 if (!trk->entry && trk->start_dts != AV_NOPTS_VALUE) {
27582758 /* First packet of a new fragment. We already wrote the duration
2759− * of the last packet of the previous fragment based on trackDuration,
2759+ * of the last packet of the previous fragment based on track_duration,
27602760 * which might not exactly match our dts. Therefore adjust the dts
27612761 * of this packet to be what the previous packets duration implies. */
2762− trk->cluster[trk->entry].dts = trk->start_dts + trk->trackDuration;
2762+ trk->cluster[trk->entry].dts = trk->start_dts + trk->track_duration;
27632763 }
27642764 if (trk->start_dts == AV_NOPTS_VALUE)
27652765 trk->start_dts = pkt->dts;
2766− trk->trackDuration = pkt->dts - trk->start_dts + pkt->duration;
2766+ trk->track_duration = pkt->dts - trk->start_dts + pkt->duration;
27672767
27682768 if (pkt->pts == AV_NOPTS_VALUE) {
27692769 av_log(s, AV_LOG_WARNING, "pts has no value\n");
@@ -2783,10 +2783,10 @@ static int mov_write_packet_internal(AVFormatContext *s, AVPacket *pkt) · 13 unmodified lines
27832783 trk->cluster[trk->entry].flags = MOV_SYNC_SAMPLE;
27842784 }
27852785 if (trk->cluster[trk->entry].flags & MOV_SYNC_SAMPLE)
2786− trk->hasKeyframes++;
2786+ trk->has_keyframes++;
27872787 }
27882788 trk->entry++;
2789− trk->sampleCount += samplesInChunk;
2789+ trk->sample_count += samples_in_chunk;
27902790 mov->mdat_size += size;
27912791
27922792 avio_flush(pb);
@@ -2949,12 +2949,12 @@ static int mov_write_header(AVFormatContext *s) · 156 unmodified lines
29492949 av_log(s, AV_LOG_ERROR, "track %d: codec block align is not set for adpcm\n", i);
29502950 goto error;
29512951 }
2952− track->sampleSize = st->codec->block_align;
2952+ track->sample_size = st->codec->block_align;
29532953 }else if(st->codec->frame_size > 1){ /* assume compressed audio */
29542954 track->audio_vbr = 1;
29552955 }else{
29562956 st->codec->frame_size = 1;
2957− track->sampleSize = (av_get_bits_per_sample(st->codec->codec_id) >> 3) * st->codec->channels;
2957+ track->sample_size = (av_get_bits_per_sample(st->codec->codec_id) >> 3) * st->codec->channels;
29582958 }
29592959 if (track->mode != MODE_MOV) {
29602960 if (track->timescale > UINT16_MAX) {
@@ -2982,9 +2982,9 @@ static int mov_write_header(AVFormatContext *s) · 21 unmodified lines
29822982
29832983 /* copy extradata if it exists */
29842984 if (st->codec->extradata_size) {
2985− track->vosLen = st->codec->extradata_size;
2986− track->vosData = av_malloc(track->vosLen);
2987− memcpy(track->vosData, st->codec->extradata, track->vosLen);
2985+ track->vos_len = st->codec->extradata_size;
2986+ track->vos_data = av_malloc(track->vos_len);
2987+ memcpy(track->vos_data, st->codec->extradata, track->vos_len);
29882988 }
29892989 }
29902990
@@ -3101,7 +3101,8 @@ static int mov_write_trailer(AVFormatContext *s) · 110 unmodified lines
31013101 av_freep(&mov->tracks[i].cluster);
31023102 av_freep(&mov->tracks[i].frag_info);
31033103
3104− if(mov->tracks[i].vosLen) av_free(mov->tracks[i].vosData);
3104+ if (mov->tracks[i].vos_len)
3105+ av_free(mov->tracks[i].vos_data);
31053106
31063107 }
31073108
libavformat/movenc.h+8−8
@@ -44,7 +44,7 @@ typedef struct MOVIentry { · 43 unmodified lines
4444 uint64_t pos;
4545 int64_t dts;
4646 unsigned int size;
47− unsigned int samplesInChunk;
47+ unsigned int samples_in_chunk;
4848 unsigned int chunkNum; ///< Chunk number if the current entry is a chunk start otherwise 0
4949 unsigned int entries;
5050 int cts;
@@ -79,21 +79,21 @@ typedef struct MOVIndex { · 28 unmodified lines
7979 int entry;
8080 unsigned timescale;
8181 uint64_t time;
82− int64_t trackDuration;
83− long sampleCount;
84− long sampleSize;
82+ int64_t track_duration;
83+ long sample_count;
84+ long sample_size;
8585 long chunkCount;
86− int hasKeyframes;
86+ int has_keyframes;
8787 #define MOV_TRACK_CTTS 0x0001
8888 #define MOV_TRACK_STPS 0x0002
8989 uint32_t flags;
9090 int language;
91− int trackID;
91+ int track_id;
9292 int tag; ///< stsd fourcc
9393 AVCodecContext *enc;
9494
95− int vosLen;
96− uint8_t *vosData;
95+ int vos_len;
96+ uint8_t *vos_data;
9797 MOVIentry *cluster;
9898 int audio_vbr;
9999 int height; ///< active picture (w/o VBI) height for D-10/IMX
libavformat/mpegtsenc.c+1−1
@@ -991,7 +991,7 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt) · 990 unmodified lines
991991
992992 if (pkt->size < 5 || AV_RB32(pkt->data) != 0x0000001) {
993993 av_log(s, AV_LOG_ERROR, "H.264 bitstream malformed, "
994− "no startcode found, use the h264_mp4toannexb bitstream filter\n");
994+ "no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)\n");
995995 return AVERROR_INVALIDDATA;
996996 }
997997
libavformat/nsvdec.c+11−2
@@ -313,7 +313,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) · 312 unmodified lines
313313 char *token, *value;
314314 char quote;
315315
316− p = strings = av_mallocz(strings_size + 1);
316+ p = strings = av_mallocz((size_t)strings_size + 1);
317317 if (!p)
318318 return AVERROR(ENOMEM);
319319 endp = strings + strings_size;
@@ -350,6 +350,8 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) · 30 unmodified lines
350350 if((unsigned)table_entries_used >= UINT_MAX / sizeof(uint32_t))
351351 return -1;
352352 nsv->nsvs_file_offset = av_malloc((unsigned)table_entries_used * sizeof(uint32_t));
353+ if (!nsv->nsvs_file_offset)
354+ return AVERROR(ENOMEM);
353355
354356 for(i=0;i<table_entries_used;i++)
355357 nsv->nsvs_file_offset[i] = avio_rl32(pb) + size;
@@ -357,6 +359,8 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) · 1 unmodified line
357359 if(table_entries > table_entries_used &&
358360 avio_rl32(pb) == MKTAG('T','O','C','2')) {
359361 nsv->nsvs_timestamps = av_malloc((unsigned)table_entries_used*sizeof(uint32_t));
362+ if (!nsv->nsvs_timestamps)
363+ return AVERROR(ENOMEM);
360364 for(i=0;i<table_entries_used;i++) {
361365 nsv->nsvs_timestamps[i] = avio_rl32(pb);
362366 }
@@ -527,11 +531,16 @@ static int nsv_read_header(AVFormatContext *s) · 164 unmodified lines
527531 for (i = 0; i < NSV_MAX_RESYNC_TRIES; i++) {
528532 if (nsv_resync(s) < 0)
529533 return -1;
530− if (nsv->state == NSV_FOUND_NSVF)
534+ if (nsv->state == NSV_FOUND_NSVF) {
531535 err = nsv_parse_NSVf_header(s);
536+ if (err < 0)
537+ return err;
538+ }
532539 /* we need the first NSVs also... */
533540 if (nsv->state == NSV_FOUND_NSVS) {
534541 err = nsv_parse_NSVs_header(s);
542+ if (err < 0)
543+ return err;
535544 break; /* we just want the first one */
536545 }
537546 }
libavformat/rtsp.c+0−1
@@ -1352,7 +1352,6 @@ int ff_rtsp_connect(AVFormatContext *s) · 1351 unmodified lines
13521352 {
13531353 RTSPState *rt = s->priv_data;
13541354 char host[1024], path[1024], tcpname[1024], cmd[2048], auth[128];
1355− char *option_list, *option, *filename;
13561355 int port, err, tcp_fd;
13571356 RTSPMessageHeader reply1 = {0}, *reply = &reply1;
13581357 int lower_transport_mask = 0;
libavformat/utils.c+5−1
@@ -2988,7 +2988,11 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options) · 2987 unmodified lines
29882988 if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)
29892989 && FFABS(av_q2d(st->sample_aspect_ratio) - av_q2d(st->codec->sample_aspect_ratio)) > 0.004*av_q2d(st->sample_aspect_ratio)
29902990 ){
2991− av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder and muxer layer\n");
2991+ av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder "
2992+ "(%d/%d) and muxer layer (%d/%d)\n",
2993+ st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
2994+ st->codec->sample_aspect_ratio.num,
2995+ st->codec->sample_aspect_ratio.den);
29922996 ret = AVERROR(EINVAL);
29932997 goto fail;
29942998 }
libavformat/yuv4mpeg.c+3−0
@@ -249,6 +249,9 @@ static int yuv4_read_header(AVFormatContext *s) · 248 unmodified lines
249249 } else if (strncmp("420paldv", tokstart, 8) == 0) {
250250 pix_fmt = PIX_FMT_YUV420P;
251251 chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
252+ } else if (strncmp("420", tokstart, 3) == 0) {
253+ pix_fmt = PIX_FMT_YUV420P;
254+ chroma_sample_location = AVCHROMA_LOC_CENTER;
252255 } else if (strncmp("411", tokstart, 3) == 0)
253256 pix_fmt = PIX_FMT_YUV411P;
254257 else if (strncmp("422", tokstart, 3) == 0)
libavutil/Makefile+1−0
@@ -19,6 +19,7 @@ HEADERS = adler32.h \ · 18 unmodified lines
1919 fifo.h \
2020 file.h \
2121 imgutils.h \
22+ intfloat.h \
2223 intfloat_readwrite.h \
2324 intreadwrite.h \
2425 lfg.h \
libavutil/avutil.h+2−2
@@ -154,8 +154,8 @@ · 153 unmodified lines
154154 */
155155
156156 #define LIBAVUTIL_VERSION_MAJOR 51
157−#define LIBAVUTIL_VERSION_MINOR 35
158−#define LIBAVUTIL_VERSION_MICRO 101
157+#define LIBAVUTIL_VERSION_MINOR 36
158+#define LIBAVUTIL_VERSION_MICRO 100
159159
160160 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
161161 LIBAVUTIL_VERSION_MINOR, \
libswscale/swscale.c+1−1
@@ -2804,7 +2804,7 @@ static int swScale(SwsContext *c, const uint8_t* src[], · 2803 unmodified lines
28042804 }
28052805 }
28062806
2807− if (isPlanarYUV(dstFormat) && isALPHA(dstFormat) && !alpPixBuf)
2807+ if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf)
28082808 fillPlane(dst[3], dstStride[3], dstW, dstY-lastDstY, lastDstY, 255);
28092809
28102810 #if HAVE_MMX2
tests/Makefile+6−8
@@ -14,20 +14,18 @@ ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw · 13 unmodified lines
1414 @echo
1515 $(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
1616
17−tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
18− @mkdir -p tests/vsynth1
17+OBJDIRS += tests/data tests/vsynth1 tests/vsynth2
18+
19+tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF) | tests/vsynth1
1920 $(M)./$< 'tests/vsynth1/'
2021
21−tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
22− @mkdir -p tests/vsynth2
22+tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF) | tests/vsynth2
2323 $(M)./$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
2424
25−tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF)
26− @mkdir -p tests/data
25+tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF) | tests/data
2726 $(M)./$< $@
2827
29−tests/data/asynth-16000-1.sw: tests/audiogen$(HOSTEXESUF)
30− @mkdir -p tests/data
28+tests/data/asynth-16000-1.sw: tests/audiogen$(HOSTEXESUF) | tests/data
3129 $(M)./$< $@ 16000 1
3230
3331 tests/data/mapchan-6ch.sw: tests/audiogen$(HOSTEXESUF)

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