File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change 15
15
/* Although this file really shouldn't have access to the library internals,
16
16
* it's helpful to let it call jround_up() and jcopy_block_row().
17
17
*/
18
- #define JPEG_INTERNALS
19
-
20
18
#include <stdio.h>
21
19
#include <stdlib.h>
22
20
#include <setjmp.h>
23
21
#include "jpeglib.h"
22
+ #include "jerror.h"
24
23
#include "transupp.h" /* My own external interface */
25
24
#include <ctype.h> /* to declare isdigit() */
26
25
27
26
#define SIZEOF (object ) ((size_t) sizeof(object))
28
27
28
+ LOCAL (long )
29
+ jdiv_round_up (long a , long b )
30
+ /* Compute a/b rounded up to next integer, ie, ceil(a/b) */
31
+ /* Assumes a >= 0, b > 0 */
32
+ {
33
+ return (a + b - 1L ) / b ;
34
+ }
35
+
36
+ LOCAL (void )
37
+ jcopy_block_row (JBLOCKROW input_row , JBLOCKROW output_row ,
38
+ JDIMENSION num_blocks )
39
+ /* Copy a row of coefficient blocks from one place to another. */
40
+ {
41
+ #ifdef FMEMCOPY
42
+ FMEMCOPY (output_row , input_row , num_blocks * (DCTSIZE2 * SIZEOF (JCOEF )));
43
+ #else
44
+ register JCOEFPTR inptr , outptr ;
45
+ register long count ;
46
+
47
+ inptr = (JCOEFPTR ) input_row ;
48
+ outptr = (JCOEFPTR ) output_row ;
49
+ for (count = (long ) num_blocks * DCTSIZE2 ; count > 0 ; count -- ) {
50
+ * outptr ++ = * inptr ++ ;
51
+ }
52
+ #endif
53
+ }
54
+
29
55
#if TRANSFORMS_SUPPORTED
30
56
31
57
/*
You can’t perform that action at this time.
0 commit comments