Commit Graph

662 Commits

Author SHA1 Message Date
Michael Niedermayer 5f129a05bf Do not free sps & pps on width/height changes.
Fixes issue557.

Originally committed as revision 15414 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-25 19:01:39 +00:00
Michael Niedermayer 07dff5c7a4 Initialize next/last_picture* as the generic code does not always
set them to sane values.

Originally committed as revision 15412 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-25 14:29:35 +00:00
Michael Niedermayer 49573a87c9 Print which slices are IDR not just the slice type.
Originally committed as revision 15411 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-25 12:04:25 +00:00
Michael Niedermayer cf8bb33428 Fix CAVLC+8x8+MBAFF loop filter.
Fixes FREXT02_JVC_C.

Originally committed as revision 15410 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-25 00:41:49 +00:00
Michael Niedermayer 60c9b24df0 Field -> MBAFF direct mode can use data from fields that are not
in the reference list. Follow the spec and no comment on the sanity of this
design ...
Fixes HPCAMAPALQ_BRCM_B

Originally committed as revision 15407 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-24 23:24:24 +00:00
Michael Niedermayer aa617518b9 A few empty lines for readability.
Originally committed as revision 15385 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-22 20:46:52 +00:00
Michael Niedermayer f4d3382da2 Another try to fix temporal direct mode references.
Fixes at least
CAPAMA3_Sand_F.264
CVMAPAQP3_Sony_E.jsv

Originally committed as revision 15384 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-22 20:43:35 +00:00
Michael Niedermayer 48e025e5b6 Fix ref_shift so that it is correct for more/all? MBAFF/PAFF mixes.
Fixes at least MR9_BT_B.

Originally committed as revision 15380 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-22 02:32:22 +00:00
Michael Niedermayer 471341a7f3 indent
Originally committed as revision 15379 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-21 23:51:36 +00:00
Michael Niedermayer 53c193a9b0 Correct comment in the direct mode code.
(note, yes this is unrelated to the previous simplification, the
 code always behaved like it is documented now.)

Originally committed as revision 15378 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-21 23:49:53 +00:00
Michael Niedermayer a0ad40832f Simplify initialization of a few direct mode related variables.
Originally committed as revision 15377 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-21 23:46:59 +00:00
Michael Niedermayer 8b1fd554e1 Make MBAFF temporal direct mode closer to the spec.
Fixes at least:
CAMANL2_TOSHIBA_B
CVMANL2_TOSHIBA_B
camp_mot_mbaff0_full

Originally committed as revision 15375 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-21 02:39:09 +00:00
Michael Niedermayer 8f56e219b2 Move direct_dist_scale_factor() and direct_ref_list_init() after fill_mbaff_ref_list()
as future changes will need the mbaff lists inited.

Originally committed as revision 15374 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-21 02:23:51 +00:00
Michael Niedermayer 078f42ddae Set poc for field references in MBAFF.
Originally committed as revision 15373 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-21 02:19:45 +00:00
Michael Niedermayer a85d0c84a4 Remove fixme that is based on the assumption of !direct_8x8_inference && MBAFF.
Originally committed as revision 15370 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-19 18:53:31 +00:00
Michael Niedermayer 6a855aae94 Remove check and error message for "MBAFF + !direct_8x8_inference is not implemented"
because this mode does not exist, H.264-2007 says "When frame_mbs_only_flag is
equal to 0, direct_8x8_inference_flag shall be equal to 1."

Originally committed as revision 15369 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-19 18:49:17 +00:00
Michael Niedermayer 96b52f9e04 Make pps/sps scaling_matrix initialization closer to the spec.
This does not affect any of the conformance streams.

Originally committed as revision 15365 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-18 16:36:19 +00:00
Michael Niedermayer d464bceff2 Ensure that extradata is not parsed twice.
Fixes FRExt1_Panasonic.

Originally committed as revision 15361 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-18 15:13:15 +00:00
Jason Garrett-Glaser 67ce33162a Fix incorrect printing of brainfart cropping error in some cases in progressive mode.
Originally committed as revision 15293 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-11 00:34:39 +00:00
Michael Niedermayer 047599a4ba Rename error_resilience to error_recognition.
Originally committed as revision 15270 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-08 18:18:49 +00:00
Michael Niedermayer e4b8f1fa77 Fix artifacts of MPEG4-720I-DN-SV8K.trp caused by lack of IDR pictures and
subsequent zero POC value.

