Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: patched-ffmpeg-mt/libavformat/oggparsedirac.c

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 David Conrad 2 * Copyright (C) 2008 David Conrad
3 * 3 *
4 * This file is part of FFmpeg. 4 * This file is part of FFmpeg.
5 * 5 *
6 * FFmpeg is free software; you can redistribute it and/or 6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version. 9 * version 2.1 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 29 matching lines...) Expand all
40 return -1; 40 return -1;
41 41
42 st->codec->codec_type = CODEC_TYPE_VIDEO; 42 st->codec->codec_type = CODEC_TYPE_VIDEO;
43 st->codec->codec_id = CODEC_ID_DIRAC; 43 st->codec->codec_id = CODEC_ID_DIRAC;
44 // dirac in ogg always stores timestamps as though the video were interlaced 44 // dirac in ogg always stores timestamps as though the video were interlaced
45 st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_bas e.den}; 45 st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_bas e.den};
46 return 1; 46 return 1;
47 } 47 }
48 48
49 // various undocument things: granule is signed (only for dirac!) 49 // various undocument things: granule is signed (only for dirac!)
50 static uint64_t dirac_gptopts(AVFormatContext *s, int idx, int64_t gp, 50 static uint64_t dirac_gptopts(AVFormatContext *s, int idx, uint64_t granule,
51 int64_t *dts_out) 51 int64_t *dts_out)
52 { 52 {
53 int64_t gp = granule;
53 struct ogg *ogg = s->priv_data; 54 struct ogg *ogg = s->priv_data;
54 struct ogg_stream *os = ogg->streams + idx; 55 struct ogg_stream *os = ogg->streams + idx;
55 56
56 unsigned dist = ((gp >> 14) & 0xff00) | (gp & 0xff); 57 unsigned dist = ((gp >> 14) & 0xff00) | (gp & 0xff);
57 int64_t dts = (gp >> 31); 58 int64_t dts = (gp >> 31);
58 int64_t pts = dts + ((gp >> 9) & 0x1fff); 59 int64_t pts = dts + ((gp >> 9) & 0x1fff);
59 60
60 if (!dist) 61 if (!dist)
61 os->pflags |= PKT_FLAG_KEY; 62 os->pflags |= PKT_FLAG_KEY;
62 63
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 .granule_is_start = 1, 106 .granule_is_start = 1,
106 }; 107 };
107 108
108 const struct ogg_codec ff_old_dirac_codec = { 109 const struct ogg_codec ff_old_dirac_codec = {
109 .magic = "KW-DIRAC", 110 .magic = "KW-DIRAC",
110 .magicsize = 8, 111 .magicsize = 8,
111 .header = old_dirac_header, 112 .header = old_dirac_header,
112 .gptopts = old_dirac_gptopts, 113 .gptopts = old_dirac_gptopts,
113 .granule_is_start = 1, 114 .granule_is_start = 1,
114 }; 115 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698