OSDN Git Service
(root)
/
handbrake-jp
/
handbrake-jp-git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WinGui:
[handbrake-jp/handbrake-jp-git.git]
/
libhb
/
encavcodec.c
diff --git
a/libhb/encavcodec.c
b/libhb/encavcodec.c
index
d102548
..
22eb286
100644
(file)
--- a/
libhb/encavcodec.c
+++ b/
libhb/encavcodec.c
@@
-5,8
+5,7
@@
It may be used under the terms of the GNU General Public License. */
#include "hb.h"
It may be used under the terms of the GNU General Public License. */
#include "hb.h"
-
-#include "libavcodec/avcodec.h"
+#include "hbffmpeg.h"
struct hb_work_private_s
{
struct hb_work_private_s
{
@@
-107,13
+106,13
@@
int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
context->gop_size = 10 * job->vrate / job->vrate_base;
context->pix_fmt = PIX_FMT_YUV420P;
context->gop_size = 10 * job->vrate / job->vrate_base;
context->pix_fmt = PIX_FMT_YUV420P;
- if( job->
pixel_ratio
)
+ if( job->
anamorphic.mode
)
{
{
- context->sample_aspect_ratio.num = job->
pixel_aspect
_width;
- context->sample_aspect_ratio.den = job->
pixel_aspect
_height;
+ context->sample_aspect_ratio.num = job->
anamorphic.par
_width;
+ context->sample_aspect_ratio.den = job->
anamorphic.par
_height;
hb_log( "encavcodec: encoding with stored aspect %d/%d",
hb_log( "encavcodec: encoding with stored aspect %d/%d",
- job->
pixel_aspect_width, job->pixel_aspect
_height );
+ job->
anamorphic.par_width, job->anamorphic.par
_height );
}
if( job->mux & ( HB_MUX_MP4 | HB_MUX_PSP ) )
}
if( job->mux & ( HB_MUX_MP4 | HB_MUX_PSP ) )
@@
-159,7
+158,7
@@
int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
}
}
}
}
- if( avcodec_open( context, codec ) )
+ if(
hb_
avcodec_open( context, codec ) )
{
hb_log( "hb_work_encavcodec_init: avcodec_open failed" );
}
{
hb_log( "hb_work_encavcodec_init: avcodec_open failed" );
}
@@
-192,9
+191,9
@@
void encavcodecClose( hb_work_object_t * w )
if( pv->context )
{
if( pv->context )
{
- hb_
log(
"encavcodec: closing libavcodec" );
+ hb_
deep_log( 2,
"encavcodec: closing libavcodec" );
avcodec_flush_buffers( pv->context );
avcodec_flush_buffers( pv->context );
- avcodec_close( pv->context );
+
hb_
avcodec_close( pv->context );
}
if( pv->file )
{
}
if( pv->file )
{
@@
-237,7
+236,7
@@
int encavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
frame->quality = pv->context->global_quality;
/* Should be way too large */
frame->quality = pv->context->global_quality;
/* Should be way too large */
- buf = hb_
buffer_init( 3 * job->width * job->height / 2
);
+ buf = hb_
video_buffer_init( job->width, job->height
);
buf->size = avcodec_encode_video( pv->context, buf->data, buf->alloc,
frame );
buf->start = in->start;
buf->size = avcodec_encode_video( pv->context, buf->data, buf->alloc,
frame );
buf->start = in->start;