D E B U G   b u i l d 
 
 B a s i s   U n i v e r s a l   L D R / H D R   G P U   T e x t u r e   C o m p r e s s i o n   a n d   T r a n s c o d i n g   S y s t e m   v 1 . 6 0 . 0   ( x 6 4 ) 
 
 C o p y r i g h t   ( C )   2 0 1 9 - 2 0 2 5   B i n o m i a l   L L C ,   A l l   r i g h t s   r e s e r v e d 
 
 
 
 U s a g e :   b a s i s u   f i l e n a m e   [ f i l e n a m e   . . . ]   < o p t i o n s > 
 
 
 
 T h e   d e f a u l t   p r o c e s s i n g   m o d e   i s   c o m p r e s s i o n   o f   o n e   o r   m o r e   . P N G / . B M P / . T G A / . J P G / . Q O I / . D D S / . E X R / . H D R   f i l e s   t o   a   L D R   o r   H D R   . K T X 2   f i l e .   A l t e r n a t e   m o d e s : 
 
   - u n p a c k :   U s e   t r a n s c o d e r   t o   u n p a c k   a   . b a s i s / . K T X 2   f i l e   t o   o n e   o r   m o r e   . K T X / . P N G   f i l e s 
 
   - v a l i d a t e :   V a l i d a t e   a n d   d i s p l a y   i n f o r m a t i o n   a b o u t   a   . b a s i s / . K T X 2   f i l e 
 
   - i n f o :   D i s p l a y   h i g h - l e v e l   i n f o r m a t i o n   a b o u t   a   . b a s i s / . K T X 2   f i l e 
 
   - c o m p a r e :   C o m p a r e   t w o   L D R   P N G / B M P / T G A / J P G / Q O I   i m a g e s   s p e c i f i e d   w i t h   - f i l e ,   o u t p u t   P S N R   a n d   S S I M   s t a t i s t i c s   a n d   R G B / A   d e l t a   i m a g e s 
 
   - c o m p a r e _ h d r :   C o m p a r e   t w o   H D R   . E X R / . H D R   i m a g e s   s p e c i f i e d   w i t h   - f i l e ,   o u t p u t   P S N R   s t a t i s t i c s   a n d   R G B   d e l t a   i m a g e s 
 
   - t o n e m a p :   T o n e m a p   a n   H D R   o r   E X R   i m a g e   t o   P N G   a t   m u l t i p l e   e x p o s u r e s ,   u s e   - f i l e   t o   s p e c i f y   f i l e n a m e 
 
   - v e r s i o n :   P r i n t   v e r s i o n   a n d   e x i t 
 
 
 
 - - -   N o t e s : 
 
 
 
 U n l e s s   a n   e x p l i c i t   m o d e   i s   s p e c i f i e d ,   i f   o n e   o r   m o r e   f i l e s   h a v e   t h e   . b a s i s   o r   . K T X 2   e x t e n s i o n   t h i s   t o o l   d e f a u l t s   t o   u n p a c k   m o d e . 
 
 
 
 B y   d e f a u l t ,   t h e   c o m p r e s s o r   a s s u m e s   t h e   i n p u t   i s   i n   t h e   s R G B   c o l o r s p a c e   ( l i k e   p h o t o s / a l b e d o   t e x t u r e s ) . 
 
 I f   t h e   i n p u t   i s   N O T   s R G B   ( l i k e   a   n o r m a l   m a p ) ,   b e   s u r e   t o   s p e c i f y   - l i n e a r   f o r   l e s s   a r t i f a c t s .   D e p e n d i n g   o n   t h e   c o n t e n t   t y p e ,   s o m e   e x p e r i m e n t a t i o n   m a y   b e   n e e d e d . 
 
 
 
 T h e   T i n y E X R   l i b r a r y   i s   u s e d   t o   r e a d   . E X R   i m a g e s .   T h i s   l i b r a r y   d o e s   n o t   s u p p o r t   a l l   . E X R   c o m p r e s s i o n   m e t h o d s .   F o r   u n s u p p o r t e d   i m a g e s ,   y o u   c a n   u s e   I m a g e M a g i c k   t o   c o n v e r t   t h e m   t o   u n c o m p r e s s e d   . E X R . 
 
 
 
 F o r   . D D S   s o u r c e   f i l e s :   M i p m a p p e d   o r   n o t   m i p m a p p e d   2 D   t e x t u r e s   ( b u t   n o t   c u b e m a p s )   a r e   s u p p o r t e d .   O n l y   u n c o m p r e s s e d   3 2 - b i t   R G B A / B G R A ,   h a l f   f l o a t   R G B A ,   o r   f l o a t   R G B A   . D D S   f i l e s   a r e   s u p p o r t e d .   I n   - t e x _ a r r a y   m o d e ,   i f   a   . D D S   f i l e   i s   s p e c i f i e d ,   a l l   s o u r c e   f i l e s   m u s t   b e   i n   . D D S   f o r m a t . 
 
 
 
 F i l e n a m e s   p r e f i x e d   w i t h   a   @   s y m b o l   a r e   r e a d   a s   f i l e n a m e   l i s t i n g   f i l e s .   L i s t i n g   t e x t   f i l e s   s p e c i f y   w h i c h   a c t u a l   f i l e n a m e s   t o   p r o c e s s   ( o n e   f i l e n a m e   p e r   l i n e ) . 
 
 
 
 - - -   T e x t u r e   M o d e   O p t i o n s : 
 
   - e t c 1 s :   E n c o d e   t o   E T C 1 S   L D R   ( t h e   d e f a u l t   f o r   S D R / L D R   i n p u t s ) .   R o u g h l y   . 8 - 2 . 5   b p p . 
 
   - u a s t c :   E n c o d e   t o   U A S T C   L D R   4 x 4 .   R o u g h l y   5 - 8   b p p . 
 
   - h d r / - h d r _ 4 x 4 :   E n c o d e   i n p u t   a s   U A S T C   H D R   4 x 4   ( t h e   d e f a u l t   i f   a n y   i n p u t   f i l e   h a s   t h e   . E X R   o r   . H D R   e x t e n s i o n ,   o r   i f   a n y   . D D S   f i l e   i s   H D R ) .   R o u g h l y   5 - 8   b p p . 
 
   - h d r _ 6 x 6 :   E n c o d e   i n p u t   a s   R D O   o r   h i g h e s t   q u a l i t y   U A S T C   H D R   6 x 6 .   U s e   - l a m b d a   X   ( t r y   1 0 0 - 2 0 0 0 0   o r   h i g h e r )   o p t i o n   t o   e n a b l e   R D O   U A S T C   H D R   6 x 6 ,   w h e r e   x   c o n t r o l s   t h e   q u a l i t y   v s .   s i z e   t r a d e o f f .   R o u g h l y   1 . 2 - 3 . 2   b p p . 
 
   - h d r _ 6 x 6 i :   E n c o d e   i n p u t   a s   U A S T C   H D R   6 x 6   i n t e r m e d i a t e .   U s e   - l a m b d a   X   ( t r y   1 0 0 - 2 0 0 0 0   o r   h i g h e r )   o p t i o n   t o   e n a b l e   R D O   U A S T C   H D R   6 x 6 ,   w h e r e   x   c o n t r o l s   t h e   q u a l i t y   v s .   s i z e   t r a d e o f f .   R o u g h l y   1 - 3 . 2   b p p . 
 
 
 
 - - -   O p t i o n s : 
 
   - k t x 2 :   W r i t e   . K T X 2   f i l e s   ( t h e   d e f a u l t ) .   B y   d e f a u l t ,   U A S T C   L D R / H D R   4 x 4   a n d   A S T C   6 x 6   f i l e s   w i l l   b e   c o m p r e s s e d   u s i n g   Z s t a n d a r d   u n l e s s   - k t x 2 _ n o _ z s t a n d a r d   i s   s p e c i f i e d . 
 
   - b a s i s :   W r i t e   . b a s i s   f i l e s   i n s t e a d   o f   . K T X 2   f i l e s   ( t h e   p r e v i o u s   d e f a u l t ) . 
 
   - f i l e   f i l e n a m e . p n g / t g a / j p g / q o i / e x r / h d r :   I n p u t   i m a g e   f i l e n a m e ,   m u l t i p l e   i m a g e s   a r e   O K ,   u s e   - f i l e   X   f o r   e a c h   i n p u t   f i l e n a m e   ( p r e f i x i n g   i n p u t   f i l e n a m e s   w i t h   - f i l e   i s   o p t i o n a l ) 
 
   - a l p h a _ f i l e   f i l e n a m e . p n g / t g a / j p g / q o i :   I n p u t   a l p h a   i m a g e   f i l e n a m e ,   m u l t i p l e   i m a g e s   a r e   O K ,   u s e   - f i l e   X   f o r   e a c h   i n p u t   f i l e n a m e   ( m u s t   b e   p a i r e d   w i t h   - f i l e ) ,   i m a g e s   c o n v e r t e d   t o   R E C 7 0 9   g r a y s c a l e   a n d   u s e d   a s   i n p u t   a l p h a 
 
   - o u t p u t _ f i l e   f i l e n a m e :   O u t p u t   . b a s i s / . K T X 2   f i l e n a m e 
 
   - o u t p u t _ p a t h :   O u t p u t   . b a s i s / . K T X 2   f i l e s   t o   s p e c i f i e d   d i r e c t o r y . 
 
   - d e b u g   o r   - v e r b o s e :   E n a b l e   c o d e c   d e b u g   p r i n t   t o   s t d o u t   ( s l i g h t l y   s l o w e r ) . 
 
   - d e b u g _ i m a g e s :   E n a b l e   c o d e c   d e b u g   i m a g e s   ( m u c h   s l o w e r ) . 
 
   - s t a t s :   C o m p u t e   a n d   d i s p l a y   i m a g e   q u a l i t y   m e t r i c s   ( s l i g h t l y   t o   m u c h   s l o w e r ) . 
 
   - i n d i v i d u a l :   P r o c e s s   i n p u t   i m a g e s   i n d i v i d u a l l y   a n d   o u t p u t   m u l t i p l e   . b a s i s / . K T X 2   f i l e s   ( n o t   a s   a   t e x t u r e   a r r a y   -   t h i s   i s   n o w   t h e   d e f a u l t   a s   o f   v 1 . 1 6 ) 
 
 
 
   - f a s t e s t :   S e t   U A S T C   L D R   4 x 4   a n d   H D R   4 x 4 / 6 x 6   t o   f a s t e s t   b u t   l o w e s t   q u a l i t y   e n c o d i n g   m o d e   ( s a m e   a s   - u a s t c _ l e v e l   0   o r   - h d r _ 6 x 6 _ l e v e l   0 ) 
 
   - s l o w e r :   S e t   U A S T C   L D R   4 x 4   a n d   H D R   4 x 4 / 6 x 6   t o   s l o w e r   b u t   a   h i g h e r   q u a l i t y   e n c o d i n g   m o d e   ( s a m e   a s   - u a s t c _ l e v e l   3   o r   - h d r _ 6 x 6 _ l e v e l   5 ) 
 
   - p a r a l l e l :   C o m p r e s s   m u l t i p l e   t e x t u r e s   s i m u m t a n o u s l y   ( o n e   p e r   t h r e a d ) ,   i n s t e a d   o f   o n e   a t   a   t i m e .   C o m p a t i b l e   w i t h   O p e n C L   m o d e .   T h i s   i s   m u c h   f a s t e r ,   b u t   i n   O p e n C L   m o d e   t h e   d r i v e r   i s   p u s h e d   h a r d e r ,   a n d   t h e   C L I   o u t p u t   w i l l   b e   j u m b l e d . 
 
   - l i n e a r :   U s e   l i n e a r   c o l o r s p a c e   m e t r i c s   ( i n s t e a d   o f   t h e   d e f a u l t   s R G B   o r   s c a l e d   R G B   f o r   H D R ) ,   a n d   b y   d e f a u l t   l i n e a r   ( n o t   s R G B )   m i p m a p   f i l t e r i n g . 
 
   - t e x _ t y p e   < 2 d ,   2 d a r r a y ,   3 d ,   v i d e o ,   c u b e m a p > :   S e t   B a s i s   f i l e   h e a d e r ' s   t e x t u r e   t y p e   f i e l d .   C u b e m a p   a r r a y s   r e q u i r e   m u l t i p l e s   o f   6   i m a g e s ,   i n   X + ,   X - ,   Y + ,   Y - ,   Z + ,   Z -   o r d e r ,   e a c h   i m a g e   m u s t   b e   t h e   s a m e   r e s o l u t i o n s . 
 
     2 d = a r b i t r a r y   2 D   i m a g e s ,   2 d a r r a y = 2 D   a r r a y ,   3 D = v o l u m e   t e x t u r e   s l i c e s ,   v i d e o = v i d e o   f r a m e s ,   c u b e m a p = a r r a y   o f   f a c e s .   F o r   2 d a r r a y / 3 d / c u b e m a p s / v i d e o ,   e a c h   s o u r c e   i m a g e ' s   d i m e n s i o n s   a n d   #   o f   m i p m a p   l e v e l s   m u s t   b e   t h e   s a m e . 
 
     F o r   v i d e o ,   t h e   . b a s i s   f i l e   w i l l   b e   w r i t t e n   w i t h   t h e   f i r s t   f r a m e   b e i n g   a n   I - F r a m e ,   a n d   s u b s e q u e n t   f r a m e s   b e i n g   P - F r a m e s   ( u s i n g   c o n d i t i o n a l   r e p l e n i s h m e n t ) .   P l a y b a c k   m u s t   a l w a y s   o c c u r   i n   o r d e r   f r o m   f i r s t   t o   l a s t   i m a g e . 
 
   - c u b e m a p :   s a m e   a s   - t e x _ t y p e   c u b e m a p 
 
   - t e x _ a r r a y :   P r o c e s s   i n p u t   i m a g e s   a s   a   s i n g l e   t e x t u r e   a r r a y   a n d   w r i t e   a   s i n g l e   . b a s i s / . K T X 2   f i l e   ( t h e   f o r m e r   d e f a u l t   b e f o r e   v 1 . 1 6 ) 
 
   - f u z z _ t e s t i n g :   U s e   w i t h   - v a l i d a t e :   D i s a b l e s   C R C 1 6   v a l i d a t i o n   o f   f i l e   c o n t e n t s   b e f o r e   t r a n s c o d i n g 
 
   - m u l t i f i l e _ p r i n t f :   p r i n t f ( )   f o r m a t   s t r i n t   t o   u s e   t o   c o m p o s e   m u l t i p l e   f i l e n a m e s 
 
   - m u l t i f i l e _ f i r s t :   T h e   i n d e x   o f   t h e   f i r s t   f i l e   t o   p r o c e s s ,   d e f a u l t   i s   0   ( m u s t   s p e c i f y   - m u l t i f i l e _ p r i n t f   a n d   - m u l t i f i l e _ n u m ) 
 
   - m u l t i f i l e _ n u m :   T h e   t o t a l   n u m b e r   o f   f i l e s   t o   p r o c e s s . 
 
   - o p e n c l :   E n a b l e   O p e n C L   u s a g e   ( c u r r e n t l y   o n l y   a c c e l e r a t e s   E T C 1 S   e n c o d i n g ) 
 
   - o p e n c l _ s e r i a l i z e :   S e r i a l i z e   a l l   c a l l s   t o   t h e   O p e n C L   d r i v e r   ( t o   w o r k   a r o u n d   b u g g y   d r i v e r s ,   o n l y   u s e f u l   w i t h   - p a r a l l e l ) 
 
 
 
 - - -   E T C 1 S   s p e c i f i c   o p t i o n s   ( - e t c 1 s   -   t h e   L D R / S D R   d e f a u l t ) : 
 
   - q   X :   S e t   E T C 1 S   q u a l i t y   l e v e l ,   1 - 2 5 5 ,   d e f a u l t   i s   1 2 8 ,   l o w e r = b e t t e r   c o m p r e s s i o n / l o w e r   q u a l i t y / f a s t e r ,   h i g h e r = l e s s   c o m p r e s s i o n / h i g h e r   q u a l i t y / s l o w e r ,   d e f a u l t   i s   1 2 8 .   F o r   e v e n   h i g h e r   q u a l i t y ,   u s e   - m a x _ e n d p o i n t s / - m a x _ s e l e c t o r s . 
 
   - c o m p _ l e v e l   X :   S e t   E T C 1 S   e n c o d i n g   s p e e d   v s .   q u a l i t y   t r a d e o f f .   R a n g e   i s   0 - 6 ,   d e f a u l t   i s   1 .   H i g h e r   v a l u e s = M U C H   s l o w e r ,   b u t   s l i g h t l y   h i g h e r   q u a l i t y .   H i g h e r   l e v e l s   i n t e n d e d   f o r   v i d e o s .   U s e   - q   f i r s t ! 
 
   - m a x _ e n d p o i n t s   X :   E T C 1 S :   M a n u a l l y   s e t   t h e   m a x   n u m b e r   o f   c o l o r   e n d p o i n t   c l u s t e r s   f r o m   1 - 1 6 1 2 8 ,   u s e   i n s t e a d   o f   - q 
 
   - m a x _ s e l e c t o r s   X :   E T C 1 S :   M a n u a l l y   s e t   t h e   m a x   n u m b e r   o f   c o l o r   s e l e c t o r   c l u s t e r s   f r o m   1 - 1 6 1 2 8 ,   u s e   i n s t e a d   o f   - q 
 
 
 
 - - -   U A S T C   L D R / H D R   4 x 4   s p e c i f i c   o p t i o n s   ( - u a s t c ) : 
 
   - u a s t c :   E n a b l e   U A S T C   L D R   4 x 4   t e x t u r e   m o d e ,   i n s t e a d   o f   t h e   d e f a u l t   E T C 1 S   m o d e .   S i g n i f i c a n t l y   h i g h e r   t e x t u r e   q u a l i t y ,   b u t   m u c h   l a r g e r   ( ~ 8 b p p )   f i l e s .   ( N o t e   t h a t   U A S T C   . b a s i s   f i l e s   m u s t   b e   l o s s l e s s l y   c o m p r e s s e d   b y   t h e   u s e r . ) 
 
   - u a s t c _ l e v e l :   S e t   U A S T C   L D R / H D R   4 x 4   e n c o d i n g   l e v e l .   L D R   R a n g e   i s   [ 0 , 4 ] ,   d e f a u l t   i s   2 ,   h i g h e r = s l o w e r   b u t   h i g h e r   q u a l i t y .   0 = f a s t e s t / l o w e s t   q u a l i t y ,   3 = s l o w e s t   p r a c t i c a l   o p t i o n ,   4 = i m p r a c t i c a l l y   s l o w / h i g h e s t   a c h i e v a b l e   q u a l i t y 
 
 	 	 	 	 U A S T C   H D R   4 x 4   r a n g e   i s   [ 0 , 4 ]   -   h i g h e r = s l o w e r   b u t   h i g h e r   q u a l i t y .   H D R   4 x 4   d e f a u l t   l e v e l = 1 . 
 
   - u a s t c _ r d o _ l   X :   E n a b l e   U A S T C   L D R   4 x 4   R D O   p o s t - p r o c e s s i n g   a n d   s e t   U A S T C   L D R   4 x 4   R D O   q u a l i t y   s c a l a r   ( l a m b d a )   t o   X .   L o w e r   v a l u e s = h i g h e r   q u a l i t y / l a r g e r   L Z 
 
                                   c o m p r e s s e d   f i l e s ,   h i g h e r   v a l u e s = l o w e r   q u a l i t y / s m a l l e r   L Z   c o m p r e s s e d   f i l e s .   G o o d   r a n g e   t o   t r y   i s   [ . 2 5 - 1 0 ] . 
 
                                   N o t e :   P r e v i o u s   v e r s o n s   u s e d   t h e   - u a s t c _ r d o _ q   o p t i o n ,   w h i c h   w a s   r e m o v e d   b e c a u s e   t h e   R D O   a l g o r i t h m   w a s   c h a n g e d . 
 
   - u a s t c _ r d o _ d   X :   S e t   U A S T C   L D R   4 x 4   R D O   d i c t i o n a r y   s i z e   i n   b y t e s .   D e f a u l t   i s   4 0 9 6 ,   m a x   i s   6 5 5 3 6 .   L o w e r   v a l u e s = f a s t e r ,   b u t   l e s s   c o m p r e s s i o n . 
 
   - u a s t c _ r d o _ b   X :   S e t   U A S T C   L D R   4 x 4   R D O   m a x   s m o o t h   b l o c k   e r r o r   s c a l e .   R a n g e   i s   [ 1 , 3 0 0 ] .   D e f a u l t   i s   1 0 . 0 ,   1 . 0 = d i s a b l e d .   L a r g e r   v a l u e s   s u p p r e s s   m o r e   a r t i f a c t s   ( a n d   a l l o c a t e   m o r e   b i t s )   o n   s m o o t h   b l o c k s . 
 
   - u a s t c _ r d o _ s   X :   S e t   U A S T C   L D R   4 x 4   R D O   m a x   s m o o t h   b l o c k   s t a n d a r d   d e v i a t i o n .   R a n g e   i s   [ . 0 1 , 6 5 5 3 6 ] .   D e f a u l t   i s   1 8 . 0 .   L a r g e r   v a l u e s   e x p a n d   t h e   r a n g e   o f   b l o c k s   c o n s i d e r e d   s m o o t h . 
 
   - u a s t c _ r d o _ f :   D o n ' t   f a v o r   s i m p l e r   U A S T C   L D R   4 x 4   m o d e s   i n   R D O   m o d e . 
 
   - u a s t c _ r d o _ m :   D i s a b l e   R D O   m u l t i t h r e a d i n g   ( s l i g h t l y   h i g h e r   c o m p r e s s i o n ,   d e t e r m i n i s t i c ) . 
 
 
 
 - - -   U A S T C   H D R   4 x 4   s p e c i f i c   o p t i o n s   ( - h d r   o r   - h d r _ 4 x 4   -   t h e   H D R   d e f a u l t ) : 
 
   - u a s t c _ l e v e l   X :   S e t s   t h e   U A S T C   H D R   4 x 4   c o m p r e s s o r ' s   l e v e l .   V a l i d   r a n g e   i s   [ 0 , 4 ]   -   h i g h e r = s l o w e r   b u t   h i g h e r   q u a l i t y .   H D R   d e f a u l t = 1 . 
 
                                   L e v e l   0 = f a s t e s t / l o w e s t   q u a l i t y ,   3 = h i g h e s t   p r a c t i c a l   s e t t i n g ,   4 = e x h a u s t i v e 
 
   - h d r _ u b e r _ m o d e :   A l l o w   t h e   U A S T C   H D R   4 x 4   e n c o d e r   t o   t r y   v a r y i n g   t h e   C E M   1 1   s e l e c t o r s   m o r e   f o r   s l i g h t l y   h i g h e r   q u a l i t y   ( s l o w e r ) .   T h i s   m a y   n e g a t i v e l y   i m p a c t   B C 6 H   q u a l i t y ,   h o w e v e r . 
 
   - h d r _ u l t r a _ q u a n t :   U A S T C   H D R   4 x 4 :   T r y   t o   f i n d   b e t t e r   q u a n t i z e d   C E M   7 / 1 1   e n d p o i n t   v a l u e s   ( s l o w e r ) . 
 
   - h d r _ f a v o r _ a s t c :   U A S T C   H D R   4 x 4 :   B y   d e f a u l t   t h e   U A S T C   H D R   4 x 4   e n c o d e r   t r i e s   t o   s t r i k e   a   b a l a n c e   o r   e v e n   s l i g h t l y   f a v o r   B C 6 H   q u a l i t y .   I f   t h i s   o p t i o n   i s   s p e c i f i e d ,   A S T C   H D R   4 x 4   q u a l i t y   i s   f a v o r e d   i n s t e a d . 
 
 
 
 - - -   U A S T C   H D R   6 x 6   s p e c i f i c   o p t i o n s   ( - h d r _ 6 x 6   o r   - h d r _ 6 x 6 i ) : 
 
   - l a m b d a   X :   E n a b l e s   r a t e   d i s t o r t i o n   o p t i m i z a t i o n   ( R D O ) .   T h e   h i g h e r   t h i s   v a l u e ,   t h e   l o w e r   t h e   q u a l i t y ,   b u t   t h e   s m a l l e r   t h e   f i l e   s i z e .   T r y   1 0 0 - 2 0 0 0 0 ,   o r   h i g h e r   v a l u e s   o n   s o m e   i m a g e s . 
 
   - h d r _ 6 x 6 _ l e v e l   X :   S e t s   t h e   c o d e c   t o   6 x 6   H D R   m o d e   ( s a m e   a s   - h d r _ 6 x 6 )   a n d   c o n t r o l s   e n c o d e r   p e r f o r m a n c e   v s .   m a x   q u a l i t y   t r a d e o f f .   X   m a y   r a n g e   f r o m   [ 0 , 1 2 ] .   D e f a u l t   l e v e l   i s   2 .   H i g h e r   v a l u e s   r e s u l t   i n   b e t t e r   q u a l i t y   b u t   s l o w e r   e n c o d i n g .   V a l u e s   a b o v e   1 0   a r e   e x t r e m e l y   s l o w . 
 
   - h d r _ 6 x 6 i _ l e v e l   X :   S e t s   t h e   c o d e c   t o   6 x 6   H D R   i n t e r m e d i a t e   m o d e   ( s a m e   a s   - h d r _ 6 x 6 i )   a n d   c o n t r o l s   e n c o d e r   p e r f o r m a n c e   v s .   m a x   q u a l i t y   t r a d e o f f .   X   m a y   r a n g e   f r o m   [ 0 , 1 2 ] .   D e f a u l t   l e v e l   i s   2 . 
 
   - r e c _ 2 0 2 0 :   T h e   i n p u t   i m a g e ' s   g a m u t   i s   R e c .   2 0 2 0   v s .   t h e   d e f a u l t   R e c .   7 0 9   -   f o r   a c c u r a t e   c o l o r s p a c e   e r r o r   c a l c u l a t i o n s . 
 
   - h d r _ 6 x 6 _ j n d   X ,   - h d r _ 6 x 6 _ e x t r a _ p a t s ,   - h d r _ 6 x 6 _ b r u t e _ f o r c e _ p a t s ,   - h d r _ 6 x 6 _ c o m p _ l e v e l s   X   Y   o r   - h d r _ 6 x 6 i _ c o m p _ l e v e l s   X   Y :   L o w - l e v e l   c o n t r o l   o v e r   t h e   e n c o d e r ' s   c o n f i g u r a t i o n . 
 
 
 
 - - -   S D R / L D R - > H D R   u p c o n v e r s i o n   o p t i o n s   ( o n l y   u s e d   w h e n   e n c o d i n g   t o   H D R   f o r m a t s   f r o m   a n   L D R / S D R   s o u r c e   i m a g e ) : 
 
   - h d r _ l d r _ n o _ s r g b _ t o _ l i n e a r :   I f   s p e c i f i e d ,   L D R   i m a g e s   w i l l   N O T   b e   c o n v e r t e d   t o   n o r m a l i z e d   l i n e a r   l i g h t   ( v i a   a   s R G B - > L i n e a r   c o n v e r s i o n )   d u r i n g   S D R - > H D R   u p c o n v e r s i o n   b e f o r e   c o m p r e s s i n g   a s   H D R . 
 
   - h d r _ l d r _ u p c o n v e r s i o n _ n i t _ m u l t i p l i e r   X :   S p e c i f y   h o w   m a n y   n i t s   ( c a n d e l a s   p e r   s q .   m e t e r )   L D R / S D R   i m a g e s   a r e   c o n v e r t e d   t o   a f t e r   c o n v e r t i n g   t o   l i n e a r   l i g h t .   D e f a u l t   i s   1 0 0   n i t s .   N o t e :   P r e v i o u s   b u i l d s   u s e d   1   n i t . 
 
 
 
 - - -   M o r e   o p t i o n s : 
 
   - t e s t :   R u n   a n   a u t o m a t e d   L D R   E T C 1 S / U A S T C   e n c o d i n g   a n d   t r a n s c o d i n g   t e s t .   R e t u r n s   E X I T _ F A I L U R E   i f   a n y   f a i l u r e s 
 
   - t e s t _ h d r _ 4 x 4 / - t e s t _ h d r _ 6 x 6 / - t e s t _ h d r _ 6 x 6 i :   R u n   a u t o m a t e d   U A S T C   H D R   e n c o d i n g   a n d   t r a n s c o d i n g   t e s t s .   R e t u r n s   E X I T _ F A I L U R E   i f   a n y   f a i l u r e s 
 
   - t e s t _ d i r :   O p t i o n a l   d i r e c t o r y   o f   t e s t   f i l e s .   D e f a u l t s   t o   " . . / t e s t _ f i l e s " . 
 
   - y _ f l i p :   F l i p   i n p u t   i m a g e s   v e r t i c a l l y   b e f o r e   c o m p r e s s i o n 
 
   - n o r m a l _ m a p :   T u n e s   c o d e c   p a r a m e t e r s   f o r   b e t t e r   q u a l i t y   o n   n o r m a l   m a p s   ( l i n e a r   c o l o r s p a c e   m e t r i c s ,   l i n e a r   m i p m a p   f i l t e r i n g ,   n o   s e l e c t o r   R D O ,   n o   s R G B ) 
 
   - n o _ a l p h a :   A l w a y s   o u t p u t   n o n - a l p h a   b a s i s   f i l e s ,   e v e n   i f   o n e   o r   m o r e   i n p u t s   h a s   a l p h a 
 
   - f o r c e _ a l p h a :   A l w a y s   o u t p u t   a l p h a   b a s i s   f i l e s ,   e v e n   i f   n o   i n p u t s   h a s   a l p h a 
 
   - s e p a r a t e _ r g _ t o _ c o l o r _ a l p h a :   S e p a r a t e   i n p u t   R   a n d   G   c h a n n e l s   t o   R G B   a n d   A   ( f o r   t a n g e n t   s p a c e   X Y   n o r m a l   m a p s ) 
 
   - s w i z z l e   r g b a :   S p e c i f y   s w i z z l e   f o r   t h e   4   i n p u t   c o l o r   c h a n n e l s   u s i n g   r ,   g ,   b   a n d   a   ( t h e   - s e p a r a t e _ r g _ t o _ c o l o r _ a l p h a   f l a g   i s   e q u i v a l e n t   t o   r r r g ) 
 
   - r e n o r m :   R e n o r m a l i z e   e a c h   i n p u t   i m a g e   b e f o r e   a n y   f u r t h e r   p r o c e s s i n g / c o m p r e s s i o n 
 
   - n o _ m u l t i t h r e a d i n g :   D i s a b l e   m u l t i t h r e a d i n g 
 
   - m a x _ t h r e a d s   X :   U s e   a t   m o s t   X   t h r e a d s   t o t a l   w h e n   m u l t i t h r e a d i n g   i s   e n a b l e d   ( t h i s   i n c l u d e s   t h e   m a i n   t h r e a d ) 
 
   - n o _ k t x :   D i s a b l e   K T X   w r i t i n g   w h e n   u n p a c k i n g   ( f a s t e r ,   l e s s   o u t p u t   f i l e s ) 
 
   - k t x _ o n l y :   O n l y   w r i t e   K T X   f i l e s   w h e n   u n p a c k i n g   ( f a s t e r ,   l e s s   o u t p u t   f i l e s ) 
 
   - w r i t e _ o u t :   W r i t e   3 d f x   O U T   f i l e s   w h e n   u n p a c k i n g   F X T 1   t e x t u r e s 
 
   - f o r m a t _ o n l y :   O n l y   u n p a c k   t h e   s p e c i f i e d   f o r m a t ,   b y   i t s   n u m e r i c   c o d e . 
 
   - e t c 1 _ o n l y :   O n l y   u n p a c k   t o   E T C 1 ,   s k i p p i n g   t h e   o t h e r   t e x t u r e   f o r m a t s   d u r i n g   - u n p a c k 
 
   - d i s a b l e _ h i e r a r c h i c a l _ e n d p o i n t _ c o d e b o o k s :   D i s a b l e   h i e r a r c h i c a l   e n d p o i n t   c o d e b o o k   u s a g e ,   s l o w e r   b u t   h i g h e r   q u a l i t y   o n   s o m e   c o m p r e s s i o n   l e v e l s 
 
   - c o m p a r e _ s s i m :   C o m p u t e   a n d   d i s p l a y   S S I M   o f   i m a g e   c o m p a r i s o n   ( s l o w ) 
 
   - c o m p a r e _ p l o t :   D i s p l a y   h i s t o g r a m   p l o t s   i n   - c o m p a r e   m o d e 
 
   - b e n c h :   U A S T C   b e n c h m a r k   m o d e ,   f o r   d e v e l o p m e n t   o n l y 
 
   - r e s a m p l e   X   Y :   R e s a m p l e   a l l   i n p u t   t e x t u r e s   t o   X x Y   p i x e l s   u s i n g   a   b o x   f i l t e r 
 
   - r e s a m p l e _ f a c t o r   X :   R e s a m p l e   a l l   i n p u t   t e x t u r e s   b y   s c a l e   f a c t o r   X   u s i n g   a   b o x   f i l t e r 
 
   - n o _ s s e :   F o r b i d   a l l   S S E   i n s t r u c t i o n   s e t   u s a g e 
 
   - v a l i d a t e _ e t c 1 s :   V a l i d a t e   i n t e r n a l   E T C 1 S   c o m p r e s s o r ' s   d a t a   s t r u c t u r e s   d u r i n g   c o m p r e s s i o n   ( s l o w e r ,   i n t e n d e d   f o r   d e v e l o p m e n t ) . 
 
   - k t x 2 _ a n i m d a t a _ d u r a t i o n   X :   S e t   K T X 2 a n i m D a t a   d u r a t i o n   f i e l d   t o   i n t e g e r   v a l u e   X   ( o n l y   v a l i d / u s e f u l   f o r   - t e x _ t y p e   v i d e o ,   d e f a u l t   i s   1 ) 
 
   - k t x 2 _ a n i m d a t a _ t i m e s c a l e   X :   S e t   K T X 2 a n i m D a t a   t i m e s c a l e   f i e l d   t o   i n t e g e r   v a l u e   X   ( o n l y   v a l i d / u s e f u l   f o r   - t e x _ t y p e   v i d e o ,   d e f a u l t   i s   1 5 ) 
 
   - k t x 2 _ a n i m d a t a _ l o o p c o u n t   X :   S e t   K T X 2 a n i m D a t a   l o o p c o u n t   f i e l d   t o   i n t e g e r   v a l u e   X   ( o n l y   v a l i d / u s e f u l   f o r   - t e x _ t y p e   v i d e o ,   d e f a u l t   i s   0 ) 
 
   - f r a m e r a t e   X :   S e t   f r a m e r a t e   i n   . b a s i s   h e a d e r   t o   X / f r a m e s   s e c . 
 
   - k t x 2 _ n o _ z s t a n d a r d :   D o n ' t   c o m p r e s s   U A S T C   t e x t u r e   d a t a   u s i n g   Z s t a n d a r d   - -   s t o r e   i t   u n c o m p r e s s e d   i n s t e a d . 
 
   - k t x 2 _ z s t a n d a r d _ l e v e l   X :   S e t   Z S t a n d a r d   c o m p r e s s i o n   l e v e l   t o   X   ( s e e   Z s t a n d a r d   d o c u m e n t a t i o n ,   d e f a u l t   l e v e l   i s   6 ) 
 
   - t o n e m a p _ d i t h e r :   D i t h e r   t o n e m a p p e r ' s   8 - b i t / c o m p o n e n t   o u t p u t   b y   a d d i n g   a   s m a l l   a m o u n t   o f   w h i t e   n o i s e ,   o n l y   u s e d   w i t h   - t o n e m a p   m o d e 
 
 
 
 - - -   M i p m a p   g e n e r a t i o n   o p t i o n s : 
 
   - m i p m a p :   G e n e r a t e   m i p m a p s   f o r   e a c h   s o u r c e   i m a g e 
 
   - m i p _ s r g b :   C o n v e r t   i m a g e   t o   l i n e a r   b e f o r e   f i l t e r i n g ,   t h e n   b a c k   t o   s R G B 
 
   - m i p _ l i n e a r :   K e e p   i m a g e   i n   l i n e a r   l i g h t   d u r i n g   m i p m a p   f i l t e r i n g   ( i . e .   d o   n o t   c o n v e r t   t o / f r o m   s R G B   f o r   f i l t e r i n g   p u r p o s e s ) 
 
   - m i p _ s c a l e   X :   S e t   m i p m a p   f i l t e r   k e r n e l ' s   s c a l e ,   l o w e r = s h a r p e r ,   h i g h e r = m o r e   b l u r r y ,   d e f a u l t   i s   1 . 0 
 
   - m i p _ f i l t e r   X :   S e t   m i p m a p   f i l t e r   k e r n e l ,   d e f a u l t   i s   k a i s e r ,   f i l t e r s :   b o x ,   t e n t ,   b e l l ,   b l a c k m a n ,   c a t m u l l r o m ,   m i t c h e l l ,   e t c . 
 
   - m i p _ r e n o r m :   R e n o r m a l i z e   n o r m a l   m a p   t o   u n i t   l e n g t h   v e c t o r s   a f t e r   f i l t e r i n g 
 
   - m i p _ c l a m p :   U s e   c l a m p   a d d r e s s i n g   o n   b o r d e r s ,   i n s t e a d   o f   w r a p p i n g 
 
   - m i p _ f a s t :   U s e   f a s t e r   m i p m a p   g e n e r a t i o n   ( r e s a m p l e   f r o m   p r e v i o u s   m i p ,   n o t   a l w a y s   f i r s t / l a r g e s t   m i p   l e v e l ) .   T h e   d e f a u l t   ( a s   o f   1 / 2 0 2 1 ) 
 
   - m i p _ s l o w :   A l w a y s   r e s a m p l e   e a c h   m i p m a p   l e v e l   s t a r t i n g   f r o m   t h e   l a r g e s t   m i p m a p .   H i g h e r   q u a l i t y ,   b u t   s l o w e r .   O p p o s i t e   o f   - m i p _ f a s t .   W a s   t h e   p r i o r   d e f a u l t   b e f o r e   1 / 2 0 2 1 . 
 
   - m i p _ s m a l l e s t   X :   S e t   s m a l l e s t   p i x e l   d i m e n s i o n   f o r   g e n e r a t e d   m i p m a p s ,   d e f a u l t   i s   1   p i x e l 
 
     B y   d e f a u l t ,   t e x t u r e s   w i l l   b e   c o n v e r t e d   f r o m   s R G B   t o   l i n e a r   l i g h t   b e f o r e   m i p m a p   f i l t e r i n g ,   t h e n   b a c k   t o   s R G B   ( f o r   t h e   R G B   c o l o r   c h a n n e l s )   u n l e s s   - l i n e a r   i s   s p e c i f i e d . 
 
     Y o u   c a n   o v e r r i d e   t h i s   b e h a v i o r   w i t h   - m i p _ s r g b / - m i p _ l i n e a r . 
 
 
 
 - - -   E T C 1 S   b a c k e n d   e n d p o i n t / s e l e c t o r   R D O   c o d e c   o p t i o n s : 
 
   - n o _ s e l e c t o r _ r d o :   D i s a b l e   b a c k e n d ' s   s e l e c t o r   r a t e   d i s t o r t i o n   o p t i m i z a t i o n s   ( s l i g h t l y   f a s t e r ,   l e s s   n o i s y   o u t p u t ,   b u t   l o w e r   q u a l i t y   p e r   o u t p u t   b i t ) 
 
   - s e l e c t o r _ r d o _ t h r e s h   X :   S e t   s e l e c t o r   R D O   q u a l i t y   t h r e s h o l d ,   d e f a u l t   i s   1 . 2 5 ,   l o w e r   i s   h i g h e r   q u a l i t y   b u t   l e s s   q u a l i t y   p e r   o u t p u t   b i t   ( t r y   1 . 0 - 3 . 0 ) 
 
   - n o _ e n d p o i n t _ r d o :   D i s a b l e   b a c k e n d ' s   e n d p o i n t   r a t e   d i s t o r t i o n   o p t i m i z a t i o n s   ( s l i g h t l y   f a s t e r ,   l e s s   n o i s y   o u t p u t ,   b u t   l o w e r   q u a l i t y   p e r   o u t p u t   b i t ) 
 
   - e n d p o i n t _ r d o _ t h r e s h   X :   S e t   e n d p o i n t   R D O   q u a l i t y   t h r e s h o l d ,   d e f a u l t   i s   1 . 5 ,   l o w e r   i s   h i g h e r   q u a l i t y   b u t   l e s s   q u a l i t y   p e r   o u t p u t   b i t   ( t r y   1 . 0 - 3 . 0 ) 
 
 
 
 - - -   S e t   v a r i o u s   f i e l d s   i n   t h e   B a s i s   f i l e   h e a d e r : 
 
   - u s e r d a t a 0   X :   S e t   3 2 - b i t   u s e r d a t a 0   f i e l d   i n   B a s i s   f i l e   h e a d e r   t o   X   ( X   i s   a   s i g n e d   3 2 - b i t   i n t ) 
 
   - u s e r d a t a 1   X :   S e t   3 2 - b i t   u s e r d a t a 1   f i e l d   i n   B a s i s   f i l e   h e a d e r   t o   X   ( X   i s   a   s i g n e d   3 2 - b i t   i n t ) 
 
 
 
 - - -   E x a m p l e   L D R   E T C 1 S / U A S T C   L D R   4 x 4   c o m m a n d   l i n e s : 
 
   b a s i s u   x . p n g   :   C o m p r e s s   s R G B   i m a g e   x . p n g   t o   x . k t x 2   u s i n g   d e f a u l t   s e t t i n g s   ( m u l t i p l e   f i l e n a m e s   O K ,   u s e   - t e x _ a r r a y   i f   y o u   w a n t   a   t e x   a r r a y   v s .   m u l t i p l e   o u t p u t   f i l e s ) 
 
   b a s i s u   - b a s i s   x . q o i   :   C o m p r e s s   s R G B   i m a g e   x . q o i   t o   x . b a s i s   ( s u p p o r t s   2 4 - b i t   o r   3 2 - b i t   . Q O I   f i l e s ) 
 
   b a s i s u   x . k t x 2   :   U n p a c k   x . b a s i s   t o   P N G / K T X   f i l e s   ( m u l t i p l e   f i l e n a m e s   O K ) 
 
   b a s i s u   x . b a s i s   :   U n p a c k   x . b a s i s   t o   P N G / K T X   f i l e s   ( m u l t i p l e   f i l e n a m e s   O K ) 
 
   b a s i s u   - u a s t c   x . p n g   - u a s t c _ r d o _ l   2 . 0   - k t x 2   - s t a t s   :   C o m p r e s s   t o   a   U A S T C   . K T X 2   f i l e   w i t h   R D O   ( r a t e   d i s t o r t i o n   o p t i m i z a t i o n )   t o   r e d u c e   . K T X 2   c o m p r e s s e d   f i l e   s i z e 
 
   b a s i s u   - f i l e   x . p n g   - m i p m a p   - y _ f l i p   :   C o m p r e s s   a   m i p m a p p e d   x . k t x 2   f i l e   f r o m   a n   s R G B   i m a g e   n a m e d   x . p n g ,   Y   f l i p   e a c h   s o u r c e   i m a g e 
 
   b a s i s u   - v a l i d a t e   - f i l e   x . b a s i s   :   V a l i d a t e   x . b a s i s   ( c h e c k   h e a d e r ,   c h e c k   f i l e   C R C ' s ,   a t t e m p t   t o   t r a n s c o d e   a l l   s l i c e s ) 
 
   b a s i s u   - u n p a c k   - f i l e   x . b a s i s   :   V a l i d a t e s ,   t r a n s c o d e s   a n d   u n p a c k s   x . b a s i s   t o   m i p m a p p e d   . K T X   a n d   R G B / A   . P N G   f i l e s   ( t r a n s c o d e s   t o   a l l   s u p p o r t e d   G P U   t e x t u r e   f o r m a t s ) 
 
   b a s i s u   - q   2 5 5   - f i l e   x . p n g   - m i p m a p   - d e b u g   - s t a t s   :   C o m p r e s s   s R G B   x . p n g   t o   x . k t x 2   a t   q u a l i t y   l e v e l   2 5 5   w i t h   c o m p r e s s o r   d e b u g   o u t p u t / s t a t i s t i c s 
 
   b a s i s u   - l i n e a r   - m a x _ e n d p o i n t s   1 6 1 2 8   - m a x _ s e l e c t o r s   1 6 1 2 8   - f i l e   x . p n g   :   C o m p r e s s   n o n - s R G B   x . p n g   t o   x . k t x 2   u s i n g   t h e   l a r g e s t   s u p p o r t e d   m a n u a l l y   s p e c i f i e d   c o d e b o o k   s i z e s 
 
   b a s i s u   - b a s i s   - c o m p _ l e v e l   2   - m a x _ s e l e c t o r s   8 1 9 2   - m a x _ e n d p o i n t s   8 1 9 2   - t e x _ t y p e   v i d e o   - f r a m e r a t e   2 0   - m u l t i f i l e _ p r i n t f   " x % 0 2 u . p n g "   - m u l t i f i l e _ f i r s t   1   - m u l t i f i l e _ n u m   2 0   :   C o m p r e s s   a   2 0   s R G B   s o u r c e   i m a g e   v i d e o   s e q u e n c e   ( x 0 1 . p n g ,   x 0 2 . p n g ,   x 0 3 . p n g ,   e t c . )   t o   x 0 1 . b a s i s 
 
 
 
 - - -   E x a m p l e   U A S T C   H D R   4 x 4   c o m m a n d   l i n e s : 
 
   b a s i s u   x . e x r   :   C o m p r e s s   a   H D R   . E X R   ( o r   . H D R )   i m a g e   t o   a   U A S T C   H D R   4 x 4   . K T X 2   f i l e .   L D R / S D R   i m a g e s   w i l l   b e   u p c o n v e r t e d   t o   l i n e a r   l i g h t   H D R   b e f o r e   c o m p r e s s i o n .   S e e   H D R   u p c o n v e r s i o n   o p t i o n s ,   a b o v e . 
 
   b a s i s u   - h d r _ 4 x 4   x . e x r   :   C o m p r e s s   a   H D R   . E X R   i m a g e   t o   a   U A S T C   H D R   4 x 4   . K T X 2   f i l e . 
 
   b a s i s u   x . h d r   - u a s t c _ l e v e l   0   :   C o m p r e s s   a   H D R   . h d r   i m a g e   t o   a   U A S T C   H D R   4 x 4   . K T X 2   f i l e ,   f a s t e s t   e n c o d i n g   b u t   l o w e s t   q u a l i t y 
 
   b a s i s u   - h d r   x . p n g   :   C o m p r e s s   a   L D R   . P N G   i m a g e   t o   U A S T C   H D R   4 x 4   ( i m a g e   i s   c o n v e r t e d   f r o m   s R G B   t o   l i n e a r   l i g h t   f i r s t ,   u s e   - h d r _ l d r _ n o _ s r g b _ t o _ l i n e a r   t o   d i s a b l e ) 
 
   b a s i s u   x . h d r   - u a s t c _ l e v e l   3   :   C o m p r e s s   a   H D R   . h d r   i m a g e   t o   U A S T C   H D R   4 x 4   a t   h i g h e r   q u a l i t y   ( - u a s t c _ l e v e l   4   i s   h i g h e s t   q u a l i t y ,   b u t   v e r y   s l o w   e n c o d i n g ) 
 
   b a s i s u   x . h d r   - u a s t c _ l e v e l   3   - m i p m a p   - b a s i s   - s t a t s   - d e b u g   - d e b u g _ i m a g e s   :   C o m p r e s s   a   H D R   . h d r   i m a g e   t o   U A S T C   H D R   4 x 4 ,   . b a s i s   o u t p u t   f i l e ,   a t   h i g h e r   q u a l i t y ,   g e n e r a t e   m i p m a p s ,   o u t p u t   s t a t i s t i c s   a n d   d e b u g   i n f o r m a t i o n ,   a n d   w r i t e   t o n e   m a p p e d   d e b u g   i m a g e s 
 
   b a s i s u   x . h d r   - s t a t s   - h d r _ f a v o r _ a s t c   - h d r _ u b e r _ m o d e   - u a s t c _ l e v e l   4   :   H i g h e s t   a c h i e v a b l e   A S T C   H D R   4 x 4   q u a l i t y   ( v e r y   s l o w   e n c o d i n g ,   B C 6 H   q u a l i t y   i s   t r a d e d   o f f ) 
 
 
 
 - - -   E x a m p l e   U A S T C   H D R   6 x 6   c o m m a n d   l i n e s : 
 
   b a s i s u   - h d r _ 6 x 6   x . e x r   :   C o m p r e s s   a   H D R   . E X R   ( o r   . H D R )   i m a g e   t o   a   U A S T C   H D R   6 x 6   . K T X 2   f i l e .   L D R / S D R   i m a g e s   w i l l   b e   u p c o n v e r t e d   t o   l i n e a r   l i g h t   H D R   b e f o r e   c o m p r e s s i o n .   S e e   H D R   u p c o n v e r s i o n   o p t i o n s ,   a b o v e . 
 
   b a s i s u   - l a m b d a   1 0 0 0   - h d r _ 6 x 6   x . e x r   :   C o m p r e s s   a   H D R   . E X R   ( o r   . H D R )   i m a g e   t o   a   U A S T C   H D R   6 x 6   . K T X 2   f i l e   w i t h   r a t e - d i s t o r t i o n   o p t i m i z a t i o n   ( R D O ) ,   a t   l a m b d a   l e v e l   1 0 0 0 . 
 
   b a s i s u   - h d r _ 6 x 6 i   x . e x r   :   C o m p r e s s   a   H D R   . E X R   i m a g e   t o   a   c o m p r e s s e d   i n t e r m e d i a t e   f o r m a t   U A S T C   H D R   6 x 6   . K T X 2   f i l e . 
 
   b a s i s u   - l a m b d a   1 0 0 0   - h d r _ 6 x 6 i   x . e x r   :   C o m p r e s s   a   H D R   . E X R   i m a g e   t o   a   c o m p r e s s e d   i n t e r m e d i a t e   f o r m a t   U A S T C   H D R   6 x 6   . K T X 2   f i l e   w i t h   r a t e - d i s t o r t i o n   o p t i m i z a t i o n   ( R D O ) ,   a t   l a m b d a   l e v e l   1 0 0 0 . 
 
 
 
 - - -   V i d e o   n o t e s :   F o r   v i d e o   u s e ,   i t ' s   r e c o m m e n d e d   t o   e n c o d e   o n   a   m a c h i n e   w i t h   m a n y   c o r e s .   U s e   - c o m p _ l e v e l   2   o r   h i g h e r   f o r   b e t t e r   c o d e b o o k 
 
 g e n e r a t i o n ,   s p e c i f y   v e r y   l a r g e   c o d e b o o k s   u s i n g   - m a x _ e n d p o i n t s   a n d   - m a x _ s e l e c t o r s ,   a n d   r e d u c e   t h e   d e f a u l t   e n d p o i n t   R D O   t h r e s h o l d 
 
 ( - e n d p o i n t _ r d o _ t h r e s h )   t o   a r o u n d   1 . 2 5 .   V i d e o s   m a y   h a v e   m i p m a p s   a n d   a l p h a   c h a n n e l s .   V i d e o s   m u s t   a l w a y s   b e   p l a y e d   b a c k   b y   t h e   t r a n s c o d e r 
 
 i n   f i r s t   t o   l a s t   i m a g e   o r d e r . 
 
 V i d e o   f i l e s   c u r r e n t l y   u s e   I - F r a m e s   o n   t h e   f i r s t   i m a g e ,   a n d   P - F r a m e s   u s i n g   c o n d i t i o n a l   r e p l e n i s h m e n t   o n   s u b s e q u e n t   f r a m e s . 
 
 
 
 E T C 1 S   C o m p r e s s i o n   l e v e l   ( - c o m p _ l e v e l   X )   d e t a i l s .   T h i s   c o n t r o l s   t h e   E T C 1 S   s p e e d   v s .   q u a l i t y   t r a n d e o f f .   ( U s e   - q   t o   c o n t r o l   t h e   q u a l i t y   v s .   c o m p r e s s e d   s i z e   t r a d e o f f . ) : 
 
   L e v e l   0 :   F a s t e s t ,   b u t   h a s   m a r g i n a l   q u a l i t y   a n d   c a n   b e   b r i t t l e   o n   c o m p l e x   i m a g e s .   A v g .   Y   d B :   3 5 . 4 5 
 
   L e v e l   1 :   H i e r a r c h i c a l   c o d e b o o k   s e a r c h i n g ,   f a s t e r   E T C 1 S   e n c o d i n g .   3 6 . 8 7   d B ,   ~ 1 . 4 x   s l o w e r   v s .   l e v e l   0 .   ( T h i s   i s   t h e   d e f a u l t   s e t t i n g . ) 
 
   L e v e l   2 :   U s e   t h i s   o r   h i g h e r   f o r   v i d e o .   H i e r a r c h i c a l   c o d e b o o k   s e a r c h i n g .   3 6 . 8 7   d B ,   ~ 1 . 4 x   s l o w e r   v s .   l e v e l   0 .   ( T h i s   i s   t h e   v 1 . 1 2 ' s   d e f a u l t   s e t t i n g . ) 
 
   L e v e l   3 :   F u l l   c o d e b o o k   s e a r c h i n g .   3 7 . 1 3   d B ,   ~ 1 . 8 x   s l o w e r   v s .   l e v e l   0 .   ( E q u i v a l e n t   t h e   t h e   i n i t i a l   r e l e a s e ' s   d e f a u l t   s e t t i n g s . ) 
 
   L e v e l   4 :   H i e r a r c h i c a l   c o d e b o o k   s e a r c h i n g ,   c o d e b o o k   k - m e a n s   i t e r a t i o n s .   3 7 . 1 5   d B ,   ~ 4 x   s l o w e r   v s .   l e v e l   0 
 
   L e v e l   5 :   F u l l   c o d e b o o k   s e a r c h i n g ,   c o d e b o o k   k - m e a n s   i t e r a t i o n s .   3 7 . 4 1   d B ,   ~ 5 . 5 x   s l o w e r   v s .   l e v e l   0 . 
 
   L e v e l   6 :   F u l l   c o d e b o o k   s e a r c h i n g ,   t w i c e   a s   m a n y   c o d e b o o k   k - m e a n s   i t e r a t i o n s ,   b e s t   E T C 1   e n d p o i n t   o p t .   3 7 . 4 3   d B ,   ~ 1 2 x   s l o w e r   v s .   l e v e l   0 
 
 
 
 