summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-10-23 19:11:31 +0000
committerjstebbins <[email protected]>2010-10-23 19:11:31 +0000
commit71339bee34b6dbc248ee2027ead281369f02024c (patch)
treeff7459e51ab72d48a58b4b0a5bb59284523f7eca /libhb
parenta31c919e771257d81192439f3afcea0f444a27bc (diff)
clean up crufty legacy code
remove unused code relating to avi, ogm, psp, ipod, and forcing h264 levels git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3622 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/common.c12
-rw-r--r--libhb/common.h7
-rw-r--r--libhb/encavcodec.c8
-rw-r--r--libhb/encx264.c17
-rw-r--r--libhb/muxcommon.c8
-rw-r--r--libhb/muxmp4.c2
-rw-r--r--libhb/work.c18
7 files changed, 5 insertions, 67 deletions
diff --git a/libhb/common.c b/libhb/common.c
index d800267fe..9c6120a44 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -488,16 +488,8 @@ int hb_calc_bitrate( hb_job_t * job, int size )
(quite guessed) */
switch( job->mux )
{
- case HB_MUX_MP4:
- case HB_MUX_PSP:
- case HB_MUX_IPOD:
- case HB_MUX_MKV:
- overhead = 6;
- break;
- case HB_MUX_AVI:
- overhead = 24;
- break;
- case HB_MUX_OGM:
+ case HB_MUX_MP4:
+ case HB_MUX_MKV:
overhead = 6;
break;
default:
diff --git a/libhb/common.h b/libhb/common.h
index 7383bf627..bb394c4f4 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -220,7 +220,6 @@ struct hb_job_s
vrate, vrate_base: output framerate is vrate / vrate_base
cfr: 0 (vfr), 1 (cfr), 2 (pfr) [see render.c]
pass: 0, 1 or 2 (or -1 for scan)
- h264_level: vestigial boolean to decide if we're encoding for iPod
x264opts: string of extra x264 options
areBframes: boolean to note if b-frames are included in x264opts */
#define HB_VCODEC_MASK 0x0000FF
@@ -236,8 +235,6 @@ struct hb_job_s
int vfr;
int cfr;
int pass;
- int h264_13;
- int h264_level;
char *x264opts;
int areBframes;
int color_matrix;
@@ -253,10 +250,6 @@ struct hb_job_s
file: file path */
#define HB_MUX_MASK 0xFF0000
#define HB_MUX_MP4 0x010000
-#define HB_MUX_PSP 0x020000
-#define HB_MUX_AVI 0x040000
-#define HB_MUX_OGM 0x080000
-#define HB_MUX_IPOD 0x100000
#define HB_MUX_MKV 0x200000
int mux;
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
index 5ae5a3929..eaf7b7020 100644
--- a/libhb/encavcodec.c
+++ b/libhb/encavcodec.c
@@ -115,14 +115,10 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
job->anamorphic.par_width, job->anamorphic.par_height );
}
- if( job->mux & ( HB_MUX_MP4 | HB_MUX_PSP ) )
+ if( job->mux & HB_MUX_MP4 )
{
context->flags |= CODEC_FLAG_GLOBAL_HEADER;
}
- if( job->mux & HB_MUX_PSP )
- {
- context->flags |= CODEC_FLAG_BITEXACT;
- }
if( job->grayscale )
{
context->flags |= CODEC_FLAG_GRAY;
@@ -164,7 +160,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
}
pv->context = context;
- if( ( job->mux & ( HB_MUX_MP4 | HB_MUX_PSP ) ) && job->pass != 1 )
+ if( ( job->mux & HB_MUX_MP4 ) && job->pass != 1 )
{
#if 0
/* Hem hem */
diff --git a/libhb/encx264.c b/libhb/encx264.c
index 2a3c2b6e2..83d3edabb 100644
--- a/libhb/encx264.c
+++ b/libhb/encx264.c
@@ -169,13 +169,6 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job )
}
param.i_log_level = X264_LOG_INFO;
- if( job->h264_level )
- {
- param.b_cabac = 0;
- param.i_level_idc = job->h264_level;
- hb_log( "encx264: encoding at level %i",
- param.i_level_idc );
- }
/*
This section passes the string x264opts to libx264 for parsing into
@@ -426,16 +419,6 @@ static hb_buffer_t *nal_encode( hb_work_object_t *w, x264_picture_t *pic_out,
continue;
}
- if( job->mux & HB_MUX_AVI )
- {
- if( nal[i].i_ref_idc == NAL_PRIORITY_HIGHEST )
- {
- buf->frametype = HB_FRAME_KEY;
- }
- buf->size += size;
- continue;
- }
-
/* H.264 in .mp4 or .mkv */
switch( nal[i].i_type )
{
diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c
index ca7e20ae0..f47b442b5 100644
--- a/libhb/muxcommon.c
+++ b/libhb/muxcommon.c
@@ -451,16 +451,8 @@ hb_work_object_t * hb_muxer_init( hb_job_t * job )
switch( job->mux )
{
case HB_MUX_MP4:
- case HB_MUX_PSP:
- case HB_MUX_IPOD:
mux->m = hb_mux_mp4_init( job );
break;
- case HB_MUX_AVI:
- mux->m = hb_mux_avi_init( job );
- break;
- case HB_MUX_OGM:
- mux->m = hb_mux_ogm_init( job );
- break;
case HB_MUX_MKV:
mux->m = hb_mux_mkv_init( job );
break;
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index 3580a5459..7cd4e0fcf 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -148,7 +148,7 @@ static int MP4Init( hb_mux_object_t * m )
MP4AddH264PictureParameterSet( m->file, mux_data->track,
job->config.h264.pps, job->config.h264.pps_length );
- if( job->h264_level == 30 || job->ipod_atom)
+ if( job->ipod_atom )
{
hb_deep_log( 2, "muxmp4: adding iPod atom");
MP4AddIPodUUID(m->file, mux_data->track);
diff --git a/libhb/work.c b/libhb/work.c
index ebbc408bf..cf8d4d464 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -183,17 +183,9 @@ void hb_display_job_info( hb_job_t * job )
hb_log( " + custom color matrix: %s", job->color_matrix == 1 ? "ITU Bt.601 (SD)" : "ITU Bt.709 (HD)");
break;
- case HB_MUX_AVI:
- hb_log(" + container: AVI");
- break;
-
case HB_MUX_MKV:
hb_log(" + container: Matroska (.mkv)");
break;
-
- case HB_MUX_OGM:
- hb_log(" + conttainer: Ogg Media (.ogm)");
- break;
}
if( job->chapter_markers )
@@ -478,16 +470,6 @@ static void do_job( hb_job_t * job, int cpu_count )
hb_log( "New dimensions %i * %i", job->width, job->height );
}
- if( job->mux & HB_MUX_AVI )
- {
- // The concept of variable frame rate video was a bit too advanced
- // for Microsoft so AVI doesn't support it. Since almost all dvd
- // video is VFR we have to convert it to constant frame rate to
- // put it in an AVI container. So duplicate, drop and
- // otherwise trash video frames to appease the gods of Redmond.
- job->cfr = 1;
- }
-
if ( job->cfr == 0 )
{
/* Ensure we're using "Same as source" FPS */