diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-06-24 18:48:04 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-06-24 18:48:04 +0000 |
commit | d7ee0fe076e5fd15c9bf1d46af266a5871dbe3c7 (patch) | |
tree | bad659cbb722350d491ac703b93044a5ae542d0f | |
parent | 9079cddd832366fce51d853926cba3bad14837d4 (diff) | |
download | rockbox-d7ee0fe076e5fd15c9bf1d46af266a5871dbe3c7.tar.gz rockbox-d7ee0fe076e5fd15c9bf1d46af266a5871dbe3c7.zip |
Housekeeping. Comment musepack code seqments unused in rockbox.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27111 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/codecs/libmusepack/internal.h | 3 | ||||
-rw-r--r-- | apps/codecs/libmusepack/mpc_decoder.c | 2 | ||||
-rw-r--r-- | apps/codecs/libmusepack/mpc_demux.c | 10 | ||||
-rw-r--r-- | apps/codecs/libmusepack/mpcdec.h | 10 |
4 files changed, 23 insertions, 2 deletions
diff --git a/apps/codecs/libmusepack/internal.h b/apps/codecs/libmusepack/internal.h index c4d789f617..760f50b02d 100644 --- a/apps/codecs/libmusepack/internal.h +++ b/apps/codecs/libmusepack/internal.h | |||
@@ -78,10 +78,11 @@ struct mpc_demux_t { | |||
78 | mpc_uint32_t seek_table_size; /// used size in seek_table | 78 | mpc_uint32_t seek_table_size; /// used size in seek_table |
79 | 79 | ||
80 | // chapters | 80 | // chapters |
81 | /* rockbox: not used | ||
81 | mpc_seek_t chap_pos; /// supposed position of the first chapter block | 82 | mpc_seek_t chap_pos; /// supposed position of the first chapter block |
82 | mpc_int_t chap_nb; /// number of chapters (-1 if unknown, 0 if no chapter) | 83 | mpc_int_t chap_nb; /// number of chapters (-1 if unknown, 0 if no chapter) |
83 | mpc_chap_info * chap; /// chapters position and tag | 84 | mpc_chap_info * chap; /// chapters position and tag |
84 | 85 | */ | |
85 | }; | 86 | }; |
86 | 87 | ||
87 | /** | 88 | /** |
diff --git a/apps/codecs/libmusepack/mpc_decoder.c b/apps/codecs/libmusepack/mpc_decoder.c index 7032049c7a..7ff677aa27 100644 --- a/apps/codecs/libmusepack/mpc_decoder.c +++ b/apps/codecs/libmusepack/mpc_decoder.c | |||
@@ -272,10 +272,12 @@ mpc_decoder * mpc_decoder_init(mpc_streaminfo *si) | |||
272 | return p_tmp; | 272 | return p_tmp; |
273 | } | 273 | } |
274 | 274 | ||
275 | /* rockbox: not used | ||
275 | void mpc_decoder_exit(mpc_decoder *d) | 276 | void mpc_decoder_exit(mpc_decoder *d) |
276 | { | 277 | { |
277 | (void)d; | 278 | (void)d; |
278 | } | 279 | } |
280 | */ | ||
279 | 281 | ||
280 | void mpc_decoder_decode_frame(mpc_decoder * d, | 282 | void mpc_decoder_decode_frame(mpc_decoder * d, |
281 | mpc_bits_reader * r, | 283 | mpc_bits_reader * r, |
diff --git a/apps/codecs/libmusepack/mpc_demux.c b/apps/codecs/libmusepack/mpc_demux.c index 70ac3bd416..9b47802ac2 100644 --- a/apps/codecs/libmusepack/mpc_demux.c +++ b/apps/codecs/libmusepack/mpc_demux.c | |||
@@ -155,7 +155,7 @@ mpc_demux_seek(mpc_demux * d, mpc_seek_t fpos, mpc_uint32_t min_bytes) { | |||
155 | * @param d demuxer context | 155 | * @param d demuxer context |
156 | * @return current stream position in bits | 156 | * @return current stream position in bits |
157 | */ | 157 | */ |
158 | mpc_seek_t mpc_demux_pos(mpc_demux * d) | 158 | static mpc_seek_t mpc_demux_pos(mpc_demux * d) |
159 | { | 159 | { |
160 | return (((mpc_seek_t)(d->r->tell(d->r)) - d->bytes_total + | 160 | return (((mpc_seek_t)(d->r->tell(d->r)) - d->bytes_total + |
161 | d->bits_reader.buff - d->buffer) << 3) + 8 - d->bits_reader.count; | 161 | d->bits_reader.buff - d->buffer) << 3) + 8 - d->bits_reader.count; |
@@ -300,8 +300,10 @@ static void mpc_demux_SP(mpc_demux * d, int size, int block_size) | |||
300 | mpc_demux_seek(d, (ptr - size) * 8 + cur, 11); | 300 | mpc_demux_seek(d, (ptr - size) * 8 + cur, 11); |
301 | st_head_size = mpc_bits_get_block(&d->bits_reader, &b); | 301 | st_head_size = mpc_bits_get_block(&d->bits_reader, &b); |
302 | if (memcmp(b.key, "ST", 2) == 0) { | 302 | if (memcmp(b.key, "ST", 2) == 0) { |
303 | /* rockbox: not used | ||
303 | d->chap_pos = (ptr - size + b.size + st_head_size) * 8 + cur; | 304 | d->chap_pos = (ptr - size + b.size + st_head_size) * 8 + cur; |
304 | d->chap_nb = -1; | 305 | d->chap_nb = -1; |
306 | */ | ||
305 | mpc_demux_fill(d, (mpc_uint32_t) b.size, 0); | 307 | mpc_demux_fill(d, (mpc_uint32_t) b.size, 0); |
306 | mpc_demux_ST(d); | 308 | mpc_demux_ST(d); |
307 | } | 309 | } |
@@ -480,7 +482,9 @@ mpc_demux * mpc_demux_init(mpc_reader * p_reader) | |||
480 | memset(p_tmp, 0, sizeof(mpc_demux)); | 482 | memset(p_tmp, 0, sizeof(mpc_demux)); |
481 | p_tmp->buffer = g_buffer; | 483 | p_tmp->buffer = g_buffer; |
482 | p_tmp->r = p_reader; | 484 | p_tmp->r = p_reader; |
485 | /* rockbox: not used | ||
483 | p_tmp->chap_nb = -1; | 486 | p_tmp->chap_nb = -1; |
487 | */ | ||
484 | mpc_demux_clear_buff(p_tmp); | 488 | mpc_demux_clear_buff(p_tmp); |
485 | if (mpc_demux_header(p_tmp) == MPC_STATUS_OK && | 489 | if (mpc_demux_header(p_tmp) == MPC_STATUS_OK && |
486 | mpc_demux_seek_init(p_tmp) == MPC_STATUS_OK) { | 490 | mpc_demux_seek_init(p_tmp) == MPC_STATUS_OK) { |
@@ -495,11 +499,13 @@ mpc_demux * mpc_demux_init(mpc_reader * p_reader) | |||
495 | return p_tmp; | 499 | return p_tmp; |
496 | } | 500 | } |
497 | 501 | ||
502 | /* rockbox: not used | ||
498 | void mpc_demux_exit(mpc_demux * d) | 503 | void mpc_demux_exit(mpc_demux * d) |
499 | { | 504 | { |
500 | mpc_decoder_exit(d->d); | 505 | mpc_decoder_exit(d->d); |
501 | memset(d->seek_table, 0, sizeof(g_seek_table)); | 506 | memset(d->seek_table, 0, sizeof(g_seek_table)); |
502 | } | 507 | } |
508 | */ | ||
503 | 509 | ||
504 | void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i) | 510 | void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i) |
505 | { | 511 | { |
@@ -567,10 +573,12 @@ error: | |||
567 | return MPC_STATUS_INVALIDSV; | 573 | return MPC_STATUS_INVALIDSV; |
568 | } | 574 | } |
569 | 575 | ||
576 | /* rockbox: not used | ||
570 | mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds) | 577 | mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds) |
571 | { | 578 | { |
572 | return mpc_demux_seek_sample(d, (mpc_int64_t)(seconds * (double)d->si.sample_freq + 0.5)); | 579 | return mpc_demux_seek_sample(d, (mpc_int64_t)(seconds * (double)d->si.sample_freq + 0.5)); |
573 | } | 580 | } |
581 | */ | ||
574 | 582 | ||
575 | mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample) | 583 | mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample) |
576 | { | 584 | { |
diff --git a/apps/codecs/libmusepack/mpcdec.h b/apps/codecs/libmusepack/mpcdec.h index be18cfec95..f6aab9b16e 100644 --- a/apps/codecs/libmusepack/mpcdec.h +++ b/apps/codecs/libmusepack/mpcdec.h | |||
@@ -95,6 +95,7 @@ typedef struct mpc_frame_info_t { | |||
95 | mpc_bool_t is_key_frame; /// 1 if this frame is a key frame (first in block) 0 else. Set by the demuxer. | 95 | mpc_bool_t is_key_frame; /// 1 if this frame is a key frame (first in block) 0 else. Set by the demuxer. |
96 | } mpc_frame_info; | 96 | } mpc_frame_info; |
97 | 97 | ||
98 | /* rockbox: not used | ||
98 | typedef struct mpc_chap_info_t { | 99 | typedef struct mpc_chap_info_t { |
99 | mpc_uint64_t sample; /// sample where the chapter starts | 100 | mpc_uint64_t sample; /// sample where the chapter starts |
100 | mpc_uint16_t gain; /// replaygain chapter value | 101 | mpc_uint16_t gain; /// replaygain chapter value |
@@ -102,14 +103,17 @@ typedef struct mpc_chap_info_t { | |||
102 | mpc_uint_t tag_size; /// size of the tag element (0 if no tag is present for this chapter) | 103 | mpc_uint_t tag_size; /// size of the tag element (0 if no tag is present for this chapter) |
103 | char * tag; /// pointer to an APEv2 tag without the preamble | 104 | char * tag; /// pointer to an APEv2 tag without the preamble |
104 | } mpc_chap_info; | 105 | } mpc_chap_info; |
106 | */ | ||
105 | 107 | ||
106 | /// Initializes mpc decoder with the supplied stream info parameters. | 108 | /// Initializes mpc decoder with the supplied stream info parameters. |
107 | /// \param si streaminfo structure indicating format of source stream | 109 | /// \param si streaminfo structure indicating format of source stream |
108 | /// \return pointer on the initialized decoder structure if successful, 0 if not | 110 | /// \return pointer on the initialized decoder structure if successful, 0 if not |
109 | MPC_API mpc_decoder * mpc_decoder_init(mpc_streaminfo *si); | 111 | MPC_API mpc_decoder * mpc_decoder_init(mpc_streaminfo *si); |
110 | 112 | ||
113 | /* rockbox: not used | ||
111 | /// Releases input mpc decoder | 114 | /// Releases input mpc decoder |
112 | MPC_API void mpc_decoder_exit(mpc_decoder *p_dec); | 115 | MPC_API void mpc_decoder_exit(mpc_decoder *p_dec); |
116 | */ | ||
113 | 117 | ||
114 | /** | 118 | /** |
115 | * Sets decoder sample scaling factor. All decoded samples will be multiplied | 119 | * Sets decoder sample scaling factor. All decoded samples will be multiplied |
@@ -129,8 +133,10 @@ MPC_API void mpc_decoder_decode_frame(mpc_decoder * d, mpc_bits_reader * r, mpc_ | |||
129 | * @return an initialized mpc_demux pointer | 133 | * @return an initialized mpc_demux pointer |
130 | */ | 134 | */ |
131 | MPC_API mpc_demux * mpc_demux_init(mpc_reader * p_reader); | 135 | MPC_API mpc_demux * mpc_demux_init(mpc_reader * p_reader); |
136 | /* rockbox: not used | ||
132 | /// free demuxer | 137 | /// free demuxer |
133 | MPC_API void mpc_demux_exit(mpc_demux * d); | 138 | MPC_API void mpc_demux_exit(mpc_demux * d); |
139 | */ | ||
134 | /** | 140 | /** |
135 | * Calls mpc_decoder_scale_output to set the scaling factor according to the | 141 | * Calls mpc_decoder_scale_output to set the scaling factor according to the |
136 | * replay gain stream information and the supplied ouput level | 142 | * replay gain stream information and the supplied ouput level |
@@ -150,11 +156,15 @@ MPC_API mpc_status mpc_demux_decode(mpc_demux * d, mpc_frame_info * i); | |||
150 | MPC_API void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i); | 156 | MPC_API void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i); |
151 | /// seeks to a given sample | 157 | /// seeks to a given sample |
152 | MPC_API mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample); | 158 | MPC_API mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample); |
159 | /* rockbox: not used | ||
153 | /// seeks to a given second | 160 | /// seeks to a given second |
154 | MPC_API mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds); | 161 | MPC_API mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds); |
162 | */ | ||
155 | 163 | ||
164 | /* rockbox: keep static | ||
156 | /// \return the current position in the stream (in bits) from the beginning of the file | 165 | /// \return the current position in the stream (in bits) from the beginning of the file |
157 | MPC_API mpc_seek_t mpc_demux_pos(mpc_demux * d); | 166 | MPC_API mpc_seek_t mpc_demux_pos(mpc_demux * d); |
167 | */ | ||
158 | 168 | ||
159 | /// chapters : only for sv8 streams | 169 | /// chapters : only for sv8 streams |
160 | /** | 170 | /** |