root/platform/sx410is/sub/movie_rec_hdr.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. change_video_tables
  2. set_quality
  3. save_original_bitrates
  4. modify_bitrate

   1 #include "conf.h"
   2 
   3 static int bitrate_multiplier = 4; // unit: factory rate / 4
   4 static int bitrate_changed = 0;
   5 extern int video_target_framesize;
   6 extern int video_target_framesize2;
   7 
   8 
   9 static int orig_bitrate[2]; // original bitrates, saved at beginning of recording
  10 
  11 void change_video_tables(int a, int b) {
  12     bitrate_multiplier = (a<<2)/b;
  13     bitrate_changed = 1;
  14 }
  15 
  16 // firmware: -12 (best) ... +20 (worst)
  17 void  set_quality(int *x){ // -17 highest; +12 lowest
  18  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
  19 }
  20 
  21 void save_original_bitrates() {
  22     orig_bitrate[0] = video_target_framesize;
  23     orig_bitrate[1] = video_target_framesize2;
  24     bitrate_changed = 1;
  25 }
  26 
  27 void modify_bitrate() {
  28     if (bitrate_changed) {
  29         bitrate_changed = 0;
  30         video_target_framesize = (orig_bitrate[0] * bitrate_multiplier) >> 2;
  31         video_target_framesize2 = (orig_bitrate[1] * bitrate_multiplier) >> 2;
  32     }
  33 }
  34 

/* [<][>][^][v][top][bottom][index][help] */