Originally committed as revision 15194 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-04 12:21:06 +00:00
Michael Niedermayer d0b41d8931 Try to support invalid h264 that does not mark IDR with POC=0.
Fixes issue576.

Originally committed as revision 15153 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-02 16:31:18 +00:00
Diego Biurrun e7327dbba7 Remove unused variable.
Originally committed as revision 14732 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-13 18:33:25 +00:00
Michael Niedermayer 2967101173 The deblock filter does not need all the intra availability stuff so do
not recalculate it.

Originally committed as revision 14689 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-11 03:08:02 +00:00
Michael Niedermayer faa7e39466 Simplify constrained_intra_pred code in fill_caches().
Originally committed as revision 14688 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-11 02:52:14 +00:00
Michael Niedermayer d1d10e9125 Support MBAFF + constrained intra prediction.
(no i would not have tried to implement this had i known what mess it is)
fixes at least:
CAMACI3_Sony_C

Originally committed as revision 14687 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-11 02:21:33 +00:00
Michael Niedermayer beca9a286c Mask bits of reference indexes properly to avoid negative numbers entangling
each other.
Fixes at least:
CAMA1_TOSHIBA_B
cama1_vtc_c
CAMA3_Sand_E
cama3_vtc_b
CAMASL3_Sony_B
CVMA1_TOSHIBA_B
CVMAQP3_Sony_D
cvmp_mot_mbaff0_full_B
FRExt/HCAMFF1_HHI
FRExt/HCHP3_HHI_A
FRExt/HVLCMFF0_Sony_B

Originally committed as revision 14683 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-10 16:10:39 +00:00
Michael Niedermayer e248cb601e Remove a few more lines of unneeded code in fill_caches() for MBAFF.
Also document why the remaining related part is apparently needed.

Originally committed as revision 14682 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-10 15:39:46 +00:00
Michael Niedermayer d50cdd82de Use the correct reference tables for interlaced MBAFF MBs in the loop filter.
Fixes at least
CAMP_MOT_MBAFF_L30
CAMP_MOT_MBAFF_L31
FRExt/FREXT01_JVC_D

Originally committed as revision 14680 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-10 02:38:51 +00:00
Michael Niedermayer 0281d32550 Do not execute the part of fill_caches() for the loopfilter that overwrites
reference indexes and motion vectors.
Fixes at least:
CVMAQP2_Sony_G

Originally committed as revision 14678 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-10 00:38:41 +00:00
Michael Niedermayer 3d11b8ce13 Remove more code that has become useless after the pairless MBAFF loop
filter cleanup.

Originally committed as revision 14676 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-09 18:11:25 +00:00
Michael Niedermayer 5f7f9719ac Remove odd pairwise deblock filtering applied to MBAFF MBs.
Originally committed as revision 14673 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-09 01:17:34 +00:00
Michael Niedermayer 2ccd25d02b Use local variabes for *stride, where local variables exist.
Originally committed as revision 14623 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-05 12:06:30 +00:00
Michael Niedermayer 7d54ecc9cb indent
Originally committed as revision 14622 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-05 11:34:46 +00:00
Michael Niedermayer 9b5fab918b Simplify l1mv/l1ref calculation.
Originally committed as revision 14621 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-05 11:33:40 +00:00
Michael Niedermayer c210fa61cf simplify y_shift/ref_shift code
Originally committed as revision 14620 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-05 11:17:23 +00:00
Michael Niedermayer cc615d2ce8 indent
Originally committed as revision 14619 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-05 11:04:49 +00:00
Michael Niedermayer d00eac6c96 Factorize some code between temporal and spatial direct mode.
Originally committed as revision 14618 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-05 11:00:17 +00:00
Michael Niedermayer 8354477edc Port b4/b8_stride code from spatial direct mode to temporal.
Fixes at least:
CAMANL3_Sand_E.264
camp_mot_picaff0_full.26l
CAPA1_TOSHIBA_B.264
CVPA1_TOSHIBA_B.264

