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
- fixed regression: mov/png-sequence decoding.
[handbrake-jp/handbrake-jp-git.git]
/
libhb
/
enctheora.c
diff --git
a/libhb/enctheora.c
b/libhb/enctheora.c
index
274887f
..
29dfed1
100644
(file)
--- a/
libhb/enctheora.c
+++ b/
libhb/enctheora.c
@@
-42,10
+42,10
@@
int enctheoraInit( hb_work_object_t * w, hb_job_t * job )
ti.offset_x = ti.offset_y = 0;
ti.fps_numerator = job->vrate;
ti.fps_denominator = job->vrate_base;
ti.offset_x = ti.offset_y = 0;
ti.fps_numerator = job->vrate;
ti.fps_denominator = job->vrate_base;
- if
(job->pixel_ratio
)
+ if
( job->anamorphic.mode
)
{
{
- ti.aspect_numerator = job->
pixel_aspect
_width;
- ti.aspect_denominator = job->
pixel_aspect
_height;
+ ti.aspect_numerator = job->
anamorphic.par
_width;
+ ti.aspect_denominator = job->
anamorphic.par
_height;
}
else
{
}
else
{
@@
-63,7
+63,7
@@
int enctheoraInit( hb_work_object_t * w, hb_job_t * job )
ti.keyframe_mindistance = 8;
ti.noise_sensitivity = 1;
ti.sharpness = 0;
ti.keyframe_mindistance = 8;
ti.noise_sensitivity = 1;
ti.sharpness = 0;
- if (job->vquality < 0.0
|| job->vquality > 1.0
)
+ if (job->vquality < 0.0)
{
ti.target_bitrate = job->vbitrate * 1000;
ti.keyframe_data_target_bitrate = job->vbitrate * 1000 * 1.5;
{
ti.target_bitrate = job->vbitrate * 1000;
ti.keyframe_data_target_bitrate = job->vbitrate * 1000 * 1.5;
@@
-72,7
+72,15
@@
int enctheoraInit( hb_work_object_t * w, hb_job_t * job )
else
{
ti.target_bitrate = 0;
else
{
ti.target_bitrate = 0;
- ti.quality = 63 * job->vquality;
+
+ if( job->vquality > 0 && job->vquality < 1 )
+ {
+ ti.quality = 63 * job->vquality;
+ }
+ else
+ {
+ ti.quality = job->vquality;
+ }
}
theora_encode_init( &pv->theora, &ti );
}
theora_encode_init( &pv->theora, &ti );
@@
-142,13
+150,13
@@
int enctheoraWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
yuv.y_height = job->height;
yuv.y_stride = job->width;
yuv.y_height = job->height;
yuv.y_stride = job->width;
- yuv.uv_width =
job->width
/ 2;
- yuv.uv_height =
job->height
/ 2;
- yuv.uv_stride =
job->width / 2
;
+ yuv.uv_width =
(job->width + 1)
/ 2;
+ yuv.uv_height =
(job->height + 1)
/ 2;
+ yuv.uv_stride =
yuv.uv_width
;
yuv.y = in->data;
yuv.u = in->data + job->width * job->height;
yuv.y = in->data;
yuv.u = in->data + job->width * job->height;
- yuv.v = in->data +
job->width * job->height * 5/4
;
+ yuv.v = in->data +
( job->width * job->height ) + ( yuv.uv_width * yuv.uv_height )
;
theora_encode_YUVin(&pv->theora, &yuv);
theora_encode_YUVin(&pv->theora, &yuv);