Changeset 4742
- Timestamp:
- 03/29/10 16:15:55 (3 years ago)
- Files:
-
- 1 modified
-
vic/branches/cc/codec/encoder-h261.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vic/branches/cc/codec/encoder-h261.cpp
r4726 r4742 195 195 u_int blkno_[12]; /* for CR */ 196 196 197 // print Tx queue info 198 inline void print_txq_info() { 199 fprintf(stderr, " now: %f\ttxq_now: %d\n", 200 get_now(), tx_->tx_buf_size()); 201 } 202 inline void print_txq_info(int len) { 203 fprintf(stderr, " now: %f\ttxq_now: %d\n", 204 get_now(), len); 205 } 206 inline void print_txq_info(int len, int dif) { 207 fprintf(stderr, " now: %f\ttxq_now: %d\tdif: %d\n", 208 get_now(), len, dif); 209 } 210 // print Tx queue sent more 211 inline void print_sent_more() { 212 fprintf(stderr, "\tnow: %f\tsent: %d more: %d vf[%d]: %d\n", 213 get_now(), num_sent_, sent_more_, 214 vfno_%FHSIZE, ppframe_[vfno_%FHSIZE]); 215 } 216 // print encoding time 217 inline void print_enc_time() { 218 fprintf(stderr, " now: %f\tenc_time: %f\n\n", 219 get_now(), (enc_end_ - enc_start_)); 220 } 221 // print packers per frame 222 inline void print_ppframe() { 223 fprintf(stderr, "\tnow: %f\tppframe[%d]: %d\n", 224 get_now(), vfno_%FHSIZE, ppframe_[vfno_%FHSIZE]); 225 } 226 197 227 private: 198 228 }; … … 804 834 // increment the number of packets for this frame 805 835 ppframe_[vfno_%FHSIZE]++; 806 fprintf(stderr, "\tnow: %f\tppframe[%d]: %d\n",807 get_now(), vfno_%FHSIZE, ppframe_[vfno_%FHSIZE]); 836 print_ppframe(); 837 808 838 tx_->send(pb); 809 839 … … 829 859 // Tx queue size before entering this encoding 830 860 txq_beg_ = tx_->tx_buf_size(); 831 fprintf(stderr, " now: %f\ttxq_now: %d\n", 832 get_now(), txq_beg_); 861 print_txq_info(txq_beg_); 833 862 // sent packets after the previous encoding round, 834 863 // but before starting this encoding instance. … … 836 865 // upon XR reception in between two encoding instances. 837 866 sent_more_ = txq_end_ - txq_beg_; 838 839 fprintf(stderr, "\tnow: %f\tsent: %d more: %d vf[%d]: %d\n", 840 get_now(), num_sent_, sent_more_, 841 vfno_%FHSIZE, ppframe_[vfno_%FHSIZE]); 867 print_sent_more(); 842 868 843 869 // all encoded packets associated with … … 876 902 num_sent_ = ppframe_[vfno_%FHSIZE] - txq_dif_; 877 903 878 fprintf(stderr, " now: %f\ttxq_now: %d\tdif: %d\n", 879 get_now(), txq_end_, txq_dif_); 880 881 fprintf(stderr, " now: %f\tenc_time: %f\n\n", 882 get_now(), (enc_end_ - enc_start_)); 904 print_txq_info(txq_end_, txq_dif_); 905 print_enc_time(); 883 906 884 907 return(cc); … … 889 912 H261Encoder::encode(const VideoFrame* vf, const u_int8_t *crvec) 890 913 { 914 // time measurement 891 915 enc_start_ = get_now(); 892 916 fprintf(stderr,">>>h261_encode_start\tnow: %f\n", enc_start_);
