summaryrefslogtreecommitdiff
path: root/apps/recorder/jpeg_load.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/jpeg_load.c')
-rw-r--r--apps/recorder/jpeg_load.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/recorder/jpeg_load.c b/apps/recorder/jpeg_load.c
index f75176dae1..1af65fab6c 100644
--- a/apps/recorder/jpeg_load.c
+++ b/apps/recorder/jpeg_load.c
@@ -856,7 +856,7 @@ static const struct idct_entry idct_tbl[] = {
856/* JPEG decoder implementation */ 856/* JPEG decoder implementation */
857 857
858#ifdef JPEG_FROM_MEM 858#ifdef JPEG_FROM_MEM
859INLINE unsigned char *getc(struct jpeg* p_jpeg) 859INLINE unsigned char *jpeg_getc(struct jpeg* p_jpeg)
860{ 860{
861 if (LIKELY(p_jpeg->len)) 861 if (LIKELY(p_jpeg->len))
862 { 862 {
@@ -880,7 +880,7 @@ INLINE bool skip_bytes(struct jpeg* p_jpeg, int count)
880 } 880 }
881} 881}
882 882
883INLINE void putc(struct jpeg* p_jpeg) 883INLINE void jpeg_putc(struct jpeg* p_jpeg)
884{ 884{
885 p_jpeg->len++; 885 p_jpeg->len++;
886 p_jpeg->data--; 886 p_jpeg->data--;
@@ -892,7 +892,7 @@ INLINE void fill_buf(struct jpeg* p_jpeg)
892 p_jpeg->buf_index = 0; 892 p_jpeg->buf_index = 0;
893} 893}
894 894
895static unsigned char *getc(struct jpeg* p_jpeg) 895static unsigned char *jpeg_getc(struct jpeg* p_jpeg)
896{ 896{
897 if (UNLIKELY(p_jpeg->buf_left < 1)) 897 if (UNLIKELY(p_jpeg->buf_left < 1))
898 fill_buf(p_jpeg); 898 fill_buf(p_jpeg);
@@ -917,7 +917,7 @@ static bool skip_bytes(struct jpeg* p_jpeg, int count)
917 return p_jpeg->buf_left >= 0 || skip_bytes_seek(p_jpeg); 917 return p_jpeg->buf_left >= 0 || skip_bytes_seek(p_jpeg);
918} 918}
919 919
920static void putc(struct jpeg* p_jpeg) 920static void jpeg_putc(struct jpeg* p_jpeg)
921{ 921{
922 p_jpeg->buf_left++; 922 p_jpeg->buf_left++;
923 p_jpeg->buf_index--; 923 p_jpeg->buf_index--;
@@ -933,14 +933,14 @@ do {\
933#define e_getc(jpeg, code) \ 933#define e_getc(jpeg, code) \
934({ \ 934({ \
935 unsigned char *c; \ 935 unsigned char *c; \
936 if (UNLIKELY(!(c = getc(jpeg)))) \ 936 if (UNLIKELY(!(c = jpeg_getc(jpeg)))) \
937 return (code); \ 937 return (code); \
938 *c; \ 938 *c; \
939}) 939})
940 940
941#define d_getc(jpeg, def) \ 941#define d_getc(jpeg, def) \
942({ \ 942({ \
943 unsigned char *cp = getc(jpeg); \ 943 unsigned char *cp = jpeg_getc(jpeg); \
944 unsigned char c = LIKELY(cp) ? *cp : (def); \ 944 unsigned char c = LIKELY(cp) ? *cp : (def); \
945 c; \ 945 c; \
946}) 946})
@@ -958,7 +958,7 @@ static int process_markers(struct jpeg* p_jpeg)
958 if (c != 0xFF) /* no marker? */ 958 if (c != 0xFF) /* no marker? */
959 { 959 {
960 JDEBUGF("Non-marker data\n"); 960 JDEBUGF("Non-marker data\n");
961 putc(p_jpeg); 961 jpeg_putc(p_jpeg);
962 break; /* exit marker processing */ 962 break; /* exit marker processing */
963 } 963 }
964 964
@@ -969,7 +969,7 @@ static int process_markers(struct jpeg* p_jpeg)
969 case 0xFF: /* Fill byte */ 969 case 0xFF: /* Fill byte */
970 ret |= FILL_FF; 970 ret |= FILL_FF;
971 case 0x00: /* Zero stuffed byte - entropy data */ 971 case 0x00: /* Zero stuffed byte - entropy data */
972 putc(p_jpeg); 972 jpeg_putc(p_jpeg);
973 continue; 973 continue;
974 974
975 case 0xC0: /* SOF Huff - Baseline DCT */ 975 case 0xC0: /* SOF Huff - Baseline DCT */
@@ -1669,7 +1669,7 @@ static void search_restart(struct jpeg *p_jpeg)
1669 return; 1669 return;
1670 } 1670 }
1671 else 1671 else
1672 putc(p_jpeg); 1672 jpeg_putc(p_jpeg);
1673 } 1673 }
1674 } 1674 }
1675} 1675}