summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/mpegplayer/decode.c2
-rw-r--r--apps/plugins/mpegplayer/mpeg2.h10
-rw-r--r--apps/plugins/mpegplayer/mpeg2_internal.h2
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.h13
4 files changed, 12 insertions, 15 deletions
diff --git a/apps/plugins/mpegplayer/decode.c b/apps/plugins/mpegplayer/decode.c
index 91251206e9..9c8081efbe 100644
--- a/apps/plugins/mpegplayer/decode.c
+++ b/apps/plugins/mpegplayer/decode.c
@@ -191,7 +191,7 @@ mpeg2_state_t mpeg2_parse (mpeg2dec_t * mpeg2dec)
191 191
192 state = mpeg2dec->action (mpeg2dec); 192 state = mpeg2dec->action (mpeg2dec);
193 193
194 if ((int)state > (int)STATE_INTERNAL_NORETURN) 194 if (state > STATE_INTERNAL_NORETURN)
195 return state; 195 return state;
196 } 196 }
197 197
diff --git a/apps/plugins/mpegplayer/mpeg2.h b/apps/plugins/mpegplayer/mpeg2.h
index 2a63f399f9..bd14ead96e 100644
--- a/apps/plugins/mpegplayer/mpeg2.h
+++ b/apps/plugins/mpegplayer/mpeg2.h
@@ -130,6 +130,7 @@ typedef struct mpeg2_decoder_s mpeg2_decoder_t;
130 130
131typedef enum 131typedef enum
132{ 132{
133 STATE_INTERNAL_NORETURN = -1,
133 STATE_BUFFER = 0, 134 STATE_BUFFER = 0,
134 STATE_SEQUENCE = 1, 135 STATE_SEQUENCE = 1,
135 STATE_SEQUENCE_REPEATED = 2, 136 STATE_SEQUENCE_REPEATED = 2,
@@ -199,7 +200,14 @@ typedef enum
199 MPEG2_ALLOC_CHUNK = 1, 200 MPEG2_ALLOC_CHUNK = 1,
200 MPEG2_ALLOC_YUV = 2, 201 MPEG2_ALLOC_YUV = 2,
201 MPEG2_ALLOC_CONVERT_ID = 3, 202 MPEG2_ALLOC_CONVERT_ID = 3,
202 MPEG2_ALLOC_CONVERTED = 4 203 MPEG2_ALLOC_CONVERTED = 4,
204 MPEG_ALLOC_CODEC_MALLOC,
205 MPEG_ALLOC_CODEC_CALLOC,
206 MPEG_ALLOC_MPEG2_BUFFER,
207 MPEG_ALLOC_AUDIOBUF,
208 MPEG_ALLOC_PCMOUT,
209 MPEG_ALLOC_DISKBUF,
210 __MPEG_ALLOC_FIRST = -256,
203} mpeg2_alloc_t; 211} mpeg2_alloc_t;
204 212
205void * mpeg2_malloc (unsigned size, mpeg2_alloc_t reason); 213void * mpeg2_malloc (unsigned size, mpeg2_alloc_t reason);
diff --git a/apps/plugins/mpegplayer/mpeg2_internal.h b/apps/plugins/mpegplayer/mpeg2_internal.h
index cbc3e24a2d..f8c9891ea6 100644
--- a/apps/plugins/mpegplayer/mpeg2_internal.h
+++ b/apps/plugins/mpegplayer/mpeg2_internal.h
@@ -29,8 +29,6 @@
29 29
30#include "config.h" /* for Rockbox CPU_ #defines */ 30#include "config.h" /* for Rockbox CPU_ #defines */
31 31
32#define STATE_INTERNAL_NORETURN ((mpeg2_state_t)-1)
33
34/* macroblock modes */ 32/* macroblock modes */
35#define MACROBLOCK_INTRA 1 33#define MACROBLOCK_INTRA 1
36#define MACROBLOCK_PATTERN 2 34#define MACROBLOCK_PATTERN 2
diff --git a/apps/plugins/mpegplayer/mpegplayer.h b/apps/plugins/mpegplayer/mpegplayer.h
index 6247a6d3e1..bf223c3330 100644
--- a/apps/plugins/mpegplayer/mpegplayer.h
+++ b/apps/plugins/mpegplayer/mpegplayer.h
@@ -23,6 +23,8 @@
23#ifndef MPEGPLAYER_H 23#ifndef MPEGPLAYER_H
24#define MPEGPLAYER_H 24#define MPEGPLAYER_H
25 25
26#include "mpeg2.h"
27
26#ifdef HAVE_SCHEDULER_BOOSTCTRL 28#ifdef HAVE_SCHEDULER_BOOSTCTRL
27#define trigger_cpu_boost rb->trigger_cpu_boost 29#define trigger_cpu_boost rb->trigger_cpu_boost
28#define cancel_cpu_boost rb->cancel_cpu_boost 30#define cancel_cpu_boost rb->cancel_cpu_boost
@@ -32,17 +34,6 @@
32/* Memory allotments for various subsystems */ 34/* Memory allotments for various subsystems */
33#define MIN_MEMMARGIN (4*1024) 35#define MIN_MEMMARGIN (4*1024)
34 36
35enum mpeg_malloc_reason_t
36{
37 __MPEG_ALLOC_FIRST = -256,
38 MPEG_ALLOC_CODEC_MALLOC,
39 MPEG_ALLOC_CODEC_CALLOC,
40 MPEG_ALLOC_MPEG2_BUFFER,
41 MPEG_ALLOC_AUDIOBUF,
42 MPEG_ALLOC_PCMOUT,
43 MPEG_ALLOC_DISKBUF,
44};
45
46/** Video thread **/ 37/** Video thread **/
47#define LIBMPEG2_ALLOC_SIZE (2*1024*1024) 38#define LIBMPEG2_ALLOC_SIZE (2*1024*1024)
48 39