History

Merge "Add VPX_TS_ prefix to MAX_LAYERS, MAX_PERIODICITY" into eider

John Koleszar committed 14 years ago

Commit 9f9cc8f2 parents d8216b1 d46ddd04 files · +32 −28Browse files

Unified · Split

4 files
  1. vp8/common/onyx.h +3 −3
  2. vp8/encoder/onyx_int.h +15 −17
  3. vp8_scalable_patterns.c +3 −3
  4. vpx/vpx_encoder.h +11 −5
vp8/common/onyx.h+3−3
@@ -207,10 +207,10 @@ extern "C" · 206 unmodified lines
207207
208208 // Temporal scaling parameters
209209 unsigned int number_of_layers;
210− unsigned int target_bitrate[MAX_PERIODICITY];
211− unsigned int rate_decimator[MAX_PERIODICITY];
210+ unsigned int target_bitrate[VPX_TS_MAX_PERIODICITY];
211+ unsigned int rate_decimator[VPX_TS_MAX_PERIODICITY];
212212 unsigned int periodicity;
213− unsigned int layer_id[MAX_PERIODICITY];
213+ unsigned int layer_id[VPX_TS_MAX_PERIODICITY];
214214
215215 #if CONFIG_MULTI_RES_ENCODING
216216 /* Number of total resolutions encoded */
vp8/encoder/onyx_int.h+15−17
@@ -57,8 +57,6 @@ · 56 unmodified lines
5757 #define VP8_TEMPORAL_ALT_REF 1
5858 #endif
5959
60−#define MAX_PERIODICITY 16
61−
6260 #define MAX(x,y) (((x)>(y))?(x):(y))
6361 #define MIN(x,y) (((x)<(y))?(x):(y))
6462
@@ -670,21 +668,21 @@ typedef struct VP8_COMP · 605 unmodified lines
670668
671669 // Coding layer state variables
672670 unsigned int current_layer;
673− LAYER_CONTEXT layer_context[MAX_LAYERS];
674−
675− int64_t frames_in_layer[MAX_LAYERS];
676− int64_t bytes_in_layer[MAX_LAYERS];
677− double sum_psnr[MAX_LAYERS];
678− double sum_psnr_p[MAX_LAYERS];
679− double total_error2[MAX_LAYERS];
680− double total_error2_p[MAX_LAYERS];
681− double sum_ssim[MAX_LAYERS];
682− double sum_weights[MAX_LAYERS];
683−
684− double total_ssimg_y_in_layer[MAX_LAYERS];
685− double total_ssimg_u_in_layer[MAX_LAYERS];
686− double total_ssimg_v_in_layer[MAX_LAYERS];
687− double total_ssimg_all_in_layer[MAX_LAYERS];
671+ LAYER_CONTEXT layer_context[VPX_TS_MAX_LAYERS];
672+
673+ int64_t frames_in_layer[VPX_TS_MAX_LAYERS];
674+ int64_t bytes_in_layer[VPX_TS_MAX_LAYERS];
675+ double sum_psnr[VPX_TS_MAX_LAYERS];
676+ double sum_psnr_p[VPX_TS_MAX_LAYERS];
677+ double total_error2[VPX_TS_MAX_LAYERS];
678+ double total_error2_p[VPX_TS_MAX_LAYERS];
679+ double sum_ssim[VPX_TS_MAX_LAYERS];
680+ double sum_weights[VPX_TS_MAX_LAYERS];
681+
682+ double total_ssimg_y_in_layer[VPX_TS_MAX_LAYERS];
683+ double total_ssimg_u_in_layer[VPX_TS_MAX_LAYERS];
684+ double total_ssimg_v_in_layer[VPX_TS_MAX_LAYERS];
685+ double total_ssimg_all_in_layer[VPX_TS_MAX_LAYERS];
688686
689687 #if CONFIG_MULTI_RES_ENCODING
690688 /* Number of MBs per row at lower-resolution level */
vp8_scalable_patterns.c+3−3
@@ -117,7 +117,7 @@ static void write_ivf_frame_header(FILE *outfile, · 116 unmodified lines
117117 static int mode_to_num_layers[9] = {2, 2, 3, 3, 3, 3, 5, 2, 3};
118118
119119 int main(int argc, char **argv) {
120− FILE *infile, *outfile[MAX_LAYERS];
120+ FILE *infile, *outfile[VPX_TS_MAX_LAYERS];
121121 vpx_codec_ctx_t codec;
122122 vpx_codec_enc_cfg_t cfg;
123123 int frame_cnt = 0;
@@ -133,8 +133,8 @@ int main(int argc, char **argv) { · 9 unmodified lines
133133 int frame_duration = 1; // 1 timebase tick per frame
134134
135135 int layering_mode = 0;
136− int frames_in_layer[MAX_LAYERS] = {0};
137− int layer_flags[MAX_PERIODICITY] = {0};
136+ int frames_in_layer[VPX_TS_MAX_LAYERS] = {0};
137+ int layer_flags[VPX_TS_MAX_PERIODICITY] = {0};
138138 int flag_periodicity;
139139 int max_intra_size_pct;
140140
vpx/vpx_encoder.h+11−5
@@ -35,10 +35,16 @@ extern "C" { · 34 unmodified lines
3535 /*! Temporal Scalability: Maximum length of the sequence defining frame
3636 * layer membership
3737 */
38−#define MAX_PERIODICITY 16
38+#define VPX_TS_MAX_PERIODICITY 16
3939
4040 /*! Temporal Scalability: Maximum number of coding layers */
41−#define MAX_LAYERS 5
41+#define VPX_TS_MAX_LAYERS 5
42+
43+/*!\deprecated Use #VPX_TS_MAX_PERIODICITY instead. */
44+#define MAX_PERIODICITY VPX_TS_MAX_PERIODICITY
45+
46+/*!\deprecated Use #VPX_TS_MAX_LAYERS instead. */
47+#define MAX_LAYERS VPX_TS_MAX_LAYERS
4248
4349 /*!\brief Current ABI version number
4450 *
@@ -613,14 +619,14 @@ extern "C" { · 568 unmodified lines
613619 *
614620 * These values specify the target coding bitrate for each coding layer.
615621 */
616− unsigned int ts_target_bitrate[MAX_LAYERS];
622+ unsigned int ts_target_bitrate[VPX_TS_MAX_LAYERS];
617623
618624 /*!\brief Frame rate decimation factor for each layer
619625 *
620626 * These values specify the frame rate decimation factors to apply
621627 * to each layer.
622628 */
623− unsigned int ts_rate_decimator[MAX_LAYERS];
629+ unsigned int ts_rate_decimator[VPX_TS_MAX_LAYERS];
624630
625631 /*!\brief Length of the sequence defining frame layer membership
626632 *
@@ -638,7 +644,7 @@ extern "C" { · 11 unmodified lines
638644 * and odd numbered frames to a second layer (1) with ts_periodicity=8,
639645 * then ts_layer_id = (0,1,0,1,0,1,0,1).
640646 */
641− unsigned int ts_layer_id[MAX_PERIODICITY];
647+ unsigned int ts_layer_id[VPX_TS_MAX_PERIODICITY];
642648 } vpx_codec_enc_cfg_t; /**< alias for struct vpx_codec_enc_cfg */
643649
644650

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t