Originally committed as revision 14546 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-05 00:15:15 +00:00
Michael Niedermayer 42de393dcb Use frame_num and reference instead of poc for matching frames for direct
mode MBs, this seems to work better with field/frame mixes. POC of both
can be the same and can be different that makes its use tricky.

Originally committed as revision 14545 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-05 00:08:32 +00:00
Michael Niedermayer 6c86c44b83 *2 /2 is wrong for PAFF references, so do not do it.
Originally committed as revision 14544 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-04 23:29:34 +00:00
Michael Niedermayer f0538030da Port col_parity code from spatial mode to temporal mode,
I also love it if people duplicate code and fix one but not the other.

Originally committed as revision 14543 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-04 23:06:45 +00:00
Michael Niedermayer 301e1057b8 The code under FRAME_MBAFF for temporal direct mode MBs is needed for PAFF as well.
Originally committed as revision 14542 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-04 22:59:53 +00:00
Michael Niedermayer fa6a6c59e0 Remove redundant code.
Originally committed as revision 14541 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-04 22:52:54 +00:00
Michael Niedermayer 7762cc3dd4 Fill ref_count/ref_poc for both fields of frames.
Originally committed as revision 14540 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-04 22:32:41 +00:00
Art Clarke 910e366817 Fix static leaks in h264.c.
Patch by Art Clarke aclarke A vlideshow D com

Originally committed as revision 14538 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-04 21:45:05 +00:00
Michael Niedermayer 45260d4faa Use ref_poc and ref_count from the correct field.
Fixes at least
MR8_BT_B.h264

Originally committed as revision 14537 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-04 11:19:54 +00:00
Michael Niedermayer 4c0d57bdef Fix dist_scale_factor for long term reference pictures.
Originally committed as revision 14536 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-04 11:17:22 +00:00
Michael Niedermayer 71041842ec Use the correct collocated field in pred_direct_motion() when it differs in parity.
Fixes at least:
FRExt/HPCAFL_BRCM_C.264
FRExt/HPCAFLNL_BRCM_C.264
FRExt/HPCVFL_BRCM_A.264
FRExt/HPCVFLNL_BRCM_A.264

Originally committed as revision 14529 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-04 02:41:19 +00:00
Michael Niedermayer aa6de49e95 Remove useless mb_field_decoding_flag setting code that was at the wrong spot.
Originally committed as revision 14519 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-03 13:11:14 +00:00
Michael Niedermayer 44e9dcf13a mb_field_decoding_flag was not initialized
Fixes at least:
MR7_BT_B.h264
Sharp_MP_PAFF_1r2.jvt
Sharp_MP_PAFF_2.jvt

Originally committed as revision 14518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-03 13:00:39 +00:00
Michael Niedermayer 2879c75ff3 Picture.ref_count/ref_poc have to be stored per field (actually also per
slice but thats a seperate bug)
Fixes at least:
CABREF3_Sand_D.264
camp_mot_fld0_full.26l
CVFI2_Sony_H.jsv
CVNLFI2_Sony_H.jsv

Originally committed as revision 14511 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-02 23:13:27 +00:00
Michael Niedermayer c1708e8dc8 Simplify intra PCM MB handling.
Originally committed as revision 14476 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-30 18:21:51 +00:00
Paul Kendall 9bec77fe8d Use #define instead of a constant. Patch by Paul Kendall.
Originally committed as revision 14463 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-29 05:39:33 +00:00
Jason Garrett-Glaser aa6a89aa79 Small h264 decoding speed optimization: while->do/while
Originally committed as revision 14459 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-28 15:42:49 +00:00
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
Michael Niedermayer 9f5c1037b1 Use slice_type_nos instead of slice_type where it makes no difference.
This way we use slice_type_nos almost everywhere which means 1 variable less
for gcc to put in a register.

Originally committed as revision 14326 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-21 19:11:41 +00:00
Michael Niedermayer 4b30289ec9 SI/SP slice support. (not bitexact)
SI untested as I did not find any samples.

