Go to the documentation of this file.
23 #ifndef AVCODEC_JPEG2000_H
24 #define AVCODEC_JPEG2000_H
61 #define JPEG2000_SOP_FIXED_BYTES 0xFF910004
62 #define JPEG2000_SOP_BYTE_LENGTH 6
70 #define JPEG2000_MAX_DECLEVELS 33
71 #define JPEG2000_MAX_RESLEVELS (JPEG2000_MAX_DECLEVELS + 1)
73 #define JPEG2000_MAX_PASSES 100
77 #define JPEG2000_T1_SIG_N 0x0001
78 #define JPEG2000_T1_SIG_E 0x0002
79 #define JPEG2000_T1_SIG_W 0x0004
80 #define JPEG2000_T1_SIG_S 0x0008
81 #define JPEG2000_T1_SIG_NE 0x0010
82 #define JPEG2000_T1_SIG_NW 0x0020
83 #define JPEG2000_T1_SIG_SE 0x0040
84 #define JPEG2000_T1_SIG_SW 0x0080
85 #define JPEG2000_T1_SIG_NB (JPEG2000_T1_SIG_N | JPEG2000_T1_SIG_E | \
86 JPEG2000_T1_SIG_S | JPEG2000_T1_SIG_W | \
87 JPEG2000_T1_SIG_NE | JPEG2000_T1_SIG_NW | \
88 JPEG2000_T1_SIG_SE | JPEG2000_T1_SIG_SW)
90 #define JPEG2000_T1_SGN_N 0x0100
91 #define JPEG2000_T1_SGN_S 0x0200
92 #define JPEG2000_T1_SGN_W 0x0400
93 #define JPEG2000_T1_SGN_E 0x0800
95 #define JPEG2000_T1_VIS 0x1000
96 #define JPEG2000_T1_SIG 0x2000
97 #define JPEG2000_T1_REF 0x4000
99 #define JPEG2000_T1_SGN 0x8000
102 #define JPEG2000_CBLK_BYPASS 0x01 // Selective arithmetic coding bypass
103 #define JPEG2000_CBLK_RESET 0x02 // Reset context probabilities
104 #define JPEG2000_CBLK_TERMALL 0x04 // Terminate after each coding pass
105 #define JPEG2000_CBLK_VSC 0x08 // Vertical stripe causal context formation
106 #define JPEG2000_CBLK_PREDTERM 0x10 // Predictable termination
107 #define JPEG2000_CBLK_SEGSYM 0x20 // Segmentation symbols present
110 #define JPEG2000_CSTY_PREC 0x01 // Precincts defined in coding style
111 #define JPEG2000_CSTY_SOP 0x02 // SOP marker present
112 #define JPEG2000_CSTY_EPH 0x04 // EPH marker present
115 #define JPEG2000_PGOD_LRCP 0x00 // Layer-resolution level-component-position progression
116 #define JPEG2000_PGOD_RLCP 0x01 // Resolution level-layer-component-position progression
117 #define JPEG2000_PGOD_RPCL 0x02 // Resolution level-position-component-layer progression
118 #define JPEG2000_PGOD_PCRL 0x03 // Position-component-resolution level-layer progression
119 #define JPEG2000_PGOD_CPRL 0x04 // Component-position-resolution level-layer progression
219 return -((-(int64_t)
a) >>
b);
224 return (
a + (int64_t)
b - 1) /
b;
235 int x,
int y,
int negative);
268 int cbps,
int dx,
int dy,
277 int type = passno % 3;
279 if (
type == 0 && passno > 2)
281 if (
type == 2 && passno > 2)
284 return passno > 2 ? 2 : 1;
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
#define JPEG2000_MAX_RESLEVELS
void ff_jpeg2000_reinit(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
static int needs_termination(int style, int passno)
Jpeg2000TgtNode * zerobits
void ff_jpeg2000_set_significance(Jpeg2000T1Context *t1, int x, int y, int negative)
#define JPEG2000_CBLK_TERMALL
struct Jpeg2000TgtNode * parent
uint8_t ff_jpeg2000_xorbit_lut[16][16]
static int ff_jpeg2000_getrefctxno(int flag)
int ff_jpeg2000_init_component(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy, AVCodecContext *ctx)
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
uint8_t log2_prec_heights[JPEG2000_MAX_RESLEVELS]
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
uint8_t ff_jpeg2000_sgnctxno_lut[16][16]
Jpeg2000ResLevel * reslevel
#define JPEG2000_CBLK_BYPASS
uint8_t log2_prec_widths[JPEG2000_MAX_RESLEVELS]
uint16_t log2_cblk_height
Jpeg2000TgtNode * cblkincl
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
static int ff_jpeg2000_getsgnctxno(int flag, int *xorbit)
uint8_t expn[JPEG2000_MAX_DECLEVELS *3]
static int ff_jpeg2000_getsigctxno(int flag, int bandno)
uint8_t ff_jpeg2000_sigctxno_lut[256][4]
uint16_t mant[JPEG2000_MAX_DECLEVELS *3]
main external API structure.
static int ff_jpeg2000_ceildiv(int a, int b)
static int ff_jpeg2000_ceildivpow2(int a, int b)
void ff_jpeg2000_init_tier1_luts(void)
#define JPEG2000_MAX_DECLEVELS
static const uint8_t refctxno_lut[2][2]
void ff_jpeg2000_cleanup(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)