Commit Graph

507 Commits

Author SHA1 Message Date
Jeff Downs
18c7be6501 Initialize outputed_poc to INT_MIN at decoder initialization.
Fixes issue 560

Originally committed as revision 14428 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-27 13:49:04 +00:00
Paul Kendall
143d7f1443 left_block intialisation optimisation.
This patch changes the left_block initialisation code in the fill_caches
function from individual array element setters to a simple pointer to a
pre-initialised array.
Patch by (Paul Kendall ! paul X kcbbs knodel gen knodel nz)
Date: Sun, 27 Jul 2008 11:40:18 +1200
Subject: [FFmpeg-devel] [PATCH] h264 fill_caches left_block intialisation optimisation

Originally committed as revision 14427 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-27 13:01:17 +00:00
Jeff Downs
e791eb1ed4 And.... Fix another spec reference to be more specific and correct.
Originally committed as revision 14423 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-26 18:38:30 +00:00
Jeff Downs
25f8bceb1c Fix reference to spec to be more specific and correct.
Originally committed as revision 14422 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-26 18:34:34 +00:00
Paul Kendall
4a1aa38bda Simple refactoring to resolve a FIXME. Patch by Paul Kendall.
Originally committed as revision 14419 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-26 15:07:04 +00:00
Michael Niedermayer
fef744d404 indent
Originally committed as revision 14408 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-26 02:31:19 +00:00
Michael Niedermayer
0af6967ee7 chroma_format_idc=0 aka grayscale support.
Can be disabled by removing #define ALLOW_NOCHROMA in case the extra if()
slow the code down measurably.
Fixes at least
FRExt/HPCAMOLQ_BRCM_B.264
FRExt/HPCVMOLQ_BRCM_B.264

Originally committed as revision 14407 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-26 02:27:14 +00:00
Michael Niedermayer
af8c5e08d7 Revert r14404
Remove another 2 incorrect checks.
	These would ignore fields of different parity.
I was wrong, i thought pic_stricture is the current pic structure.
But it does not make a difference either way on the reference bitstreams.

Originally committed as revision 14405 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 23:55:31 +00:00
Michael Niedermayer
d9022d38fb Remove another 2 incorrect checks.
These would ignore fields of different parity.

Originally committed as revision 14404 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 23:49:01 +00:00
Michael Niedermayer
79b5c77692 Print an error if a reference picture is missing.
Originally committed as revision 14403 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 23:39:43 +00:00
Michael Niedermayer
6edac8e104 Remove mysterious ref->data[0] check.
What the standard calls non-existent is not related to the
value of the data[0] pointer.

Originally committed as revision 14402 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 23:36:48 +00:00
Michael Niedermayer
99157e499c 10l typo, fix compilation
Originally committed as revision 14401 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 22:42:49 +00:00
Michael Niedermayer
91ea868eeb Remove another stupidity, long_ref==0 check 4 lines after assert(long_ref==0).
Originally committed as revision 14400 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 22:39:43 +00:00
Michael Niedermayer
b3e93fd408 indent
Originally committed as revision 14399 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 21:51:50 +00:00
Michael Niedermayer
d4f7d83866 Rewrite fill_default_ref_list(), the old code was obfuscated beyond
repair with hacks.
new code is ~60lines old was ~200
Fixes at least:
FRExt/HCHP2_HHI_A.264
one sample also get decoded much better:
FRExt/FRExt1_Panasonic.avc (PSNR 11 -> 80)
(no i do not know why, the old code was too a big mess to figure out
 what it did)

Originally committed as revision 14398 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 21:46:15 +00:00
Michael Niedermayer
37dcf83077 Do not scare the user with error messages when everything is ok.
Originally committed as revision 14396 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 14:52:58 +00:00
Michael Niedermayer
d9e3242213 Make remove_short() match remove_long() in that it calls unreference_pic().
Originally committed as revision 14395 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 14:00:01 +00:00
Michael Niedermayer
472c9a58a8 Removing yet another weird field pic special case,
now related to SHORT2LONG MMCOs.

Originally committed as revision 14394 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 13:40:13 +00:00
Michael Niedermayer
9c0e46242f Make remove_long() call unreference_pic() internally.
Originally committed as revision 14393 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 13:09:06 +00:00
Michael Niedermayer
1cea5d0d03 Merge oddly duplicated remove_long/remove_long_at_index() function.
Originally committed as revision 14392 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 12:56:58 +00:00
Michael Niedermayer
6f45060851 Remove strange long_ref=0.
Originally committed as revision 14391 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 12:34:39 +00:00
Michael Niedermayer
4f10312c19 indent
Originally committed as revision 14390 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 12:26:24 +00:00
Michael Niedermayer
3f1e179747 10000l, forgotton }
Originally committed as revision 14389 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 12:25:28 +00:00
Michael Niedermayer
c29e05e60d Remove another of these obfuscated special cases for field pictures
that does not do anything.