Originally committed as revision 14325 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-21 18:44:57 +00:00
Michael Niedermayer 932f396f50 Remove superfluous ().
Originally committed as revision 14324 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-21 18:26:11 +00:00
Michael Niedermayer e3e6f18f16 Simplify slice type checks.
Originally committed as revision 14323 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-21 18:24:45 +00:00
Michael Niedermayer 72caa912f2 More correct ref comparison in the loop filter.
Originally committed as revision 14322 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-21 18:06:23 +00:00
Michael Niedermayer 29d05ebc7a Simplify spatial direct ref selection with FFMIN3()
Originally committed as revision 14319 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-21 01:41:56 +00:00
Michael Niedermayer 41f5c62f5c Fix used references indexes in the loop filter.
Disable filter_mb_fast() as it optimized the incorrect code.
Fixes at least:
BA3_SVA_C.264
CABA3_SVA_B.264
CABACI3_Sony_B.jsv
CAFI1_SVA_C.264
camp_mot_frm0_full.26l
CAWP5_TOSHIBA_E.264
CVFI2_SVA_C.264
CVSE3_Sony_H.jsv
CVWP2_TOSHIBA_E.264
CVWP5_TOSHIBA_E.264
SL1_SVA_B.264

Originally committed as revision 14315 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-20 18:06:41 +00:00
Michael Niedermayer 4f20b45fbe Fix h264_loop_filter_strength_mmx2() so it works with PAFF.
fixed at least:
CVFI1_Sony_D.jsv
CVFI1_SVA_C.264
MR6_BT_B.h264

Originally committed as revision 14310 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 21:53:54 +00:00
Michael Niedermayer fb19e1443b Take the brain amputated spec literally if the user asks for it (-strict 1).
That is, add 16 frames delay, cache trashing and av desync.
fixes at least the following reference bitstreams:
CABA3_Sony_C.jsv
CACQP3_Sony_D.jsv
CAMANL1_TOSHIBA_B.264
CANL3_Sony_C.jsv
CVBS3_Sony_C.jsv
CVMANL1_TOSHIBA_B.264

Originally committed as revision 14308 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 16:16:00 +00:00
Michael Niedermayer 2a811db238 Make the automatic has_b_frames increasing code increase it up to the
same maximum that can be achieved by specifying the value in the bitstream.

Originally committed as revision 14302 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 15:37:52 +00:00
Michael Niedermayer 28bb9eb24b Try to fix my latest 100l fate SVQ3 breakage.
Originally committed as revision 14300 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 12:21:09 +00:00
Michael Niedermayer 801b27fa7c Remove apparently unneeded out!=NULL check.
Originally committed as revision 14299 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 11:57:29 +00:00
Michael Niedermayer 3eaa6d0e56 Simplify picture output code.
Originally committed as revision 14298 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 11:11:48 +00:00
Michael Niedermayer 6b476f05e3 Remove useless #if 0 code.
Originally committed as revision 14297 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 10:47:25 +00:00
Michael Niedermayer 7c0efeccfa Do not forget marking disposed delayed pics as unused.
Fixes issue335

Originally committed as revision 14296 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 03:33:42 +00:00
Michael Niedermayer 79f4494a04 indent
Originally committed as revision 14292 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 03:17:44 +00:00
Michael Niedermayer 0ab515e935 simplify
Originally committed as revision 14291 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 03:13:11 +00:00
Michael Niedermayer df8a7dff29 Remove delayed_output_pic, I do not understand what this variable was good for.
It is simpler and might be faster now.

Originally committed as revision 14289 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 02:53:57 +00:00
Michael Niedermayer 1b547abaa3 Drop out of order pics even if bitstream_restriction_flag is set.
Originally committed as revision 14288 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-19 02:44:17 +00:00
Michael Niedermayer 197ea52443 Make frames non reference by default, so they are disposed of automatically
in MPV_frame_start() if we break out due to an error at a random place.
Fixes issue334

Originally committed as revision 14283 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-18 20:59:17 +00:00
Michael Niedermayer 1d42f41091 indent
Originally committed as revision 14258 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-16 17:51:24 +00:00
Michael Niedermayer 7a9dba3cd6 SVQ3 uses the JPEG variant of YUV 4:2:0.
Fixes issue256

Originally committed as revision 14257 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-16 17:48:47 +00:00
Alexander Strange 64b9d48f76 Move the size of the H264Context delayed_pic array into a #define.
This improves readability by getting rid of some magic numbers.

Originally committed as revision 14248 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-15 21:30:04 +00:00
Måns Rullgård e1f15d3836 H264: fix index range assert() in remove_short_at_index()
Originally committed as revision 14233 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-14 19:17:13 +00:00
Jason Garrett-Glaser 3a8322b133 H264: Fix decoding with CABAC/delta_qp/PCM macroblocks.
Patch by Jason Garrett-Glaser (darkshikari gmail com)

Originally committed as revision 14160 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-11 02:07:57 +00:00
Michael Niedermayer 7445f9cc67 fix IPCM_decode_error.h264
Originally committed as revision 14135 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-09 06:03:59 +00:00
Alexander Strange 58cc7dd9fc Cosmetics: split a long line.
Originally committed as revision 14055 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-02 22:28:47 +00:00
Alexander Strange 92ed1ec957 Use get_cabac_bypass_sign instead of an if/else.
Originally committed as revision 14054 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-02 22:25:17 +00:00
Alexander Strange 142ee5d73d Reorder the if/else for residual cats to match gcc's branch prediction.
Originally committed as revision 14053 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-02 22:20:06 +00:00
Alexander Strange 47775cb8de Simplify loop condition for readability.
Originally committed as revision 14052 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-02 22:15:05 +00:00
Alexander Strange 9f734c3b57 Reindent.
Originally committed as revision 14051 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-02 22:12:01 +00:00
Alexander Strange 9588ec340c Clone decode_cabac_residual() for DC residuals, to get rid of a bunch of branches in the main loop.
Originally committed as revision 14050 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-02 22:08:12 +00:00
Alexander Strange 2e254bc583 Don't generate two copies of hl_decode_mb() under ENABLE_SMALL.
(assuming your compiler removes unused static functions)

Originally committed as revision 14049 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-02 22:03:53 +00:00
Alexander Strange fedec603db Don't test for H264 encoding unless an encoder exists.
Originally committed as revision 14048 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-02 21:46:18 +00:00
Stefano Sabatini fe4bf37455 Make AVCodec long_names definition conditional depending on CONFIG_SMALL.
Originally committed as revision 13759 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-06-12 21:50:13 +00:00
Carl Eugen Hoyos 7e14f14584 Warn about unimplemented H264 feature.
Originally committed as revision 13542 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-29 23:16:12 +00:00
Pascal Massimino ae899d12ae in TRUNCATED mode, use residual fragments in ParseContext
for decoding the very last frame.

Originally committed as revision 13538 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-29 20:09:45 +00:00
Diego Biurrun 9c852bcf58 cosmetics: spelling typo fixes
Originally committed as revision 13489 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-28 09:20:59 +00:00
Diego Biurrun f4433de9ef consistency cosmetics: indices --> indexes
Originally committed as revision 13444 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-26 23:14:25 +00:00
Michael Niedermayer 4806b9226c print direct_spatial_mv_pred
Originally committed as revision 13409 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-26 01:06:15 +00:00
Alexander Strange bff2266a7f Remove newly unused variables.
Originally committed as revision 13127 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-11 19:22:28 +00:00
Alexander Strange d2b54ec801 Use h->mb_xy directly in decode_cabac_residual().
Originally committed as revision 13126 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-11 19:18:39 +00:00
Alexander Strange 64514ee8de Store mb_xy in H264Context and only calculate it once per MB.
Originally committed as revision 13125 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-11 19:16:21 +00:00
Carl Eugen Hoyos e0a0c85dbd One const per declaration is enough.
Originally committed as revision 13079 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-08 14:01:44 +00:00
Jason Garrett-Glaser 144783887c Use a state machine to reduce branching logic in decode_cabac_residual.
Patch by Jason Garrett-Glaser (darkshikari gmail com)

Originally committed as revision 13060 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-04 22:39:12 +00:00