Originally committed as revision 14388 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 12:23:41 +00:00
Michael Niedermayer
c725090004 Simplify mmco setup code used in IDR pictures.
Originally committed as revision 14387 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 12:12:25 +00:00
Michael Niedermayer
57288c4a06 Remove redundant h->mmco_index= 0.
Originally committed as revision 14386 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 12:02:45 +00:00
Michael Niedermayer
5118c6c771 Assert that long_ref has been cleared for released pics.
Originally committed as revision 14385 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 11:54:03 +00:00
Michael Niedermayer
849b9cef32 Clear long_ref when a frame is no longer a long_ref.
Originally committed as revision 14384 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 11:52:40 +00:00
Michael Niedermayer
d9fe1749fc Make sure mmco index is 0 (instead of uninitialized) in all error returns.
Originally committed as revision 14383 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 11:48:32 +00:00
Michael Niedermayer
9296f5d81a Simplify strange obfuscated code in MMCO_LONG handling.
Note, this might change behavior for invalid bitstreams.

Originally committed as revision 14381 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-25 00:13:02 +00:00
Michael Niedermayer
357282c6f3 Set field_poc (it was half uninitialized before) and use it
instead of the fragile first_field check to determine if we have
2 fields at the end.

Originally committed as revision 14380 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-24 23:43:44 +00:00
Michael Niedermayer
b78a6baaf1 Minor simplification of code in init_poc().
Originally committed as revision 14379 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-24 22:29:38 +00:00
Michael Niedermayer
5710b37160 cosmetics (indent and 2 empty lines)
Originally committed as revision 14378 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-24 22:05:58 +00:00
Michael Niedermayer
80f8e035ba init_poc() vs. idr() cleanup
Originally committed as revision 14377 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-24 22:04:29 +00:00
Michael Niedermayer
ac5057c2de Fix loop filter with CAVLC 8x8dct.
Fixes at least:
FRExt/HPCV_BRCM_A.264
FRExt/HVLCFI0_Sony_B.264
FRExt/HVLCPFF0_Sony_B.264
H264_artifacts_motion.h264

Originally committed as revision 14373 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-24 17:13:37 +00:00
Diego Biurrun
1412060e78 misc spelling/grammar fixes
Originally committed as revision 14367 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-24 10:55:36 +00:00
Michael Niedermayer
a149c1a59f Reset prev_frame_num for idr frames as required by the spec.
Originally committed as revision 14354 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-24 00:45:18 +00:00
Michael Niedermayer
b4cf222870 Better explanation for buf_size==0 code.
Originally committed as revision 14353 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-23 17:24:11 +00:00
Michael Niedermayer
cf67f1655c 100l cross_idr simplification had a typo
Originally committed as revision 14351 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-23 14:59:55 +00:00
Michael Niedermayer
f3ba9db42d Remove truncated support, use an AVParser if you used that, it is the same.
Originally committed as revision 14350 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-23 14:44:07 +00:00
Michael Niedermayer
617e42e2c4 Simplify cross_idr calculation.
Originally committed as revision 14349 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-23 14:37:15 +00:00
Michael Niedermayer
55f22dd473 Remove redundant keyframe checks.
Originally committed as revision 14347 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-23 11:24:04 +00:00
Michael Niedermayer
26b86e47c0 Support gaps in the frame num.
Fixes at least:
MR3_TANDBERG_B.264
MR4_TANDBERG_C.264
MR5_TANDBERG_C.264

Originally committed as revision 14339 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-23 02:12:54 +00:00
Michael Niedermayer
e44e48372b Reset frame_num for MMCO 5.
Fixes at least
MR2_TANDBERG_E.264

Originally committed as revision 14338 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-22 19:30:45 +00:00
Michael Niedermayer
2e916cb392 3rd try to get the loop filter ref/mv check working correctly.
Fixes at least:
src19td.IBP.264
CVWP3_TOSHIBA_E.264
cvmp_mot_picaff0_full_B.26l
CVMP_MOT_FRM_L31_B.26l
cvmp_mot_frm0_full_B.26l
CVMP_MOT_FLD_L30_B.26l
cvmp_mot_fld0_full_B.26l

Originally committed as revision 14337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-22 17:44:36 +00:00
Michael Niedermayer
5a78bfbde7 qscale has a range of 0..51 we thus do not need a 256 entry table and neither need
to and it with 0xFF.

Originally committed as revision 14336 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-22 13:01:10 +00:00
Michael Niedermayer
a82688b003 Setting chroma_qp to 0 for PCM blocks is really an interesting minor
optimization, more interresting would it have been had the author
thought about what value chroma_qp would have for the following MB.
Or failing that, had actually tested the code.
So this reverts this non-functional optimization, and makes the code work.
Fixes at least CAPM3_Sony_D.jsv

Originally committed as revision 14335 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-22 12:31:48 +00:00
Michael Niedermayer
3a75616940 Deobfusate chroma_qp_table[1] init code.
Originally committed as revision 14334 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-22 11:56:56 +00:00
Carl Eugen Hoyos
6aaff88fd9 Revert r13542: Spatial direct mode probably also works with PAFF.
Originally committed as revision 14332 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-21 22:46:47 +00:00
Michael Niedermayer
c32867b5b6 Loop filtering with multiple slice types fix.
Fixes at least:
CABAST3_Sony_E.jsv
CABASTBR3_Sony_A.jsv
CABASTBR3_Sony_B.jsv

Originally committed as revision 14331 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-21 22:19:06 +00:00